/* =====================================================================
   #block50k — the spinning $50K cash block
   Ported from the 1v1 podcast site (Projects/day1v1) 2026-08-12.
   Pure-CSS 3D: rotateY 8s + float bob + counter-phase pedestal glow.
   Transform/opacity only. prefers-reduced-motion -> static 3/4 pose.
   NOTE: colours are hard-coded, NOT tokens — body.world (marble theme)
   redefines --text/--muted/--line to dark-ink values and would make
   this dark card unreadable.
   ===================================================================== */

/* ---------- anchor: card chrome (only once JS marks it ready) ----------
   a#block50k.is-ready (1,1,1) so the structural reservation in styles.css
   (`#block50k { display:block; … }`) can never flatten the grid,
   whatever the stylesheet order. */
.block50k { display: block; text-decoration: none; }

/* the slot is 520px INCLUSIVE — padding/border must never widen it (2px
   mobile overflow + 546px card measured under content-box; this ends it) */
.block50k,
.block50k *,
.block50k *::before,
.block50k *::after { box-sizing: border-box; }

a#block50k.is-ready {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  column-gap: 16px;
  width: 100%;
  max-width: 520px;
  min-height: 96px;
  padding: 8px 18px 8px 6px;
  border: 1px solid rgba(199, 203, 209, .14);
  border-radius: 14px;
  background:
    radial-gradient(120% 160% at 12% 50%, rgba(200, 168, 106, .10), transparent 55%),
    linear-gradient(120deg, rgba(20, 21, 25, .78), rgba(11, 11, 13, .58));
  -webkit-tap-highlight-color: transparent;
  transition: transform .45s cubic-bezier(.22, .61, .21, 1);
  overflow: visible;
}

/* hover glow ring lives on a pseudo so we transition OPACITY, not box-shadow */
.block50k.is-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    0 10px 44px rgba(200, 168, 106, .22),
    inset 0 0 0 1px rgba(200, 168, 106, .38);
  opacity: 0;
  transition: opacity .45s cubic-bezier(.22, .61, .21, 1);
  pointer-events: none;
}

.block50k:focus-visible {
  outline: 2px solid #C8A86A;
  outline-offset: 3px;
}

/* ---------- stage: perspective room for the pickup ---------- */
.b50k-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 98px;
  padding-bottom: 12px;
  perspective: 560px;
  perspective-origin: 50% 22%;
}

/* gold pedestal glow — breathes in counter-phase with the bob */
.b50k-glow {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 104px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(200, 168, 106, .55),
    rgba(200, 168, 106, .16) 55%,
    transparent 78%);
  transform: translateX(-50%);
  opacity: .55;
  animation: b50k-shadow 4.5s ease-in-out infinite;
  transition: opacity .45s cubic-bezier(.22, .61, .21, 1);
}

/* float wrapper — bob only, so it composes with the cube's spin */
.b50k-float {
  display: block;
  width: 80px;
  height: 46px;
  transform-style: preserve-3d;
  animation: b50k-bob 4.5s ease-in-out infinite;
  will-change: transform;
}

/* fixed camera tilt: lets the top face read, GTA-style */
.b50k-tilt {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotateX(-14deg);
  transform-style: preserve-3d;
}

/* ---------- the cash block ---------- */
.b50k-cube {
  --fw: 80px; /* footprint: width & depth */
  --fh: 46px; /* stack height */
  position: relative;
  display: block;
  width: var(--fw);
  height: var(--fh);
  transform-style: preserve-3d;
  animation: b50k-spin 8s linear infinite;
  will-change: transform;
}

.b50k-face {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--fw);
  height: var(--fh);
  box-sizing: border-box;
  border: 1px solid rgba(200, 168, 106, .5);
  background: linear-gradient(165deg, #1A1B21 0%, #0B0B0D 72%);
  box-shadow: inset 0 1px 0 rgba(231, 232, 234, .08);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.b50k-front  { transform: translate(-50%, -50%) translateZ(calc(var(--fw) / 2)); }
.b50k-back   { transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--fw) / 2)); }
.b50k-right  { transform: translate(-50%, -50%) rotateY(90deg)  translateZ(calc(var(--fw) / 2)); }
.b50k-left   { transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--fw) / 2)); }
.b50k-top,
.b50k-bottom { height: var(--fw); }
.b50k-top    { transform: translate(-50%, -50%) rotateX(90deg)  translateZ(calc(var(--fh) / 2)); }
.b50k-bottom { transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--fh) / 2)); background: #0B0B0D; }

/* currency strap — champagne band wrapping front → top → back */
.b50k-front::before,
.b50k-back::before,
.b50k-top::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 16px;
  transform: translateX(-50%);
  background: rgba(200, 168, 106, .16);
  border-left: 1px solid rgba(200, 168, 106, .30);
  border-right: 1px solid rgba(200, 168, 106, .30);
  pointer-events: none;
}

