/* Alex's design for the site (PR #18), on the app's night palette and type (docs/11-design-system.md §2–§3). */
@font-face { font-family: "Lora"; src: url("/fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --night: #242d3b;
  --deep: #1b2330;
  --cream: #f4e6cc;
  --muted: #bdb3a4;
  --paper: #f0e4ce;
  --ink: #2a2b33;
  --ink-soft: #655e54;
  --orange: #a54b25;
  --moon: #f2cf8b;
  --gold: #e8cb9b;
  --line: rgba(244, 230, 204, 0.2);
  --font-body: "Nunito", system-ui, sans-serif;
  --font-display: "Lora", Georgia, serif;
  --header-height: 76px;
}

* { box-sizing: border-box; }

html {
  background: var(--night);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
summary { font: inherit; }
a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--moon); outline-offset: 6px; }
::selection { background: #c69765; color: var(--deep); }

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
h1, h2 { text-wrap: balance; }
h2 { font-size: clamp(38px, 4.4vw, 66px); line-height: 1.13; letter-spacing: -0.045em; }
h2 em { font-weight: 400; }

img { display: block; max-width: 100%; height: auto; }

.shell { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }

.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  line-height: 1.6;
}

/* Header and footer, on every page */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--night); }
.header-inner { height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 30px; }

.wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.045em;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  line-height: 1;
}
.wordmark .brand-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }

.main-nav { display: flex; gap: 32px; font-size: 13px; }
.main-nav a, .site-footer a { transition: color 0.2s; }
.main-nav a:hover, .site-footer a:hover { color: var(--moon); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 12px;
  transition: background 0.2s;
}
.nav-cta:hover { background: rgba(244, 230, 204, 0.07); }
.nav-cta span { font-size: 18px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid currentColor;
  padding-block: 7px;
  font-size: 13px;
}
.text-link:hover { opacity: 0.75; }

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  background: var(--orange);
  color: var(--cream);
  padding: 15px 26px;
  border-radius: 50px;
  font-weight: 700;
}
.primary-link:hover { background: #964220; }

.site-footer { padding-block: 54px 28px; }
.footer-top, .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-top p { font-family: var(--font-display); font-size: 17px; }
.footer-note { margin-top: 36px; max-width: 70ch; color: var(--muted); font-size: 12px; line-height: 1.7; }
.footer-bottom { margin-top: 36px; color: var(--muted); font-size: 11px; }
.footer-bottom nav { display: flex; gap: 28px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 30;
  transform: translateY(-150%);
  background: var(--cream);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 4px;
}
.skip-link:focus { transform: none; }

/* Text pages: support, 404, and the legal pages from docs/legal */
.document { max-width: 760px; padding: 80px 0 120px; min-height: 65vh; }
.document .eyebrow { color: var(--moon); margin-bottom: 24px; }
.document h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 32px; }
.document h2 { font-size: 28px; letter-spacing: -0.02em; margin: 44px 0 12px; }
.document p { color: var(--muted); margin-bottom: 18px; }
.document a:not(.text-link) { color: var(--cream); text-decoration: underline; text-underline-offset: 5px; }
.document .document-intro { font-size: 21px; color: var(--cream); }
.document ul, .document ol { color: var(--muted); padding-left: 22px; margin: 0 0 18px; }
.document li { margin-bottom: 10px; }

