/* Plate & Pillow website. Like the app, the page moves through the day as
   you scroll: dawn at the top, then day, dusk and night. The colours are the
   app's own (lib/core/theme/day_palette.dart), the type is the app's own
   Fraunces and Inter, served from this origin. */

@font-face { font-family: Fraunces; src: url(/fonts/Fraunces-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/fonts/Fraunces-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/fonts/Fraunces-Italic.ttf) format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  /* Dawn */
  --dawn-1: #ffb98a; --dawn-2: #ffd9b0; --dawn-3: #fff1de;
  --dawn-ink: #3a2216; --dawn-muted: #8f5e47; --dawn-accent: #f2733d;
  /* Day */
  --day-1: #9fd8ff; --day-2: #cdebff; --day-3: #f4faff;
  --day-ink: #0f2438; --day-muted: #4f6e8a; --day-accent: #f07a2c; --day-deep: #1d4e7a;
  /* Dusk */
  --dusk-1: #ff9e7a; --dusk-2: #e8728f; --dusk-3: #9a5bb0; --dusk-4: #5b3e96;
  --dusk-ink: #fff6f2; --dusk-muted: #ffe8ec; --dusk-accent: #ffc36b;
  /* Night */
  --night-1: #2b2266; --night-2: #15113a; --night-3: #09081a;
  --night-ink: #ede9ff; --night-muted: #a99cff; --night-accent: #9c7cff;
  /* The dial */
  --sleep-1: #6f7cff; --sleep-2: #a9b3ff; --awake-1: #ffe08a; --awake-2: #ff8a3d;

  --radius: 28px;
  --wrap: 1080px;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::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;
  font: 400 17px/1.6 var(--sans);
  color: var(--day-ink);
  background: var(--night-3);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--day-accent); outline-offset: 3px; border-radius: 6px; }

/* ── Wordmark and top bar ──────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: italic 400 1.6rem/1 var(--serif); }
.brand img { border-radius: 10px; box-shadow: 0 4px 14px rgba(58, 34, 22, .18); }
.amp { color: var(--dawn-accent); }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: rgba(255, 255, 255, .45); }

/* ── Sky bands ─────────────────────────────────────────────────────────── */
.band { position: relative; overflow: hidden; }
.band > .wrap { position: relative; z-index: 1; }

