/* Sunmoss site. Colours are the app's pigments (app/src/presentation/theme/theme.ts). */
:root {
  --paper: #F7F2E7;
  --paper-light: #FBF8F1;
  --oat: #EEE8DA;
  --oat-deep: #E3DACA;
  --sage-mist: #EEF0E4;
  --sage: #A7B59C;
  --sage-deep: #6C7B68;
  --clay: #B98468;
  --peach: #F4D6B8;
  --honey: #F3D98C;
  --ink: #3F3A33;
  --ink-soft: #6E675C;
  --ink-faint: #9A9285;
  --frame: #2E3246;

  --bg: var(--paper);
  --surface: var(--paper-light);
  --surface-sunken: var(--oat);
  --line: var(--oat-deep);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-faint: var(--ink-faint);
  --accent: var(--sage-deep);
  --accent-soft: rgba(108, 123, 104, 0.14);

  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --radius: 22px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2E3246;
    --surface: #393D55;
    --surface-sunken: #353950;
    --line: #42465F;
    --text: #F2ECDF;
    --text-soft: #CBC5D6;
    --text-faint: #9C98B1;
    --accent: #B8C6A9;
    --accent-soft: rgba(184, 198, 169, 0.16);
    --frame: #1F2232;
  }
}

* { 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;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

/* Header */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 24px/1 var(--display); letter-spacing: -0.3px;
  color: var(--text); text-decoration: none;
}
.wordmark .sun {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF3D0, var(--honey) 55%, var(--peach));
  box-shadow: 0 0 0 4px rgba(243, 217, 140, 0.25);
}
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--text-soft); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero .wrap {
  display: grid; gap: clamp(40px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.04; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--text-soft); max-width: 34em; margin: 22px 0 32px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 14px; border-radius: 16px;
  background: var(--text); color: var(--bg); text-decoration: none;
}
.soon .phone-glyph {
  width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 6px; position: relative; opacity: 0.9;
}
.soon .phone-glyph::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 2px;
  margin-left: -3px; border-radius: 2px; background: currentColor;
}
.soon small { display: block; font-size: 12px; opacity: 0.75; line-height: 1.2; }
.soon strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.text-link { color: var(--text-soft); font-weight: 500; text-decoration: none; }
.text-link:hover { color: var(--text); }

/* Phone demo */
.phone {
  justify-self: center; position: relative; width: min(330px, 100%); aspect-ratio: 572 / 1024;
  border-radius: 46px; padding: 10px; background: var(--frame);
  box-shadow: 0 30px 60px -20px rgba(46, 50, 70, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--paper); }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .painted { opacity: var(--energy, 0); transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1); }
.today {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 16px 16px 12px;
  border-radius: 26px; background: rgba(251, 248, 241, 0.94); color: #3F3A33;
  box-shadow: 0 10px 30px -12px rgba(63, 58, 51, 0.35);
}
.today-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.today-head span:first-child { font: 500 19px/1.2 var(--display); }
.today-head span:last-child { font-size: 12px; color: #6E675C; }
.goal {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 4px;
  border: 0; border-top: 1px solid #EEE8DA; background: none; color: inherit;
  font: 500 15px/1.3 var(--body); text-align: left; cursor: pointer;
}
.goal:first-of-type { border-top: 0; }
.goal .tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #A7B59C;
  display: grid; place-items: center; transition: background .3s, border-color .3s;
}
.goal .tick svg { width: 13px; height: 13px; opacity: 0; transition: opacity .2s; }
.goal[aria-pressed="true"] .tick { background: #6C7B68; border-color: #6C7B68; }
.goal[aria-pressed="true"] .tick svg { opacity: 1; }
.goal[aria-pressed="true"] .label { color: #6E675C; }
.goal .tag { margin-left: auto; font-size: 11px; color: #6C7B68; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.demo-note { text-align: center; font-size: 13px; color: var(--text-faint); margin-top: 14px; }

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { color: var(--text-soft); margin: 14px 0 0; font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: 600 16px/1 var(--body);
}
.step p { color: var(--text-soft); margin: 10px 0 0; }

.gentle { background: var(--surface-sunken); }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); border: 1px solid var(--line);
}
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--text-soft); margin: 6px 0 0; }

.evening { padding: 0; }
.evening-band {
  position: relative; min-height: clamp(420px, 60vw, 620px); display: flex; align-items: flex-end;
  background: #353950 url("/img/evening-fireflies-bloom.webp") center 62% / cover no-repeat;
}
.evening-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46, 50, 70, 0.75) 0%, rgba(46, 50, 70, 0.1) 45%, rgba(46, 50, 70, 0) 60%);
}
.evening-copy {
  position: absolute; top: clamp(40px, 7vw, 88px); left: 0; right: 0; z-index: 1; color: #F2ECDF;
}
.evening-copy p { color: #E8E1EE; max-width: 30em; font-size: 18px; margin: 14px 0 0; }

.closing { text-align: center; }
.closing h2 { margin-bottom: 14px; }
.closing p { color: var(--text-soft); font-size: 18px; margin: 0 auto 28px; max-width: 30em; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--text-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.disclaimer { width: 100%; margin: 0; }

/* Plain pages (support, 404) */
.page { padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 8vw, 104px); }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 18px; }
.page .lede { margin-top: 0; }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin: 28px 0; }
.card h2 { font-size: 24px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-soft); }
.faq h3 { font-size: 20px; margin: 28px 0 6px; }
.faq p { margin: 0; color: var(--text-soft); }

/* Legal pages (privacy, terms) */
.legal .wrap { max-width: 760px; }
.legal .updated { color: var(--text-faint); font-size: 15px; margin: 0 0 8px; }
.legal h2 { font-size: 26px; line-height: 1.25; margin: 48px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-soft); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .summary { margin: 28px 0 8px; }
.legal .summary h2 { margin-top: 0; }
.legal .summary ul { margin: 10px 0 0; }
.legal .toc { margin: 24px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 15px; }
.legal .toc li { margin: 4px 0; break-inside: avoid; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }
@media (max-width: 560px) { .legal .toc { columns: 1; } }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { width: min(300px, 82%); }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .site-nav a:first-child { display: none; }
}
