/* Find my Sun site. Same tokens as the Android app (design-system/), dark-first.
   Quality colours (--full/--high/--blocked) follow the app's Color.kt, which is
   what the screenshots show, not the older OKLCH values in the design doc. */

@font-face {
  font-family: Manrope;
  src: url(/assets/fonts/manrope.39ccf151.woff2) format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/assets/fonts/plex-mono-500.25f91b22.woff2) format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg-canvas: #070b14;
  --bg-surface: #11161f;
  --bg-surface2: #1c222b;
  --border: #2d333d;
  --text: #eef2f9;
  --text-dim: #9da5b1;
  --accent: #f0834e;
  --accent-text: #080d16;
  /* Not in the design system: accent as text/link colour needs more contrast
     than the button fill has on the light canvas. */
  --accent-link: #f0834e;
  --full: #7ab953;
  --high: #ddb049;
  --blocked: #d33a3c;
  --font-ui: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 64px; /* section rhythm on large screens */
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-canvas: #f8f5ee;
    --bg-surface: #ffffff;
    --bg-surface2: #eae8e0;
    --border: #d0cec7;
    --text: #11161f;
    --text-dim: #474d58;
    --accent: #c65d26;
    --accent-text: #fbf8f1;
    --accent-link: #a9481a;
    --full: #5c9932;
    --high: #c09000;
    --blocked: #bb061e;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text);
  font: 500 15px/1.6 var(--font-ui);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-link);
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-link);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--s4);
  top: -100px;
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--s3) var(--s4);
  border-radius: 12px;
  font-weight: 800;
  z-index: 10;
}
.skip:focus {
  top: var(--s3);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--s4);
}

.prose {
  max-width: 68ch;
}

/* ---- header / footer -------------------------------------------------- */

.site-header {
  padding: var(--s4) 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}
.logo {
  width: 32px;
  height: 32px;
  flex: none;
}
.logo-sun {
  fill: var(--high);
}
.logo-horizon {
  fill: var(--accent);
}
.site-nav {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
}
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--s7);
  padding: var(--s5) 0 var(--s6);
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  list-style: none;
  margin: 0 0 var(--s3);
  padding: 0;
}
.site-footer p {
  margin: var(--s2) 0;
}
.fine {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---- type ------------------------------------------------------------- */

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(28px, 6.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 18px;
  font-weight: 700;
}
p {
  margin: var(--s3) 0 0;
}
.lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 56ch;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  margin: 0 0 var(--s2);
}
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---- buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 16px 28px;
  border-radius: 16px;
  /* 19px bold counts as "large text" for WCAG, which the light-theme
     accent/accent-text pair (4:1) needs. */
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
}
.btn:hover {
  filter: brightness(1.08);
}
.badge-play {
  display: inline-block;
  line-height: 0;
}
.badge-play img {
  height: 56px;
  width: auto;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  margin-top: var(--s5);
}

/* ---- sections --------------------------------------------------------- */

.section {
  padding-top: var(--s7);
}
.section > .wrap > h2 + p,
.section > .wrap > h2 + .prose {
  margin-top: var(--s3);
}

.hero {
  padding-top: var(--s5);
}
.hero .wrap {
  display: grid;
  gap: var(--s6);
  align-items: center;
}
.hero-shot {
  justify-self: center;
  width: min(300px, 70%);
}
.shot {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 820px) {
  .hero .wrap {
    grid-template-columns: 1.3fr 1fr;
  }
  .hero-shot {
    width: min(320px, 100%);
  }
}

/* steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.steps li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
}
.steps strong {
  display: block;
  font-size: 16px;
}
.steps span {
  color: var(--text-dim);
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps li {
    grid-template-columns: 1fr;
  }
}

/* quality states */
.states {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
@media (min-width: 720px) {
  .states {
    grid-template-columns: repeat(2, 1fr);
  }
}
.state {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.state h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}
.state p {
  margin: var(--s1) 0 0;
  color: var(--text-dim);
}
.shape {
  width: 28px;
  height: 28px;
  margin-top: 1px;
}
.shape-full path,
.shape-full circle {
  fill: var(--full);
}
.shape-partial path {
  fill: var(--high);
}
.shape-blocked path {
  fill: var(--blocked);
}
.shape-unknown circle {
  stroke: var(--text-dim);
  stroke-width: 1.6;
}

/* features */
.features {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s5);
}
.feature {
  display: grid;
  gap: var(--s4);
  padding: var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.feature .shot {
  width: min(240px, 70%);
  justify-self: center;
}
.feature p {
  color: var(--text-dim);
}
.tag-pro {
  display: inline-block;
  margin-left: var(--s2);
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-link);
  color: var(--accent-link);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: 2px;
}
@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* audience */
.audience {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
.audience li {
  padding-left: var(--s4);
  border-left: 3px solid var(--accent);
}
.audience strong {
  display: block;
}
.audience span {
  color: var(--text-dim);
}
@media (min-width: 720px) {
  .audience {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* table */
.table-wrap {
  overflow-x: auto;
  margin-top: var(--s5);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
th,
td {
  padding: var(--s3) var(--s4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
thead th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}
tbody th {
  font-weight: 700;
}

/* under the hood */
.facts {
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s3);
}
.facts li {
  padding: var(--s4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.callout {
  margin-top: var(--s5);
  padding: var(--s4) var(--s5);
  background: var(--bg-surface2);
  border-radius: 20px;
}
.prose h3 {
  margin-top: var(--s6);
}
.callout p:first-child {
  margin-top: 0;
}

/* faq */
details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  margin-top: var(--s3);
}
summary {
  cursor: pointer;
  padding: var(--s4);
  font-weight: 700;
  font-size: 16px;
  list-style-position: inside;
}
details > p {
  margin: 0;
  padding: 0 var(--s4) var(--s4);
  color: var(--text-dim);
}

/* credits */
.credits dt {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  margin-top: var(--s4);
}
.credits dd {
  margin: var(--s1) 0 0;
}

/* ---- home (coming soon) ---------------------------------------------- */

.coming {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.coming main {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: var(--s6) var(--s4);
}
.coming .logo {
  width: 72px;
  height: 72px;
}
.coming h1 {
  margin-top: var(--s4);
}
.coming .soon {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-top: var(--s3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.coming .lead {
  margin-left: auto;
  margin-right: auto;
}
.coming .cta-row {
  justify-content: center;
}
.coming .site-footer {
  margin-top: 0;
  width: 100%;
}
.coming .site-footer {
  text-align: center;
}
.coming .site-footer ul {
  justify-content: center;
}

.notfound main {
  padding: var(--s7) 0;
}