/* stacked-bill edges — faint platinum striping on every lateral face */
.b50k-front::after,
.b50k-back::after,
.b50k-left::after,
.b50k-right::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,
    rgba(231, 232, 234, .10) 0 1px,
    transparent 1px 5px);
  pointer-events: none;
}

/* top of the stack — the lit face */
.b50k-top {
  background:
    radial-gradient(80% 80% at 50% 35%, rgba(231, 232, 234, .10), transparent 70%),
    linear-gradient(165deg, #22242B 0%, #101116 80%);
}

/* the denomination — REAL TEXT, gilded */
.b50k-cash {
  position: relative;
  z-index: 1;
  font: 800 17px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .05em;
  background: linear-gradient(180deg, #EBD9AC 0%, #C8A86A 55%, #8F7442 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- copy column ---------- */
.b50k-copy {
  display: grid;
  row-gap: 4px;
  padding: 14px 0;
}

.b50k-eyebrow {
  font: 600 10px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #C8A86A;
}

.b50k-title {
  font: 700 17px/1.15 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #E7E8EA;
}

.b50k-sub {
  font: 400 12.5px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #9A9DA4;
}

.b50k-arrow {
  display: inline-block;
  margin-left: 6px;
  color: #C8A86A;
  transition: transform .45s cubic-bezier(.22, .61, .21, 1);
}

/* ---------- interaction: pause + lift + glow ---------- */
@media (hover: hover) and (pointer: fine) {
  .block50k:hover { transform: translateY(-2px); }
  .block50k:hover::after { opacity: 1; }
  .block50k:hover .b50k-glow { opacity: .95; }
  .block50k:hover .b50k-arrow { transform: translateX(3px); }
  .block50k:hover .b50k-cube,
  .block50k:hover .b50k-float,
  .block50k:hover .b50k-glow { animation-play-state: paused; }
}

.block50k:focus-visible { transform: translateY(-2px); }
.block50k:focus-visible::after { opacity: 1; }
.block50k:focus-visible .b50k-glow { opacity: .95; }
.block50k:focus-visible .b50k-arrow { transform: translateX(3px); }
.block50k:focus-visible .b50k-cube,
.block50k:focus-visible .b50k-float,
.block50k:focus-visible .b50k-glow { animation-play-state: paused; }

/* offscreen (IntersectionObserver, js/block50k.js): stop burning frames */
.block50k.is-offscreen .b50k-cube,
.block50k.is-offscreen .b50k-float,
.block50k.is-offscreen .b50k-glow { animation-play-state: paused; }

/* ---------- keyframes (transform only) ---------- */
@keyframes b50k-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

@keyframes b50k-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@keyframes b50k-shadow {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(.86); }
}

/* ---------- 390px lane: smaller pickup, no overflow ---------- */
@media (max-width: 420px) {
  a#block50k.is-ready {
    grid-template-columns: 112px 1fr;
    column-gap: 12px;
    padding-right: 14px;
  }
  .b50k-stage { width: 112px; height: 92px; }
  .b50k-glow { width: 90px; height: 20px; }
  .b50k-float { width: 70px; height: 42px; }
  .b50k-cube { --fw: 70px; --fh: 42px; }
  .b50k-cash { font-size: 15px; }
  .b50k-title { font-size: 16px; }
}

/* ---------- reduced motion: the static page IS the page ---------- */
@media (prefers-reduced-motion: reduce) {
  .b50k-cube,
  .b50k-float,
  .b50k-glow { animation: none !important; }
  .b50k-cube { transform: rotateY(-32deg); } /* static 3/4 pose */
  .block50k.is-ready,
  .block50k.is-ready::after,
  .b50k-glow,
  .b50k-arrow { transition: none !important; }
  .block50k:hover,
  .block50k:focus-visible { transform: none; }
}

/* ---------------------------------------------------------------------
   HERO VARIANT — the block as a page centrepiece, not a side card.
   Same machine, scaled up; every rule above still applies.
   --------------------------------------------------------------------- */
a#block50k.is-ready.block50k--hero {
  grid-template-columns: 220px 1fr;
  column-gap: 26px;
  max-width: 620px;
  min-height: 150px;
  padding: 16px 28px 16px 10px;
  border-radius: 18px;
}
.block50k--hero .b50k-stage { width: 220px; height: 168px; perspective: 900px; }
.block50k--hero .b50k-glow { width: 168px; height: 34px; }
.block50k--hero .b50k-float { width: 140px; height: 80px; }
.block50k--hero .b50k-cube { --fw: 140px; --fh: 80px; }
.block50k--hero .b50k-cash { font-size: 30px; }
.block50k--hero .b50k-front::before,
.block50k--hero .b50k-back::before,
.block50k--hero .b50k-top::before { width: 28px; }
.block50k--hero .b50k-eyebrow { font-size: 11px; letter-spacing: .22em; }
.block50k--hero .b50k-title { font-size: 26px; }
.block50k--hero .b50k-sub { font-size: 14px; }

