/* Daylo marketing + legal site.
   Tokens mirror the app theme exactly (see BRANDING.md); dark theme uses the
   app's dark palette via prefers-color-scheme. Legal pages share this sheet. */

:root {
  --canvas: #FAF6EF;
  --surface: #FFFFFF;
  --inset: #F3ECE0;
  --ink: #2B2A27;
  --ink-2: #8C857A;
  --ink-3: #B7AF9F;
  --hairline: #EBE3D6;
  --terra: #E07A5F;
  --terra-dark: #C8624A;
  --terra-soft: #F6DDD2;
  --band: #F6DDD2;
  --night: #1A1916;
  --night-surface: #242220;
  --night-ink: #F2ECE2;
  --night-ink-2: #A8A096;
  --shadow: 0 30px 70px rgba(43, 42, 39, 0.18);
  --shadow-big: 0 44px 110px rgba(43, 42, 39, 0.24);
  --radius: 22px;
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1A1916;
    --surface: #242220;
    --inset: #2F2C28;
    --ink: #F2ECE2;
    --ink-2: #A8A096;
    --ink-3: #7A746B;
    --hairline: #34302B;
    --terra: #E8876C;
    --terra-dark: #EFA890;
    --terra-soft: #3A2A24;
    --band: #242220;
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    --shadow-big: 0 44px 110px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none !important; transform: none !important; opacity: 1 !important; }
}
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  overflow-x: hidden;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 6px; }

/* ── Header ─────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; text-decoration: none; color: var(--ink); letter-spacing: -0.02em; }
.brand .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--terra); display: inline-block; flex: none; }
.nav nav { display: flex; align-items: center; }
.nav a.link { color: var(--ink-2); text-decoration: none; margin-left: 26px; font-weight: 600; font-size: 15px; }
.nav a.link:hover { color: var(--terra-dark); }
.nav .cta { margin-left: 26px; padding: 10px 20px; font-size: 14px; }
@media (max-width: 720px) { .nav a.link { display: none; } .nav .cta { margin-left: 0; } }

/* ── Buttons ────────────────────────────────────────────── */
.cta {
  display: inline-block; background: var(--terra); color: #FFF7F2; text-decoration: none;
  font-weight: 700; padding: 16px 30px; border-radius: 999px; font-size: 16px;
  transition: transform .15s ease, background .15s ease;
}
.cta:hover { background: var(--terra-dark); transform: translateY(-1px); }
.cta.secondary { background: transparent; color: var(--terra-dark); border: 2px solid var(--terra); }
.cta.secondary:hover { background: var(--terra-soft); }
.cta.disabled,
.cta[aria-disabled="true"] {
  background: var(--terra-soft);
  color: var(--terra-dark);
  cursor: default;
  pointer-events: none;
}
.cta.disabled:hover,
.cta[aria-disabled="true"]:hover {
  background: var(--terra-soft);
  transform: none;
}

/* ── Eyebrow + headings ─────────────────────────────────── */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); }
h1, h2 { text-wrap: balance; }
.hl { color: var(--terra); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
  padding: 84px 0 40px; min-height: 620px;
}
.hero h1 { font-size: clamp(44px, 6vw, 76px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 22px; }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 30em; margin: 0 0 30px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

/* Phone stage: backdrop circle + tilted device + floating UI chips */
.stage { position: relative; display: flex; justify-content: center; padding: 30px 0; }
.stage::before {
  content: ""; position: absolute; inset: auto;
  width: min(520px, 92%); aspect-ratio: 1; border-radius: 50%;
  background: var(--terra-soft); top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.device {
  position: relative; width: min(310px, 74vw);
  border: 10px solid #2B2A27; border-radius: 42px; overflow: hidden;
  box-shadow: var(--shadow-big); background: #2B2A27;
}
.device img { display: block; width: 100%; height: auto; }
.stage .device { transform: rotate(-4deg); }
.float {
  position: absolute; z-index: 3; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow); padding: 13px 18px;
  display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px;
}
.float .fcheck {
  width: 26px; height: 26px; border-radius: 50%; background: #A8728A; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800;
}
.float .fstrike { text-decoration: line-through; color: var(--ink-2); }
.float.f1 { left: 2%; top: 16%; transform: rotate(-4deg); }
.float.f2 { right: 0%; bottom: 18%; transform: rotate(3deg); }
.float .fdot { width: 10px; height: 10px; border-radius: 50%; background: var(--terra); flex: none; }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-head { max-width: 620px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 14px; }
.section-head p { color: var(--ink-2); margin: 0; }

/* Marquee feature rows */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px);
  align-items: center; padding: 56px 0;
}
.feature .shot { display: flex; justify-content: center; position: relative; }
.feature .shot::before {
  content: ""; position: absolute; width: min(400px, 88%); aspect-ratio: 1;
  border-radius: 44px; background: var(--band);
  top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-6deg);
}
.feature:nth-of-type(even) .shot::before { transform: translate(-50%, -50%) rotate(5deg); }
.feature .device { width: min(280px, 68vw); }
.feature:nth-of-type(odd) .device { transform: rotate(3deg); }
.feature:nth-of-type(even) .device { transform: rotate(-3deg); }
.feature:nth-of-type(even) .shot { order: 2; }
.feature h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.06; margin: 0 0 16px; }
.feature p { color: var(--ink-2); max-width: 26em; margin: 0 0 20px; }
.feature ul { margin: 0; padding: 0; list-style: none; }
.feature li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); font-size: 15px; margin-bottom: 10px; }
.feature li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--terra); flex: none; transform: translateY(-1px); }
.feature li strong { color: var(--ink); font-weight: 700; }

