/* Xeliuh: warm ivory and sand, slate ink from the logo, ochre for accents.
   Light is the default; dark follows the system unless the visitor picked one. */

:root {
  color-scheme: light;
  --bg: #faf6ef;
  --bg-soft: #f3ecdf;
  --surface: #fffdf9;
  --line: #e6dccb;
  --ink: #2c3e4a;
  --ink-soft: #55656f;
  --logo-ink: #334551;
  --logo-accent: #c09b4c;
  --accent: #8a6a25;          /* ochre dark enough for text on ivory (5:1) */
  --accent-soft: #efe2c4;
  --sage: #6f7f6a;
  --focus: #8a6a25;
  --shadow: 0 1px 2px rgb(44 62 74 / 6%), 0 8px 24px rgb(44 62 74 / 6%);
  --radius: 18px;
  --wrap: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #172129;
    --bg-soft: #1d2a33;
    --surface: #213039;
    --line: #2f414c;
    --ink: #f1e8d8;
    --ink-soft: #b9b2a5;
    --logo-ink: #f1e8d8;
    --logo-accent: #d6b26a;
    --accent: #e0bf7a;
    --accent-soft: #3a3626;
    --sage: #9aab92;
    --focus: #e0bf7a;
    --shadow: 0 1px 2px rgb(0 0 0 / 25%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #172129;
  --bg-soft: #1d2a33;
  --surface: #213039;
  --line: #2f414c;
  --ink: #f1e8d8;
  --ink-soft: #b9b2a5;
  --logo-ink: #f1e8d8;
  --logo-accent: #d6b26a;
  --accent: #e0bf7a;
  --accent-soft: #3a3626;
  --sage: #9aab92;
  --focus: #e0bf7a;
  --shadow: 0 1px 2px rgb(0 0 0 / 25%), 0 8px 24px rgb(0 0 0 / 25%);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

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

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

/* Logo: the sprite's dark parts follow --logo-ink, the gold stroke --logo-accent. */
.logo-mark, .logo-word { color: var(--logo-ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand .logo-mark { width: 40px; height: 27px; }
.brand .logo-word { width: 84px; height: 23px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.tools { display: flex; gap: 6px; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .8125rem/1 var(--font); letter-spacing: .04em;
  min-width: 40px; height: 36px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip:hover { border-color: var(--accent); }
.chip svg { width: 18px; height: 18px; }
.chip .moon { display: none; }
:root[data-theme="dark"] .chip .sun { display: none; }
:root[data-theme="dark"] .chip .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip .sun { display: none; }
  :root:not([data-theme="light"]) .chip .moon { display: block; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(36rem 22rem at -5% 0%, color-mix(in srgb, var(--sage) 14%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px;
  padding-block: clamp(56px, 10vw, 120px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
h1 {
  margin: 0 0 20px; font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.06; letter-spacing: -.025em; font-weight: 700;
  text-wrap: balance;
}
.lead { margin: 0 0 32px; font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.button.primary { background: var(--ink); color: var(--bg); }
.button.primary:hover { transform: translateY(-1px); }
.button.ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button.ghost:hover { border-color: var(--accent); }
.hero-art { justify-self: center; width: min(100%, 420px); }
.hero-art .logo-mark { width: 100%; height: auto; aspect-ratio: 734 / 482; filter: drop-shadow(0 18px 30px rgb(44 62 74 / 10%)); }

/* Sections */
section { padding-block: clamp(56px, 8vw, 96px); }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 40em; margin-bottom: 36px; }
h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.section-head p { margin: 0; color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--ink-soft); }
.card .tag {
  align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px;
}
.card .more { margin-top: auto; padding-top: 8px; font-weight: 600; text-decoration: none; }
.card .more::after { content: " →"; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; list-style: none; }
.principles li { border-top: 2px solid var(--logo-accent); padding-top: 18px; }
.principles p { margin: 0; color: var(--ink-soft); }
.note {
  margin: 40px 0 0; padding: 20px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed var(--line); color: var(--ink-soft);
}

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact .card a { font-size: 1.15rem; font-weight: 600; word-break: break-word; }
address { font-style: normal; color: var(--ink); }

/* Long-form pages (privacy) */
.prose { max-width: 44em; padding-block: clamp(40px, 7vw, 80px); }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 36px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated { color: var(--ink-soft); font-size: .95rem; }

.not-found { text-align: center; padding-block: clamp(80px, 14vw, 160px); }
.not-found .logo-mark { width: 120px; height: auto; aspect-ratio: 734 / 482; margin: 0 auto 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; font-size: .9375rem; color: var(--ink-soft); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.foot .brand .logo-mark { width: 30px; height: 20px; }
.foot .brand .logo-word { width: 64px; height: 18px; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--ink-soft); }

/* Small screens */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { order: -1; width: min(62%, 260px); justify-self: start; }
  .cards, .principles, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .brand .logo-word { width: 72px; height: 20px; }
  .bar { min-height: 60px; }
  .actions .button { flex: 1 1 auto; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
.not-found .lead { margin-inline: auto; }