.dawn {
  color: var(--dawn-ink);
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(255, 246, 220, .95), rgba(255, 246, 220, 0) 70%),
    linear-gradient(180deg, var(--dawn-1), var(--dawn-2) 55%, var(--dawn-3));
}
.day {
  color: var(--day-ink);
  background:
    radial-gradient(520px 380px at 88% 0, rgba(255, 244, 205, .9), rgba(255, 244, 205, 0) 70%),
    linear-gradient(180deg, var(--day-1), var(--day-2) 30%, var(--day-3));
}
.dusk {
  color: var(--dusk-ink);
  background:
    radial-gradient(560px 360px at 18% 4%, rgba(255, 214, 160, .55), rgba(255, 214, 160, 0) 70%),
    linear-gradient(180deg, var(--dusk-1), var(--dusk-2) 30%, var(--dusk-3) 70%, var(--dusk-4));
}
.night {
  color: var(--night-ink);
  background: radial-gradient(120% 80% at 50% 0%, var(--night-1), var(--night-2) 55%, var(--night-3));
}
.night::before,
html[data-phase="night"] header.band::before {
  /* A few stars, drawn with gradients so there is no image to load. */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 27% 42%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent),
    radial-gradient(1px 1px at 63% 30%, #fff, transparent),
    radial-gradient(2px 2px at 78% 14%, #fff, transparent),
    radial-gradient(1px 1px at 88% 46%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 8% 64%, #fff, transparent),
    radial-gradient(1px 1px at 55% 58%, #fff, transparent),
    radial-gradient(1px 1px at 93% 76%, #fff, transparent);
}

/* The rolling hills from the app, as the bottom edge of a band. */
.hills { display: block; width: 100%; height: clamp(60px, 9vw, 120px); margin-top: -1px; }
.hills.over { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-bottom: clamp(70px, 10vw, 130px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 28px 0 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--dawn-muted); margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--dawn-accent); }
.sub { font-size: 1.15rem; max-width: 34em; color: var(--dawn-ink); }
.promise { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; list-style: none; }
.promise li { background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .8); padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; }

/* ── The 24-hour dial (CSS only) ───────────────────────────────────────── */
.dial-wrap { position: relative; justify-self: center; width: min(400px, 82vw); aspect-ratio: 1; }
.dial {
  position: absolute; inset: 0; border-radius: 50%;
  /* 00:00 at the bottom and 12:00 at the top, like the app; 15deg an hour.
     Asleep 23:00–07:00, awake the rest. */
  background: conic-gradient(from 180deg,
    var(--sleep-1) 0deg, var(--sleep-2) 105deg,
    var(--awake-1) 105deg, var(--awake-2) 225deg, var(--awake-1) 345deg,
    var(--sleep-2) 345deg, var(--sleep-1) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px));
}
.dial-face {
  position: absolute; inset: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .85);
  display: grid; place-content: center; text-align: center;
  box-shadow: 0 20px 60px rgba(242, 115, 61, .18);
}
.dial-face small { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dawn-muted); }
.dial-face strong { display: block; font: 400 clamp(1.6rem, 5vw, 2.2rem)/1.1 var(--serif); margin: 6px 0 2px; }
.dial-face .time { font: 600 clamp(2.6rem, 9vw, 3.8rem)/1 var(--serif); background: linear-gradient(180deg, var(--dawn-accent), #c9482a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dial-face .in { color: var(--dawn-muted); margin-top: 8px; }
/* An event on the ring at hour angle --a (15deg an hour from the bottom). */
.dot {
  --r: calc(50% - 11px);
  position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%;
  left: calc(50% - var(--r) * sin(var(--a)));
  top: calc(50% + var(--r) * cos(var(--a)));
  background: #fff; border: 3px solid rgba(58, 34, 22, .25);
}
/* Classes, not inline styles: the CSP allows no inline styles. */
.d-wake { --a: 105deg; } .d-breakfast { --a: 112.5deg; } .d-lunch { --a: 180deg; }
.d-snack { --a: 225deg; } .d-dinner { --a: 270deg; } .d-bed { --a: 345deg; } .d-now { --a: 191.25deg; }
.dot.now { width: 30px; height: 30px; margin: -15px; background: var(--dawn-accent); border-color: #fff; box-shadow: 0 0 24px rgba(242, 115, 61, .7); }

/* ── Store badges ──────────────────────────────────────────────────────── */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px; background: #1b1430; color: #fff; text-decoration: none; min-width: 190px; }
.badge small { display: block; font-size: .7rem; opacity: .8; line-height: 1.2; }
.badge strong { display: block; font-size: 1.1rem; line-height: 1.2; }
a.badge:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(27, 20, 48, .3); }
.note { font-size: .92rem; margin-top: 14px; opacity: .85; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.sec { padding: clamp(56px, 8vw, 96px) 0; }
.lead { font-size: 1.15rem; max-width: 40em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; margin-top: clamp(48px, 7vw, 88px); }
.split.rev > .shot { order: 2; }
.split ul { padding-left: 1.2em; margin: 0 0 1em; }
.split li { margin-bottom: .35em; }
.shot { justify-self: center; width: min(300px, 76vw); }
.shot img { border-radius: 34px; border: 6px solid rgba(255, 255, 255, .85); box-shadow: 0 30px 70px rgba(15, 36, 56, .22); }
.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--day-accent); margin-bottom: 10px; display: block; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.card { background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .9); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--day-muted); }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(29, 78, 122, .09); color: var(--day-deep); margin-bottom: 14px; }
.dusk .card, .night .card { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.dusk .card p { color: var(--dusk-muted); }
.night .card p { color: var(--night-muted); }
.dusk .ico { background: rgba(255, 255, 255, .16); color: var(--dusk-accent); }
.night .ico { background: rgba(255, 255, 255, .08); color: var(--night-accent); }

/* Who it's for */
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.who div { background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px; padding: 18px 20px; }
.who b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: 4px; }
.who span { color: var(--day-muted); font-size: .95rem; }

