/* =========================================================================
   Luna Theme — main.css
   Full visual system: tokens, animations, holo borders, layout, components.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Design tokens
   ---------------------------------------------------------------------- */
:root {
  /* Base palette */
  --bg-base:        #0a0a0a;
  --bg-surface:     #111111;
  --bg-elevated:    #1a1a1a;
  --border-subtle:  #222222;
  --text-primary:   #ffffff;
  --text-secondary: #888888;
  --text-muted:     #444444;

  /* Holo chromatic gradient — the signature visual element */
  --holo-gradient: linear-gradient(
    135deg,
    #ff0080,
    #ff4d00,
    #ffcc00,
    #00ff88,
    #00ccff,
    #7b2fff,
    #ff0080
  );

  /* Badge color tokens */
  --badge-cyan:    #00ccff;
  --badge-magenta: #ff0080;
  --badge-green:   #00ff88;
  --badge-yellow:  #ffcc00;
  --badge-orange:  #ff4d00;
  --badge-violet:  #7b2fff;

  /* Layout */
  --container-max: 1280px;
  --nav-height:    72px;
  --radius-card:   16px;
  --radius-pill:   999px;
  --radius-btn:    10px;

  /* Motion */
  --transition-base: 0.3s ease;
  --holo-speed:      4s;
}

/* -------------------------------------------------------------------------
   Reset / base
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(123, 47, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0, 204, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(255, 0, 128, 0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.site-header,
main,
footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; }

a { color: inherit; }

button { font-family: inherit; }

/* Accessibility helpers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-btn);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* -------------------------------------------------------------------------
   Container utility
   ---------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

/* -------------------------------------------------------------------------
   Keyframes
   ---------------------------------------------------------------------- */
@keyframes holoShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(123, 47, 255, 0.2); }
  50%      { box-shadow: 0 0 40px rgba(0, 204, 255, 0.3), 0 0 60px rgba(255, 0, 128, 0.15); }
}

/* -------------------------------------------------------------------------
   Holo border system (mask-composite pseudo-element)
   ---------------------------------------------------------------------- */
.holo-border { position: relative; }
.holo-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo-gradient);
  background-size: 300% 300%;
  animation: holoShift var(--holo-speed) ease infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--transition-base);
}
.holo-border:hover::before { animation-duration: 1.5s; }
.holo-border:hover {
  box-shadow:
    0 0 20px rgba(123, 47, 255, 0.25),
    0 0 40px rgba(0, 204, 255, 0.12);
}

/* Cards: holo border hidden by default, revealed on hover */
.card-holo::before { opacity: 0; }
.card-holo:hover::before { opacity: 1; }

/* -------------------------------------------------------------------------
   Gradient text
   ---------------------------------------------------------------------- */
.gradient-text {
  background: var(--holo-gradient);
  background-size: 300% 300%;
  animation: holoShift 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------------
   Header / navigation
   ---------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}
.site-header.scrolled { border-bottom-color: var(--border-subtle); }

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.luna-mark { display: block; }
.site-brand__wordmark {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.site-nav--center {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.nav-group { position: relative; }
.nav-group__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: color var(--transition-base), background var(--transition-base);
}
.nav-group__trigger:hover,
.nav-group:hover .nav-group__trigger { color: var(--text-primary); }
.nav-caret { font-size: 0.6rem; opacity: 0.7; transition: transform var(--transition-base); }
.nav-group:hover .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  z-index: 50;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-base), background var(--transition-base);
}
.nav-dropdown a:hover { color: var(--text-primary); background: var(--bg-elevated); }

.site-header__right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.site-nav--primary .nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav--primary .nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  transition: color var(--transition-base);
}
.site-nav--primary .nav-menu a:hover { color: var(--text-primary); }

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-base);
}
.nav-link:hover { color: var(--text-primary); }

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 10px 22px;
  background: #ffffff;
  color: #0a0a0a;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-base);
}
.btn-primary:hover { background: #f0f0f0; transform: translateY(-1px); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

.btn-ghost {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-base), border-color var(--transition-base);
}
.btn-ghost:hover { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   Ticker
   ---------------------------------------------------------------------- */
.ticker-wrapper {
  overflow: hidden;
  padding: 16px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.ticker-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: tickerScroll 50s linear infinite;
}
.ticker-wrapper:hover .ticker-track { animation-play-state: paused; }
.ticker-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: nowrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.ticker-pill.holo-border {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-primary);
}

