/* ═══════════════════════════════════════════════
   bitcoinbox¹ — BTC Education Hub
   White, near-black, one orange. Premium merch drop.
   Headlines: Archivo (stand-in for Agrandir).
   ═══════════════════════════════════════════════ */

:root {
  --bg-top: #FFFFFF;
  --bg-bottom: #F7F6F4;
  --ink: #111111;
  --grey: #6B6B6B;
  --grey-light: #A9ACB2;      /* wordmark grey */
  --line: #E8E7E4;
  --orange: #F7931A;
  --orange-deep: #E5860F;

  --font-head: "Archivo", "Agrandir", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --measure: 40rem;
  --wide: 64rem;
  --pad-x: clamp(1.25rem, 5vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* No CSS smooth-scrolling: it makes ScrollTrigger's refresh-time scroll
   compensation asynchronous, which corrupts pin measurements when the
   viewport resizes mid-pin (phone rotation, mobile URL bar). */

body {
  background: var(--bg-top);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle page gradient on a fixed layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  pointer-events: none;
}

::selection { background: var(--orange); color: #fff; }

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

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ══════════ Hero ══════════ */

.hero {
  min-height: 96svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 7vh, 5rem) var(--pad-x) 7.5rem;
  position: relative;
}

.hero-inner {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logomark {
  width: clamp(180px, 46vw, 250px);
  margin-bottom: 0.5rem;
}

.hero-exploded {
  width: clamp(280px, 88vw, 560px);
  margin: -0.75rem 0 -0.5rem; /* renders carry generous whitespace of their own */
}

.hero-wordmark { line-height: 0; }
.hero-wordmark img {
  width: clamp(240px, 70vw, 420px);
}

.hero-sub {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 1.75rem 0 2rem;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.hero-funds {
  font-size: 0.875rem;
  color: var(--grey);
}

/* Buttons — the orange pills, consistent everywhere */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--orange);
  text-decoration: none;
  padding: 1.05rem 2.75rem;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover {
  background: var(--orange-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(247, 147, 26, 0.35);
}
.btn:active { transform: translateY(0) scale(0.98); }

.counter {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.08em;
}
.counter-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--grey);
  white-space: nowrap;
}
.scroll-cue-line {
  width: 1px;
  height: 34px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--ink);
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

/* ══════════ Packing sequence ══════════ */

#pack { border-top: 1px solid var(--line); }

.pack-pin { position: relative; }

.pack-stage {
  height: 100svh;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.pack-progress {
  position: absolute;
  top: 1.4rem;
  left: var(--pad-x);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--grey);
  z-index: 5;
}

/* Items layer ABOVE the box so drops land visibly inside it. (z-index is safe
   here again — the old mix-blend-mode constraint was removed with the JPEGs.) */
.pack-items { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pack-item {
  position: absolute;
  left: 50%;
  top: 27%;
  width: clamp(150px, 44vw, 280px);
  height: auto;
  margin-left: calc(clamp(150px, 44vw, 280px) / -2);
  margin-top: calc(clamp(150px, 44vw, 280px) / -2);
  will-change: transform, opacity;
}

.pack-box {
  position: absolute;
  bottom: 10svh;
  left: 50%;
  /* 78vw governs phones (unchanged); desktop cap trimmed 480 -> 420px */
  margin-left: calc(clamp(280px, 78vw, 420px) / -2);
  width: clamp(280px, 78vw, 420px);
  z-index: 1;
}
.pack-box .box-closed {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.pack-captions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3.5svh;
  width: min(88vw, 34rem);
  z-index: 4;
  text-align: center;
}
.cap {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  font-size: clamp(0.75rem, 2.6vw, 0.875rem);
  line-height: 1.5;
  color: var(--ink);
  opacity: 0;
}

/* Static fallback — hidden unless reduced motion / no JS */
.pack-static { display: none; padding: 4rem var(--pad-x); }
html.no-motion .pack-pin { display: none; }
html.no-motion .pack-static { display: block; }

.pack-static .section-title { text-align: center; margin-bottom: 2.5rem; }
.pack-static-grid {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem 2.5rem;
}
.pack-static-grid img { max-width: 220px; margin: 0 auto; }
.pack-static-grid figcaption {
  font-size: 0.8125rem;
  color: var(--grey);
  text-align: center;
  max-width: 26rem;
  margin: 0.75rem auto 0;
}

/* ══════════ Shared section rhythm ══════════ */

.section {
  padding: clamp(4.5rem, 11vw, 8rem) var(--pad-x);
  border-top: 1px solid var(--line);
}

.measure { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: var(--wide); margin: 0 auto; }

.eyebrow {
  color: var(--grey);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  margin-bottom: 1rem;
}
.eyebrow-scarce { color: var(--orange); }

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

/* ══════════ What's inside ══════════ */

.inside-list { list-style: none; }

.inside-item {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.inside-item:last-child { border-bottom: 1px solid var(--line); }

.inside-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.inside-head h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
}
.inside-value { color: var(--grey); white-space: nowrap; }

.inside-item p { color: var(--grey); font-size: 0.9375rem; }

.ledger {
  margin-top: 2.25rem;
  padding: 1.1rem 0;
  border-top: 2px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ══════════ The Can ══════════ */

.can-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 760px) {
  .can-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; }
}

.can-figure {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  width: 100%;
}
.can-figure img { transition: filter 0.3s ease, opacity 0.3s ease; }

.can-sub {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}
.can-body { color: var(--grey); font-size: 0.9375rem; max-width: 32rem; margin-bottom: 1.5rem; }
.can-link a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Sold-out state: add class "sold-out" to #the-can */
.can-soldout-badge {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1.2rem;
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
}
.can-soldout-note { display: none; color: var(--grey); font-size: 0.8125rem; }

#the-can.sold-out .can-figure img { filter: grayscale(1); opacity: 0.6; }
#the-can.sold-out .can-soldout-badge { display: block; }
#the-can.sold-out .can-soldout-note { display: block; }
#the-can.sold-out .can-link { display: none; }
#the-can.sold-out .eyebrow-scarce { color: var(--grey); }

/* ══════════ Choose your box ══════════ */

.tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .tiers { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.tier {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.tier:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.07);
}
.tier-collector { border: 2px solid var(--ink); }

.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tier-head h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
}
.tier-price { font-size: 1.05rem; font-weight: 500; }

.tier-body { color: var(--grey); font-size: 0.9375rem; flex-grow: 1; }

.tier-count { margin: 1.4rem 0 1.5rem; color: var(--grey); }
.tier-count-scarce { color: var(--orange); font-weight: 500; }

.tier .btn { text-align: center; }

/* ══════════ How it works ══════════ */

.steps { list-style: none; }

.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.step-num {
  color: var(--grey-light);
  font-size: 1rem;
  line-height: 1.8;
  min-width: 2rem;
}
.step h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.step p { color: var(--grey); font-size: 0.9375rem; }

.cutoffs {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--grey);
}
.cutoff-date { color: var(--ink); font-weight: 500; }

/* ══════════ FAQ ══════════ */

.faq-list details {
  border-top: 1px solid var(--line);
}
.faq-list details:last-child { border-bottom: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-mark {
  color: var(--grey-light);
  font-size: 1.1rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-list details[open] .faq-mark { transform: rotate(45deg); }

.faq-list details p {
  padding: 0 0 1.4rem;
  color: var(--grey);
  font-size: 0.9375rem;
  max-width: 36rem;
}

/* ══════════ Footer ══════════ */

.footer {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5rem) var(--pad-x);
}
.footer-logo-link { display: inline-block; margin-bottom: 1.25rem; }
.footer-logo { width: 210px; max-width: 60vw; height: auto; display: block; }
.footer a { color: inherit; text-underline-offset: 3px; }
.footer-contact { margin-bottom: 1.75rem; opacity: 0.85; }
.footer-small { font-size: 0.8125rem; opacity: 0.55; max-width: 26rem; margin: 0 auto; }

/* ══════════ Motion prep (JS adds movement; keep visible without it) ══════════ */

html.has-motion [data-hero] { opacity: 0; }
html.has-motion .reveal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .counter-dot, .scroll-cue-line::after { animation: none; }
  .btn, .tier, .faq-mark, .can-figure img { transition: none; }
}
