/* Emberveil — one stylesheet for the whole site.
   The palette is lifted from the app's src/constants/tokens.ts so the site and
   the product are the same object. Do not hand-copy these values into a page;
   add to this file instead. */

:root {
  --paper:      #F4EFE6;
  --panel:      #FBF8F3;
  --ink:        #191919;
  /* The app's C.textMuted is #847F79. It measures only 3.46:1 on this paper,
     which is fine for a small label on a phone but too weak for the
     paragraphs this site sets in it, so it is darkened along the same hue
     (32.7deg) and saturation to clear 4.5:1. Measured, not guessed. */
  --muted:      #6A6662;
  --rule:       #DCD3C3;
  --accent:     #2F7BA7;
  --accent-ink: #235C7E;
  --flag:       #AA8413;
  /* The map's own land surface, measured off design/reference/cream-map-reference.png.
     It backs the phone screenshot so the image has nothing white behind it. */
  --land:       #CEBEA7;
  /* The app's C.gold, darkened along the same hue (40deg) and saturation.
     #9D7525 is sized as a graphic indicator in the app and measures 3.96:1
     here, where it is set as small text and owes 4.5:1. */
  --gold:       #84621F;
  --btn-bg:       #235C7E;
  --btn-bg-hover: #2F7BA7;
  --btn-fg:       #FFFFFF;
  --shadow:     0 1px 2px rgba(25,25,25,0.06), 0 8px 24px rgba(25,25,25,0.07);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #17140F;
    --panel:      #1F1B15;
    --ink:        #EDE7DB;
    --muted:      #A39C90;
    --rule:       #342E25;
    --accent:     #6FB2D7;
    --accent-ink: #9CCBE6;
    --flag:       #D7B34B;
    --land:       #4A4136;
    --gold:       #D7B34B;
    --btn-bg:       #6FB2D7;
    --btn-bg-hover: #9CCBE6;
    --btn-fg:       #17140F;
    --shadow:     0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:      #17140F;
  --panel:      #1F1B15;
  --ink:        #EDE7DB;
  --muted:      #A39C90;
  --rule:       #342E25;
  --accent:     #6FB2D7;
  --accent-ink: #9CCBE6;
  --flag:       #D7B34B;
  --land:       #4A4136;
  --gold:       #D7B34B;
  --btn-bg:       #6FB2D7;
  --btn-bg-hover: #9CCBE6;
  --btn-fg:       #17140F;
  --shadow:     0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.45);
  color-scheme: dark;
}

* { 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(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Georgia, because that is the face the app sets for its own wordmark
   (FONT.serif in tokens.ts). */
.serif { font-family: Georgia, 'Times New Roman', serif; }

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}
.wrap--narrow { max-width: 44rem; }

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

/* ---------- site header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--rule);
}
.site-nav {
  display: flex;
  gap: clamp(1rem, 4vw, 1.9rem);
  font-size: 0.95rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn--primary:hover { background: var(--btn-bg-hover); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn--quiet:hover { border-color: var(--muted); }

/* ---------- sections ---------- */

section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
section + section { border-top: 1px solid var(--rule); }

h1, h2, h3 { text-wrap: balance; }
h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 0.6rem;
}
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; }
.section-lede {
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2.5rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .step {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.6rem;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
