/* BumpCast site, in the app's "Cabin Dawn" mood layer (docs/design/DESIGN_SPEC.md):
   a time-of-day sky behind everything, glass cards on the sky, large soft type, the wave line,
   the water-glass severity glyphs and the breathing orb. Fonts are self-hosted. */
@font-face { font-family: "Familjen Grotesk"; font-weight: 600; font-display: swap; src: url("fonts/FamiljenGrotesk-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/FamiljenGrotesk-Bold.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype"); }

/* ---------- Tokens. Day sky by default; script.js picks dawn/day/dusk/night from the visitor's clock. */
:root {
  --display: "Familjen Grotesk", -apple-system, sans-serif;
  --body: "Atkinson Hyperlegible", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --sky-1: #CFE3F3; --sky-2: #E6EFF6; --sky-3: #F4F7FA;
  --glow: rgba(255,255,255,.75); --tint: rgba(42,115,133,.16);

  --ink: #15253A; --ink2: #45576C; --accent: #2A7385; --on-accent: #FFFFFF;
  --glass: rgba(255,255,255,.58); --glass-strong: rgba(255,255,255,.78); --rim: rgba(255,255,255,.85);
  --hairline: rgba(21,37,58,.10); --shadow: 0 24px 60px -30px rgba(21,37,58,.35);

  --smooth: #3A9A8F; --light: #C99A2E; --moderate: #C9733A; --severe: #8E4A6B;
  color-scheme: light;
}
:root[data-sky="dawn"] { --sky-1: #F6D9C4; --sky-2: #DFE3EC; --sky-3: #B9D0E6; --glow: rgba(255,236,220,.8); --tint: rgba(201,154,46,.14); }
:root[data-sky="dusk"] { --sky-1: #E7C3C9; --sky-2: #C9BFD9; --sky-3: #9FB0D0; --glow: rgba(255,226,232,.7); --tint: rgba(142,74,107,.14); }

/* Night sky, and dark mode always (as in the app): light ink, darker glass. */
:root[data-sky="night"] {
  --sky-1: #1B2A45; --sky-2: #121D31; --sky-3: #0B1322; --glow: rgba(111,188,204,.16); --tint: rgba(92,192,179,.10);
  --ink: #F2F5F8; --ink2: #B7C3D0; --accent: #6FBCCC; --on-accent: #0F1C2C;
  --glass: rgba(255,255,255,.07); --glass-strong: rgba(18,29,49,.82); --rim: rgba(255,255,255,.14);
  --hairline: rgba(255,255,255,.12); --shadow: 0 24px 60px -30px rgba(0,0,0,.7);
  --smooth: #5CC0B3; --light: #E0B54E; --moderate: #E38F55; --severe: #C57EA0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-1: #1B2A45; --sky-2: #121D31; --sky-3: #0B1322; --glow: rgba(111,188,204,.16); --tint: rgba(92,192,179,.10);
    --ink: #F2F5F8; --ink2: #B7C3D0; --accent: #6FBCCC; --on-accent: #0F1C2C;
    --glass: rgba(255,255,255,.07); --glass-strong: rgba(18,29,49,.82); --rim: rgba(255,255,255,.14);
    --hairline: rgba(255,255,255,.12); --shadow: 0 24px 60px -30px rgba(0,0,0,.7);
    --smooth: #5CC0B3; --light: #E0B54E; --moderate: #E38F55; --severe: #C57EA0;
    color-scheme: dark;
  }
}

/* ---------- Sky */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--sky-3); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); overflow-x: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%) fixed;
  font: 18px/1.6 var(--body);
}
/* The slowly drifting light, the web cousin of the app's MeshGradient. */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 22% 18%, var(--glow), transparent 70%),
    radial-gradient(34vmax 26vmax at 82% 62%, var(--tint), transparent 70%),
    radial-gradient(30vmax 22vmax at 40% 92%, var(--glow), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(4vmax, -3vmax, 0) rotate(6deg); } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Floating glass nav */
.nav {
  position: sticky; top: 12px; z-index: 10; margin: 12px auto 0; max-width: 1120px; padding: 0 16px;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--rim); box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.15rem/1 var(--display); letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a { color: var(--ink2); text-decoration: none; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--ink); background: var(--glass); }
.nav nav a.pill { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* ---------- Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
p, li { max-width: 62ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.eyebrow { font: 500 .78rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin: 0 0 14px; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--ink2); }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.5; color: var(--ink2); margin: 20px 0 0; }

.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700;
  box-shadow: 0 14px 30px -16px var(--accent);
}
.button svg { width: 18px; height: 18px; fill: currentColor; }
.button.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--rim); box-shadow: none; }

