/* Ahead — marketing site. Palette mirrors AppColors in lib/theme/app_theme.dart. */

@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("assets/fonts/manrope-700.woff") format("woff"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("assets/fonts/manrope-800.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-600.woff") format("woff"); }

:root {
  --paper: #fffbeb;
  --card: #f8f3f0;
  --ink: #0f172a;
  --ink-soft: rgba(15, 23, 42, 0.68);
  --ink-faint: rgba(15, 23, 42, 0.45);
  --rule: rgba(15, 23, 42, 0.1);
  --primary: #92400e;
  --primary-ink: #ffffff;
  --accent: #6366f1;
  --red: #dc2626;
  --shadow: 0 30px 60px -25px rgba(70, 40, 10, 0.35), 0 12px 24px -12px rgba(70, 40, 10, 0.2);
  --radius-lg: 28px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1410;
    --card: #2e241c;
    --ink: #f5f0e8;
    --ink-soft: rgba(245, 240, 232, 0.72);
    --ink-faint: rgba(245, 240, 232, 0.48);
    --rule: rgba(245, 240, 232, 0.12);
    --primary: #d8975a;
    --primary-ink: #1c1410;
    --accent: #a5b4fc;
    --red: #f87171;
    --shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: "Manrope", "Inter", system-ui, sans-serif; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }

.wrap { width: min(var(--measure), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--card); padding: 8px 14px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { padding-block: 20px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 22px/1 "Manrope", sans-serif; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(24px, 6vw, 72px) clamp(56px, 9vw, 112px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(44px, 6.2vw, 76px); font-weight: 800; letter-spacing: -0.04em; }
.hero h1 .strike { position: relative; display: inline-block; color: var(--ink-faint); }
.hero h1 .strike::after {
  content: ""; position: absolute; left: -4%; right: -4%; top: 52%; height: 0.09em;
  background: var(--red); border-radius: 1em; transform: rotate(-6deg); transform-origin: left center;
  animation: strike 0.7s cubic-bezier(.6, 0, .2, 1) 0.5s both;
}
@keyframes strike { from { transform: rotate(-6deg) scaleX(0); } to { transform: rotate(-6deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hero h1 .strike::after { animation: none; } }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 34ch; margin: 24px 0 32px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 18px;
  border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font: 500 11px/1.2 "Inter", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.store-badge strong { display: block; font: 700 18px/1.2 "Manrope", sans-serif; }
.store-badge[aria-disabled="true"] { cursor: default; }
.cta-note { font-size: 14px; color: var(--ink-faint); }

/* Phone frame around real app screenshots */
.phone {
  position: relative; width: min(100%, 340px); aspect-ratio: 390 / 844; margin-inline: auto;
  border-radius: 46px; padding: 10px; background: #14100d; box-shadow: var(--shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 37px; }
.hero-visual { position: relative; }
.hero-visual .phone { transform: rotate(2.5deg); }
.hero-visual::before {
  /* the page behind: a torn-off calendar sheet */
  content: ""; position: absolute; inset: 6% 8% -4% 2%; background: var(--card);
  border-radius: var(--radius-lg); transform: rotate(-5deg); z-index: -1;
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 24px; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 16px 0 0; }

.rule { border: 0; border-top: 1px dashed var(--rule); margin: 0; }

/* Feature rows: text + screenshot, alternating */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(40px, 6vw, 72px); }
.feature + .feature { border-top: 1px dashed var(--rule); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature > *, .hero .wrap > *, .privacy-band > * { min-width: 0; } /* let grid columns shrink below image widths */
.feature-text h3 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; }
.feature-text p { color: var(--ink-soft); margin: 14px 0 0; max-width: 46ch; }
.feature-text ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-text li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.feature-text li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 12px;
  border: 2px solid var(--primary); border-radius: 50%;
}
.feature-num { font: 800 15px/1 "Manrope", sans-serif; color: var(--primary); letter-spacing: 0.1em; margin-bottom: 14px; display: block; }
.feature .phone { width: min(100%, 300px); }
.shot-flat { border-radius: 24px; box-shadow: var(--shadow); width: min(100%, 420px); margin-inline: auto; }

/* Small extras grid */
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.extra { background: var(--card); border-radius: 20px; padding: 24px; }
.extra h3 { font-size: 19px; font-weight: 700; }
.extra p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }
.extra .ico { width: 36px; height: 36px; color: var(--primary); margin-bottom: 14px; }

/* Privacy band */
.privacy-band { background: var(--card); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.privacy-band h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; }
.privacy-band p { color: var(--ink-soft); margin: 16px 0 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.checks svg { width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.checks strong { display: block; font-weight: 600; }
.checks span { color: var(--ink-soft); font-size: 15px; }

/* Final CTA */
.closing { text-align: center; }
.closing h2 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 800; }
.closing p { color: var(--ink-soft); margin: 16px auto 28px; max-width: 40ch; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { padding-block: 40px 56px; border-top: 1px dashed var(--rule); font-size: 14px; color: var(--ink-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(24px, 5vw, 56px) 80px; }
.legal .wrap { max-width: 720px; }
.legal h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; }
.legal .meta { color: var(--ink-faint); font-size: 15px; margin: 12px 0 32px; }
.legal .summary { background: var(--card); border-radius: 20px; padding: 20px 24px; margin-bottom: 40px; }
.legal .summary p { margin: 0; }
.legal h2 { font-size: 24px; font-weight: 800; margin: 44px 0 12px; }
.legal h3 { font-size: 18px; font-weight: 700; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; }
.legal td { color: var(--ink-soft); }
.legal .table-scroll { overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap, .feature, .privacy-band { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .hero-visual { max-width: 320px; margin-inline: auto; }
  .extras { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .extras { grid-template-columns: 1fr; }
  .site-nav .hide-sm { display: none; }
}
