/* ============================================================
   TGC: MEMBERSHIP (scripts/tgc-member.js builds the markup)
   The card's transforms are written by one ticker in the script, so
   nothing on the card itself has a transition.
   ============================================================ */

.tm__head { max-width: 62rem; margin-bottom: clamp(2.2rem, 5vw, 4.5rem); }
.tm__h2 { margin: 0.8rem 0 1.2rem; font-size: var(--text-display); }
.tm__lede { max-width: 50ch; color: var(--muted); }

.tm__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .tm__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

/* ---------- THE STAGE ---------- */
.tm__stage { display: grid; justify-items: center; min-width: 0; }
.tm__hint { margin-top: clamp(1.6rem, 3vw, 2.4rem); text-align: center; }

.tm-rig {
  display: grid;
  justify-items: center;
  width: min(100%, 80vw, 21rem);
}

/* The strap hangs from a fixed pivot and turns about it. */
.tm-strap {
  position: relative;
  display: grid;
  justify-items: center;
  height: clamp(5rem, 11vw, 8.5rem);
  transform-origin: 50% 0%;
}
.tm-strap__web {
  width: 1.6rem; height: 100%;
  overflow: hidden;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 80% 90%, 80% 100%, 20% 100%, 20% 90%);
  display: grid; justify-items: center;
}
.tm-strap__print {
  writing-mode: vertical-rl;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.56rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent-ink);
  white-space: nowrap;
  padding-top: 0.4rem;
}
.tm-strap__clip {
  position: absolute; bottom: -0.7rem;
  width: 1.3rem; height: 1.3rem;
  border: 3px solid #b9b2a8;
  border-radius: 50%;
  background: transparent;
  z-index: 2;
}

/* ---------- THE CARD ---------- */
.tm-card {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  margin-top: 0.3rem;
  container-type: inline-size;
  transform-origin: 50% -12%;   /* pivots at the clip, not at itself */
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: pan-y;          /* vertical scroll stays the page's */
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;       /* one element, moves every visible frame */
}
.tm-card.is-held { cursor: grabbing; }
.tm-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 1rem; }
.tm-card.is-flipped { transform: rotateY(180deg); }   /* reduced motion only */

.tm-card__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 9cqi 8cqi 7cqi;
  border-radius: 5cqi;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.tm-card__face--front {
  color: var(--accent-ink);
  background:
    radial-gradient(120% 70% at 18% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(0, 0, 0, 0.22), transparent 60%),
    var(--accent);
}
.tm-card__face--back {
  transform: rotateY(180deg);
  color: var(--ink);
  background:
    radial-gradient(100% 60% at 80% 0%, rgba(255, 77, 0, 0.18), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}

/* The punched slot the clip goes through. */
.tm-card__slot {
  position: absolute; top: 3.2cqi; left: 50%;
  width: 22cqi; height: 3.4cqi;
  translate: -50% 0;
  border-radius: 99px;
  background: var(--ground);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.tm-card__top, .tm-card__row, .tm-card__foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 3cqi;
}
.tm-card__mark {
  width: 34cqi; aspect-ratio: 1600 / 287;
  background: currentColor;
  -webkit-mask: url("../assets/brand/tgc.png") center / contain no-repeat;
          mask: url("../assets/brand/tgc.png") center / contain no-repeat;
}
.tm-card__meta {
  font-family: var(--font-mono); font-weight: 700;
  font-size: max(0.55rem, 3.6cqi);
  letter-spacing: 0.2em; text-transform: uppercase;
}
.tm-card__meta--hot { color: var(--accent); }
.tm-card__meta--end { margin-left: auto; opacity: 0.7; }

.tm-card__word {
  position: relative; z-index: 1;
  margin-top: auto;
  font-family: var(--display-face); font-weight: 700;
  text-transform: uppercase;
  font-size: 21cqi; line-height: 0.85; letter-spacing: -0.01em;
}
.tm-card__row {
  margin-top: 4cqi; padding-block: 3cqi;
  border-block: 2px solid currentColor;
}
.tm-card__no { font-family: var(--display-face); font-weight: 700; font-size: 6.4cqi; text-transform: uppercase; }
.tm-card__foot { margin-top: 5cqi; justify-content: flex-start; }
.tm-card__plus {
  width: 6cqi; height: 6cqi; background: currentColor;
  clip-path: polygon(40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%, 0 40%, 40% 40%);
}

/* Back: the decorative code block and the includes, small. */
.tm-card__code {
  position: relative; z-index: 1;
  width: 40cqi; margin: 7cqi 0 5cqi;
  padding: 3cqi; background: var(--ink); border-radius: 2cqi;
}
.tm-card__code svg { display: block; width: 100%; height: auto; fill: var(--ground); }
.tm-card__list {
  position: relative; z-index: 1;
  list-style: none; margin: 0 0 auto; padding: 0;
  display: grid; gap: 1.6cqi;
  font-family: var(--font-mono); font-size: max(0.5rem, 3.2cqi);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.tm-card__list li::before { content: "+ "; color: var(--accent); }
.tm-card__face--back .tm-card__foot { color: var(--muted); }

/* Holographic foil: a hue band, masked to a stripe, slid by the ticker. */
.tm-card__foil {
  position: absolute; inset: -50%;
  z-index: 0; pointer-events: none;   /* under the print: the type stays ink */
  background: repeating-linear-gradient(115deg,
    hsl(20 100% 70% / 0) 0%,
    hsl(55 100% 72% / 0.55) 5%,
    hsl(165 100% 70% / 0.5) 10%,
    hsl(250 100% 78% / 0.55) 15%,
    hsl(330 100% 72% / 0.5) 20%,
    hsl(20 100% 70% / 0) 25%);
  -webkit-mask: linear-gradient(115deg, transparent 32%, #000 50%, transparent 68%);
          mask: linear-gradient(115deg, transparent 32%, #000 50%, transparent 68%);
  mix-blend-mode: color-dodge;
  opacity: 0.42;
}
/* Specular glare: a soft hot spot that follows the tilt. */
.tm-card__glare {
  position: absolute; inset: -50%;
  z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 17%);
  mix-blend-mode: soft-light;
}

/* ---------- THE OFFER (6 Nov 2026: no prices, sign-up + next race) ---------- */
.tm__offer { min-width: 0; display: grid; gap: clamp(2rem, 4vw, 3rem); align-content: start; }

/* The next race ticket(s). Empty when there is nothing to say. */
.tm-next { display: grid; gap: 0.9rem; justify-items: start; }
.tm-next:empty { display: none; }
.tm-next .tkt { max-width: 100%; }
.tm-next__line { font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); line-height: 1; }
.tm-next__note { color: var(--muted); max-width: 44ch; }

/* The sign-up: the section's second job. */
.tm-drops { display: grid; gap: 0.9rem; justify-items: start;
  padding: clamp(1.2rem, 2.6vw, 2rem); border: 1px solid var(--line); background: var(--surface);
  box-shadow: inset 0 3px 0 var(--accent); }
.tm-next:not(:empty) + .tm-drops { margin-top: 0; }
.tm-drops__tag { background: var(--accent); color: var(--accent-ink, #050505); padding: 0.35rem 0.6rem; font-weight: 700; }
.tm-drops__h { font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3.2rem); line-height: 0.95; margin: 0; }
.tm-drops__p { color: var(--muted); max-width: 46ch; }
.tm-drops .cta { margin-top: 0.4rem; }
.tm__small { margin-top: 0.4rem; max-width: 52ch; line-height: 1.7; }