/* -------------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.hero {
  min-height: 84vh;
  display: flex;
  align-items: center;
  margin-top: var(--nav-height);
  padding-top: 24px;
  text-align: center;
  position: relative;
}
.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.hero__headline {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin: 0 0 24px;
}
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero__cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Split hero: live Luna avatar on the left, copy on the right. */
.hero__inner--split {
  max-width: 1240px;
  display: flex;
  align-items: center;
  gap: 48px;
  text-align: left;
}
.hero__avatar {
  flex: 0 0 40%;
  align-self: stretch;
  min-height: 640px;
}
.hero__avatar-frame {
  width: 100%;
  height: 100%;
  min-height: 640px;
  border: 0;
  display: block;
  background: transparent;
}
.hero__content {
  flex: 1 1 auto;
  min-width: 0;
}
.hero__inner--split .hero__sub {
  margin-left: 0;
  margin-right: 0;
}
.hero__inner--split .hero__cta-row {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .hero__inner--split {
    flex-direction: column;
    text-align: center;
  }
  .hero__avatar {
    flex: none;
    width: 100%;
    min-height: 420px;
  }
  .hero__avatar-frame {
    min-height: 420px;
  }
  .hero__inner--split .hero__sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__inner--split .hero__cta-row {
    justify-content: center;
  }
}

/* -------------------------------------------------------------------------
   Feature row
   ---------------------------------------------------------------------- */
.feature-row {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.feature-row__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature-col { padding: 32px 40px; border-left: 1px solid var(--border-subtle); }
.feature-col:first-child { border-left: none; }
.feature-col__stat {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.feature-col__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 4px 0 10px;
}
.feature-col__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Showcase section / tabs / cards
   ---------------------------------------------------------------------- */
.showcase-section { padding: 96px 0; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 16px;
  line-height: 1.1;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}
.tab-btn:hover:not(.active) { border-color: #444; color: var(--text-primary); }
.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: transparent;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 32px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: transparent;
}
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}
.card__cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color var(--transition-base);
}
.card:hover .card__cta { color: var(--text-primary); }
.card__thumbnail {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: #0f0f0f;
}
.card__thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { padding: 16px; }
.card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Badge variants */
.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge-cyan    { background: rgba(0, 204, 255, 0.1);  color: var(--badge-cyan);    border: 1px solid rgba(0, 204, 255, 0.2); }
.badge-magenta { background: rgba(255, 0, 128, 0.1);  color: var(--badge-magenta); border: 1px solid rgba(255, 0, 128, 0.2); }
.badge-green   { background: rgba(0, 255, 136, 0.1);  color: var(--badge-green);   border: 1px solid rgba(0, 255, 136, 0.2); }
.badge-yellow  { background: rgba(255, 204, 0, 0.1);  color: var(--badge-yellow);  border: 1px solid rgba(255, 204, 0, 0.2); }
.badge-orange  { background: rgba(255, 77, 0, 0.1);   color: var(--badge-orange);  border: 1px solid rgba(255, 77, 0, 0.2); }
.badge-violet  { background: rgba(123, 47, 255, 0.1); color: var(--badge-violet);  border: 1px solid rgba(123, 47, 255, 0.2); }

/* -------------------------------------------------------------------------
   Single showcase detail
   ---------------------------------------------------------------------- */
