/* =================================================================
   BuiltByTyler — Design System
   Light / minimal · sleek · elegant · thin
   All tokens live in :root so the look can be retuned in one place.
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — Ice / Cyan · clinical high-tech */
  --bg:            #04070C;   /* deep blue-black page */
  --surface:       #0B121C;   /* cards / panels (lifted off the page) */
  --surface-alt:   #070C14;   /* subtle bands */
  --ink:           #EAF3FF;   /* primary text — ice white */
  --muted:         #7C8A9E;   /* secondary text — cool grey */
  --hairline:      rgba(150,200,230,0.16); /* cyan-tinted borders */
  --accent:        #5FE6FF;   /* cyan — primary CTAs / emphasis */
  --accent-warm:   #5FE6FF;   /* price / highlight (unified cyan) */
  --on-accent:     #04070C;   /* text on accent (dark on cyan) */
  --overlay:       rgba(2, 5, 10, 0.74);

  /* Typography — futuristic geometric display, clean body */
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Fluid type scale — smaller, more minimal */
  --fs-hero:    clamp(2.1rem, 5vw, 3.75rem);
  --fs-h1:      clamp(1.6rem, 3.4vw, 2.6rem);
  --fs-h2:      clamp(1.3rem, 2.3vw, 1.75rem);
  --fs-h3:      clamp(1rem, 1.5vw, 1.2rem);
  --fs-body:    0.94rem;
  --fs-small:   0.78rem;
  --fs-micro:   0.66rem;

  /* Spacing / layout */
  --maxw:       1200px;
  --gutter:     clamp(1.25rem, 4vw, 3rem);
  --radius:     10px;
  --radius-sm:  6px;
  --radius-lg:  16px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5), 0 2px 10px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.55);
  --shadow-lg: 0 22px 60px rgba(0,0,0,0.65);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --nav-h: 58px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--surface-alt); }

/* Open viewing room for the 3D scene between the hero and the first content
   band — lets the flythrough breathe before the frosted panels rise over it. */
.scene-gap { height: clamp(240px, 55vh, 540px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.section-head { max-width: 640px; margin: 0 auto clamp(2rem,4vw,3.5rem); text-align: center; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--muted); margin-top: 0.75rem; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: 50px;
  background: var(--accent);
  color: var(--on-accent);
  transition: background .3s var(--ease), color .3s var(--ease),
              transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--on-accent); }

.btn--block { width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===================================================================
   NAVIGATION  (injected by components.js)
   =================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  /* Desktop keeps the original floating look at the very top of the page,
     then firms into a frosted bar once scrolled (.is-scrolled). On mobile
     it's always a frosted bar — see the responsive block below. */
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), height .3s var(--ease);
}
/* Once the page leaves the top, firm the bar up for contrast AND slim it down. */
.site-nav.is-scrolled {
  height: 46px;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(150, 200, 230, 0.18);
}
/* Keep the nav legible even where backdrop-filter is unsupported. */
.site-nav .brand,
.nav-links a,
.cart-btn { text-shadow: 0 1px 14px rgba(2, 5, 10, 0.6); }
.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand b { font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: var(--fs-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-block: 0.4rem;
  transition: color .25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* Lock the page behind the open mobile menu (toggled by main.js). */
html.nav-open, html.nav-open body { overflow: hidden; }

.cart-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--ink);
  display: inline-flex;
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -2px; right: -4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 50px;
  background: var(--accent-warm);
  color: var(--on-accent);
  font-size: 0.62rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0);
  transition: transform .3s var(--ease);
}
.cart-count.is-visible { transform: scale(1); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 28px; height: 28px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 3px; right: 3px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 8px; }
.nav-toggle span:nth-child(2) { top: 14px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  min-height: calc(100vh - var(--nav-h));
  /* Dynamic viewport unit: avoids the layout "jump" on mobile when the
     browser address bar slides in/out. Falls back to vh where unsupported. */
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero__inner { width: 100%; text-align: center; }
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 300;
  letter-spacing: -0.015em;
  /* Dramatic entrance — a holographic "focus pull" + cyan glow flash (~0.9s) */
  animation: hero-focus 0.85s var(--ease) both, hero-flash 0.95s ease-out both;
}
.hero h1 em {
  font-style: normal;
  font-weight: 500;
  /* "fun" lights up cyan as the payoff at the end of the entrance */
  animation: hero-emph 0.4s var(--ease) 0.55s both;
}
@keyframes hero-focus {
  0%   { opacity: 0; filter: blur(18px); transform: scale(1.07); letter-spacing: 0.14em; }
  55%  { opacity: 1; }
  100% { opacity: 1; filter: blur(0); transform: scale(1); letter-spacing: -0.015em; }
}
@keyframes hero-flash {
  0%, 100% { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45); }
  45%      { text-shadow: 0 0 30px rgba(95, 230, 255, 0.6), 0 2px 30px rgba(0, 0, 0, 0.45); }
}
@keyframes hero-emph {
  from { color: var(--ink); }
  to   { color: var(--accent); text-shadow: 0 0 22px rgba(95, 230, 255, 0.5); }
}
.hero p {
  max-width: 36ch;
  margin: 1.5rem auto 2.5rem;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  color: var(--muted);
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===================================================================
   PRODUCT GRID + CARDS
   =================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(95, 230, 255, 0.28); }