/* Privacy band */
.privacy-big { font: 400 clamp(1.5rem, 3.4vw, 2.2rem)/1.3 var(--serif); max-width: 26em; }
.privacy-big em { color: var(--dusk-accent); }

/* Pricing */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.plan { border-radius: var(--radius); padding: 28px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); }
.plan.pro { background: linear-gradient(160deg, rgba(156, 124, 255, .3), rgba(156, 124, 255, .08)); border-color: rgba(180, 150, 255, .45); }
.plan h3 { font-size: 1.6rem; font-weight: 400; margin-bottom: 4px; }
.plan .per { color: var(--night-muted); margin-bottom: 16px; }
.plan ul { padding-left: 1.2em; margin: 0; }
.plan li { margin-bottom: .4em; }
.tag { display: inline-block; font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--day-accent); color: #fff; vertical-align: middle; margin-left: 6px; }
.night .tag { background: var(--night-accent); color: #fff; }

/* Final call and footer */
.cta { text-align: center; padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); }
.cta .badges { justify-content: center; margin-top: 26px; }
.moon { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; box-shadow: inset -16px -6px 0 0 #f6efd8; transform: rotate(-20deg); filter: drop-shadow(0 0 18px rgba(246, 239, 216, .45)); }
footer { color: var(--night-muted); font-size: .92rem; padding: 28px 0 40px; border-top: 1px solid rgba(255, 255, 255, .08); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--night-ink); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Text pages (privacy, support, suggestions) ────────────────────────── */
.page-head { padding-bottom: clamp(50px, 7vw, 90px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 20px; }
.page-head .sub { max-width: 36em; }
.doc { background: var(--day-3); color: var(--day-ink); padding: 10px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 1.8rem; margin-top: 1.6em; }
.doc h3 { margin-top: 1.4em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .45em; }
.doc a { color: var(--day-deep); }
.doc .muted { color: var(--day-muted); }
.box { background: #fff; border: 1px solid rgba(15, 36, 56, .1); border-radius: 22px; padding: 22px 24px; margin: 24px 0; }
.box p:last-child { margin-bottom: 0; }
.mail { font: 600 1.15rem var(--sans); }
details { background: #fff; border: 1px solid rgba(15, 36, 56, .1); border-radius: 18px; padding: 0 20px; margin: 10px 0; }
details[open] { padding-bottom: 14px; }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.4rem/1 var(--sans); color: var(--day-muted); }
details[open] summary::after { content: "\2013"; }
.page-head .wrap > :not(.top) { max-width: 720px; margin-left: auto; margin-right: auto; }
details p:last-child, details ol:last-child, details ul:last-child { margin-bottom: 0; }

.sugg { display: grid; gap: 16px; margin: 24px 0; }
.sugg article { background: #fff; border: 1px solid rgba(15, 36, 56, .1); border-radius: 22px; padding: 22px 24px; }
.sugg h3 { margin: 0 0 6px; }
.sugg .times { font-size: .95rem; color: var(--day-muted); margin-bottom: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--day-deep); color: #fff; }
.doc .btn { color: #fff; }
.btn.ghost { background: transparent; color: var(--day-deep); border: 2px solid rgba(29, 78, 122, .3); }
.doc .btn.ghost { color: var(--day-deep); }

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split.rev > .shot { order: 0; }
  .grid { grid-template-columns: 1fr 1fr; }
  .who { grid-template-columns: 1fr 1fr; }
  .price { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid, .who { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  .badge { min-width: 0; flex: 1 1 100%; }
}

.kicker.on-dusk { color: var(--dusk-accent); }
.kicker.on-night { color: var(--night-muted); }
.cta .lead { margin: 0 auto; }
.sec h2.center { margin-top: clamp(56px, 8vw, 96px); }
.wrap.sec { padding-left: 20px; padding-right: 20px; }
.band.sec { padding-bottom: clamp(110px, 14vw, 180px); }

/* ── The sky at the top follows the visitor's clock ────────────────────────
   assets/sky.js sets <html data-phase> from the visitor's local time, with the
   same rule as the app (day_palette.dart). The header reads its colours from
   these variables, so each phase only has to restate them. Without JavaScript
   there is no data-phase and the header stays at dawn. */
header.band {
  --ink: var(--dawn-ink); --muted: var(--dawn-muted);
  --accent: var(--dawn-accent); --accent-2: #c9482a;
  --glass: rgba(255, 255, 255, .55); --glass-line: rgba(255, 255, 255, .8);
  --ring: rgba(58, 34, 22, .25); --glow: rgba(242, 115, 61, .18);
  --hover: rgba(255, 255, 255, .45);
}
header.band .eyebrow, header.band .dial-face small, header.band .dial-face .in { color: var(--muted); }
header.band .sub { color: var(--ink); }
header.band h1 em, header.band .amp { color: var(--accent); }
header.band .top nav a:hover { background: var(--hover); }
header.band .promise li { background: var(--glass); border-color: var(--glass-line); }
header.band .dial-face { background: var(--glass); border-color: var(--glass-line); box-shadow: 0 20px 60px var(--glow); }
header.band .dial-face .time { background-image: linear-gradient(180deg, var(--accent), var(--accent-2)); }
header.band .dot { border-color: var(--ring); }
header.band .dot.now { background: var(--accent); box-shadow: 0 0 24px var(--accent); }

html[data-phase="day"] header.band {
  color: var(--day-ink);
  --ink: var(--day-ink); --muted: var(--day-muted);
  --accent: var(--day-accent); --accent-2: #c4561a;
  --glass: rgba(255, 255, 255, .6); --glass-line: rgba(255, 255, 255, .9);
  --ring: rgba(15, 36, 56, .22); --glow: rgba(29, 78, 122, .16);
  background:
    radial-gradient(46% 60% at 86% 4%, rgba(255, 244, 205, .95), rgba(255, 244, 205, 0) 70%),
    linear-gradient(180deg, var(--day-1), var(--day-2) 60%, var(--day-3));
}
html[data-phase="dusk"] header.band {
  color: var(--dusk-ink);
  --ink: var(--dusk-ink); --muted: var(--dusk-muted);
  --accent: var(--dusk-accent); --accent-2: #ff8a6b;
  --glass: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .3);
  --ring: rgba(255, 255, 255, .45); --glow: rgba(91, 62, 150, .35);
  --hover: rgba(255, 255, 255, .16);
  background:
    radial-gradient(50% 55% at 14% 92%, rgba(255, 214, 160, .7), rgba(255, 214, 160, 0) 70%),
    linear-gradient(180deg, var(--dusk-4), var(--dusk-3) 30%, var(--dusk-2) 68%, var(--dusk-1));
}
html[data-phase="night"] header.band {
  color: var(--night-ink);
  --ink: var(--night-ink); --muted: var(--night-muted);
  --accent: var(--night-accent); --accent-2: #d9ceff;
  --glass: rgba(255, 255, 255, .07); --glass-line: rgba(255, 255, 255, .16);
  --ring: rgba(255, 255, 255, .35); --glow: rgba(156, 124, 255, .25);
  --hover: rgba(255, 255, 255, .1);
  background: radial-gradient(120% 90% at 50% 0%, var(--night-1), var(--night-2) 60%, var(--night-3));
}
html[data-phase="dusk"] header.band .brand img,
html[data-phase="night"] header.band .brand img { box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
html[data-phase="dusk"] header.band .badge,
html[data-phase="night"] header.band .badge { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
/* The moon rises over the dial at night. */
html[data-phase="night"] header.band .dial-wrap::before {
  content: ""; position: absolute; width: 54px; height: 54px; right: -6%; top: -8%; border-radius: 50%;
  box-shadow: inset -12px -5px 0 0 #f6efd8; transform: rotate(-20deg);
  filter: drop-shadow(0 0 16px rgba(246, 239, 216, .45));
}
/* The back hill takes the colour of the sky above it, so the edge down to
   the daytime section below reads as a landscape, not a grey band. */
html[data-phase="dusk"] header.band .hills path:first-child { fill: #f59a86; opacity: .9; }
html[data-phase="night"] header.band .hills path:first-child { fill: #3a2f86; opacity: .95; }
