/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea, select { font: inherit; }

/* ===== Design tokens ===== */
:root {
  --brand: #26B5D8;
  --brand-light: #5CC9E0;
  --brand-dark: #1E9BC0;
  --ink-900: #181818;
  --ink-800: #1d1e1f;
  --ink-700: #252628;
  --ink-600: #313335;
  --ink-500: #454749;
  --ink-400: #6b6e72;
  --ink-300: #9ea1a5;
  --ink-200: #c4c6c8;
  --ink-100: #e6e7e8;

  --color-bg: 245, 247, 250;
  --color-bg-elevated: 255, 255, 255;
  --color-text: 24, 24, 24;
  --color-text-muted: 80, 84, 88;
  --color-border: 226, 230, 235;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-card: 0 4px 24px -4px rgba(24,24,24,0.06);
  --shadow-glow: 0 0 40px -8px rgba(38,181,216,0.45);
  --shadow-glow-sm: 0 0 20px -6px rgba(38,181,216,0.4);

  --container-max: 1280px;
}

html.dark {
  --color-bg: 13, 13, 14;
  --color-bg-elevated: 24, 24, 26;
  --color-text: 245, 247, 250;
  --color-text-muted: 165, 170, 176;
  --color-border: 38, 40, 44;
  --shadow-card: 0 4px 24px -4px rgba(0,0,0,0.4);
}

body {
  font-family: var(--font-sans);
  background-color: rgb(var(--color-bg));
  color: rgb(var(--color-text));
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

::selection { background-color: rgba(38,181,216,.25); }

/* ===== Layout helpers ===== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 3rem; } }

.section { padding-block: 5rem; }
@media (min-width: 640px) { .section { padding-block: 7rem; } }

.section-alt { background-color: rgb(var(--color-bg)); }
html:not(.dark) .section-alt { background-color: #F5F7FA; }
html.dark .section-alt { background-color: #0d0d0e; }

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }

.text-muted { color: rgb(var(--color-text-muted)); }

.text-gradient {
  background: linear-gradient(135deg, #26B5D8 0%, #1E9BC0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass {
  background-color: rgba(var(--color-bg-elevated), .65);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.glass-border { border: 1px solid rgba(var(--color-border), .8); }

.card {
  background-color: rgb(var(--color-bg-elevated));
  border: 1px solid rgba(var(--color-border), .8);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  padding: .85rem 1.75rem;
  font-size: .875rem;
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background-color: var(--ink-900);
  color: #fff;
}
.btn-primary:hover { background-color: var(--brand); box-shadow: var(--shadow-glow); }
html.dark .btn-primary { background-color: var(--brand); color: var(--ink-900); }
html.dark .btn-primary:hover { background-color: var(--brand-light); }

.btn-secondary {
  background-color: rgb(var(--color-bg-elevated));
  border: 1px solid rgba(var(--color-border), .8);
  color: rgb(var(--color-text));
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.btn-block { width: 100%; }

/* ===== Visually hidden (a11y skip link) ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--brand); color: #fff;
  padding: .6rem 1rem; border-radius: .5rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.04); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.float { animation: float 6s ease-in-out infinite; }
.spin-slow { animation: spinSlow 12s linear infinite; }
.pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
