/* ── Shared design tokens + components ── */
:root {
  --bg:      #0a0a0b;
  --surface: #131316;
  --fg:      #e8e8ec;
  --muted:   #7a7a85;
  --border:  rgba(255,255,255,0.08);
  --accent:  oklch(65% 0.18 255);
  --success: oklch(65% 0.19 155);

  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(48px, 6vw, 72px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10,10,11,0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  gap: 0;
  letter-spacing: 0.01em;
}

.nav-logo .logo-bracket {
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-logo:hover .logo-bracket-l { transform: translateX(-2px); }
.nav-logo:hover .logo-bracket-r { transform: translateX(2px); }

.nav-logo .logo-name {
  color: var(--fg);
  transition: color 0.2s;
}

.nav-logo .logo-dot {
  color: var(--muted);
}

.nav-logo .logo-method {
  color: var(--accent);
  transition: color 0.2s;
}

.nav-logo .logo-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: logo-blink 1.2s step-end infinite;
  opacity: 0.8;
}

@keyframes logo-blink {
  50% { opacity: 0; }
}

.nav-logo:hover .logo-name { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .nav-logo .logo-cursor { animation: none; opacity: 0.6; }
  .nav-logo:hover .logo-bracket-l,
  .nav-logo:hover .logo-bracket-r { transform: none; }
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-links a:hover { color: var(--fg); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--fg);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--fg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 450;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.16); }

/* ── Tags ── */
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger { transition-delay: calc(var(--i, 0) * 70ms); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
  .reveal-stagger { transition-delay: 0ms; }
}

/* ── Footer ── */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(10,10,11,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  h1 { font-size: 36px; }
}
