/* ==========================================================================
   HomeRoam — marketing site
   The tokens below are lifted verbatim from the app (src/theme/palette.json
   and src/theme/typography.ts) so the site and the product are provably the
   same brand rather than an approximation of it.
   ========================================================================== */

/* --- Fonts. Self-hosted, the same files the app bundles: exact match, no
       third-party request, and nothing to break if a CDN does. ------------ */
@font-face {
  font-family: 'Archivo Expanded';
  src: url('fonts/ArchivoExpanded-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Expanded';
  src: url('fonts/ArchivoExpanded-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* palette.json, verbatim */
  --cream: #f1e4c8;
  --eggshell: #faf3e6;
  --ink: #243958;
  --navy: #2d4b73;
  --teal: #2f7e78;
  --peacock: #4682a9;
  --mustard: #e9a83b;
  --gold: #d9b23d;
  --burnt-orange: #e75f26;
  --red: #d93b30;
  --pink: #e85d82;
  --rust: #ad4718;
  --teal-wash: #bdd0c5;
  --mustard-wash: #f4d9aa;
  --pink-wash: #f5c6c8;

  /* The app uses --teal for borders and marks, where contrast is not a text
     concern. As *text* on cream it measures 3.81:1 — below AA. This is the
     same hue taken darker: 5.14:1 on cream, 5.86:1 on eggshell. Borders and
     dots keep the original teal. */
  --teal-text: #276863;

  --ink-muted: rgba(36, 57, 88, 0.72);
  --hairline: rgba(47, 126, 120, 0.32);

  --display: 'Archivo Expanded', 'Arial Black', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--rust);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
a:hover {
  color: var(--burnt-orange);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--eggshell);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* --- Type -------------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.5rem + 4.2vw, 4.6rem);
}
h2 {
  font-size: clamp(1.85rem, 1.3rem + 2.4vw, 3rem);
}
h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1.3;
}

p {
  margin: 0;
  max-width: var(--measure);
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin: 0 0 0.9rem;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.55vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-muted);
}

/* --- Layout ------------------------------------------------------------ */
.shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
}

section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

/* --- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header[data-stuck='true'] {
  border-bottom-color: var(--hairline);
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover {
  color: var(--rust);
}
@media (max-width: 720px) {
  .site-nav .nav-link {
    display: none;
  }
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.2s ease;
}
.btn:active {
  transform: scale(0.975);
  opacity: 0.85;
}
.btn-primary {
  background: var(--rust);
  color: var(--eggshell);
}
.btn-primary:hover {
  background: var(--burnt-orange);
  color: var(--eggshell);
}
.btn-secondary {
  background: var(--eggshell);
  color: var(--ink);
  border-color: var(--teal);
}
.btn-secondary:hover {
  border-color: var(--rust);
  color: var(--ink);
}
.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
}

/* --- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(2rem, 4vw, 3.25rem) 0;
  overflow: hidden;
}

/* Copy and a live-looking lesson beside it: the right half was dead space
   and the panorama sat entirely below the fold. Showing the product's real
   differentiator — an answer written under the question — earns that space
   far better than emptiness did. */
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.hero-copy {
  display: grid;
  gap: 1.4rem;
  justify-items: start;
  max-width: 17ch;
}
.hero-copy p,
.hero-copy .hero-actions,
.hero-copy .hero-note {
  max-width: 46ch;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4rem);
}

.hero h1 .accent {
  color: var(--rust);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.hero-art {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-bottom: 0;
}

/* --- Marquee of subjects ----------------------------------------------- */
.ticker {
  border-block: 1px solid var(--hairline);
  background: var(--eggshell);
  overflow: hidden;
  padding-block: 0.9rem;
}
.ticker-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: slide 42s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
}
.ticker-track span {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-text);
  white-space: nowrap;
}
.ticker-track span::after {
  content: '✦';
  margin-left: 2.5rem;
  color: var(--mustard);
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* --- Steps ------------------------------------------------------------- */
.steps,
.cards {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  counter-reset: step;
}
.step,
.card {
  background: var(--eggshell);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 0.7rem;
  align-content: start;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--mono);
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--ink);
  font-weight: 700;
}
.step p,
.card p {
  color: var(--ink-muted);
  font-size: 0.98rem;
}
/* A small mark instead of a number: these are qualities, not an order. */
.card::before {
  content: '';
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: var(--teal);
}

/* --- Feature rows ------------------------------------------------------ */
.feature {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
  }
  .feature.reverse .feature-art {
    order: -1;
  }
}
.feature-copy {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.feature-art img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  width: 100%;
}

.tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.tick-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--ink-muted);
}
.tick-list li::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-wash);
}

/* --- Lesson preview ---------------------------------------------------- */
.lesson-card {
  background: var(--eggshell);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid;
  gap: 1.1rem;
  box-shadow: 0 22px 50px -34px rgba(36, 57, 88, 0.5);
}
.lesson-card .lesson-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-text);
}
.lesson-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}
.qa {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: var(--cream);
  border-left: 3px solid var(--mustard);
}
.qa .q {
  font-weight: 600;
}
.qa .a {
  font-size: 0.94rem;
  color: var(--ink-muted);
}
.qa .a strong {
  color: var(--teal-text);
  font-weight: 600;
}
.answer-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}

/* --- Avatar strip ------------------------------------------------------ */
.avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.avatars img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--eggshell);
  box-shadow: 0 0 0 1px var(--hairline);
}

/* --- Pricing ----------------------------------------------------------- */
.plans {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: start;
}
.plan {
  background: var(--eggshell);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  display: grid;
  gap: 0.9rem;
  align-content: start;
}
.plan.featured {
  background: var(--mustard-wash);
  border-color: var(--mustard);
  box-shadow: 0 22px 50px -34px rgba(173, 71, 24, 0.55);
}
.plan .price {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}
.plan .price span {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.badge {
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--rust);
  color: var(--eggshell);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.plan-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* --- FAQ --------------------------------------------------------------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 780px;
}
details {
  background: var(--eggshell);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
details[open] {
  border-color: var(--teal);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--teal-text);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  margin-top: 0.8rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* --- Closing CTA ------------------------------------------------------- */
.closer {
  background: var(--ink);
  color: var(--eggshell);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  text-align: center;
}
.closer h2 {
  color: var(--eggshell);
  max-width: 18ch;
}
.closer p {
  color: rgba(250, 243, 230, 0.78);
  max-width: 48ch;
}
.closer .btn-primary {
  background: var(--mustard);
  color: var(--ink);
}
.closer .btn-primary:hover {
  background: var(--gold);
  color: var(--ink);
}

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.5rem 3.5rem;
  margin-top: clamp(3rem, 7vw, 6rem);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-left: auto;
}
.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.footer-links a:hover {
  color: var(--rust);
}
.colophon {
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  max-width: 60ch;
}

/* --- Scroll reveal ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Long-form (legal) pages ------------------------------------------- */
.prose {
  max-width: 72ch;
  display: grid;
  gap: 1.1rem;
}
.prose h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  margin-top: 2rem;
}
.prose h3 {
  margin-top: 1.25rem;
}
.prose ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-muted);
}
.prose .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.prose strong {
  color: var(--ink);
}
