/* =========================================================================
   AppScenes landing page — pure CSS3
   ========================================================================= */

:root {
  --bg: #1b273f;
  --bg-soft: #293852;
  --surface: #33425e;
  --surface-2: #3f5070;
  --border: #556585;
  --text: #f1f5f9;
  --text-dim: #c3cde0;
  --text-mute: #93a2bf;
  --primary: #6366f1;
  --primary-hover: #7c7ff5;
  --accent: #22d3ee;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(8, 14, 28, 0.45);
  --shadow-sm: 0 6px 18px rgba(8, 14, 28, 0.28);
  --maxw: 1160px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------- themes
   The SPA stores the preference under the same localStorage key, so the
   landing page and the app share one light/dark choice. */
[data-theme="light"] {
  --bg: #eef2f8;
  --bg-soft: #e6ecf5;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #d7dfeb;
  --text: #0f172a;
  --text-dim: #475569;
  --text-mute: #64748b;
  --accent: #0891b2;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] body {
  background-image: radial-gradient(1200px 800px at 80% -10%, #dbe4f3 0%, rgba(238, 242, 248, 0) 58%);
}
[data-theme="light"] .site-header { background: rgba(238, 242, 248, 0.82); }
[data-theme="light"] .site-header.is-scrolled { background: rgba(238, 242, 248, 0.96); }
[data-theme="light"] .pill,
[data-theme="light"] .strip-item { background: rgba(255, 255, 255, 0.78); }
[data-theme="light"] .section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(238, 242, 248, 0));
  border-color: var(--border);
}
[data-theme="light"] .feature { background: linear-gradient(180deg, #ffffff, #f5f8fc); }
[data-theme="light"] .step,
[data-theme="light"] .faq-item { background: #ffffff; }
[data-theme="light"] .price-card { background: linear-gradient(180deg, #ffffff, #f5f8fc); }
[data-theme="light"] .price-card.is-featured {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), #ffffff);
  box-shadow: 0 0 0 1px var(--primary), 0 24px 60px rgba(99, 102, 241, 0.18);
}
[data-theme="light"] .legal-hero { background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent); }
[data-theme="light"] .legal-toc { background: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .callout { background: rgba(34, 211, 238, 0.1); }
[data-theme="light"] .site-footer { background: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .cookie-banner { background: rgba(255, 255, 255, 0.97); }
[data-theme="light"] .cta-band {
  background:
    radial-gradient(600px 240px at 20% 50%, rgba(99, 102, 241, 0.18), transparent 70%),
    linear-gradient(120deg, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.08));
}
@media (max-width: 860px) {
  [data-theme="light"] .main-nav { background: rgba(238, 242, 248, 0.98); }
  [data-theme="light"] .main-nav > a { border-bottom-color: var(--border); }
}

/* ---------------------------------------------------------- theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.18s, background 0.18s;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* Logos: logo-light.png is for the dark theme, logo.png for the light theme. */
.logo .logo-on-light { display: none; }
[data-theme="light"] .logo .logo-on-dark { display: none; }
[data-theme="light"] .logo .logo-on-light { display: block; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 800px at 80% -10%, #3b4c6b 0%, rgba(27, 39, 63, 0) 58%);
  background-repeat: no-repeat;
  background-position: top center;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: 820px; }

.grad {
  background: linear-gradient(100deg, var(--accent), #a78bfa 60%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.06s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { background: linear-gradient(180deg, #8b8ef7, var(--primary-hover)); }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--surface); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(27, 39, 63, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(27, 39, 63, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--primary), #8b5cf6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text span { color: var(--accent); }
.logo-img {
  height: 34px;
  width: auto;
  display: block;
}

.main-nav { display: flex; align-items: center; gap: 1.35rem; margin-left: auto; }
.main-nav > a { color: var(--text-dim); font-size: 14px; font-weight: 600; }
.main-nav > a:hover { color: var(--text); text-decoration: none; }
.nav-auth { display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 0; }
.hero-glow {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 620px;
  background:
    radial-gradient(500px 320px at 18% 30%, rgba(99, 102, 241, 0.35), transparent 70%),
    radial-gradient(520px 340px at 85% 15%, rgba(34, 211, 238, 0.22), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-bottom: 3rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(51, 66, 94, 0.6);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.lead { font-size: 1.08rem; color: var(--text-dim); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.6rem 0 1.4rem; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-mute);
  font-size: 13.5px;
}
.hero-points li { display: flex; align-items: center; gap: 0.45rem; }
.hero-points li::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ---- hero mock editor ---- */
.hero-visual { perspective: 1400px; }
.mock-window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(3deg);
  transition: transform 0.5s ease;
}
.hero-visual:hover .mock-window { transform: rotateY(0) rotateX(0); }
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: rgba(27, 39, 63, 0.6);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }
.mock-title { margin-left: 0.6rem; color: var(--text-mute); font-size: 11.5px; font-weight: 600; }
.mock-body { display: grid; grid-template-columns: 92px 1fr 104px; min-height: 330px; }
.mock-side { padding: 0.7rem; border-right: 1px solid var(--border); background: rgba(27, 39, 63, 0.35); }
.mock-side.right { border-right: 0; border-left: 1px solid var(--border); }
.mock-side-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin: 0.2rem 0 0.5rem;
  font-weight: 700;
}
.mock-thumb {
  position: relative;
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(150deg, #4a5d82, #3a4a6b);
  border: 1px solid var(--border);
  margin-bottom: 0.45rem;
}
.mock-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25); }
.mock-thumb span {
  position: absolute; top: -6px; left: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  background: var(--surface-2); color: var(--text-dim);
}
.mock-chip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mock-chip-row i { height: 20px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); }
.mock-canvas {
  display: grid;
  place-items: center;
  padding: 1rem;
  background-color: #34435f;
  background-image:
    linear-gradient(45deg, #3d4d6b 25%, transparent 25%),
    linear-gradient(-45deg, #3d4d6b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3d4d6b 75%),
    linear-gradient(-45deg, transparent 75%, #3d4d6b 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.mock-phone {
  position: relative;
  width: 150px;
  height: 300px;
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(160deg, #566a90, #2c3a56);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.mock-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}
.mock-screen {
  position: relative;
  height: 100%;
  border-radius: 18px;
  background: linear-gradient(165deg, #6366f1 0%, #22d3ee 100%);
  padding: 34px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mock-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.mock-heading { height: 10px; width: 92%; border-radius: 999px; background: rgba(255, 255, 255, 0.92); }
.mock-heading.short { width: 62%; }
.mock-cta {
  margin-top: auto;
  height: 26px; width: 88px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.mock-frame-glow {
  position: absolute; inset: 0;
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
  pointer-events: none;
}
.mock-prop { height: 26px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 0.45rem; }
.mock-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 0.6rem; }
.mock-swatches i { height: 18px; border-radius: 50%; }
.mock-swatches i:nth-child(1) { background: #6366f1; }
.mock-swatches i:nth-child(2) { background: #22d3ee; }
.mock-swatches i:nth-child(3) { background: #f43f5e; }
.mock-swatches i:nth-child(4) { background: #f59e0b; }
.mock-layer { height: 20px; border-radius: 5px; background: rgba(51, 66, 94, 0.7); border: 1px solid var(--border); margin-bottom: 0.35rem; }

.hero-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid var(--border);
}
.strip-label { color: var(--text-mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.strip-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.strip-item {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(51, 66, 94, 0.5);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- sections */
.section { padding: 5rem 0; scroll-margin-top: 84px; }
.section-alt {
  background: linear-gradient(180deg, rgba(41, 56, 82, 0.35), rgba(27, 39, 63, 0));
  border-top: 1px solid rgba(85, 101, 133, 0.35);
  border-bottom: 1px solid rgba(85, 101, 133, 0.35);
}
.section-head { max-width: 660px; margin: 0 auto 3rem; text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-sub { color: var(--text-dim); font-size: 1.02rem; margin: 0; }

/* ---------------------------------------------------------------- features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feature {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(51, 66, 94, 0.65), rgba(41, 56, 82, 0.4));
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.feature h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.feature p { color: var(--text-dim); font-size: 14.5px; margin: 0; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------ free tools */
.tool-guarantees {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: -1rem auto 2rem;
}
.tool-guarantees span {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(51, 66, 94, 0.5);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
}
[data-theme="light"] .tool-guarantees span { background: rgba(255, 255, 255, 0.8); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tool-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover { color: inherit; }
.tool-card h3 { color: var(--text); }
.tool-card p { flex: 1 1 auto; }
.tool-card .tool-open {
  margin-top: 0.9rem;
  color: var(--primary-hover);
  font-weight: 650;
  font-size: 0.9rem;
}
[data-theme="light"] .tool-card .tool-open { color: var(--primary); }
.tool-all { text-align: center; margin: 2rem 0 0; }
.tool-more {
  text-align: center;
  margin: 1rem auto 0;
  max-width: 760px;
  color: var(--text-mute);
  font-size: 0.88rem;
}
.tool-more a { color: var(--text-dim); }
.tool-more a:hover { color: var(--text); }
@media (max-width: 980px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.7rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(51, 66, 94, 0.5);
}
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(150deg, var(--primary), #8b5cf6);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

/* ---------------------------------------------------------------- templates */
.template-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.filter {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.filter:hover { color: var(--text); background: var(--surface); }
.filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tpl {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.18s, border-color 0.18s, opacity 0.2s;
}
.tpl:hover { transform: translateY(-4px); border-color: var(--accent); }
.tpl.is-hidden { display: none; }
.tpl-tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  backdrop-filter: blur(4px);
}
.tpl-phone {
  width: 62%;
  height: 78%;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  padding: 22% 12% 12%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tpl-bar { height: 8px; width: 100%; border-radius: 999px; background: rgba(255, 255, 255, 0.9); }
.tpl-line { height: 7px; width: 86%; border-radius: 999px; background: rgba(255, 255, 255, 0.55); }
.tpl-line.short { width: 58%; }

.tpl-a { background: linear-gradient(160deg, #33425e, #1b273f); }
.tpl-b { background: linear-gradient(160deg, #ef4444, #b91c1c); }
.tpl-c { background: linear-gradient(160deg, #6366f1, #22d3ee); }
.tpl-d { background: linear-gradient(160deg, #0f766e, #134e4a); }
.tpl-e { background: linear-gradient(160deg, #f1f5f9, #cbd5e1); }
.tpl-e .tpl-phone { background: rgba(15, 23, 42, 0.9); }
.tpl-f { background: linear-gradient(160deg, #7c3aed, #4c1d95); }
.tpl-g { background: linear-gradient(160deg, #f59e0b, #ec4899); }
.tpl-h { background: linear-gradient(160deg, #0ea5e9, #1e3a8a); }

/* ---------------------------------------------------------------- pricing */
.billing-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(27, 39, 63, 0.6);
  margin: 0 auto 2.2rem;
  width: max-content;
}
.section-head + .billing-toggle { display: flex; }
.billing-toggle .toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.billing-toggle .toggle-btn.is-active { background: var(--primary); color: #fff; }
.save-badge {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.toggle-btn.is-active .save-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.2rem; align-items: stretch; }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(51, 66, 94, 0.7), rgba(41, 56, 82, 0.45));
}
.price-card.is-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 24px 60px rgba(99, 102, 241, 0.25);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.22), rgba(41, 56, 82, 0.6));
}
.ribbon {
  position: absolute;
  top: -13px; left: 50%; transform: translateX(-50%);
  padding: 0.22rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.price-card h3 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.price-desc { color: var(--text-mute); font-size: 13.5px; margin: 0 0 1.1rem; }
.price { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.period { color: var(--text-mute); font-size: 14px; font-weight: 600; }
.strike { color: var(--text-mute); text-decoration: line-through; font-size: 1.1rem; font-weight: 700; }
.price-note { color: var(--success); font-size: 12.5px; font-weight: 700; margin: 0 0 0.6rem; }
.price-features { list-style: none; margin: 1.1rem 0 1.6rem; padding: 0; display: grid; gap: 0.55rem; }
.price-features li { position: relative; padding-left: 1.7rem; color: var(--text-dim); font-size: 14px; }
.price-features li::before {
  content: '';
  position: absolute; left: 0; top: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.price-card .btn { margin-top: auto; }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 0.7rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(51, 66, 94, 0.5);
  overflow: hidden;
}
.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1rem 3rem 1rem 1.1rem;
  font-weight: 700;
  font-size: 15px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  position: absolute; right: 1.15rem; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item p { margin: 0; padding: 0 1.1rem 1.1rem; color: var(--text-dim); font-size: 14.5px; }

/* ---------------------------------------------------------------- cta */
.cta-band {
  padding: 3.5rem 0;
  background:
    radial-gradient(600px 240px at 20% 50%, rgba(99, 102, 241, 0.35), transparent 70%),
    linear-gradient(120deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.12));
  border-top: 1px solid var(--border);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.3rem; }
.cta-inner p { color: var(--text-dim); margin: 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: rgba(20, 30, 49, 0.7); padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; }
.footer-tagline { color: var(--text-mute); font-size: 13.5px; margin-top: 0.8rem; max-width: 22rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); margin-bottom: 0.3rem; }
.footer-col a { color: var(--text-dim); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 22px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 13px;
}
.footer-bottom p { margin: 0; }
.footer-legal-links { display: flex; gap: 0.5rem; align-items: center; }

/* ---------------------------------------------------------------- cookie */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(680px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(27, 39, 63, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 13px; color: var(--text-dim); flex: 1; }
.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------------------------------------------------------- reveal
   Only hide elements when scripting is available, so the page remains fully
   readable with JavaScript disabled. app.js adds `.is-visible` on scroll. */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =========================================================================
   Legal pages (terms / privacy / imprint)
   ========================================================================= */
.legal-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(41, 56, 82, 0.4), transparent);
}
.legal-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.legal-hero p { color: var(--text-dim); margin: 0; }
.legal-meta { color: var(--text-mute); font-size: 13px; margin-top: 0.6rem; }
.legal-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding: 3rem 0 5rem;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: rgba(51, 66, 94, 0.45);
}
.legal-toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 0.35rem; }
.legal-toc li { counter-increment: toc; }
.legal-toc a { color: var(--text-dim); font-size: 13.5px; display: block; padding: 0.2rem 0; }
.legal-toc a::before { content: counter(toc) '. '; color: var(--text-mute); }
.legal-toc a:hover { color: var(--accent); text-decoration: none; }
.legal-body { max-width: 760px; }
.legal-body h2 {
  font-size: 1.35rem;
  margin: 2.4rem 0 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.legal-body p, .legal-body li { color: var(--text-dim); font-size: 14.8px; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.legal-body a { overflow-wrap: anywhere; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: 14px; }
.legal-body th, .legal-body td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-body th { color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.legal-body td { color: var(--text-dim); }
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.07);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.placeholder { color: #fcd34d; font-weight: 600; }
.back-home { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-dim); font-size: 13.5px; font-weight: 600; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-visual { max-width: 620px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .legal-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  .legal-toc { position: static; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.8rem 1.1rem 1.2rem;
    background: rgba(27, 39, 63, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a { padding: 0.65rem 0.2rem; border-bottom: 1px solid rgba(85, 101, 133, 0.3); }
  .nav-auth { margin-top: 0.6rem; }
  .nav-auth .btn { flex: 1; }
  .header-inner { position: relative; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding: 3.5rem 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 3rem; }
  .hero-actions .btn { flex: 1; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-actions { justify-content: flex-end; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
