/* Tangle Charms v7 — racing-minimalist, full-bleed canvas + parallax */
:root {
  --obsidian: #0a0b0d;
  --carbon: #111316;
  --bone: #f4f1ea;
  --silver: #d8dce2;
  --lime: #d2ff00;
  --muted: rgba(244, 241, 234, 0.62);
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --sans: "Inter Tight", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --header-h: 64px;
  --page: min(1180px, calc(100% - 40px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  overflow-y: scroll;
  background: var(--obsidian);
}
html, body { margin: 0; padding: 0; }
body {
  overflow-x: clip;
  overflow-y: visible;
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  z-index: 1;
}
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--bone);
}
h3 {
  margin: 0 0 0.35em;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bone);
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-150%);
  background: var(--lime);
  color: var(--obsidian);
  padding: 8px 14px;
  z-index: 200;
  font-weight: 600;
}
.skip:focus, .skip:focus-visible { transform: translateY(12px); }

/* ===== Layer 0: fixed atmospheric backdrop ===== */
.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--obsidian);
}
.page-backdrop-photo {
  position: absolute;
  inset: -8%;
  background-image: image-set(
    url("assets/after-usbc-silver-1024.webp?v=11") type("image/webp"),
    url("assets/after-usbc-silver-1024.jpg?v=11") type("image/jpeg")
  );
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: brightness(0.22) saturate(0.55) contrast(1.15);
  transform: scale(1.06);
}
.page-backdrop-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 40%, rgba(216, 220, 226, 0.07), transparent 55%),
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(10, 11, 13, 0.88) 100%),
    linear-gradient(to bottom, rgba(10, 11, 13, 0.35) 0%, transparent 18%, transparent 70%, rgba(10, 11, 13, 0.7) 100%);
}
.page-backdrop-grain {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
}
.site-header.is-scrolled {
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--hairline);
}
.header-inner {
  width: var(--page);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  color: var(--bone);
  text-transform: uppercase;
}
.nav {
  display: none;
  margin-left: auto;
  gap: 28px;
}
.nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  opacity: 0.78;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 1; }
.menu-toggle {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  position: relative;
  padding: 0;
}
.menu-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--bone);
  transition: transform 0.25s var(--ease);
}
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
body.nav-open .menu-toggle span:first-child { transform: rotate(45deg); }
body.nav-open .menu-toggle span:last-child { transform: rotate(-45deg); }

@media (max-width: 859px) {
  body.nav-open .nav {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 8px 0 16px;
    background: rgba(10, 11, 13, 0.96);
    border-bottom: 1px solid var(--hairline);
  }
  body.nav-open .nav a {
    display: block;
    width: 100%;
    padding: 14px calc((100vw - var(--page)) / 2);
    opacity: 1;
  }
}
@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .nav { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 22px;
  line-height: 1;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  background: transparent;
  color: var(--bone);
  white-space: nowrap;
}
.btn:focus-visible { outline: 1px solid var(--lime); outline-offset: 3px; }
.btn-lime {
  background: var(--lime);
  color: var(--obsidian);
  border-color: var(--lime);
}
.btn-lime:hover { filter: brightness(1.08); }
[data-amazon-cta][hidden] { display: none !important; }
[data-amazon-cta]:not([hidden]) { margin-top: 28px; }