.card__media {
  aspect-ratio: 4 / 3;
  background: var(--surface-alt);
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }

/* ---- Wireframe holograms (home featured grid) ---- */
.card__media.is-holo {
  position: relative;
  background:
    radial-gradient(115% 95% at 50% 58%, #06223a 0%, #04111f 52%, #010305 100%);
}
.card__holo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* soft projection glow behind the model */
.card__media.is-holo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(58% 52% at 50% 56%, rgba(60, 200, 255, 0.22), transparent 72%);
}
/* fine CRT scanlines (static texture only) */
.card__media.is-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(110, 220, 255, 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

.holo-hud {
  position: absolute;
  left: 0.85rem;
  bottom: 0.7rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(120, 225, 255, 0.85);
  pointer-events: none;
}
.holo-hud::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #5fe6ff;
  box-shadow: 0 0 6px 1px rgba(95, 230, 255, 0.9);
  vertical-align: middle;
  animation: holo-blink 2.4s steps(1) infinite;
}
@keyframes holo-blink { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .holo-hud::before { animation: none; }
}

.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__name { font-size: var(--fs-h3); margin-bottom: 0.2rem; }
.card__tag { font-size: var(--fs-small); color: var(--muted); margin-bottom: 1.1rem; }
.card__row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.price { font-family: var(--font-display); font-size: 1.35rem; }
.price .soon { font-family: var(--font-body); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.08em; }

