/* The club lander uses the existing colours, marks, and live UI renderers. */
.landing-page main { overflow: clip; }
.club-hero, .club-section { width: min(1440px, calc(100% - 2 * var(--margin))); margin-inline: auto; }
.club-hero { display: grid; grid-template-columns: minmax(300px, .74fr) minmax(0, 1.26fr); align-items: center; gap: clamp(28px, 4vw, 72px); padding-block: clamp(28px, 5vw, 76px) clamp(48px, 7vw, 112px); }
.club-hero-copy { display: grid; justify-items: start; gap: 20px; position: relative; z-index: 1; min-width: 0; }
.club-hero-logo { width: 100%; max-width: 640px; margin: 0 0 4px -3%; }
/* The big mountain logo is the brand on the home page; the header mark keeps its space so the nav does not move. */
.landing-page .site-header .home { visibility: hidden; }
.club-hero h1 { font-size: clamp(2.8rem, 4.5vw, 5.5rem); line-height: .98; overflow-wrap: anywhere; }
.club-hero .lead { max-width: 33ch; font-size: clamp(1.12rem, 1.45vw, 1.35rem); }
.club-hero .actions { gap: 18px 22px; max-width: 100%; }
.club-hero .button { padding-inline: 20px; min-width: 0; overflow-wrap: anywhere; }
.hero-controls { font-size: .85rem; color: var(--muted); max-width: 34ch; }
.club-capture { min-width: 0; margin: 0; background: var(--night-deep); border-radius: 12px; overflow: hidden; outline: 1px solid rgb(255 255 255 / .14); }
.club-capture img { width: 100%; height: auto; }
.club-capture figcaption { color: var(--muted); padding: 14px 18px; font-size: .78rem; line-height: 1.5; }
.hero-capture { transform: none; }
.hud-style-buttons button { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 6px; background: var(--panel-2); color: var(--snow); font: 700 .82rem/1.3 "Exo 2", sans-serif; cursor: pointer; transition: background-color 120ms, color 120ms; }
.capture-image { aspect-ratio: 16 / 9; display: grid; align-items: center; background: var(--night-deep); position: relative; overflow: hidden; min-height: 0; }
.capture-image img { height: 100%; max-height: 100%; object-fit: contain; position: absolute; inset: 0; }
.club-section { margin-block: 0 clamp(72px, 8vw, 128px); }
.online-showcase, .hud-showcase, .finish-showcase { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr); align-items: center; gap: clamp(32px, 6vw, 88px); }
.showcase-copy { display: grid; justify-items: start; gap: 22px; min-width: 0; }
.showcase-copy h2 { font-size: clamp(1.9rem, 3.2vw, 3.25rem); line-height: 1.04; overflow-wrap: anywhere; }
.showcase-copy .lead { font-size: clamp(1.06rem, 1.4vw, 1.25rem); max-width: 43ch; }
.showcase-copy > p { max-width: 47ch; }
.showcase-copy a:not(.button), .club-progress a:not(.button), .host-requirements a:not(.button) { color: var(--cyan); text-underline-offset: .2em; }
.join-steps { display: grid; gap: 18px; list-style: none; counter-reset: joins; }
.join-steps li { position: relative; display: grid; gap: 3px; padding-left: 48px; counter-increment: joins; }
.join-steps li::before { content: counter(joins); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; background: var(--purple); color: var(--cyan); font-style: italic; font-weight: 900; }
.join-steps span { color: var(--muted); font-size: .9rem; }
.hud-showcase { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.hud-try { width: 100%; min-width: 0; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .16); display: grid; gap: 14px; }
.hud-try-title { font-weight: 800; }
.hud-style-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.hud-style-buttons button[aria-pressed="true"] { background: var(--orange); color: var(--night); }
.hud-try .style-preview { background: var(--night-deep); padding: 24px 16px; border-radius: 8px; min-height: 112px; display: grid; align-content: center; }
.hud-try .style-preview .pill { grid-template-columns: 2em minmax(0, 1fr) auto auto; max-width: none; font-size: 13px; }
.sample-note, .finish-note { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.preview-label { padding: 6px 10px; background: var(--purple); color: var(--snow); font-size: .76rem; font-weight: 800; border-radius: 4px; }
.finish-points { display: grid; gap: 12px; padding-left: 20px; list-style: square; }
.finish-points li::marker { color: var(--cyan); }
.club-progress { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px 64px; padding-top: clamp(40px, 5vw, 72px); border-top: 2px solid var(--purple); align-items: center; }
.progress-intro { display: grid; gap: 18px 64px; justify-items: start; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.progress-intro h2 { font-size: clamp(2.2rem, 4vw, 3.8rem); grid-row: 1 / 4; align-self: center; }
.progress-intro .lead { max-width: 43ch; }
.progress-detail { color: var(--muted); max-width: 48ch; }
.club-progress .pass-wrap { width: min(380px, 90%); justify-self: center; }
.club-progress .pass { width: 100%; }
.club-progress .pass-band { flex-wrap: wrap; }
.pass-example { background: var(--night-deep); color: var(--muted); padding: 12px 16px; font-size: .72rem; text-align: center; }
.club-progress .board-preview { grid-column: auto; padding-block: 0; border-top: 0; }
.club-progress .board-head { align-items: center; }
.club-progress .board-head h3 { font-size: 1.8rem; }
.club-progress .top-riders li:not(.top-empty) { border-radius: 4px; grid-template-columns: 2ch 40px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; }
.host-requirements { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: clamp(24px, 4vw, 48px); background: var(--panel); border-radius: 12px; }
.host-requirements h2 { font-size: clamp(1.6rem, 2.5vw, 2.4rem); margin-bottom: 16px; }
.host-requirements p { max-width: 63ch; margin-block: 12px; }
.host-requirements details { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.host-requirements summary { cursor: pointer; color: var(--snow); min-height: 44px; display: list-item; align-content: center; }
.host-requirements > .button { flex: 0 0 auto; }
.progress-intro > :not(h2) { grid-column: 2; }
.club-progress .top-face { width: 40px; height: 50px; grid-row: 1 / 3; }
.club-progress .top-rank { grid-row: 1 / 3; font-size: 1.25rem; }
.club-progress .top-name { grid-column: 3; font-size: 1rem; }
.club-progress .top-detail { grid-column: 3; font-size: .76rem; }
.club-progress .top-points { grid-column: 4; grid-row: 1 / 3; font-size: .9rem; }
@media (max-width: 1100px) {
  .club-hero { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; }
  .club-hero .actions { align-items: stretch; flex-direction: column; }
  .club-hero h1 { font-size: clamp(2.65rem, 4.7vw, 4.8rem); }
  .online-showcase, .hud-showcase, .finish-showcase { gap: 32px; }
  .hud-try .style-preview { padding-inline: 10px; }
  .hud-try .style-preview .pill { font-size: 11px; gap: 5px; }
}
@media (max-width: 800px) {
  .club-hero { grid-template-columns: 1fr; padding-block: 30px 64px; gap: 36px; }
  .club-hero-copy { gap: 20px; }
  .club-hero-logo { width: 100%; max-width: 560px; margin: 0 0 0 -3%; }
  .club-hero h1 { font-size: clamp(2.8rem, 8.5vw, 4.5rem); }
  .club-hero .lead { max-width: 46ch; }
  .club-hero .actions { flex-direction: row; align-items: center; }
  .online-showcase, .hud-showcase, .finish-showcase { grid-template-columns: 1fr; gap: 30px; }
  .online-showcase .showcase-copy, .finish-showcase .showcase-copy { grid-row: 1; }
  .showcase-copy h2 { font-size: clamp(2rem, 6vw, 2.8rem); }
  .showcase-copy .lead { max-width: 54ch; }
  .hud-try { max-width: 480px; }
  .hud-try .style-preview .pill { font-size: 13px; }
  .club-progress { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .club-progress .pass-wrap { width: min(400px, 90%); justify-self: center; }
  .host-requirements { display: grid; gap: 22px; justify-items: start; }
  .progress-intro { grid-template-columns: minmax(0, 1fr); }
  .progress-intro { grid-column: auto; }
  .progress-intro h2 { grid-row: auto; }
  .progress-intro > :not(h2) { grid-column: auto; }
}
@media (max-width: 420px) {
  .club-hero .actions { display: grid; width: calc(100% - 8px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .club-hero .button { min-height: 50px; font-size: .82rem; padding-inline: 10px; }
  .club-hero-logo { width: 100%; max-width: 100%; margin-left: 0; }
  .club-capture figcaption { font-size: .74rem; padding: 12px; }
  .hud-style-buttons button { padding-inline: 10px; font-size: .76rem; }
  .hud-try .style-preview .pill { font-size: 11px; }
  .club-progress .pass-wrap { width: calc(100% - 14px); rotate: 0deg; filter: drop-shadow(6px 6px 0 var(--orange)); }
  .club-progress .pass-body { grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .club-progress .pass-photo { width: 74px; }
  .club-progress .pass-id .mark { width: 130px; }
  .club-progress .pass-lines { font-size: .76rem; }
  .club-progress .pass-stats { margin-inline: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .club-progress .board-head { gap: 16px; }
  .club-progress .top-riders li:not(.top-empty) { grid-template-columns: 2ch minmax(0, 1fr) auto; gap: 4px 10px; }
  .club-progress .top-face { display: none; }
  .club-progress .top-name, .club-progress .top-detail { grid-column: 2; }
  .club-progress .top-points { grid-column: 3; }
  .club-hero-copy { gap: 14px; }
  .club-hero h1 { font-size: 2.55rem; }
  .club-hero .lead { font-size: 1rem; }
  .hero-controls { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page .hero-capture, .landing-page .pass-wrap { transform: none; rotate: 0deg; translate: none; transition: none; }
  .hud-style-buttons button { transition: none; }
}

/* Fixed image bounds keep the comparison stable while its handle moves. */
.view-reveal { position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; cursor: ew-resize; touch-action: pan-y; }
.view-reveal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.view-reveal-full { clip-path: inset(0 0 0 var(--reveal)); }
.view-reveal-labels { display: flex; justify-content: space-between; gap: 18px; padding: 12px 12px 0; }
.view-reveal-labels span { max-width: 46%; padding: 5px 8px; border-radius: 4px; background: var(--night-deep); color: var(--snow); font-size: .72rem; font-weight: 800; line-height: 1.25; }
.view-reveal-labels span:last-child { text-align: right; }
.view-reveal-divider { position: absolute; inset-block: 0; left: var(--reveal); width: 2px; background: var(--snow); transform: translateX(-50%); pointer-events: none; }
.view-reveal-divider::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; border: 2px solid var(--cyan); border-radius: 50%; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent 17px, var(--night-deep) 17px 19px, transparent 19px 23px, var(--night-deep) 23px 25px, transparent 25px), var(--snow); }
.view-reveal input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.view-reveal:focus-within { outline: 3px solid var(--cyan); outline-offset: -3px; }
.view-reveal:focus-within .view-reveal-divider::after { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (forced-colors: active) {
  .view-reveal-divider { background: CanvasText; }
  .view-reveal-divider::after { background: Canvas; border-color: CanvasText; }
}