/* Night band (always dark, both themes) */
.night {
  background: var(--night); color: var(--night-ink);
  border-radius: 32px; padding: 64px clamp(28px, 6vw, 80px); margin: 40px 0;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  overflow: hidden; position: relative;
}
.night .eyebrow { color: var(--night-ink-2); }
.night h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 16px; }
.night .hl { color: #E8876C; }
.night p { color: var(--night-ink-2); max-width: 26em; margin: 0; }
.night .device { border-color: #34302B; background: #34302B; transform: rotate(4deg); margin: -10px 0 -90px; width: min(280px, 66vw); }
.night .shot { display: flex; justify-content: center; }

/* Small feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 28px 24px;
}
.card .glyph {
  width: 44px; height: 44px; border-radius: 14px; background: var(--terra-soft);
  display: grid; place-items: center; font-size: 20px;
}
.card h3 { margin: 16px 0 8px; font-size: 17px; font-weight: 700; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
  padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }
.faq a { color: var(--terra-dark); }

/* Closing CTA band */
.closer {
  background: var(--terra-soft); border-radius: 32px; text-align: center;
  padding: 72px 28px; margin: 24px 0 56px;
}
.closer h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.06; margin: 0 0 14px; }
.closer p { color: var(--ink-2); margin: 0 0 28px; }

/* Reveal on scroll (JS adds .in; reduced-motion overrides above) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--hairline); padding: 40px 0 52px; }
footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer a { color: var(--ink-2); text-decoration: none; display: block; margin: 6px 0; font-size: 15px; }
footer a:hover { color: var(--terra-dark); }
footer .muted { color: var(--ink-3); font-size: 13px; margin-top: 22px; }

/* ── Legal pages (privacy.html / terms.html) ────────────── */
.legal { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 40px; margin: 44px 0; }
.legal h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.legal .updated { color: var(--ink-3); font-size: 14px; margin: 0 0 28px; }
.legal h2 { font-size: 21px; font-weight: 700; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal a { color: var(--terra-dark); }
.legal .note { background: var(--inset); border-radius: 12px; padding: 14px 18px; font-size: 14px; color: var(--ink-2); }

/* Simple standalone notice pages */
.center-page { min-height: 100svh; display: grid; place-items: center; }
.simple-notice {
  max-width: 680px;
  margin: 44px auto;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.simple-notice p { margin: 0; color: var(--ink); font-size: clamp(22px, 3vw, 34px); line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.simple-notice a { color: var(--terra-dark); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; min-height: 0; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
  .feature { grid-template-columns: 1fr; text-align: center; padding: 40px 0; }
  .feature:nth-of-type(even) .shot { order: 0; }
  .feature p { margin-left: auto; margin-right: auto; }
  .feature ul { display: inline-block; text-align: left; }
  .night { grid-template-columns: 1fr; text-align: center; }
  .night p { margin: 0 auto; }
  .night .device { margin-bottom: -120px; }
  .legal { padding: 26px; }
}