.card__add {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 50px;
  padding: 0.55rem 1.1rem;
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.card__add:hover { background: var(--ink); color: var(--on-accent); }

.badge {
  display: inline-block;
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===================================================================
   PRODUCT DETAIL
   =================================================================== */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.detail__media {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 4 / 3;
}
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__info { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.detail__info h1 { font-size: var(--fs-h1); margin-bottom: 0.5rem; }
.detail__tag { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
.detail__price { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1.5rem; }
.detail__desc { margin-bottom: 2rem; }
.detail__actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 2.25rem; }

.specs { border-top: 1px solid var(--hairline); }
.specs dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 2rem; margin: 1.25rem 0 0; }
.specs dt { font-size: var(--fs-small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; }

.back-link { font-size: var(--fs-small); letter-spacing: 0.08em; color: var(--muted); display: inline-flex; gap: 0.4rem; margin-bottom: 1.75rem; }
.back-link:hover { color: var(--ink); }

.notice {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

.empty-state { text-align: center; padding-block: clamp(3rem, 10vw, 7rem); }
.empty-state h1 { font-size: var(--fs-h1); margin-bottom: 1rem; }
.empty-state p { color: var(--muted); margin-bottom: 2rem; }

/* ===================================================================
   ABOUT
   =================================================================== */
.about-hero { text-align: center; max-width: 760px; margin-inline: auto; }
.about-hero h1 { font-size: var(--fs-h1); margin-bottom: 1.25rem; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 720px;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}
.about-card h3 { font-size: var(--fs-h3); margin-bottom: 0.75rem; }
.about-card p { color: var(--muted); }

/* ---- The combination highlight (about page) ---- */
.about-combine {
  max-width: 720px;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  text-align: center;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(11, 18, 28, 0.42);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
}
.about-combine .eyebrow { margin-bottom: 0.6rem; }
.about-combine h3 { font-size: var(--fs-h2); margin-bottom: 1rem; }
.about-combine p { color: var(--muted); max-width: 58ch; margin-inline: auto; }
.about-figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ===================================================================
   CONTACT
   =================================================================== */
.contact-wrap { max-width: 560px; margin-inline: auto; text-align: center; }
.contact-wrap h1 { font-size: var(--fs-h1); margin-bottom: 1rem; }
.contact-wrap > p { color: var(--muted); margin-bottom: 2.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 0.9rem; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
  text-align: left;
}
.contact-list a:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.contact-list svg { width: 22px; height: 22px; flex-shrink: 0; }
.contact-list .c-label { font-size: var(--fs-micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; }
.contact-list .c-value { font-size: 1.05rem; }

/* ===================================================================
   FOOTER  (injected by components.js)
   =================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.site-footer .brand { font-size: 1rem; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; font-size: var(--fs-small); color: var(--muted); }
.footer-meta a:hover { color: var(--ink); }

/* ===================================================================
   CART DRAWER + TOAST
   =================================================================== */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
  z-index: 200;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0;
  height: 100%; width: min(380px, 90vw);
  background: var(--bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.drawer__head h2 { font-size: var(--fs-h3); }
.drawer__close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.drawer__close:hover { color: var(--ink); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem var(--gutter); }
.drawer__foot { padding: 1.25rem var(--gutter); border-top: 1px solid var(--hairline); }

.cart-line { display: flex; gap: 1rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--hairline); }
.cart-line:last-child { border-bottom: none; }
.cart-line img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__name { font-size: 0.95rem; }
.cart-line__meta { font-size: var(--fs-small); color: var(--muted); }
.cart-line__remove { background: none; border: none; color: var(--muted); font-size: 0.85rem; }
.cart-line__remove:hover { color: var(--ink); }
.cart-empty { color: var(--muted); text-align: center; padding-block: 3rem; }

.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translate(-50%, 150%);
  background: var(--ink);
  color: var(--on-accent);
  padding: 0.85rem 1.4rem;
  border-radius: 50px;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-md);
  z-index: 300;
  transition: transform .45s var(--ease);
  white-space: nowrap;
}
.toast.is-visible { transform: translate(-50%, 0); }

/* ===================================================================
   SCROLL-IN ANIMATION
   =================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail__info { position: static; }
}

/* ---- Tablet / mobile: collapsed nav ---- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }

  /* Always a visible frosted bar on mobile — content sits right beneath
     it, so it can never be allowed to disappear into the scene. */
  .site-nav {
    background: rgba(4, 7, 12, 0.6);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: rgba(150, 200, 230, 0.12);
  }
  .site-nav.is-scrolled { background: rgba(4, 7, 12, 0.82); }

  /* Larger, finger-friendly tap targets for the cart + menu buttons. */
  .nav-actions { gap: 0.5rem; }
  .cart-btn { padding: 0.55rem; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    /* Frosted dropdown that matches the bar, with a solid floor so the
       links never wash out over the moving scene behind them. */
    background: rgba(6, 10, 18, 0.92);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--hairline);
    padding: 0.25rem var(--gutter) 1rem;
    transform: translateY(-115%);
    transition: transform .4s var(--ease);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid rgba(150, 200, 230, 0.07); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    width: 100%;
    padding-block: 0.95rem;
    font-size: 1rem;
    color: var(--ink);
  }
  .nav-links a::after { display: none; }

  /* Hide the scroll-readout on small screens — keep only the thin
     scroll-progress line up top. */
  .hud__readout { display: none; }
}

/* ---- Phones: tighten rhythm + keep everything inside the viewport ---- */
@media (max-width: 540px) {
  /* Hero CTAs stack to full-width pills so they never crowd or clip. */
  .hero__cta { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero__cta .btn { width: 100%; }

  /* Let the toast wrap instead of running off-screen on narrow phones. */
  .toast {
    white-space: normal;
    text-align: center;
    max-width: calc(100vw - 2rem);
    left: 1rem;
    right: 1rem;
    transform: translateY(150%);
  }
  .toast.is-visible { transform: translateY(0); }

  /* Roomier card padding reads better at phone width. */
  .card__body { padding: 1.2rem 1.25rem 1.4rem; }

  /* Product detail actions go full-width so buttons don't squeeze. */
  .detail__actions { flex-direction: column; align-items: stretch; }
  .detail__actions .btn { width: 100%; }

  /* Specs: stack label over value instead of a cramped two-column grid. */
  .specs dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .specs dt { margin-top: 0.85rem; }
  .specs dd { margin-bottom: 0.25rem; }
}

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

/* ===================================================================
   IMMERSIVE 3D DEPTH LAYER  (assets/js/immersive.js)
   -------------------------------------------------------------------
   A fixed full-viewport WebGL world sits behind all content. The page
   becomes a sheet of glass panels floating over a deep, scrollable
   particle field — so depth is felt on every page, not just the hero.
   =================================================================== */

/* Deep base behind the canvas; the canvas itself is the visible
   backdrop, so the body must be transparent for it to show. */
html { background: var(--bg); }
body { background: transparent; }

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;          /* behind the legibility veil and all content */
  display: block;
  pointer-events: none; /* never intercept scroll / clicks */
}

/* Legibility veil — a soft vignette between the world and the words.
   Keeps the centre open (full depth) while grounding the edges. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(125% 120% at 50% 32%, transparent 46%, rgba(3, 6, 12, 0.26) 100%),
    linear-gradient(180deg, rgba(3, 6, 12, 0.1) 0%, transparent 18%, transparent 74%, rgba(3, 6, 12, 0.2) 100%);
}

/* Hero stays transparent so the world reads at full depth, with a
   little extra legibility halo directly behind the headline. */
.hero { background: transparent; }
.hero__inner { position: relative; z-index: 1; }
.hero h1,
.hero p { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45); }
.section-head h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }

