/* Encounter's website. Colours and type follow the app
   (app/lib/app/theme/room_colors.dart, app_theme.dart). Fonts are served from
   this site, never from Google. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #F5EFE6;          /* linen */
  --surface: #FBF7F1;     /* cream */
  --band: #EDE4D8;        /* sand */
  --ink: #2E2723;
  --muted: #6F635B;       /* inkMuted, a touch darker for small text on linen */
  --accent: #B85C42;      /* terracotta */
  --accent-ink: #FBF7F1;
  --amber: #D9A24E;
  --line: #D8CCBE;        /* seam */
  --person-ink: #2E2723;
  --radius: 20px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1714;        /* night */
    --surface: #251F1B;   /* walnut */
    --band: #251F1B;
    --ink: #F1E7DC;       /* parchment */
    --muted: #B3A598;
    --accent: #E08A6D;    /* ember */
    --accent-ink: #1C1714;
    --amber: #E9B872;     /* candle */
    --line: #4A3F38;      /* shadowSeam */
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons, shaped like the app's (stadium, 52 px tall). */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button-small { min-height: 42px; padding: 0 20px; font-size: 0.95rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: auto; height: 30px; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 104px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.9rem; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 6px 14px; border-radius: 999px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { margin: 0; width: 100%; }
.hero-art svg { width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 400px; margin-inline: auto; }
}

/* The orbit illustration */
.you { fill: var(--amber); }
.person text { font: 600 24px var(--serif); fill: var(--person-ink); fill-opacity: 0.7; text-anchor: middle; dominant-baseline: central; }
.room { opacity: 1; }
@media (prefers-color-scheme: dark) { .room { opacity: 0.08; } }
.drift-a { animation: drift 9s ease-in-out infinite; }
.drift-b { animation: drift 11s ease-in-out -3s infinite reverse; }
.drift-c { animation: drift 13s ease-in-out -6s infinite; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -6px); }
}
@media (prefers-reduced-motion: reduce) { .drift-a, .drift-b, .drift-c { animation: none; } }

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.band { background: var(--band); }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }

.cards { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--muted); margin: 0; }
.step { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 16px; }

.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.points li { padding-left: 22px; border-left: 3px solid var(--accent); }
.points p { color: var(--muted); margin: 0; }

.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Beta */
.beta-box { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(28px, 6vw, 64px); text-align: center; }
.beta-box .lede { margin-inline: auto; }
.beta-soon { display: inline-block; margin: 12px 0 0; padding: 12px 22px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); font-weight: 700; }

/* Sign-up form */
.signup { display: grid; gap: 18px; max-width: 460px; margin: 28px auto 0; text-align: left; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 700; padding: 0; }
.signup input[type="text"], .signup input[type="email"] {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; min-height: 52px;
}
.signup input:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.choices label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.signup input[type="radio"], .signup input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.signup .button { width: 100%; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.small { font-size: 0.9rem; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 24px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1rem; font-family: var(--sans); font-weight: 700; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:not(.brand) { color: var(--ink); }
.site-footer .brand { margin-bottom: 12px; }
.site-footer .brand img { height: 26px; }
.footer-base { margin-top: 32px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }

/* Legal pages (rendered from docs/legal/*.md) */
.page { padding: clamp(40px, 6vw, 72px) 0 80px; }
.prose { width: min(760px, 100% - 32px); margin-inline: auto; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); min-width: 9em; }
.prose th { font-weight: 700; }
.prose code { font-size: 0.9em; }
.draft-note { background: color-mix(in srgb, var(--amber) 18%, transparent); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
