:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #5d5d58;
  --line: #d9d7cf;
  --accent: #ff5a1f;
  --accent-2: #2a4bff;
  --hero-ink: #111111;
  --radius: 14px;
  --wrap: 1120px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --surface: #171716;
    --ink: #f2f1ec;
    --muted: #a3a29b;
    --line: #2d2d2a;
    --accent: #ff6b35;
    --accent-2: #6d86ff;
    --hero-ink: #f2f1ec;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap { padding: 0 40px; }
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.wordmark {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.bar nav { display: flex; gap: 20px; }
.bar nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.bar nav a:hover { color: var(--ink); }

/* Hero: the one expressive layer — grainy gradient behind oversized type */
.hero {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 90% at 85% 20%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    radial-gradient(55% 80% at 10% 100%, color-mix(in srgb, var(--accent-2) 40%, transparent), transparent 70%),
    var(--bg);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  .hero::after { mix-blend-mode: screen; opacity: 0.18; }
}
.hero-grid {
  position: relative;
  z-index: 1;
  padding-top: 72px;
  padding-bottom: 80px;
}
@media (min-width: 720px) {
  .hero-grid { padding-top: 120px; padding-bottom: 128px; }
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero .eyebrow { color: var(--hero-ink); opacity: 0.75; }

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(42px, 8.4vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--hero-ink);
}
.lede {
  margin: 28px 0 0;
  max-width: 40ch;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.45;
  color: var(--hero-ink);
}

/* Sections on a 12-column grid */
.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-top: 72px;
  padding-bottom: 24px;
}
@media (min-width: 900px) {
  .section { grid-template-columns: repeat(12, 1fr); gap: 32px; padding-top: 104px; }
  .section-head { grid-column: 1 / span 4; }
  .section > :not(.section-head) { grid-column: 5 / span 8; }
}
.section-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.section-head p { margin: 10px 0 0; color: var(--muted); max-width: 32ch; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 26px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-index {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.card h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.card p { margin: 0; }
.card-meta { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.card-link {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.contact { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .contact div { grid-template-columns: 180px 1fr; gap: 24px; }
}
.contact dt { font-weight: 600; }
.contact dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.contact dd a { color: var(--ink); }

/* Privacy page */
.prose { max-width: 760px; padding-top: 56px; padding-bottom: 24px; }
.prose h1 { font-size: clamp(40px, 7vw, 72px); max-width: none; margin-bottom: 28px; }
.prose h2 { margin: 40px 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 14px; color: var(--ink); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 96px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot p { margin: 0; }
.foot nav a { color: var(--muted); }