/* Content bands stay light so the wireframe world reads through them — just a
   faint tint + soft blur for a subtle difference, not a dark fill. */
.section--alt {
  background: rgba(7, 12, 20, 0.22);
  backdrop-filter: blur(5px) saturate(125%);
  -webkit-backdrop-filter: blur(5px) saturate(125%);
  border-block: 1px solid rgba(150, 200, 230, 0.06);
}

/* Cards read as glass panels suspended over the field. */
.card {
  background: rgba(11, 18, 28, 0.62);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.card:hover { background: rgba(15, 24, 38, 0.76); }

/* About cards + contact links pick up the same frosted treatment. */
.contact-list a {
  background: rgba(11, 18, 28, 0.58);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

/* Footer floats above the world too. */
.site-footer {
  background: rgba(6, 11, 18, 0.62);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

/* Scroll cue — a thin "dive in" prompt anchored to the hero. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 1;
  pointer-events: none;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(95, 230, 255, 0.9), transparent);
  animation: cue-fall 2.4s var(--ease) infinite;
}
@keyframes cue-fall {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
}

/* ===================================================================
   HUD  (injected by components.js, driven by immersive.js)
   -------------------------------------------------------------------
   A minimal instrument layer over the whole viewport: a hairline
   scroll-progress bar, a live callout naming the craft you're flying
   past, and a scroll readout. All faint, mono, and click-through.
   =================================================================== */
.hud {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hud__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}
#hud-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #5fe6ff, #d6f6ff);
  box-shadow: 0 0 8px rgba(95, 230, 255, 0.6);
  transition: transform .12s linear;
}

.hud__readout {
  position: absolute;
  right: var(--gutter);
  bottom: 1.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  opacity: 0.62;
}

@media (prefers-reduced-motion: reduce) {
  #hud-bar { transition: none; }
}

/* ===================================================================
   PRODUCT CARDS — spec-sheet detailing
   =================================================================== */
.price,
.detail__price,
.detail__price + * { font-variant-numeric: tabular-nums; }

/* Index tag (01, 02 …) */
.card__index {
  position: absolute;
  top: 0.75rem;
  left: 0.9rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  color: rgba(245, 245, 243, 0.7);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Thin accent rule that draws in along the card top on hover */
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, #5fe6ff, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
  z-index: 3;
}
.card:hover::after { transform: scaleX(1); }

.card__add { display: inline-flex; align-items: center; }

/* ===================================================================
   MEDIA PLACEHOLDERS — replace the old product photos with a clean
   cyan reticle on a dark panel (matches the wireframe holograms).
   =================================================================== */
.card__media.is-placeholder,
.detail__media.is-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(115% 95% at 50% 58%, #06223a 0%, #04111f 52%, #010305 100%);
}
.card__media.is-placeholder::after,
.detail__media.is-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(110, 220, 255, 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}
.reticle {
  width: 42%;
  max-width: 130px;
  color: rgba(120, 225, 255, 0.5);
  filter: drop-shadow(0 0 6px rgba(95, 230, 255, 0.35));
}

/* Detail media frame holds either a hologram canvas or a placeholder. */
.detail__media { position: relative; }
.detail__media.is-holo {
  background: radial-gradient(115% 95% at 50% 58%, #06223a 0%, #04111f 52%, #010305 100%);
}

/* Cart line thumbnail (no photos) */
.cart-line__thumb {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: radial-gradient(120% 120% at 50% 40%, #0a2336, #04111f);
  border: 1px solid var(--hairline);
}

/* ===================================================================
   BUILD PACKAGES  (shop.html#packages)
   =================================================================== */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}
.package {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.85rem 1.6rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(11, 18, 28, 0.62);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.package:hover {
  transform: translateY(-4px);
  border-color: rgba(95, 230, 255, 0.3);
  box-shadow: var(--shadow-md);
}
.package__head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}
.package__badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(95, 230, 255, 0.35);
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
}
.package__name { font-size: var(--fs-h3); }
.package__price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
}
.package__blurb { color: var(--muted); font-size: var(--fs-small); margin: 0; }
.package__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  flex: 1;
}
.package__list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: var(--fs-small);
  color: var(--ink);
}
.package__list li::before {
  content: "›";
  position: absolute;
  left: 0.1rem;
  color: var(--accent);
}
.package .btn { margin-top: 0.5rem; }