.single-showcase { padding: calc(var(--nav-height) + 64px) 0 80px; }
.showcase-detail { max-width: 880px; margin: 0 auto; }
.showcase-detail__back {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 32px;
  transition: color var(--transition-base);
}
.showcase-detail__back:hover { color: var(--text-primary); }
.showcase-detail__header { text-align: center; margin-bottom: 40px; }
.showcase-detail__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 18px 0 12px;
  line-height: 1.1;
}
.showcase-detail__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.showcase-detail__tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.showcase-detail__preview {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #0f0f0f;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 9;
}
.showcase-detail__preview::before { opacity: 1; }
.showcase-detail__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-detail__content { margin-top: 48px; }

/* -------------------------------------------------------------------------
   Generic page / posts / entry content
   ---------------------------------------------------------------------- */
.page-content,
.showcase-archive,
.error-404 { padding: calc(var(--nav-height) + 64px) 0 80px; }

.page-header { text-align: center; margin-bottom: 40px; }
.page-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  line-height: 1.1;
}
.page-sub { color: var(--text-secondary); }

.entry-content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2em 0 0.6em;
}
.entry-content a { color: var(--badge-cyan); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius-card); }
.entry-content blockquote {
  border-left: 2px solid var(--badge-violet);
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.5em;
  color: var(--text-primary);
}
.entry-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.page-body { padding: 40px 0 0; }

.post-list { max-width: 760px; margin: 0 auto; }
.post-list__item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.post-list__title { margin: 0 0 8px; font-size: 1.3rem; }
.post-list__title a { color: var(--text-primary); text-decoration: none; }
.post-list__title a:hover { color: var(--badge-cyan); }
.post-list__excerpt { color: var(--text-secondary); }

.pagination { text-align: center; margin-top: 48px; }
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* Search form */
.search-form { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.search-form .search-field {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  min-width: 240px;
}
.search-form .search-field::placeholder { color: var(--text-muted); }
.search-form .search-submit {
  background: #fff;
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
}

/* -------------------------------------------------------------------------
   404
   ---------------------------------------------------------------------- */
.error-404__inner { text-align: center; max-width: 640px; margin: 0 auto; }
.error-404__code {
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 800;
  line-height: 1;
  margin: 24px 0 8px;
  letter-spacing: -0.05em;
}
.error-404__headline { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; margin: 0 0 16px; }
.error-404__sub { color: var(--text-secondary); margin: 0 auto 32px; max-width: 440px; line-height: 1.7; }
.error-404__search { margin-top: 40px; }

/* -------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
  margin-top: 120px;
}
.footer__top { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; margin-bottom: 48px; }
.footer__brand-row { display: flex; align-items: center; gap: 10px; }
.footer__wordmark { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.footer__tagline { font-size: 0.85rem; color: var(--text-muted); margin: 8px 0 0; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 10px; }
.footer__col a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; transition: color var(--transition-base); }
.footer__col a:hover { color: var(--text-primary); }
.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   Scroll-in animations
   ---------------------------------------------------------------------- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-in.visible > * { animation: fadeUp 0.5s ease both; }
.animate-in.visible > *:nth-child(1) { animation-delay: 0.05s; }
.animate-in.visible > *:nth-child(2) { animation-delay: 0.10s; }
.animate-in.visible > *:nth-child(3) { animation-delay: 0.15s; }
.animate-in.visible > *:nth-child(4) { animation-delay: 0.20s; }
.animate-in.visible > *:nth-child(5) { animation-delay: 0.25s; }
.animate-in.visible > *:nth-child(6) { animation-delay: 0.30s; }

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .site-nav--center { display: none; }
}

@media (max-width: 768px) {
  .feature-row__grid { grid-template-columns: 1fr; }
  .feature-col { border-left: none; border-top: 1px solid var(--border-subtle); }
  .feature-col:first-child { border-top: none; }

  .card-grid { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr; gap: 40px; }
  .footer__links { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .site-nav--primary,
  .nav-link--login { display: none; }

  /* Mobile slide-down menu when toggled */
  .site-header.nav-open .site-nav--center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 24px 24px;
  }
  .site-header.nav-open .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 12px;
  }
}

@media (max-width: 480px) {
  .footer__links { grid-template-columns: 1fr; }
  .showcase-section { padding: 64px 0; }
}

/* -------------------------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-in { opacity: 1; transform: none; }
}
