:root {
  --bg: #0A1726;
  --bg-elev: #0E1F33;
  --surface: #152A42;
  --line: #1F3552;
  --fg: #F4EFE2;
  --fg-muted: #9DAEC2;
  --fg-subtle: #5C7290;
  --brand: #D4B36A;
  --brand-soft: #E5C988;
  --accent: #5B8FB9;
  --accent-soft: #8AB4D6;
  --glow: rgba(212, 179, 106, 0.35);
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Chakra Petch', 'JetBrains Mono', monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body { transition: background 0.6s ease, color 0.6s ease; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Grain */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}
.typing-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 1.5px;
  animation: typingDot 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bubble-enter { animation: slideUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes shimmerLine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-subtle); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-weight: 500;
  transition: transform 0.2s, background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: var(--bg);
  box-shadow: 0 8px 24px var(--glow);
}
.btn-primary:hover {
  background: var(--brand-soft);
  box-shadow: 0 12px 32px var(--glow);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--brand);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--brand);
  font-feature-settings: 'ss01';
}



section {
  padding: clamp(72px, 10vw, 120px) 0;
  position: relative;
}

.lead {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--fg-muted);
  text-wrap: pretty;
  max-width: 56ch;
}

.display { font-size: clamp(34px, 5vw, 64px); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.3s, transform 0.4s;
}

.link-shimmer { position: relative; }
.link-shimmer::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.link-shimmer:hover::after { transform: scaleX(1); }

/* Decorative tech corner brackets */
.tech-corner::before, .tech-corner::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--brand);
  border-style: solid;
  opacity: 0.5;
}
.tech-corner::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.tech-corner::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