/* ===== Hero (WebGL intact) ===== */
.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #0a0b0d;
  scroll-margin-top: 0;
}
.hero-stage,
.hero-canvas,
.hero-poster,
.hero-poster img,
.hero-fallback,
.hero-fallback picture,
.hero-fallback img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-stage { z-index: 0; }
.hero-poster img,
.hero-fallback img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.hero-poster img { object-position: center 42%; }
.hero-fallback img { object-position: center 40%; }
.hero-canvas {
  display: block;
  z-index: 1;
  touch-action: pan-y;
  cursor: crosshair;
}
.hero-fallback {
  z-index: 1;
  pointer-events: auto;
  touch-action: pan-y;
  cursor: pointer;
  --mx: 50%;
  --my: 50%;
  --reveal: 0%;
}
.hero-fallback picture,
.hero-fallback img {
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 var(--reveal), transparent calc(var(--reveal) + 18%));
  mask-image: radial-gradient(circle at var(--mx) var(--my), #000 var(--reveal), transparent calc(var(--reveal) + 18%));
}
.hero.is-fallback .hero-canvas { display: none; }
.hero.is-fallback .hero-fallback { display: block; }
.hero.is-toggled .hero-fallback {
  --mx: 50%;
  --my: 50%;
  --reveal: 100%;
}
.hero.is-toggled .hero-fallback picture,
.hero.is-toggled .hero-fallback img {
  -webkit-mask-image: none;
  mask-image: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: calc(var(--header-h) + 24px) calc((100% - var(--page)) / 2) 56px;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 11, 13, 0.78) 0%, rgba(10, 11, 13, 0.18) 38%, transparent 58%),
    linear-gradient(to bottom, rgba(10, 11, 13, 0.48) 0%, transparent 28%);
  color: var(--bone);
}
.hero-kicker {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f4f4f2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-kicker .telem {
  font-variant-numeric: tabular-nums;
  color: #f4f4f2;
  padding-right: 12px;
  border-right: 1px solid rgba(244, 244, 242, 0.7);
}
.hero-overlay h1 {
  font-size: clamp(4.4rem, 14vw, 11rem);
  max-width: 12ch;
}
.hero-sub {
  margin: 14px 0 0;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--bone);
  opacity: 0.86;
}
.scroll-cue {
  margin-top: 32px;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  position: relative;
  padding-bottom: 18px;
}
.hero .scroll-cue::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 14px;
  background: #f4f4f2;
}

/* ===== Editorial canvas + hovering layers ===== */
.editorial {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: clip;
}
.float-layer {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}
.layer-charm {
  top: 125vh;
  right: 16px;
  width: min(50vw, 640px);
  z-index: 2;
  background: #060709;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}
.layer-charm img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #060709;
}
.layer-ghost {
  top: 88vh;
  left: -6vw;
  width: min(70vw, 920px);
  z-index: 0;
  color: rgba(244, 241, 234, 0.09);
}
.ghost-type {
  display: block;
  font-family: var(--display);
  font-size: clamp(5rem, 18vw, 14rem);
  line-height: 0.8;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: inherit;
  user-select: none;
}
.ghost-ring {
  position: absolute;
  top: 18%;
  left: 42%;
  width: min(52vw, 620px);
  height: auto;
  opacity: 0.7;
  color: rgba(216, 220, 226, 0.22);
}

/* ===== Shared section typography ===== */
.section { scroll-margin-top: calc(var(--header-h) + 16px); }
.section-head { width: var(--page); margin: 0 auto; }
.eyebrow {
  margin: 0 0 16px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow .num {
  color: var(--lime);
  padding-right: 12px;
  border-right: 1px solid var(--hairline-strong);
  font-variant-numeric: tabular-nums;
}
.lede {
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ===== Before / After slider ===== */
.compare {
  position: relative;
  z-index: 3;
  padding: 72px 0 0;
}
.compare-head {
  margin-bottom: 28px;
}
.compare-head h2 {
  font-size: clamp(3rem, 8vw, 6.5rem);
}
.ba {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 420px;
  overflow: hidden;
  background: #060709;
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
}
.ba-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ba-layer picture,
.ba-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 48% 36%;
}
.ba-before {
  width: 50%;
  z-index: 2;
  border-right: 0;
}
.ba-label {
  position: absolute;
  bottom: 18px;
  z-index: 3;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(10, 11, 13, 0.55);
  border: 1px solid var(--hairline);
  padding: 6px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.ba-label-before { left: 16px; }
.ba-label-after { right: 16px; }
.ba-after .ba-label-after { right: 16px; }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 0;
  pointer-events: none;
}
.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--bone);
  box-shadow: 0 0 0 1px rgba(10, 11, 13, 0.3);
  transform: translateX(-50%);
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--bone);
  border-radius: 50%;
  background: rgba(10, 11, 13, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(10, 11, 13, 0.25);
}
.ba-knob::before,
.ba-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--bone);
  border-right: 1px solid var(--bone);
}
.ba-knob::before {
  left: 11px;
  transform: translateY(-50%) rotate(-135deg);
}
.ba-knob::after {
  right: 11px;
  transform: translateY(-50%) rotate(45deg);
}
.ba-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

