/* ============================================================
   Nord palette — https://www.nordtheme.com
   ============================================================ */
:root {
  /* Polar Night */
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  /* Snow Storm */
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  /* Frost */
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  /* Aurora */
  --nord11: #bf616a;
  --nord12: #d08770;
  --nord13: #ebcb8b;
  --nord14: #a3be8c;
  --nord15: #b48ead;

  /* Semantic tokens — dark theme (default) */
  --bg: var(--nord0);
  --bg-alt: var(--nord1);
  --surface: var(--nord1);
  --surface-hover: var(--nord2);
  --border: var(--nord2);
  --text: var(--nord6);
  --text-muted: var(--nord4);
  --text-dim: #8b96ab;
  --accent: var(--nord8);
  --accent-strong: var(--nord9);
  --accent-contrast: var(--nord0);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.32);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --container: 1120px;
  --transition: 180ms ease;
}

[data-theme="light"] {
  --bg: var(--nord6);
  --bg-alt: var(--nord5);
  --surface: #ffffff;
  --surface-hover: var(--nord5);
  --border: var(--nord4);
  --text: var(--nord0);
  --text-muted: var(--nord2);
  --text-dim: var(--nord3);
  --accent: var(--nord10);
  --accent-strong: var(--nord9);
  --accent-contrast: #ffffff;
  --shadow-sm: 0 1px 2px rgba(46, 52, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(46, 52, 64, 0.10);
  --shadow-lg: 0 20px 48px rgba(46, 52, 64, 0.14);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }
[data-theme="light"] html, html[data-theme="light"] { color-scheme: light; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.logo-accent { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--surface-hover); color: var(--text); }
.icon { width: 20px; height: 20px; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ============================================================
   Badge component — variants
   ============================================================ */
.badge {
  --badge-color: var(--nord13);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--badge-color);
  background: color-mix(in srgb, var(--badge-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-color) 40%, transparent);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--badge-color);
}

.badge[data-variant="live"] {
  --badge-color: var(--nord14);
}
.badge[data-variant="live"] .badge-dot {
  animation: pulse 1.8s ease-in-out infinite;
}

.badge[data-variant="shipped"] {
  --badge-color: var(--nord9);
}

.badge[data-variant="tbd"] {
  --badge-color: var(--nord13);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--badge-color) 55%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--badge-color) 0%, transparent); }
}

/* ============================================================
   Under Construction
   ============================================================ */
.construction {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.construction-inner {
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.construction-inner .badge { margin-bottom: 1.5rem; }

.construction-title {
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.construction-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot { animation: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  .construction { padding: 3rem 0; }
}