/* ===================================================================
   INCLUDED WITH EVERY BUILD  (shop.html)
   =================================================================== */
.included {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(0.9rem, 2.2vw, 1.5rem);
}
.included li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(11, 18, 28, 0.5);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.included li:hover { border-color: rgba(95, 230, 255, 0.28); transform: translateY(-2px); }
.included svg {
  width: 26px; height: 26px;
  flex-shrink: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 5px rgba(95, 230, 255, 0.4));
}
.included__title {
  display: block;
  font-size: var(--fs-small);
  letter-spacing: 0.03em;
  color: var(--ink);
}
.included__desc {
  display: block;
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Highlighted build-walkthrough video (shop.html) */
.build-video { margin: clamp(1.5rem, 4vw, 2.75rem) auto 0; max-width: 760px; }
.build-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
}
.build-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.build-video figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* One-line reassurance on each product detail page */
.detail__included {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail__included b { color: var(--accent); font-weight: 400; }

/* ===================================================================
   ORDER MODAL  (build packages → main.js)
   =================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
  z-index: 210;
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }

.order-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%);
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.6rem, 4vw, 2.25rem);
  background: rgba(11, 18, 28, 0.94);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(95, 230, 255, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 60px rgba(40, 160, 210, 0.15);
  z-index: 211;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .3s var(--ease);
}
.order-modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.order-modal__close {
  position: absolute; top: 0.8rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.6rem; line-height: 1;
}
.order-modal__close:hover { color: var(--ink); }
.order-modal__title { font-size: var(--fs-h3); margin: 0.2rem 0 0.3rem; }
.order-modal__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 0 0 1.25rem;
}

.order-form { display: grid; gap: 0.85rem; }
.order-field { display: grid; gap: 0.35rem; }
.order-field > span {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.order-field input,
.order-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--ink);
  background: rgba(4, 7, 12, 0.6);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  resize: vertical;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.order-field input:focus,
.order-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(95, 230, 255, 0.15);
}
.order-form__note {
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.5;
  margin: 0.3rem 0 0;
}
.order-form .btn { margin-top: 0.3rem; }

/* ===================================================================
   ABOUT — portrait treatment
   A headshot framed as part of the system: layered cyan rings, a soft
   glow, faint scanlines, and a mono ID caption. Not "just pasted".
   =================================================================== */
.about-hero--split {
  max-width: 980px;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
.about-hero--split h1 { margin-bottom: 1.25rem; }

.portrait { position: relative; margin: 0; }
.portrait__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: radial-gradient(120% 100% at 50% 30%, #0a2336, #04111f);
  box-shadow:
    0 0 0 1px rgba(95, 230, 255, 0.32),   /* crisp inner ring */
    0 0 0 7px rgba(95, 230, 255, 0.06),   /* faint matte ring */
    0 26px 70px rgba(0, 0, 0, 0.6),       /* depth */
    0 0 55px rgba(40, 160, 210, 0.20);    /* cyan glow */
}
.portrait__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.04) saturate(0.95);
  transition: transform .6s var(--ease), filter .6s var(--ease);
}
.portrait:hover .portrait__frame img { transform: scale(1.045); filter: contrast(1.06) saturate(1); }
/* cyan light from above + fine scanlines so it sits in the world */
.portrait__frame::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(95, 230, 255, 0.14), transparent 60%);
  mix-blend-mode: screen;
}
.portrait__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(110, 220, 255, 0.045) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}
.portrait__cap {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-mono);
}
.portrait__name {
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.portrait__role {
  font-size: var(--fs-micro);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 640px) {
  .about-hero--split {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    max-width: 460px;
  }
  .portrait { width: min(280px, 78%); }
}