/* ===== Story ===== */
.story {
  position: relative;
  z-index: 3;
  padding: 120px 0 40px;
}
.story-copy {
  width: var(--page);
  margin: 0 auto;
  max-width: 36rem;
  margin-left: calc((100% - var(--page)) / 2);
}
.story h2 {
  font-size: clamp(3rem, 8vw, 6.2rem);
  margin-bottom: 22px;
}
.story-points {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.story-points li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.98rem;
}
.story-points strong {
  display: block;
  color: var(--bone);
  font-weight: 600;
  margin-bottom: 2px;
}

/* ===== Four moves ===== */
.how {
  position: relative;
  z-index: 3;
  padding: 100px 0 40px;
}
.how .section-head h2 {
  font-size: clamp(3rem, 8vw, 6.2rem);
}
.steps {
  width: var(--page);
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--hairline);
}
.step {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.step-num {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--lime);
  display: block;
  margin-bottom: 8px;
}
.step-art {
  width: 140px;
  color: var(--silver);
  margin: 8px 0 16px;
  opacity: 0.85;
}
.step-art svg { width: 100%; height: auto; }
.step p { color: var(--muted); font-size: 0.95rem; max-width: 28ch; }

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
  }
  .step {
    padding: 32px 28px 36px 0;
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
  }
  .step:last-child { border-right: 0; padding-right: 0; }
  .step:not(:first-child) { padding-left: 28px; }
}

/* ===== Shop ===== */
.shop {
  position: relative;
  z-index: 3;
  padding: 120px 0 100px;
  width: var(--page);
  margin: 0 auto;
}
.shop h2 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  margin-bottom: 20px;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--hairline);
  padding: 36px 0 48px;
  background: rgba(10, 11, 13, 0.55);
}
.footer-inner {
  width: var(--page);
  margin: 0 auto;
}
.footer-brand { margin-bottom: 20px; }
.footer-brand p {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-bottom: 24px;
}
.site-footer nav a {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--silver);
}
.site-footer nav a:hover { color: var(--bone); }
.legal, .copy {
  font-size: 0.7rem;
  line-height: 1.55;
  color: rgba(244, 241, 234, 0.42);
  max-width: 62rem;
}
.copy { margin-top: 12px; }

@media (max-width: 859px) {
  .layer-charm {
    top: 155vh;
    right: -22vw;
    width: 62vw;
    opacity: 0.55;
  }
  .layer-ghost {
    top: 120vh;
    left: -16vw;
    width: 110vw;
  }
  .ghost-ring { width: 80vw; left: 20%; }
  .story { padding: 88px 0 24px; }
  .how { padding: 72px 0 24px; }
  .shop { padding: 88px 0 72px; }
  .compare { padding-top: 56px; }
  .ba { min-height: 380px; height: 80vh; }
  .hero-overlay { padding-bottom: 40px; }
}


/* One-shot hero charm flash — class-driven, not :hover-held */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform-origin: var(--flash-x, 50%) var(--flash-y, 40%);
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 40%), rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.16) 22%, rgba(255,255,255,0.04) 42%, transparent 66%);
  mix-blend-mode: screen;
}
.hero.is-flash::after {
  animation: heroCharmFlash 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heroCharmFlash {
  0% { opacity: 0; transform: scale(0.72); }
  30% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.22); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-layer {
    will-change: auto;
    transform: none !important;
  }
  .page-backdrop-photo { transform: none; }
  .hero.is-flash::after {
    animation: none !important;
    opacity: 0;
  }
}

@media (min-width: 860px) {
  .story-copy { padding-right: min(36vw, 420px); max-width: none; }
}
