/* Sunline site. Palette follows the app (ui/Theme.kt): Night, Deep, Ocean, Sun, Haze. */
@font-face {
  font-family: "Instrument Serif";
  src: url(assets/fonts/instrument-serif.woff2) format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url(assets/fonts/instrument-serif-italic.woff2) format("woff2");
  font-style: italic; font-weight: 400; font-display: swap;
}

:root {
  --night: #05070F;
  --deep: #0B1330;
  --ocean: #1E3A6E;
  --sun: #F2B35B;
  --sun-hi: #FFD27A;
  --haze: #B9C3DA;
  --text: #E8ECF6;
  --muted: #8C97B2;
  --line: rgba(185, 195, 218, 0.14);
  --line-strong: rgba(185, 195, 218, 0.26);
  --panel: rgba(11, 19, 48, 0.55);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A faint starfield behind everything. Pure CSS, no image. */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 32%, rgba(255,240,210,.5), transparent 60%),
    radial-gradient(1px 1px at 33% 71%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 90% 58%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 6% 88%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1.5px 1.5px at 48% 92%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 22% 44%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 58, 110, .45), transparent 70%);
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(5, 7, 15, .66); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 26px; letter-spacing: -.01em; line-height: 1; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links .get { color: var(--night); background: var(--sun); padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.nav-links .get:hover { color: var(--night); background: var(--sun-hi); }
@media (max-width: 640px) { .nav-links a:not(.get) { display: none; } }

/* ---------- Hero ---------- */
.hero { min-height: calc(100svh - 60px); display: flex; align-items: flex-end; padding: 48px 0 clamp(56px, 9vh, 96px); }
.hero .wrap { width: 100%; }
.hero h1, .hero .lede, section h2, .section-lede { text-shadow: 0 2px 24px rgba(5, 7, 15, .8); }
.live {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--haze);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 10px;
  background: rgba(11, 19, 48, .5);
}
.live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(242,179,91,.6); animation: pulse 2.4s infinite; flex: none; }
.live.paused .pulse { background: var(--muted); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242,179,91,.55); } 70% { box-shadow: 0 0 0 10px rgba(242,179,91,0); } 100% { box-shadow: 0 0 0 0 rgba(242,179,91,0); } }
@media (prefers-reduced-motion: reduce) { .live .pulse { animation: none; } }

h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 8.4vw, 108px); line-height: .95; letter-spacing: -.02em;
  margin: 22px 0 0; max-width: 13ch;
}
h1 em, h2 em { font-style: italic; color: var(--sun); }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; }
.lede { color: var(--haze); font-size: clamp(16px, 1.6vw, 18.5px); max-width: 40ch; margin-top: 24px; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.play-badge { display: inline-block; border-radius: 10px; transition: transform .15s; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { height: 58px; width: auto; }
.cta .note { color: var(--muted); font-size: 13.5px; }

/* ---------- The sky: a fixed, full-screen Earth behind the page ---------- */
.sky { position: fixed; inset: 0; z-index: 0; background: #02040a url(assets/fallback.jpg) center / cover no-repeat; }
.sky canvas { width: 100%; height: 100%; display: block; }
/* Keeps text readable: light over the hero, darker (via --veil, set while scrolling) below it. */
.veil { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,15,.6) 0, rgba(5,7,15,0) 22%, rgba(5,7,15,0) 55%, rgba(5,7,15,.85) 100%); }
.veil::after { content: ""; position: absolute; inset: 0; background: rgb(5, 7, 15); opacity: var(--veil, 0); }
.hud { position: fixed; left: var(--gutter); bottom: 16px; z-index: 30; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(5, 7, 15, .62); }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; margin-top: 40px; color: var(--haze); font: 12.5px var(--mono); letter-spacing: .04em; text-decoration: none; }
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--sun), transparent); }

/* ---------- Sections ---------- */
section { padding: clamp(72px, 11vw, 140px) 0 0; }
.kicker { font: 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.4vw, 64px); line-height: 1; letter-spacing: -.015em; margin-top: 16px; }
.section-lede { color: var(--haze); max-width: 46ch; margin-top: 18px; font-size: 17px; }

