/* ── Ascentra design system ─────────────────────────────────────── */
:root {
  /* warm dark palette — see /dark-mode-ab.html for accent rationale */
  --bg: #0F0E0C;
  --surface: #1A1916;
  --surface-2: #221F1B;
  --ink: #F5F3EE;
  --ink-2: #C8C5BC;
  --ink-3: #8E8B82;
  --ink-4: #5A5853;
  --accent: #E8E1D2;            /* warm cream — user bubbles, eyebrows, primary CTAs, active dots */
  --accent-ink: #0F0E0C;        /* text on accent surfaces */
  --line: rgba(245,243,238,0.08);
  --line-2: rgba(245,243,238,0.18);
  --ok: #5BD675;                /* live / done indicator — only chromatic moment in the system */
  --shadow: rgba(0,0,0,0.45);
  --placeholder-bg: transparent;
  --placeholder-stripe: rgba(245,243,238,0.05);
  --placeholder-ink: rgba(245,243,238,0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ── Type ───────────────────────────────────────────────────────── */
.serif {
  font-family: 'Georgia', 'Times New Roman', serif;
  letter-spacing: -0.02em;
  font-weight: 400;
}
h1, h2, h3 { margin: 0; font-weight: 400; }
h1.display {
  font-family: 'Georgia', serif;
  font-size: clamp(56px, 9vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
h2.display {
  font-family: 'Georgia', serif;
  font-size: clamp(42px, 6vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.022em;
}
h3.display {
  font-family: 'Georgia', serif;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.mono {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: 0;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 720px) { .container { padding: 0 24px; } }

section { padding: 120px 0; position: relative; }
section.tight { padding: 72px 0; }
@media (max-width: 720px) { section { padding: 80px 0; } }

.divider { height: 1px; background: var(--line); width: 100%; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Georgia', serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  width: 24px;
  height: 32px;
  display: inline-block;
  background-image: url('logo-mark-inverse.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: none;
}
.site-footer .brand-mark { width: 28px; height: 38px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 16px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-1px); background: #FFFFFF; color: var(--accent-ink); }
.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-arrow { transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ── Placeholder blocks (imagery) ───────────────────────────────── */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--placeholder-stripe) 0px,
      var(--placeholder-stripe) 1px,
      transparent 1px,
      transparent 12px
    ),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--placeholder-ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  pointer-events: none;
}
.placeholder > span {
  position: relative;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--line-2); }
.card .eyebrow { margin-bottom: 18px; display: block; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 48px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col a:not(.brand) {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--ink); }
.footer-tagline {
  font-family: 'Georgia', serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  max-width: 320px;
  margin: 14px 0 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ── Tweaks panel ───────────────────────────────────────────────── */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px;
  min-width: 240px;
  box-shadow: 0 20px 60px var(--shadow);
  display: none;
  font-family: 'Hanken Grotesk', sans-serif;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h5 {
  margin: 0 0 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 500;
}
.tweak-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.tweak-row:last-child { margin-bottom: 0; }
.tweak-row label { font-size: 13px; color: var(--ink-2); }
.toggle {
  position: relative;
  width: 40px; height: 22px;
  background: var(--line-2);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.2s;
}
.toggle[aria-pressed="true"] { background: var(--accent); }
.toggle[aria-pressed="true"]::after { transform: translateX(18px); background: var(--bg); }

/* ── Form ───────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.field label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
}
.field input, .field textarea, .field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select { appearance: none; cursor: pointer; }

/* ── Fade-in on load ────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.fade-in.d1 { animation-delay: 0.12s; }
.fade-in.d2 { animation-delay: 0.24s; }
.fade-in.d3 { animation-delay: 0.36s; }
.fade-in.d4 { animation-delay: 0.48s; }
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* ── Marquee ────────────────────────────────────────────────────── */
.marquee {
  display: flex;
  overflow: hidden;
  gap: 80px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 80px;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-family: 'Georgia', serif;
  font-size: 28px;
  color: var(--ink-3);
  letter-spacing: -0.02em;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}