.glass {
  background: var(--glass); border: 1px solid var(--rim); border-radius: 28px; box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

/* ---------- Document pages (privacy, terms, support, email): paper on the sky */
.doc-head { max-width: 820px; margin: 0 auto; padding: 64px 16px 28px; }
.doc-head .lede { max-width: 60ch; }
.sheet { max-width: 820px; margin: 0 auto 72px; padding: 0 16px; }
.sheet > .glass { padding: clamp(24px, 5vw, 52px); background: var(--glass-strong); }
.sheet h2 { font-size: 1.6rem; margin: 2.2em 0 .5em; }
.sheet h2:first-child { margin-top: 0; }
.sheet h3 { margin: 1.6em 0 .4em; }
.sheet ul, .sheet ol { padding-left: 1.2em; }
.sheet li { margin: .45em 0; }
.sheet li::marker { color: var(--accent); }
.note { border-left: 3px solid var(--accent); padding: 6px 0 6px 16px; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--hairline); }
th { font: 500 .74rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.table-wrap { overflow-x: auto; }
.faq h2 { font-size: 1.3rem; }

/* ---------- Footer */
footer { max-width: 1120px; margin: 0 auto; padding: 28px 16px 48px; color: var(--ink2); font-size: .92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--hairline); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink2); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  body::before, .orb { animation: none; }
}

section[id] { scroll-margin-top: 96px; }

/* ---------- Home: product page built from real screenshots */
.small { font-size: .92rem; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.hero-shots { position: relative; justify-self: center; width: min(520px, 100%); height: 640px; }
.hero-shots .device { position: absolute; width: 300px; }
.hero-shots .front { right: 0; top: 40px; z-index: 2; }
.hero-shots .back { left: 0; top: 0; transform: rotate(-4deg); opacity: .96; }

.device { margin: 0; justify-self: center; width: min(330px, 100%); padding: 9px; border-radius: 54px; background: #0B1119; box-shadow: 0 50px 90px -40px rgba(10,25,45,.6), inset 0 0 0 1.5px rgba(255,255,255,.1); }
.device img { display: block; width: 100%; height: auto; border-radius: 45px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 88px 0; border-top: 1px solid var(--hairline); }
.row.flip .copy { order: 2; }
.row .copy { max-width: 500px; }
.row.flip .copy { justify-self: start; }
.row h2 { margin-bottom: 18px; }
.row p { color: var(--ink2); font-size: 1.08rem; margin: 0 0 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pair .device:last-child { margin-top: 64px; }
.pair .device { width: 100%; padding: 7px; border-radius: 42px; }
.pair .device img { border-radius: 35px; }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.levels { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.levels li { display: flex; align-items: center; gap: 14px; color: var(--ink2); }
.levels b { color: var(--ink); margin-right: 6px; }
.glass-glyph { flex: none; width: 30px; height: 36px; overflow: visible; }
.glass-glyph .w { fill: var(--c); opacity: .5; }
.glass-glyph .s { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glass-glyph .g { fill: none; stroke: var(--c); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; padding: 72px 0; border-top: 1px solid var(--hairline); }
.split h2 { margin-bottom: 14px; }
.plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.plan-list h3 { padding-bottom: 10px; border-bottom: 2px solid var(--accent); display: inline-block; }

.orb { display: inline-block; width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, rgba(255,255,255,.25)); box-shadow: 0 0 0 12px rgba(255,255,255,.2), 0 0 40px rgba(255,255,255,.6); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0% { transform: scale(.82); } 40% { transform: scale(1.08); } 100% { transform: scale(.82); } }
.cta { text-align: center; padding: 88px 0 72px; display: grid; justify-items: center; gap: 18px; border-top: 1px solid var(--hairline); }
.cta p { color: var(--ink2); margin: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 40px; }
  .hero-shots { height: 600px; }
  .row, .row.flip { grid-template-columns: 1fr; gap: 40px; padding: 64px 0; }
  .row.flip .copy { order: 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav nav a:not(.pill) { padding: 8px; font-size: .9rem; }
  .nav nav a.hide-sm { display: none; }
  .device { width: min(290px, 100%); }
  .pair { gap: 12px; }
  .pair .device:last-child { margin-top: 40px; }
  .plan-list { grid-template-columns: 1fr; }
  .hero-shots { height: 520px; }
  .hero-shots .device { width: 230px; }
  .hero-shots .back { left: 0; }
  .hero-shots .front { top: 52px; }
}
@media (prefers-reduced-motion: reduce) { body::before, .orb { animation: none; } }
