/* Anologe — shared design system */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Inter+Tight:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Type */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Color */
  --bg: #fafaf7;
  --bg-1: #f3f3ee;
  --bg-card: #ffffff;
  --ink: #0a0a0a;
  --ink-1: #1c1c1a;
  --mute: #6b6b66;
  --mute-1: #98988f;
  --line: rgba(10, 10, 10, 0.09);
  --line-strong: rgba(10, 10, 10, 0.18);
  --accent: #d8ea2c;
  --accent-ink: #1a1d00;
  --good: #1f8a5b;
  --warn: #c87a00;

  /* Density */
  --density: 1;
  --space-1: calc(4px * var(--density));
  --space-2: calc(8px * var(--density));
  --space-3: calc(12px * var(--density));
  --space-4: calc(16px * var(--density));
  --space-5: calc(24px * var(--density));
  --space-6: calc(32px * var(--density));
  --space-7: calc(48px * var(--density));
  --space-8: calc(64px * var(--density));
  --space-9: calc(96px * var(--density));
  --space-10: calc(128px * var(--density));

  --container: 1280px;
  --container-narrow: 980px;

  --radius: 3px;
  --radius-card: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* Type scale */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink); display: inline-block;
}
.eyebrow.accent .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(216, 234, 44, 0.22); }

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1, 'zero' 1; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 500; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.028em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.18; letter-spacing: -0.018em; }
h4 { font-size: 17px; line-height: 1.28; letter-spacing: -0.012em; font-weight: 500; }

p { margin: 0; }
.lede { font-size: 18px; line-height: 1.55; color: var(--mute); max-width: 56ch; text-wrap: pretty; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }
.section { padding: var(--space-9) 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-tight { padding: var(--space-8) 0; }

.row { display: flex; gap: var(--space-4); }
.col { display: flex; flex-direction: column; gap: var(--space-4); }

/* Section heading block */
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
  align-items: baseline;
}
.section-head .label { padding-top: 6px; }
.section-head .title { max-width: 720px; }
.section-head .title h2 { margin-bottom: var(--space-3); }
.section-head .title p { color: var(--mute); font-size: 16px; max-width: 60ch; }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* Nav */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.nav-wrap.scrolled { border-bottom-color: var(--line); }
.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-brand .mark {
  width: 22px; height: 22px;
  background: var(--ink);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.nav-brand .mark::before,
.nav-brand .mark::after {
  content: '';
  position: absolute;
  background: var(--accent);
}
.nav-brand .mark::before {
  left: 3px; top: 3px; width: 6px; height: 16px;
}
.nav-brand .mark::after {
  right: 3px; top: 9px; width: 10px; height: 4px;
}

.nav-links {
  display: flex; gap: 2px; align-items: center;
  font-size: 14px;
}
.nav-links a {
  padding: 8px 12px;
  color: var(--mute);
  position: relative;
  transition: color 160ms;
  letter-spacing: -0.005em;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: 2px;
  height: 1.5px;
  background: var(--ink);
}

.nav-cta {
  display: flex; align-items: center; gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  transition: background 160ms, border-color 160ms, color 160ms, transform 160ms;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-1); }
.btn.primary {
  background: var(--ink);
  color: #fafaf7;
  border-color: var(--ink);
}
.btn.primary:hover { background: #000; }
.btn.accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.accent:hover { filter: brightness(0.96); }
.btn.ghost { border-color: transparent; padding: 10px 12px; }
.btn .arrow { transition: transform 200ms; }
.btn:hover .arrow { transform: translateX(2px); }
.btn.sm { padding: 7px 12px; font-size: 13px; }

/* Pills / tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  white-space: nowrap;
}
.tag .d { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.tag.live .d { background: var(--good); box-shadow: 0 0 0 3px rgba(31, 138, 91, 0.15); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

/* Mono divider */
.mono-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mono-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.mono-rule::before {
  content: '—';
  color: var(--mute-1);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: var(--space-8) 0 var(--space-6);
  margin-top: var(--space-9);
  background: var(--bg);
}
.footer .grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}
.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer ul a { color: var(--ink-1); }
.footer ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer .bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.03em;
}
.footer .bottom .left { display: flex; gap: 18px; flex-wrap: wrap; }
.footer .signature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  font-size: 13px;
  color: var(--mute);
}
.footer .signature .addr { line-height: 1.55; }
.footer .big-mark {
  margin-top: var(--space-7);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(80px, 14vw, 200px);
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
  margin-bottom: var(--space-3);
}

@media (max-width: 900px) {
  .footer .grid { grid-template-columns: 1fr 1fr; }
}

/* Logo strip */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  overflow: hidden;
}
.logo-strip .lg {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  border-right: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  filter: saturate(0);
  opacity: 0.78;
  transition: opacity 160ms, color 160ms;
}
.logo-strip .lg:last-child { border-right: 0; }
.logo-strip .lg:hover { opacity: 1; color: var(--ink); }
.logo-strip .lg svg { width: 22px; height: 22px; margin-right: 8px; }

@media (max-width: 900px) {
  .logo-strip { grid-template-columns: repeat(3, 1fr); }
  .logo-strip .lg:nth-child(3) { border-right: 0; }
  .logo-strip .lg:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}

/* Stat */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  overflow: hidden;
}
.stat-grid .stat {
  padding: var(--space-6) var(--space-5);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-grid .stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: -0.035em;
  font-weight: 500;
  line-height: 1;
}
.stat .num .sub { font-size: 20px; color: var(--mute); margin-left: 4px; }
.stat .label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.stat .meta { font-size: 13px; color: var(--mute); line-height: 1.4; }
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid .stat:nth-child(2) { border-right: 0; }
  .stat-grid .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 160ms, box-shadow 160ms;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 7px;
}
.field-error { color: #b81d1d; font-size: 12px; margin-top: 6px; font-family: var(--font-mono); }
.input.invalid, .textarea.invalid, .select.invalid { border-color: #b81d1d; }

/* Utility */
.divider { height: 1px; background: var(--line); width: 100%; border: 0; margin: 0; }
.hide-mob { }
@media (max-width: 720px) { .hide-mob { display: none !important; } }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-1);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* Anchor offset for sticky nav */
.anchor { scroll-margin-top: 80px; }

/* Type-pair variants (Tweaks) */
body.tp-editorial {
  --font-display: 'Fraunces', 'Times New Roman', serif;
}
body.tp-editorial h1, body.tp-editorial h2, body.tp-editorial h3 {
  letter-spacing: -0.022em;
  font-weight: 500;
}
body.tp-mono {
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-sans: 'JetBrains Mono', ui-monospace, monospace;
}
body.tp-mono h1, body.tp-mono h2, body.tp-mono h3 { letter-spacing: -0.04em; font-weight: 500; }