.legal h1 { font-size: clamp(40px, 5vw, 60px); }
.legal h3 { font-size: 21px; margin: 32px 0 10px; }
.legal strong { color: var(--cream); font-weight: 800; }
.legal .scroll { overflow-x: auto; margin-bottom: 18px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14.5px; color: var(--muted); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); }
.legal th { color: var(--cream); font-weight: 800; }
.legal mark { background: #f6b6a0; color: var(--ink); padding: 0 3px; border-radius: 4px; }

/* Home: the first screen */
.hero { position: relative; overflow: hidden; background: var(--night); }
.hero-copy { text-align: center; padding-top: 38px; position: relative; z-index: 1; }
.hero-copy .eyebrow { color: var(--moon); }
.hero-copy h1 { font-size: clamp(76px, 7.5vw, 112px); line-height: 0.99; letter-spacing: -0.065em; margin-top: 25px; }
.hero-copy h1 em { color: var(--gold); font-weight: 400; }
.hero-lead { color: var(--muted); font-size: 16px; line-height: 1.65; margin-top: 29px; }
.discover { display: inline-flex; align-items: center; gap: 24px; margin-top: 27px; font-size: 12px; }
.discover span { font-size: 19px; transition: transform 0.2s; }
.discover:hover span { transform: translateY(4px); }

.hero-art { height: clamp(360px, 34vw, 510px); margin-top: -80px; position: relative; isolation: isolate; pointer-events: none; }
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 90%, transparent 100%);
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
  padding-bottom: 36px;
  margin-top: -20px;
  position: relative;
}