/* ---------- Screenshots ---------- */
.shots { display: flex; gap: clamp(18px, 3vw, 40px); justify-content: center; align-items: flex-start; flex-wrap: wrap; margin-top: 56px; }
.shot { width: min(250px, 72vw); }
.shot .bezel { border-radius: 38px; padding: 8px; background: linear-gradient(150deg, #1f2638, #070a14 60%); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -30px rgba(0,0,0,.9); }
.shot img { width: 100%; height: auto; border-radius: 31px; }
.shot figcaption { text-align: center; color: var(--haze); font-size: 14px; margin-top: 16px; }
@media (min-width: 861px) { .shot:nth-child(2) { margin-top: 48px; } }

/* ---------- A day with Sunline ---------- */
.day-list { list-style: none; margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
@media (max-width: 960px) { .day-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .day-list { grid-template-columns: 1fr; } }
.day-list li { padding: 28px 24px 32px 0; border-bottom: 1px solid var(--line); position: relative; }
@media (min-width: 961px) { .day-list li + li { padding-left: 24px; border-left: 1px solid var(--line); } }
@media (min-width: 561px) and (max-width: 960px) { .day-list li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); } }
.day-list .t { font: 400 44px/1 var(--serif); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.day-list .sky-bar { display: block; height: 3px; width: 56px; border-radius: 3px; margin: 18px 0 18px; }
.day-list h3 { font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.day-list p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 52px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; background: var(--panel); }
.plan.pro { border-color: rgba(242,179,91,.45); background: linear-gradient(160deg, rgba(242,179,91,.12), rgba(11,19,48,.55) 55%); }
.plan .name { font-family: var(--serif); font-size: 34px; line-height: 1; }
.plan .price { color: var(--muted); font-size: 14px; margin-top: 8px; }
.plan ul { list-style: none; margin-top: 22px; }
.plan li { padding: 9px 0 9px 26px; position: relative; border-top: 1px solid var(--line); color: var(--haze); font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(90deg, var(--sun) 50%, var(--ocean) 50%); }
.plans-note { color: var(--muted); font-size: 14px; margin-top: 20px; }

/* ---------- Privacy summary ---------- */
.privacy-sum { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .privacy-sum { grid-template-columns: 1fr; } }
.facts { list-style: none; }
.facts li { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts .k { color: var(--text); font-weight: 600; }
.facts .v { color: var(--muted); }
@media (max-width: 480px) { .facts li { grid-template-columns: 1fr; gap: 4px; } }
.link-arrow { display: inline-block; margin-top: 26px; color: var(--sun); text-decoration: none; font-weight: 600; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Final + footer ---------- */
.final { text-align: center; padding-bottom: clamp(72px, 10vw, 120px); }
.final h2 { margin: 0 auto; max-width: 16ch; }
.final .cta { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; position: relative; z-index: 1; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px 32px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
.credit { width: 100%; font-size: 12.5px; }

/* ---------- Article (privacy page) ---------- */
.article { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) 96px; position: relative; z-index: 1; }
.article h1 { font-size: clamp(44px, 7vw, 76px); max-width: none; }
.article .updated { color: var(--muted); font: 13px var(--mono); margin-top: 14px; }
.article h2 { font-size: clamp(28px, 3.6vw, 36px); margin: 52px 0 6px; }
.article p, .article li { color: #c6cde0; }
.article p { margin: 14px 0; }
.article ul { list-style: none; margin: 14px 0; }
.article li { padding: 7px 0 7px 24px; position: relative; }
.article li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(90deg, var(--sun) 50%, var(--ocean) 50%); }
.article strong { color: var(--text); font-weight: 600; }
.article a { color: var(--sun); text-underline-offset: 3px; }
.article code { font-family: var(--mono); font-size: .86em; background: rgba(30,58,110,.35); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.article th, .article td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.article tr:last-child td { border-bottom: 0; }
.article th { color: var(--text); font-weight: 600; background: rgba(11,19,48,.6); }
.article td { color: var(--muted); }
.article td:first-child { color: var(--text); }
.tldr { border: 1px solid rgba(242,179,91,.35); background: linear-gradient(160deg, rgba(242,179,91,.1), rgba(11,19,48,.5) 60%); border-radius: 18px; padding: 8px 22px; margin-top: 32px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }
