/* Affiliate Program — single program (40% commission) page.
   Built in the X-Frame design system: imports j3.css (tokens + header/buttons)
   and xframe/page.css (hero-x, dlist, sec-head, darkbox, etc.). This file holds
   only the genuinely-new bits: the stat bar, the single tier card, the
   get-started cards, and the FAQ accordion (copied from the level-1 style so this
   page does not depend on level-1/page.css). */

/* ---- hero — desktop: copy left, collage right; mobile: stacked (image under headline) ---- */
.aff-hero { padding: clamp(34px,5vw,72px) 0 clamp(30px,4vw,56px); position: relative; overflow: hidden; }
.aff-hero::before { content:""; position:absolute; top:-30%; right:-12%; width:680px; height:680px;
  background: radial-gradient(circle, rgba(211,30,3,.12), transparent 62%); z-index:-1; }
.aff-hero-grid { display:grid; column-gap: clamp(32px,5vw,64px);
  grid-template-columns: 1.02fr .98fr;
  grid-template-areas:
    ".       media"
    "eyebrow media"
    "title   media"
    "sub     media"
    "cta     media"
    ".       media";
  grid-template-rows: 1fr auto auto auto auto 1fr; }
.aff-hero-grid > .eyebrow { grid-area: eyebrow; justify-self: start; }
.aff-hero h1 { grid-area: title; font-size: clamp(2.1rem, 1rem + 4vw, 3.4rem); margin: 18px 0; letter-spacing:-.03em; line-height:1.08; }
.aff-hero h1 .accent { color: var(--red); }
.aff-hero .sub { grid-area: sub; font-size: clamp(1.06rem,1rem+.45vw,1.24rem); color: var(--body); max-width: 520px; margin: 0 0 30px; }
.aff-hero .cta-cluster { grid-area: cta; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; margin: 0; }
.aff-hero-media { grid-area: media; align-self: center; }
.aff-hero-media img { width:100%; height:auto; border-radius: 20px; display:block; }