@media (max-width: 620px) {
  a#block50k.is-ready.block50k--hero {
    grid-template-columns: 1fr;
    row-gap: 4px;
    justify-items: center;
    text-align: center;
    padding: 18px 20px 22px;
    max-width: 100%;
  }
  .block50k--hero .b50k-stage { width: 190px; height: 148px; }
  .block50k--hero .b50k-float { width: 118px; height: 68px; }
  .block50k--hero .b50k-cube { --fw: 118px; --fh: 68px; }
  .block50k--hero .b50k-cash { font-size: 25px; }
  .block50k--hero .b50k-title { font-size: 22px; }
  .block50k--hero .b50k-copy { justify-items: center; padding-top: 0; }
}

/* ---------------------------------------------------------------------
   APPLY / operator landing page
   --------------------------------------------------------------------- */
.ap-hero { min-height: 78vh; display: flex; align-items: center; }
.ap-kicker { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .3em; font-size: clamp(11px, 1.3vw, 14px); color: var(--champagne-2); display: block; margin-bottom: 12px; }
.ap-mega {
  font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase;
  line-height: 0.92; letter-spacing: -0.01em; font-size: clamp(40px, 8vw, 104px);
  background: linear-gradient(165deg, #F4EFE4 16%, var(--champagne-2) 54%, var(--champagne-1) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0 0 18px;
}
.ap-block-wrap { margin: 30px 0 8px; }
.ap-note { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 56ch; }

/* the two doors — Pepper and Wiz */
.ap-doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.ap-door {
  position: relative; border: 1px solid var(--line); background: var(--smoke);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 10px;
}
.ap-door::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--champagne-2), transparent 85%); }
.ap-door-role { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .2em; font-size: 11.5px; color: var(--champagne-2); }
.ap-door-name { font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(21px, 2.6vw, 27px); color: #F4EFE4; line-height: 1.1; }
.ap-door p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.ap-door-mail { margin-top: auto; padding-top: 12px; font-family: "Archivo", sans-serif; font-weight: 700; font-size: clamp(15px, 1.9vw, 18px); color: #F4EFE4; text-decoration: none; border-bottom: 1px solid rgba(200,168,106,0.45); align-self: flex-start; padding-bottom: 2px; }
.ap-door-mail:hover { color: var(--champagne-2); }
@media (max-width: 820px) { .ap-doors { grid-template-columns: 1fr; } .ap-hero { min-height: 64vh; } }

/* numbered "what happens" run */
.ap-steps { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: apstep; }
.ap-steps li { position: relative; padding: 16px 0 16px 58px; border-bottom: 1px solid var(--line); counter-increment: apstep; color: var(--text); font-size: 16.5px; }
.ap-steps li::before {
  content: counter(apstep, decimal-leading-zero); position: absolute; left: 0; top: 18px;
  font-family: "Oswald", sans-serif; font-size: 12px; letter-spacing: .2em; color: var(--champagne-2);
}
.ap-steps li:last-child { border-bottom: 0; }
.ap-steps strong { color: #F4EFE4; }

/* ---------------------------------------------------------------------
   STATIC FLOOR — the card must render even if JS never runs.
   The page ships a real copy block inside the anchor; JS clears it and
   builds the 3D version. Without JS you still get a clean, clickable card.
   --------------------------------------------------------------------- */
a#block50k:not(.is-ready) {
  display: block;
  width: 100%;
  max-width: 520px;
  padding: 22px 26px;
  border: 1px solid rgba(199, 203, 209, .14);
  border-radius: 14px;
  background:
    radial-gradient(120% 160% at 12% 50%, rgba(200, 168, 106, .10), transparent 55%),
    linear-gradient(120deg, rgba(20, 21, 25, .78), rgba(11, 11, 13, .58));
  text-decoration: none;
}
a#block50k:not(.is-ready) .b50k-copy { display: grid; row-gap: 5px; padding: 0; }

/* =====================================================================
   HOME GATE — "Get in the Room" first screen (index.html only)
   Full viewport; the visitor scrolls it away to reach the site.
   Pure CSS + static HTML: never depends on JS to be visible.
   ===================================================================== */
.gate {
  position: relative;
  /* exactly one screen: i18n.js injects a fixed language strip and sets
     body{padding-top:33px}, so subtract it or the gate overshoots the fold
     and buries the scroll cue. Without JS there is no strip and the gate is
     simply 33px shy of full height — visually identical. */
  min-height: calc(100vh - 33px);
  min-height: calc(100dvh - 33px);
  display: flex;
  align-items: center;
  padding: clamp(104px, 12vh, 156px) 28px clamp(72px, 9vh, 100px);
}
.gate-in { width: 100%; max-width: var(--maxw, 1180px); margin: 0 auto; }

.gate-kicker {
  display: block;
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .3em; font-size: clamp(10.5px, 1.3vw, 14px);
  color: var(--champagne-2); margin-bottom: 14px;
}
.gate-title {
  font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase;
  line-height: .9; letter-spacing: -.015em;
  font-size: clamp(44px, 8.2vw, 104px);
  background: linear-gradient(165deg, #F4EFE4 14%, var(--champagne-2) 52%, var(--champagne-1) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0 0 16px;
}
.gate-sub {
  color: #E7E8EA; font-size: clamp(16px, 1.9vw, 20px); line-height: 1.6;
  max-width: 56ch; margin: 0 0 24px;
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
.gate-sub a { color: var(--champagne-2); }

.gate-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

/* scroll affordance — a real link, so keyboard users can leave the gate */
.gate-scroll {
  position: absolute; left: 28px; bottom: clamp(26px, 5vh, 48px);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .22em; font-size: 11.5px;
  color: var(--champagne-2); text-decoration: none;
}
.gate-scroll:hover { color: #F4EFE4; }
.gate-chev { display: inline-block; font-size: 15px; animation: gate-bob 1.9s ease-in-out infinite; }
@keyframes gate-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

@media (max-width: 620px) {
  .gate { padding-top: clamp(96px, 14vh, 140px); align-items: flex-start; }
  .gate-br { display: block; height: 0; }
  .gate-cta { gap: 10px; }
  .gate-cta .btn { width: 100%; justify-content: center; }
  .gate-scroll { left: 50%; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .gate-chev { animation: none !important; }
}

/* short viewports (laptops, landscape phones): compress so the gate stays
   exactly one screen instead of pushing the scroll cue past the fold */
@media (max-height: 820px) and (min-width: 621px) {
  .gate { padding-top: clamp(96px, 11vh, 128px); padding-bottom: clamp(60px, 7vh, 80px); }
  .gate-title { font-size: clamp(40px, 7vw, 84px); margin-bottom: 12px; }
  .gate-sub { font-size: clamp(15px, 1.6vw, 17px); margin-bottom: 18px; }
  .gate-cta { margin-top: 18px; }
  a#block50k.is-ready.block50k--hero { min-height: 120px; padding: 10px 22px 10px 8px; grid-template-columns: 172px 1fr; }
  .block50k--hero .b50k-stage { width: 172px; height: 132px; }
  .block50k--hero .b50k-float { width: 108px; height: 62px; }
  .block50k--hero .b50k-cube { --fw: 108px; --fh: 62px; }
  .block50k--hero .b50k-cash { font-size: 23px; }
  .block50k--hero .b50k-title { font-size: 21px; }
}

/* mobile: the gate must still be exactly one screen, so compact the stack.
   The third CTA is dropped here only because the $50K card itself already
   links to apply.html — the action is still one tap away, not removed. */
@media (max-width: 620px) {
  .gate { padding: clamp(88px, 12vh, 112px) 22px clamp(52px, 7vh, 70px); }
  .gate-kicker { font-size: 10.5px; letter-spacing: .24em; margin-bottom: 10px; }
  .gate-title { font-size: clamp(38px, 12vw, 52px); margin-bottom: 12px; }
  .gate-sub { font-size: 15.5px; line-height: 1.5; margin-bottom: 18px; }
  .gate-cta { margin-top: 18px; gap: 9px; }
  .gate-cta .btn { padding: 12px 18px; font-size: 12px; }
  .gate-cta a[href="apply.html"] { display: none; }
  a#block50k.is-ready.block50k--hero { padding: 12px 16px 16px; }
  .block50k--hero .b50k-stage { width: 150px; height: 116px; }
  .block50k--hero .b50k-glow { width: 116px; height: 24px; }
  .block50k--hero .b50k-float { width: 96px; height: 55px; }
  .block50k--hero .b50k-cube { --fw: 96px; --fh: 55px; }
  .block50k--hero .b50k-cash { font-size: 20px; }
  .block50k--hero .b50k-eyebrow { font-size: 10px; }
  .block50k--hero .b50k-title { font-size: 19px; }
  .block50k--hero .b50k-sub { font-size: 13px; }
}
/* very short phones (SE-class): trim once more */
@media (max-width: 620px) and (max-height: 700px) {
  .gate { padding-top: 80px; padding-bottom: 46px; }
  .gate-sub { display: none; }
  .block50k--hero .b50k-stage { width: 132px; height: 100px; }
  .block50k--hero .b50k-float { width: 84px; height: 48px; }
  .block50k--hero .b50k-cube { --fw: 84px; --fh: 48px; }
}
