/* Experimental 3D cable home page. Dark, neon, hi-vis accents from Nick's workwear. */

:root {
  --bg: #04060b;
  --text: #eef1f7;
  --muted: #9aa4b8;
  --line: rgba(238, 241, 247, 0.14);
  --glass: rgba(10, 14, 24, 0.62);
  --accent: #d8f31a;
  --accent-ink: #10150a;
  --live: #c46a2c;
  --neutral: #2f7bff;
  --earth: #1fd655;
  --head-font: "Archivo", system-ui, sans-serif;
  --body-font: "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  background: var(--bg);
  font: 17px/1.55 var(--body-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Fixed HUD ---------- */
.hud-top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 3vw, 36px);
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  font: 700 13px/1.1 var(--head-font); letter-spacing: 0.08em; text-transform: uppercase;
}
.hud-brand img { width: 40px; height: 40px; filter: invert(1); }
.hud-actions { display: flex; align-items: center; gap: 12px; }
.hud-quote {
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  font: 700 14px/1 var(--head-font); letter-spacing: 0.02em;
  box-shadow: 0 0 24px rgba(216, 243, 26, 0.35);
  transition: box-shadow 0.2s;
}
.hud-quote:hover { box-shadow: 0 0 36px rgba(216, 243, 26, 0.7); }
.hud-menu {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: rgba(10, 14, 24, 0.5);
  display: grid; place-content: center; gap: 6px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hud-menu span:not(.sr) { display: block; width: 18px; height: 2px; background: var(--text); transition: transform 0.25s; }
.hud-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.hud-menu[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 25;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px clamp(24px, 8vw, 120px) 48px;
  background: rgba(4, 6, 11, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li a {
  display: inline-block; padding: 4px 0; text-decoration: none;
  font: 800 clamp(34px, 6vw, 64px)/1.08 var(--head-font); font-stretch: 68%;
  color: transparent; -webkit-text-stroke: 1px var(--text);
  transition: color 0.2s;
}
.menu li a:hover, .menu li a:focus-visible { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.menu-contact { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 36px; color: var(--muted); }

/* ---------- Scene ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.no-3d .scene { display: none; }
.track { height: 100vh; }

.css3d { position: fixed !important; inset: 0; z-index: 5; pointer-events: none; }

.hero-copy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  text-align: center; padding: 70px 16px clamp(16px, 3.5vh, 36px); pointer-events: none;
  background: linear-gradient(rgba(4, 6, 11, 0), rgba(4, 6, 11, 0.82) 38%);
  transition: opacity 0.3s;
}
/* A quiet label: the neon logo above is the headline */
.hero-copy h1 {
  margin: 0; font: 600 clamp(12px, 1.3vw, 15px)/1 var(--head-font); font-stretch: 100%;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted);
}
.hero-copy p { margin: 8px 0 18px; color: var(--muted); font-size: 15px; letter-spacing: 0.04em; }
.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font: 600 11px/1 var(--head-font); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.chapters {
  position: fixed; left: clamp(16px, 3vw, 36px); bottom: clamp(20px, 4vh, 36px); z-index: 20;
  list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
}
.chapters button {
  all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center;
  font: 600 12px/1 var(--head-font); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); opacity: 0.55; transition: opacity 0.25s, color 0.25s;
}
.chapters button::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width 0.25s; }
.chapters button b { font-weight: 700; color: inherit; }
.chapters button[aria-current="true"] { color: var(--accent); opacity: 1; }
.chapters button[aria-current="true"]::before { width: 34px; }
.chapters button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.no-3d .chapters, .no-3d .hero-copy .scroll-cue { display: none; }

/* ---------- Floating cards ----------
   Sizes are in --u (2px in 3D) so the browser draws the cards at double size and the
   scene scales them down, which keeps the text sharp. The plain layout sets --u to 1px. */
.cable-js .cards { position: fixed; inset: 0; visibility: hidden; pointer-events: none; }
.cc { --u: 2px; pointer-events: auto; }
.cc-card {
  display: block; width: calc(340 * var(--u)); padding: calc(26 * var(--u)) calc(26 * var(--u)) calc(22 * var(--u));
  text-decoration: none;
  border-radius: calc(14 * var(--u)); border: var(--u) solid var(--line);
  background: rgba(8, 11, 19, 0.82);
  box-shadow: 0 calc(20 * var(--u)) calc(60 * var(--u)) rgba(0, 0, 0, 0.45);
  transition: border-color 0.25s, box-shadow 0.25s;
}
a.cc-card:hover, a.cc-card:focus-visible {
  outline: none; border-color: rgba(216, 243, 26, 0.75);
  box-shadow: 0 0 calc(40 * var(--u)) rgba(216, 243, 26, 0.25), 0 calc(20 * var(--u)) calc(60 * var(--u)) rgba(0, 0, 0, 0.45);
}
.cc-index { display: block; font: 600 calc(11 * var(--u))/1 var(--head-font); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.cc-icon {
  display: block; width: calc(34 * var(--u)); height: calc(34 * var(--u));
  margin: calc(22 * var(--u)) 0 calc(14 * var(--u)); color: var(--accent);
}
.cc-card h3 { margin: calc(14 * var(--u)) 0 calc(8 * var(--u)); font: 800 calc(26 * var(--u))/1.05 var(--head-font); font-stretch: 72%; letter-spacing: 0; color: var(--text); }
.cc-icon + h3 { margin-top: 0; }
.cc-card p { margin: 0; color: #c9cfdb; font-size: calc(15 * var(--u)); line-height: 1.5; }
.cc-more { display: inline-block; margin-top: calc(18 * var(--u)); font: 700 calc(13 * var(--u))/1 var(--head-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

.cc-title {
  margin: 0; width: calc(760 * var(--u)); text-align: center;
  font: 800 calc(128 * var(--u))/0.9 var(--head-font); font-stretch: 68%; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: calc(2 * var(--u)) rgba(238, 241, 247, 0.9);
}
.cc-title span {
  display: block; margin-bottom: calc(14 * var(--u));
  font: 700 calc(16 * var(--u))/1 var(--head-font); letter-spacing: 0.4em;
  color: var(--accent); -webkit-text-stroke: 0;
}

.cc-video {
  display: block; width: calc(240 * var(--u)); text-decoration: none;
  border-radius: calc(10 * var(--u)); overflow: hidden;
  background: rgba(8, 11, 19, 0.85); border: var(--u) solid var(--line);
  box-shadow: 0 0 calc(30 * var(--u)) rgba(47, 123, 255, 0.22);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cc-video:hover, .cc-video:focus-visible { outline: none; border-color: rgba(216, 243, 26, 0.75); box-shadow: 0 0 calc(40 * var(--u)) rgba(216, 243, 26, 0.45); }
.cc-video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.cc-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-video-play {
  position: absolute; left: 50%; top: 50%; width: calc(40 * var(--u)); height: calc(40 * var(--u));
  transform: translate(-50%, -50%); padding: calc(10 * var(--u)); border-radius: 50%;
  background: rgba(255, 0, 51, 0.9); color: #fff;
}
.cc-video-title {
  display: block; padding: calc(10 * var(--u)) calc(12 * var(--u)) calc(12 * var(--u));
  font: 700 calc(13 * var(--u))/1.25 var(--head-font); letter-spacing: 0.01em; color: var(--text);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.cc-card.cc-cta { width: calc(400 * var(--u)); border-color: rgba(216, 243, 26, 0.45); }
.cc-actions { display: flex; flex-wrap: wrap; gap: calc(10 * var(--u)); margin-top: calc(22 * var(--u)); }
.cc-btn {
  padding: calc(12 * var(--u)) calc(20 * var(--u)); border-radius: 999px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  font: 700 calc(15 * var(--u))/1 var(--head-font);
}
.cc-btn-ghost { background: transparent; color: var(--text); border: var(--u) solid var(--line); }
.cc-btn:hover { box-shadow: 0 0 calc(26 * var(--u)) rgba(216, 243, 26, 0.5); }

/* Plain layout when there's no WebGL */
.no-3d .track { display: none; }
.no-3d .hero-copy { position: static; padding: 140px 16px 40px; background: none; }
.no-3d .cc { --u: 1px; }
.no-3d .cards {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  padding: 0 16px 80px; max-width: 1200px; margin: 0 auto;
}
.no-3d .cc-title { width: 100%; font-size: clamp(56px, 12vw, 110px); }
.no-3d .cc[data-stop="title"] { flex-basis: 100%; }
.no-3d .cc-videos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; flex-basis: 100%; }
.no-3d .cc-card, .no-3d .cc-card.cc-cta { width: min(100%, 360px); }

@media (max-width: 600px) {
  .hud-brand span { display: none; }
  .chapters { display: none; }
}
/* ---------- Homepage extras ---------- */
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 40; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }

.hero-trust {
  list-style: none; margin: 0 auto 20px; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px;
  font-size: 13px; color: var(--muted); letter-spacing: 0.02em;
}
.hero-trust b { color: var(--text); font: 700 15px/1 var(--head-font); margin-right: 3px; }
.hero-trust img { display: block; height: 30px; width: auto; background: #fff; padding: 3px 6px; border-radius: 6px; }

.cc-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(6 * var(--u)); margin: calc(18 * var(--u)) 0 calc(14 * var(--u)); }
.cc-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(6 * var(--u)); display: block; }
.cc-avatar {
  display: block; width: calc(64 * var(--u)); height: calc(64 * var(--u)); margin: calc(18 * var(--u)) 0 calc(12 * var(--u));
  border-radius: 50%; object-fit: cover; border: calc(2 * var(--u)) solid var(--accent);
}
.cc-quote { margin: 0; }
.cc-quote p { margin: 0 0 calc(8 * var(--u)); font: 700 calc(19 * var(--u))/1.25 var(--head-font); color: var(--text); }
.cc-quote cite { font-style: normal; font-size: calc(13 * var(--u)); color: var(--muted); }
.cc-badge {
  position: absolute; left: calc(8 * var(--u)); top: calc(8 * var(--u)); z-index: 1;
  padding: calc(4 * var(--u)) calc(8 * var(--u)); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 calc(10 * var(--u))/1 var(--head-font); letter-spacing: 0.08em; text-transform: uppercase;
}
.cc-yt {
  display: inline-flex; align-items: center; gap: calc(8 * var(--u)); margin-top: calc(16 * var(--u));
  font: 600 calc(14 * var(--u))/1 var(--body-font); color: var(--text); text-decoration: none;
}
.cc-yt .icon { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: #ff0033; }
.cc-yt:hover { color: var(--accent); }

.menu-social { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; }
.menu-social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.menu-social a:hover, .menu-contact a:hover { color: var(--accent); }
.menu-contact a { text-decoration: none; }
.menu .icon { width: 20px; height: 20px; }

/* Footer: scrolls up over the scene at the end */
.foot {
  position: relative; z-index: 22;
  padding: 56px clamp(16px, 5vw, 64px) 28px;
  background: #070a12; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted);
}
.foot-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); max-width: 1200px; margin: 0 auto; }
.foot h2 { margin: 0 0 14px; font: 700 13px/1 var(--head-font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); }
.foot p { margin: 0 0 14px; }
.foot-mark { filter: invert(1); width: 48px; height: 48px; margin-bottom: 12px; }
.foot-napit { background: #fff; padding: 5px 8px; border-radius: 6px; height: 40px; width: auto; }
.foot-list, .foot .area-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.foot a:hover { color: var(--accent); }
.foot .icon { width: 18px; height: 18px; flex: none; }
.foot-base {
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px;
}
.foot-base p { margin: 0; }
.foot-base a { display: inline; text-decoration: underline; text-underline-offset: 3px; }
.icon { width: 24px; height: 24px; }

@media (max-width: 600px) {
  .hero-trust { gap: 6px 16px; font-size: 12px; }
  .hero-trust li:first-child { flex-basis: 100%; display: flex; justify-content: center; }
}

/* ---------- Card-to-page morph (see transition.js and the script in index.html) ---------- */
/* The card waiting flat in the middle of the screen for a subpage header to shrink back into it */
.cc.vt-land {
  position: fixed !important; left: 50%; top: 50%; z-index: 7;
  transform: translate(-50%, -50%) !important;
  visibility: visible !important; opacity: 1 !important;
  --u: min(1.05px, 0.247vw);
}
.cc.vt-land > .cc-card { view-transition-name: nb-head; }
.cc.vt-land h3 { view-transition-name: nb-title; }
.cc.vt-land :is(.cc-icon, .cc-avatar, .cc-thumbs) { view-transition-name: nb-icon; }
/* The tapped card, once its flat copy has been lifted out to morph */
.cc.vt-hidden { visibility: hidden !important; }
/* While landing, keep the 3D scene dark until it has jumped to the right card */
.scene, .hero-copy { transition: opacity 0.5s; }
.vt-arriving .scene, .vt-arriving .hero-copy { opacity: 0; }

/* Touch devices: skip effects that are costly to draw over a moving 3D scene */
@media (pointer: coarse) {
  .cc-card, .cc-video { box-shadow: none; }
  .hud-menu { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 14, 24, 0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue i { animation: none; }
}
