/* Sunglow website. Palette and feel follow app/src/lib/theme.ts (Golden hour / Night). */

:root {
  color-scheme: light;
  --bg: #FFF1E6;
  --ink: #3E2A2E;
  --muted: #6B4F53;
  --link: #A03F18;
  --rule: rgba(120, 70, 60, .18);
  --focus: #A03F18;
  --sky-top: #FFF1E6;
  --sky-mid: #FFD7B3;
  --sky-low: #FFB38A;
  --sun-hi: #FFF7E6;
  --sun-mid: #FFC872;
  --sun-lo: #FF9456;
  --glow: rgba(255, 165, 105, .55);
  --on-sun: #2A1A1E;
  --sun-size: clamp(150px, 30vw, 230px);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0e16;
    --ink: #F3ECE4;
    --muted: #BFB5AC;
    --link: #FFCE86;
    --rule: rgba(255, 255, 255, .12);
    --focus: #FFCE86;
    --sky-top: #0b0e16;
    --sky-mid: #231f3a;
    --sky-low: #7A3E38;
    --sun-hi: #FFF3DC;
    --glow: rgba(214, 112, 72, .5);
  }
}

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

html {
  background: var(--bg);
  scrollbar-color: var(--muted) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sun-mid); color: var(--on-sun); }

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--sun-mid);
  color: var(--on-sun);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Layout: 16px gutter on phones, centred measure on desktop. */
.wrap {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}
.brand {
  color: var(--ink);
  font-weight: 800;
  font-size: .9375rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: .25em; }

/* Hero: a sky that the sun sets into. */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-low) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-top: clamp(24px, 6vw, 56px);
}
.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lead {
  max-width: 34ch;
  margin: 20px 0 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--ink);
}
.lead strong { font-weight: 700; }

.scene {
  position: relative;
  height: clamp(230px, 40vw, 380px);
  margin-top: clamp(32px, 6vw, 56px);
}

.orb {
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: var(--sun-size);
  height: var(--sun-size);
  transform: translate(-50%, 0);
  animation: sink 2.6s cubic-bezier(.22, .8, .3, 1) both;
}
.orb::before {
  content: "";
  position: absolute;
  inset: -70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  animation: breathe 9s ease-in-out infinite;
}
.disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--sun-hi) 0%, #FFCF85 48%, var(--sun-lo) 100%);
}

/* The ground is the page colour, so the sun sets behind the horizon. */
.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background: var(--bg);
}

@keyframes sink {
  from { transform: translate(-50%, 0); }
  to   { transform: translate(-50%, 40%); }
}
@keyframes breathe {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

/* Sections */
.section { padding-block: clamp(56px, 10vw, 112px); }
.section h2 {
  margin: 0 0 clamp(24px, 4vw, 40px);
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.section h2 + p { margin-top: 0; }

/* How it works: a sun-path of three steps. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 36px;
  max-width: 60ch;
}
.steps li {
  position: relative;
  padding-left: 52px;
}
.steps li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sun-mid), var(--sun-lo));
  box-shadow: 0 6px 16px -4px var(--glow);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: -26px;
  width: 2px;
  background: var(--rule);
}
.steps h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.steps p { margin: 0; color: var(--muted); }

/* Privacy summary list on the landing page. */
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 62ch;
}
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sun-mid);
}

.text-link { font-weight: 700; }

/* Get the app */
.get { background: linear-gradient(180deg, var(--bg), var(--sky-mid) 180%); }
.get-inner { text-align: left; }
.get h2 { max-width: 16ch; }
.get p { max-width: 46ch; margin: 0 0 28px; color: var(--ink); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 26px 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFC870 0%, #FF9D5A 50%, #FF7E66 100%);
  color: var(--on-sun);
  text-decoration: none;
  box-shadow: 0 14px 32px -14px rgba(255, 126, 102, .7);
  cursor: default;
}
.badge svg { flex: none; }
.badge-text { display: grid; line-height: 1.15; }
.badge-text small { font-size: .8125rem; font-weight: 600; opacity: .85; }
.badge-text strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 28px;
  color: var(--muted);
  font-size: .9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--ink); }

/* Document pages (privacy, support, 404) */
.doc { padding-block: clamp(40px, 7vw, 72px); }
.doc h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.03em;
}
.doc .meta { margin: 0 0 32px; color: var(--muted); font-size: .9375rem; }
.prose { max-width: 66ch; }
.prose h2 {
  margin: 2.2em 0 .5em;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.prose p, .prose ul { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.faq-title {
  margin: 40px 0 16px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.faq { max-width: 66ch; border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); padding-block: 18px; }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--link);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; color: var(--ink); }

.not-found {
  min-height: 70vh;
  display: grid;
  align-content: center;
}
.not-found h1 { margin-bottom: 12px; }

/* Keep the sun's motion calm and optional. */
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; transform: translate(-50%, 40%); }
  .orb::before { animation: none; opacity: .9; }
}

@media (min-width: 720px) {
  .steps { gap: 44px; }
}

@media (max-width: 380px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: .875rem; }
  .brand { letter-spacing: .14em; }
}