/* Home: the ritual, on paper */
.ritual { background: var(--paper); color: var(--ink); padding: 110px 0 100px; position: relative; }
.section-opening { display: grid; grid-template-columns: 1fr 2.2fr 0.3fr; gap: 35px; align-items: start; }
.section-opening > p { padding-top: 10px; color: #8d4f32; }
.section-opening h2 { font-size: clamp(38px, 4.2vw, 60px); }
.section-opening h2 em { color: #8d6b50; }
.section-opening > div > p { font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin-top: 23px; }
.opening-star { color: #ac6d3e; width: 30px; height: 30px; margin-top: 20px; justify-self: end; }

.chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 55px; margin-top: 85px; }
.chapter-heading { display: flex; align-items: baseline; gap: 15px; border-top: 1px solid #c9bba7; padding-top: 24px; }
.chapter-heading > span { font-size: 10px; color: #76644f; }
.chapter h3 { font-size: 27px; letter-spacing: -0.04em; }
.chapter-text { font-size: 14px; line-height: 1.85; color: var(--ink-soft); margin-top: 16px; min-height: 104px; max-width: 310px; }

.phone-figure { margin-top: 34px; }
.phone {
  background: var(--deep);
  padding: 7px;
  border-radius: 35px;
  width: 260px;
  max-width: 100%;
  margin-inline: auto;
  box-shadow: 0 18px 35px -22px rgba(22, 28, 38, 0.55);
}
.phone img { border-radius: 28px; width: 100%; }
.phone-figure figcaption { text-align: center; font-size: 11px; color: #6d604f; margin-top: 25px; line-height: 1.6; }
.chapter:nth-child(2) .phone-figure { padding-top: 40px; }
.chapter:nth-child(3) .phone-figure { padding-top: 80px; }

/* Home: the cove */
.cove { padding-block: 140px; display: grid; grid-template-columns: 1fr 1fr; gap: 130px; align-items: center; }
.cove-visual { position: relative; padding: 26px 0 0; }
.cove-phone { width: 285px; transform: rotate(-5deg); box-shadow: none; outline: 1px solid rgba(244, 230, 204, 0.15); }
.cove-orbit { position: absolute; top: 28px; right: 0; display: flex; align-items: center; gap: 10px; writing-mode: vertical-rl; }
.cove-orbit svg { width: 17px; height: 17px; color: var(--moon); }
.cove-orbit span { font-size: 8px; letter-spacing: 0.22em; color: var(--muted); }
.image-note { font-family: var(--font-display); font-style: italic; font-size: 13px; text-align: center; color: var(--muted); margin-top: 36px; }
.cove-copy > .eyebrow { color: var(--moon); margin-bottom: 30px; }
.cove-copy h2 em { color: var(--gold); }
.cove-copy > p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.85; max-width: 370px; margin-top: 25px; }
.cove-footnote {
  margin-top: 35px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  max-width: 370px;
}
.cove-footnote svg { width: 17px; height: 17px; color: var(--moon); flex-shrink: 0; }

/* Home: privacy, briefly */
.quiet-note { background: #303a48; padding: 90px 0; text-align: center; }
.quiet-note .eyebrow { color: var(--moon); }
.quiet-note h2 { margin-top: 24px; font-size: clamp(40px, 4.6vw, 68px); }
.quiet-note h2 em { color: var(--gold); }
.quiet-details { display: flex; align-items: center; justify-content: center; gap: 55px; margin-top: 40px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.quiet-details svg { width: 14px; height: 14px; color: var(--moon); }
.quiet-note a { margin-top: 30px; font-size: 11px; color: var(--cream); }

/* Home: questions */
.questions { padding-block: 120px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 100px; }
.questions .eyebrow { color: var(--moon); margin-bottom: 30px; }
.questions h2 { font-size: clamp(36px, 3.8vw, 54px); }
.questions h2 em { color: var(--gold); }
.questions > div > p:not(.eyebrow) { font-size: 14px; color: var(--muted); margin-top: 26px; }
.questions .text-link { color: var(--cream); }

.faqs { padding-top: 6px; }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs details:first-child { border-top: 1px solid var(--line); }
.faqs summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 15px; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary:hover { color: var(--moon); }
.faq-mark { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; background: currentColor; top: 5px; width: 12px; height: 1px; }
.faq-mark::after { transform: rotate(90deg); transition: transform 0.2s; }
.faqs details[open] .faq-mark::after { transform: rotate(0); }
.faqs details > p { font-size: 14px; color: var(--muted); line-height: 1.85; padding: 0 25px 24px 0; max-width: 520px; }

/* Home: the end */
.download { text-align: center; background: var(--deep); padding: 50px 24px 100px; overflow: hidden; }
.sleeping-otter {
  width: 210px;
  height: 210px;
  background-image: url("/img/otter-sheet.webp");
  background-size: 200% 200%;
  background-position: 100% 100%;
  margin: -15px auto -30px;
  animation: float 7s ease-in-out infinite;
}
.download .eyebrow { color: var(--moon); position: relative; }
.download h2 { margin-top: 24px; font-size: clamp(42px, 4.7vw, 68px); }
.download h2 em { color: var(--gold); }
.download > p:not(.eyebrow):not(.coming-soon):not(.download-note) { font-size: 14px; color: var(--muted); margin-top: 25px; }
.coming-soon {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  padding: 13px 24px;
  background: var(--orange);
  border-radius: 40px;
  color: var(--cream);
  font-size: 13px;
  margin-top: 28px;
}
.coming-soon span { font-size: 17px; }
.download > a { margin-top: 28px; }
.download-note { color: var(--muted); font-size: 10px; letter-spacing: 0.05em; margin-top: 15px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@media (min-width: 1600px) {
  .shell { width: min(1320px, calc(100% - 160px)); }
  .hero-art { height: 550px; margin-top: -90px; }
  .chapters { gap: 80px; }
  .phone { width: 280px; }
  .cove-phone { width: 310px; }
}

@media (max-width: 1050px) {
  .section-opening { grid-template-columns: 1fr 2.5fr; }
  .opening-star { display: none; }
  .chapters { gap: 28px; }
  .chapter h3 { font-size: 23px; }
  .chapter-text { font-size: 13px; min-height: 120px; }
  .phone { padding: 5px; border-radius: 28px; }
  .phone img { border-radius: 23px; }
  .cove { gap: 60px; padding-block: 100px; }
  .questions { gap: 55px; }
  .hero-art { margin-top: -40px; }
  .hero-copy { padding-top: 48px; }
  .phone-figure figcaption { font-size: 10px; }
}

@media (max-width: 900px) {
  :root { --header-height: 72px; }
  .shell { width: calc(100% - 64px); }
  .main-nav { gap: 20px; font-size: 12px; }
  .wordmark { font-size: 25px; }
  .nav-cta { padding: 8px 15px; gap: 14px; }
}

@media (max-width: 700px) {
  :root { --header-height: 64px; }
  .shell { width: calc(100% - 40px); }
  body { font-size: 16px; }
  .header-inner { gap: 15px; }
  .wordmark { font-size: 25px; }
  .wordmark .brand-icon { width: 32px; height: 32px; border-radius: 9px; }
  .main-nav { display: none; }
  .nav-cta { font-size: 11px; padding: 7px 13px; gap: 16px; }
  .eyebrow { font-size: 9px; letter-spacing: 0.16em; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-top { gap: 20px; }
  .footer-top p { font-size: 15px; }
  .footer-note { margin-top: 28px; }
  .footer-bottom { margin-top: 28px; gap: 20px; }
  .footer-bottom nav { gap: 24px; flex-wrap: wrap; }
  .site-footer { padding-top: 36px; }
  .document { padding-block: 50px 80px; }
  .document .document-intro { font-size: 19px; }

  .hero-copy { padding: 45px 20px 0; }
  .hero-copy h1 { font-size: clamp(65px, 15.8vw, 98px); margin-top: 26px; letter-spacing: -0.065em; }
  .hero-lead { font-size: 14px; margin-top: 25px; }
  .discover { margin-top: 23px; font-size: 11px; }
  .hero-art { height: 330px; margin-top: 4px; margin-inline: -28%; }
  .hero-art img { object-position: center 62%; mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 88%, transparent); }
  .hero-caption { margin-top: -5px; padding-bottom: 26px; justify-content: center; font-size: 8px; letter-spacing: 0.16em; }
  .hero-caption span:last-child { display: none; }

  .ritual { padding-block: 66px; }
  .section-opening { display: block; }
  .section-opening > p { padding: 0; margin-bottom: 23px; }
  .section-opening h2 { font-size: 39px; }
  .section-opening > div > p { font-size: 14px; margin-top: 20px; }
  .desktop-break { display: none; }
  .chapters { grid-template-columns: 1fr; gap: 54px; margin-top: 46px; }
  .chapter-heading { padding-top: 22px; gap: 18px; }
  .chapter h3 { font-size: 28px; }
  .chapter-text { min-height: 0; max-width: 100%; font-size: 14px; margin-top: 12px; }
  .phone-figure, .chapter:nth-child(2) .phone-figure, .chapter:nth-child(3) .phone-figure { margin-top: 26px; padding-top: 0; }
  .phone { width: min(260px, 68vw); padding: 6px; border-radius: 33px; }
  .phone img { border-radius: 27px; }
  .phone-figure figcaption { margin-top: 22px; font-size: 11px; }

  .cove { padding-block: 70px; grid-template-columns: 1fr; gap: 45px; }
  .cove-copy { grid-row: 1; }
  .cove-copy > .eyebrow { margin-bottom: 24px; }
  .cove-copy h2 { font-size: 46px; }
  .cove-copy > p:not(.eyebrow) { font-size: 15px; max-width: none; margin-top: 22px; }
  .cove-footnote { max-width: none; }
  .cove-visual { padding-top: 10px; }
  .cove-phone { width: min(270px, 66vw); }
  .cove-orbit { right: 12px; }
  .image-note { margin-top: 33px; }

  .quiet-note { padding-block: 65px; }
  .quiet-note h2 { font-size: 38px; }
  .quiet-details { gap: 22px; flex-direction: column; margin-top: 30px; font-size: 13px; }
  .quiet-details svg { width: 12px; height: 12px; }

  .questions { grid-template-columns: 1fr; gap: 32px; padding-block: 66px; }
  .questions .eyebrow { margin-bottom: 23px; }
  .questions h2 { font-size: 42px; }
  .questions > div > p:not(.eyebrow) { margin-top: 22px; }
  .faqs summary { font-size: 14px; padding-block: 22px; }
  .faqs details > p { font-size: 13px; }

  .download { padding: 25px 20px 66px; }
  .download h2 { font-size: clamp(36px, 9vw, 48px); }
  .sleeping-otter { width: 190px; height: 190px; margin-bottom: -23px; }
  .coming-soon { font-size: 12px; }
  .download > p:not(.eyebrow):not(.coming-soon):not(.download-note) { font-size: 13px; }
}

@media (max-width: 380px) {
  .header-inner { gap: 10px; }
  .wordmark { font-size: 22px; gap: 8px; }
  .nav-cta { font-size: 10px; gap: 8px; padding-inline: 10px; }
  .hero-copy h1 { font-size: 15.8vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