/* ---- stat bar ---- */
.statbar { background: #f3f4f6; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statbar .wrap { display:grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { text-align:center; padding: clamp(22px,3vw,34px) 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font-family: var(--font-head); font-weight: 700; color: var(--red); font-size: clamp(1.8rem,1rem+2vw,2.6rem); line-height:1; letter-spacing:-.02em; }
.stat .lab { font-family: var(--font-head); font-weight: 600; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin-top: 10px; }
.stat .sub { font-size: .86rem; color: var(--muted); margin-top: 4px; }

/* ---- single tier card ---- */
.tier-card { max-width: 680px; margin: 0 auto; background:#fff; border:1px solid var(--line);
  border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.tier-card .tc-head { background: var(--box-dark, #141417); color:#fff; padding: clamp(28px,4vw,44px); text-align:center; }
.tier-card .tc-badge { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-head);
  font-weight:600; font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color: var(--red-bright);
  background: rgba(224,40,23,.12); padding: 6px 14px; border-radius: var(--pill); }
.tier-card .tc-head h3 { color:#fff; font-size: clamp(1.5rem,1rem+1.4vw,2rem); margin: 16px 0 8px; }
.tier-card .tc-rate { font-family:var(--font-head); font-weight:700; color:#fff; line-height:1; margin: 10px 0 6px; }
.tier-card .tc-rate .big { color: var(--red-bright); font-size: clamp(3rem,1rem+7vw,4.6rem); }
.tier-card .tc-rate .word { font-size: 1.1rem; font-weight:600; color:#c2c6cc; margin-left: 6px; }
.tier-card .tc-sub { color:#c2c6cc; max-width: 460px; margin: 12px auto 0; font-size: 1rem; }
.tier-card .tc-body { padding: clamp(26px,3.5vw,40px); }
.tier-card .tc-body .dlist { max-width: none; }
.tier-card .tc-body .btn { width:100%; justify-content:center; margin-top: 28px; }

/* ---- get started: 3 supporting cards + CTA ---- */
.gs-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gs-card { background:#fff; border:1px solid var(--line); border-radius: 18px; padding: 26px 24px; box-shadow: var(--shadow-sm); }
.gs-card .gs-ic { width:46px; height:46px; border-radius: 12px; background: var(--bg-tint); display:grid; place-items:center; margin-bottom: 16px; }
.gs-card .gs-ic svg { width:24px; height:24px; color: var(--red); }
.gs-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.gs-card p { font-size: .96rem; color: #4a5260; line-height:1.55; margin:0; }
.gs-cta { text-align:center; margin-top: clamp(34px,4vw,52px); }
.gs-cta .btn { font-size: 1.08rem; padding: 16px 34px; }
.gs-note { font-size:.9rem; color: var(--muted); margin-top: 16px; }

/* ---- FAQ accordion (level-1 style, self-contained) ---- */
.accordion { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; max-width: 860px; margin: 0 auto; }
.acc-item { border-bottom: 1px solid var(--line); background:#fff; }
.acc-item:last-child { border-bottom: 0; }
.acc-trigger { width:100%; text-align:left; background:none; border:0; padding: 18px 24px; font-family: var(--font-head);
  font-size: .98rem; font-weight: 600; color: var(--ink); cursor:pointer; display:flex; justify-content:space-between;
  align-items:center; gap:16px; transition: background .15s; }
.acc-trigger:hover { background: var(--bg-soft); }
.acc-trigger .acc-icon { flex-shrink:0; width:22px; height:22px; border-radius:50%; border:2px solid var(--red);
  color: var(--red); display:flex; align-items:center; justify-content:center; font-size:1.1rem; font-weight:700; line-height:1;
  transition: transform .2s, background .2s; }
.acc-item.open .acc-trigger .acc-icon { background: var(--red); color:#fff; transform: rotate(45deg); }
.acc-body { display:none; padding: 0 24px 18px; }
.acc-item.open .acc-body { display:block; }
.acc-body p { font-size: .94rem; color: #4a5260; line-height:1.6; margin:0; }

/* ---- reveal (matches xframe/level-1) ---- */
.reveal { opacity:0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity:1; transform:none; }

/* ---- responsive ---- */
@media (max-width: 900px){
  .aff-hero-grid { display:flex; flex-direction:column; align-items:center; text-align:center; }
  .aff-hero h1 { margin: 18px 0 0; }
  .aff-hero .sub { max-width: 520px; margin: 0 auto 30px; }
  .aff-hero .cta-cluster { justify-content:center; }
  .aff-hero-media { width:100%; max-width: 520px; margin: 26px auto 28px; }
  .statbar .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left:0; }
  .stat:nth-child(odd) { border-left:0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gs-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline:auto; }
}
@media (max-width: 560px){
  .aff-hero .cta-cluster { flex-direction: column; align-items: stretch; }
  .aff-hero .cta-cluster .btn { width:100%; }
}

/* ---- affiliate application modal ---- */
.aff-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.aff-modal.open { display: block; }
.aff-modal-overlay { position: absolute; inset: 0; background: rgba(12,12,14,.62); backdrop-filter: blur(3px); }
.aff-modal-card { position: relative; z-index: 1; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  overflow-y: auto; margin: 24px auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 40px); animation: affPop .26s var(--ease); }
@keyframes affPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.aff-modal-x { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--bg-tint); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .15s; }
.aff-modal-x:hover { background: var(--line); }

.aff-modal-head { text-align: center; margin-bottom: 22px; }
.aff-modal-head h2 { font-size: clamp(1.45rem, 1rem + 1.4vw, 1.95rem); margin: 12px 0 8px; letter-spacing: -.02em; line-height: 1.12; }
.aff-modal-head h2 .accent { color: var(--red); }
.aff-modal-head p { font-size: .96rem; color: #4a5260; line-height: 1.55; max-width: 420px; margin: 0 auto; }

.aff-field { margin-bottom: 16px; }
.aff-field > label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 7px; }
.aff-field .req { color: var(--red); }
.aff-form input[type="text"], .aff-form input[type="email"], .aff-form textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.aff-form textarea { resize: vertical; }
.aff-form input:focus, .aff-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,40,23,.12); }
.aff-form input::placeholder, .aff-form textarea::placeholder { color: #9aa1ad; }

.aff-radios { display: grid; gap: 8px; }
.aff-radio { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; font-size: .95rem; color: #3a414c; transition: border-color .15s, background .15s; }
.aff-radio:hover { border-color: #c7ccd4; background: var(--bg-soft); }
.aff-radio input { accent-color: var(--red); width: 17px; height: 17px; flex-shrink: 0; }
.aff-radio:has(input:checked) { border-color: var(--red); background: var(--bg-tint); color: var(--ink); }

.aff-submit { width: 100%; justify-content: center; margin-top: 8px; }
.aff-submit.is-loading { opacity: .7; cursor: default; }
.aff-form-note { text-align: center; font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.aff-form-err { color: var(--red); font-size: .9rem; margin: 0 0 12px; text-align: center; }

.aff-success { text-align: center; padding: 14px 0 6px; }
.aff-success-ic { width: 66px; height: 66px; border-radius: 50%; background: var(--bg-tint); display: grid; place-items: center; margin: 0 auto 16px; }
.aff-success h3 { font-size: 1.4rem; margin-bottom: 10px; }
.aff-success p { font-size: .96rem; color: #4a5260; line-height: 1.6; max-width: 400px; margin: 0 auto 22px; }
