/* Decode My Lab — shared design system */
:root {
  --bg: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --fg: #0A0A0A;
  --fg-body: #525252;
  --fg-muted: #737373;
  --fg-subtle: #A3A3A3;
  --rule: #E5E5E5;
  --rule-soft: #EFEFEF;
  --accent: #4F46E5;
  --accent-hover: #4338CA;

  --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* 4-size type scale */
  --t-display: clamp(40px, 6vw, 72px);
  --t-head: clamp(26px, 3vw, 34px);
  --t-body: 17px;
  --t-small: 13px;

  /* 8px grid spacing */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 128px;
  --s-9: 192px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg-body);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--f-mono);
  font-feature-settings: 'zero';
  letter-spacing: -0.01em;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: #F3F3F3; border-color: #D4D4D4; }

/* Eyebrow label */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Wordmark */
.wordmark {
  font-family: var(--f-sans);
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* Forms (shared) */
.input, .textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease;
}
.input:focus, .textarea:focus { border-color: var(--accent); }

/* Utility */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.center { text-align: center; }

/* Responsive */
@media (max-width: 720px) {
  :root { --t-body: 16px; }
  .container, .container-narrow { padding: 0 20px; }
}
