:root {
  --color-bg: #f5f1ea;
  --color-surface: #fffdf9;
  --color-ink: #16130f;
  --color-muted: #6b645a;
  --color-rule: #ddd5c8;
  --color-live: #e5322d;
  --color-live-soft: #fbe3e1;

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-hero: clamp(2.75rem, 1.5rem + 6vw, 6rem);
  --text-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);

  --space-gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --space-section: clamp(3.5rem, 2.5rem + 5vw, 8rem);
  --measure: 68ch;

  --duration-fast: 150ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #12110f;
    --color-surface: #1b1916;
    --color-ink: #f2ede4;
    --color-muted: #a39b8f;
    --color-rule: #34302a;
    --color-live: #ff5a52;
    --color-live-soft: #3a1c1a;
  }
}

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

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

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-live); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-live);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--color-rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.brand { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.site-nav { display: flex; gap: 1.25rem; font-size: var(--text-sm); }
.site-nav a { text-decoration: none; color: var(--color-muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-ink); }

/* Live badge */
.live {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-live); background: var(--color-live-soft);
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.live::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: currentColor; animation: pulse 1.6s var(--ease-out-expo) infinite;
}
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 70% { opacity: 0.25; transform: scale(1.6); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }

/* Hero */
.hero { padding: var(--space-section) 0 calc(var(--space-section) * 0.75); }
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-hero); line-height: 0.98; letter-spacing: -0.02em;
  margin: 1.5rem 0 1.75rem; max-width: 14ch;
}
.hero h1 em { color: var(--color-live); }
.lede { font-size: var(--text-lg); color: var(--color-muted); max-width: 46ch; margin: 0; }

/* Sections */
.section { padding: var(--space-section) 0; border-top: 1px solid var(--color-rule); }
.section-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .section-grid { grid-template-columns: 1fr 2fr; gap: 4rem; } }
.eyebrow { font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-h2); line-height: 1.1; margin: 0.5rem 0 0; }

.services { list-style: none; margin: 0; padding: 0; }
.services li { display: grid; grid-template-columns: 3rem 1fr; padding: 1.5rem 0; border-bottom: 1px solid var(--color-rule); }
.services li:first-child { padding-top: 0; }
.services .num { font-family: var(--font-display); font-size: 1.5rem; color: var(--color-live); line-height: 1.2; }
.services h3 { font-size: var(--text-lg); font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.services p { margin: 0; color: var(--color-muted); }

.contact-card {
  background: var(--color-surface); border: 1px solid var(--color-rule);
  border-radius: 14px; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  box-shadow: 0 1px 0 var(--color-rule), 0 24px 48px -32px rgb(0 0 0 / 0.25);
}
.contact-card a.email { font-family: var(--font-display); font-size: var(--text-h2); text-decoration: none; word-break: break-all; }

/* Prose (privacy) */
.prose { max-width: var(--measure); padding: var(--space-section) 0; }
.prose h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-h2); line-height: 1.1; margin: 0 0 0.5rem; }
.prose h2 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; margin: 2.5rem 0 0.5rem; }
.prose .meta { color: var(--color-muted); font-size: var(--text-sm); margin-bottom: 2rem; }
.prose ul { padding-left: 1.2rem; }

/* Callback */
.callback { padding: var(--space-section) 0; max-width: 640px; }
.code-box {
  display: flex; gap: 0.75rem; align-items: stretch; margin: 1.5rem 0;
  background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: 10px; padding: 0.5rem;
}
.code-box code {
  flex: 1; min-width: 0; padding: 0.6rem 0.75rem; overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--text-sm);
}
.btn {
  font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  border: 0; border-radius: 7px; padding: 0 1rem;
  background: var(--color-ink); color: var(--color-bg);
  transition: transform var(--duration-fast) var(--ease-out-expo), opacity var(--duration-fast);
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }
.notice { color: var(--color-muted); font-size: var(--text-sm); }
.notice.error { color: var(--color-live); }
[hidden] { display: none !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-rule); padding: 2rem 0; font-size: var(--text-sm); color: var(--color-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
