/* ============================================
   Application Engine — Marketing Site
   Design tokens sourced from lib/theme/app_theme.dart (AppColors)
   ============================================ */

/* ---------- Self-hosted fonts ----------
   Fontsource v5.3.0 (same binaries as Google Fonts), SIL OFL 1.1 —
   licences in /fonts/LICENSE-*.txt. The latin-ext files only download
   if a page uses a character in their unicode-range. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/fraunces-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/fraunces-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #221527;
  --ink-soft: #4A3A4E;
  --coral: #FF5A36;
  --coral-deep: #E23F1C;
  --green: #2FBF71;
  --sunbeam: #FFC93C;
  --plum-pop: #A855F7;
  --canvas: #FFF8F3;
  --canvas-alt: #FFEFE4;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max-width: 1120px;
  --radius-pill: 999px;
  --radius-card: 20px;
  --rule: rgba(34, 21, 39, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--plum-pop);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:focus-visible { border-radius: var(--radius-pill); }

.btn-primary {
  background: var(--coral);
  color: var(--canvas);
}

.btn-primary:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--canvas);
}

.btn-disabled {
  cursor: default;
  opacity: 0.55;
}

.btn-disabled:hover {
  transform: none;
}

.btn-primary.btn-disabled:hover { background: var(--coral); }
.btn-ghost.btn-disabled:hover { background: transparent; color: var(--ink); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 243, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(34, 21, 39, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 34px;
  height: 34px;
}

.footer .brand { font-size: 18px; }
.footer .brand img { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 16px; }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--coral-deep);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  max-width: 15ch;
}

.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

.hero-video-frame {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(34, 21, 39, 0.35);
}

.hero-video-frame video {
  width: 100%;
  height: auto;
}

/* ---------- Intro band ---------- */

.intro-band {
  background: var(--canvas-alt);
  padding: 56px 0;
}

.intro-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 42ch;
  margin: 0 auto;
  text-align: center;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

.section-tight-top { padding-top: 0; }

.section-head {
  max-width: 56ch;
  margin: 0 0 56px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 0 0 14px;
  line-height: 1.15;
}

.section-head p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- How it works: 5 even columns ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.step {
  padding: 0 20px 32px;
}

.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step:not(:last-child) { border-right: 1px solid var(--rule); }

.step-index {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--coral-deep);
  margin: 28px 0 14px;
}

.step h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.step p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Free vs subscription (side by side, no visuals until real screenshots) ---------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(34, 21, 39, 0.1);
}

.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  background: rgba(47, 191, 113, 0.12);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.tag-paid {
  color: var(--plum-pop);
  background: rgba(168, 85, 247, 0.12);
}

.value-copy h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 12px;
}

.value-copy p {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 42ch;
}

/* ---------- Pricing plans ---------- */

.plans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 56px 0 24px;
}

.plans-head h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0;
}

.currency-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--canvas-alt);
  border-radius: var(--radius-pill);
}

.currency-toggle[hidden] { display: none; }

.currency-toggle button {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  cursor: pointer;
}

.currency-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.plan {
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 32px;
}

.plan-featured {
  border: 2px solid var(--ink);
}

.plan-name {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--sunbeam);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.plan-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  margin: 0 0 8px;
}

.plan-price .per {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
}

.plan-note {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  flex-grow: 1;
}

.plan-note strong { color: var(--ink); }

.plan .btn { align-self: flex-start; }

.plans-fine-print {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 16px 0 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--canvas);
  border-radius: 28px;
  padding: 64px 56px;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0 0 16px;
}

.cta-band p {
  font-size: 17px;
  color: rgba(255, 248, 243, 0.75);
  margin: 0 0 32px;
}

/* ---------- Legal pages (privacy, terms) ---------- */

.legal {
  max-width: 72ch;
  padding-block: 64px 88px;
}

.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 8px;
}

.legal-draft-notice {
  display: inline-block;
  background: var(--canvas-alt);
  border: 1px solid var(--sunbeam);
  border-radius: var(--radius-card);
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 20px;
}

.legal .legal-updated {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 40px;
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  font-size: 16px;
  color: var(--ink-soft);
}

.legal ul,
.legal ol { padding-left: 1.4em; }

.legal a { color: var(--coral-deep); }

.legal-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}

.legal-table thead th {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}

.legal-table tbody th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 88px;
}

.not-found h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 24px;
}

/* ---------- Footer ---------- */

.footer {
  padding: 56px 0 40px;
  border-top: 1px solid rgba(34, 21, 39, 0.1);
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-links a:hover { color: var(--ink); }

.footer-copy {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .step { padding: 0 14px 28px; }
  .step h3 { font-size: 16px; }
  .step p { font-size: 14px; }
}

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; border-bottom: none; }
  .step,
  .step:first-child,
  .step:last-child { padding: 0 0 24px; border-right: none; border-bottom: 1px solid var(--rule); }
  .value-grid { grid-template-columns: 1fr; gap: 32px; }
  .plans { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .cta-band { padding: 48px 24px; }
}

@media (max-width: 480px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .nav-inner { padding: 14px 20px; }
  .btn { padding: 11px 20px; font-size: 14px; }
  .plan { padding: 24px; }
  .plan-price { font-size: 38px; }
}
