/* Milkmoon — single page. Colours are the app's own (Design/palette.json): day = milk, night = red-shifted plum.
   The page turns from day to night at "Made for 3 a.m." (site.js sets data-sky); dark-mode visitors get night throughout. */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #FBF7F2; }
@property --surface { syntax: '<color>'; inherits: true; initial-value: #FFFFFF; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #2A2420; }
@property --ink2 { syntax: '<color>'; inherits: true; initial-value: #5F544C; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #B4475F; }
@property --hair { syntax: '<color>'; inherits: true; initial-value: #E6DCD0; }

:root {
  --bg: #FBF7F2; --surface: #FFFFFF; --ink: #2A2420; --ink2: #5F544C; --accent: #B4475F; --hair: #E6DCD0;
  --shadow: 0 40px 80px -30px rgba(70, 40, 40, .35), 0 12px 24px -12px rgba(70, 40, 40, .2);
  --night-bg: #120E14; --night-surface: #1B1419; --night-ink: #E2B49C; --night-ink2: #B48A76; --night-accent: #E0876E; --night-hair: #33242A;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light;
  transition: --bg 1.6s ease, --surface 1.6s ease, --ink 1.6s ease, --ink2 1.6s ease, --accent 1.6s ease, --hair 1.6s ease;
}
:root[data-sky="night"] {
  --bg: var(--night-bg); --surface: var(--night-surface); --ink: var(--night-ink); --ink2: var(--night-ink2);
  --accent: var(--night-accent); --hair: var(--night-hair);
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(226, 180, 156, .08);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root, :root[data-sky] {
    --bg: var(--night-bg); --surface: var(--night-surface); --ink: var(--night-ink); --ink2: var(--night-ink2);
    --accent: var(--night-accent); --hair: var(--night-hair);
    --shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(226, 180, 156, .08);
    color-scheme: dark;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

*, *::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(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h2 { font: 500 clamp(2.1rem, 4.6vw, 3.4rem)/1.04 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
h2 em, h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 14px; background: var(--surface); color: var(--ink); border-radius: 10px; }
.skip:focus { left: 12px; }

/* Header */
.top {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.15rem/1 var(--serif); }
.brand img { border-radius: 9px; }
.badge { display: inline-block; border-radius: 10px; }
.badge img { height: 53px; width: auto; }
.badge--small img { height: 40px; }
@media (prefers-color-scheme: dark) { .badge img { box-shadow: 0 0 0 1px #A6A6A6; border-radius: 9px; } }
:root[data-sky="night"] .badge img { box-shadow: 0 0 0 1px #A6A6A6; border-radius: 9px; }

/* Sections share one rhythm */
main > section { padding: clamp(72px, 11vw, 150px) var(--gutter); }
main > section > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }

/* Hero: the glance line, set the way the app sets it */
.hero {
  display: grid; gap: clamp(40px, 6vw, 72px); align-items: center;
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding-top: clamp(28px, 6vw, 80px) !important;
}
.hero > * { margin: 0 !important; max-width: none !important; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr .85fr; } }
.eyebrow, .tag {
  font: 600 .8rem/1.2 var(--round); letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.tag { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; margin-bottom: 20px; }
.glance { font: 500 clamp(2.5rem, 6vw, 4.6rem)/1.02 var(--serif); letter-spacing: -.028em; }
.glance__line { display: block; }
.glance .num {
  font: 600 1em/1 var(--round); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.lede { margin-top: 28px; max-width: 34em; font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink2); }
.cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cta__note { font-size: .95rem; color: var(--ink2); }

.hero__art { position: relative; margin: 0; justify-self: center; width: min(330px, 78vw); padding-bottom: 8px; }
.lifted {
  position: absolute; left: 50%; top: 36%; width: min(440px, 92vw); transform: translateX(-50%) rotate(-3deg);
  filter: drop-shadow(0 30px 40px rgba(20, 10, 20, .45)) drop-shadow(0 0 1px rgba(224, 135, 110, .6));
}
.lifted img { border-radius: clamp(18px, 4vw, 24px); }
@media (prefers-reduced-motion: no-preference) {
  .lifted { animation: lift 1.1s cubic-bezier(.2, .8, .2, 1) .35s both; }
  @keyframes lift { from { opacity: 0; transform: translate(-50%, 28px) rotate(0deg); } }
}

/* Device: drawn in CSS around the real screenshot */
.phone {
  position: relative; padding: 3.2%; border-radius: 15% / 7%;
  background: linear-gradient(150deg, #4a4350, #1d181f 25%, #0e0b10 60%, #322a34);
  box-shadow: var(--shadow);
}
.phone img { border-radius: 12.4% / 5.7%; }
.phone::after {
  content: ""; position: absolute; top: 4.6%; left: 50%; transform: translateX(-50%);
  width: 29%; aspect-ratio: 3.4; background: #000; border-radius: 999px;
}
.phone--tilt-l { transform: rotate(-2.5deg); }
.phone--tilt-r { transform: rotate(2.5deg); }

/* Feature rows */
.feature { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1.1fr .9fr; }
  .feature--flip .feature__copy { order: 2; }
}
.feature__copy p { margin-top: 22px; max-width: 32em; color: var(--ink2); font-size: 1.12rem; }
.feature__copy p.tag { margin-top: 0; color: var(--accent); font-size: .8rem; }
.feature__art { margin: 0; justify-self: center; width: min(310px, 74vw); }
.aside { font-size: .95rem !important; color: var(--ink2); opacity: .9; }
.ticks { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 32em; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}

/* The turn to night. Without JS this band is simply dark; with JS the whole page follows it. */
.night {
  position: relative; background: var(--night-bg); color: var(--night-ink);
  --ink: var(--night-ink); --ink2: var(--night-ink2); --accent: var(--night-accent); --hair: var(--night-hair);
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(226, 180, 156, .08);
  transition: background-color 1.6s ease;
}
:root[data-sky="night"] .night { background: transparent; }
.night__sky { max-width: var(--wrap); height: 0; position: relative; margin: 0 auto; }
.moon {
  position: absolute; left: 0; top: clamp(-120px, -8vw, -60px); width: clamp(72px, 9vw, 112px); height: auto; color: #E9C9A8;
  opacity: 0; transform: translateY(70px) rotate(-8deg);
  transition: opacity 1.8s ease .2s, transform 2.4s cubic-bezier(.2, .7, .1, 1) .2s;
  filter: drop-shadow(0 0 40px rgba(233, 201, 168, .35));
}
:root[data-sky="night"] .moon, .no-js .moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) { .moon { opacity: 1; transform: none; } }

/* Never locked */
.split h2 { text-align: center; }
.split__lede { margin-top: 22px !important; max-width: 36em !important; text-align: center; color: var(--ink2); font-size: 1.15rem; }
.split__cols { margin-top: 52px; display: grid; gap: 20px; }
@media (min-width: 820px) { .split__cols { grid-template-columns: 1.2fr 1fr; } }
.col { background: var(--surface); border: 1px solid var(--hair); border-radius: 28px; padding: clamp(24px, 4vw, 40px); }
.col h3 { font: 600 .85rem/1.2 var(--round); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.col--premium { border-color: var(--accent); }
.col--premium h3 { color: var(--accent); }
.col ul { margin: 20px 0 0; padding-left: 1.1em; display: grid; gap: 10px; }
.col .aside { margin-top: 20px; }

/* Privacy */
.privacy h2 { max-width: 15em !important; margin-left: 0 !important; }
.privacy { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.facts { margin: 48px 0 0; display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 24px; overflow: hidden; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { background: var(--bg); padding: 28px clamp(22px, 3vw, 34px); }
.facts dt { font: 600 1.25rem/1.2 var(--serif); }
.facts dd { margin: 10px 0 0; color: var(--ink2); }

/* FAQ */
.faq { max-width: calc(820px + 2 * var(--gutter)); margin: 0 auto; }
.faq h2 { margin-bottom: 30px !important; }
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-of-type { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font: 500 1.2rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 24px; color: var(--ink2); max-width: 40em; }

/* Final */
.final { text-align: center; }
.final > * { margin-left: auto; margin-right: auto; }
.final img:first-child { border-radius: 22px; margin-bottom: 28px; box-shadow: var(--shadow); }
.final h2 { margin-bottom: 32px; }
.final .aside { margin-top: 18px; }

.foot {
  max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--hair); color: var(--ink2); font-size: .9rem; display: grid; gap: 10px;
}
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.foot nav a:hover { text-decoration: underline; }
.fine { font-size: .78rem; opacity: .85; }

/* Legal pages */
.doc { max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding: 24px var(--gutter) 80px; }
.doc h1 { font: 500 clamp(2.2rem, 5vw, 3rem)/1.1 var(--serif); letter-spacing: -.02em; margin-bottom: 8px; }
.doc h2 { font: 600 1.2rem/1.3 var(--serif); letter-spacing: 0; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink2); }
.doc p + p { margin-top: 12px; }
.doc .date { font-size: .9rem; margin-bottom: 28px; }
.doc details { border-top: 1px solid var(--hair); }
.doc summary { cursor: pointer; padding: 16px 0; font: 500 1.1rem/1.35 var(--serif); color: var(--ink); }
.doc details p { padding-bottom: 16px; }
