/* =========================================================================
   The WICK Protocol · shared funnel + specimen styles (system B)
   One continuous page canvas, transparent sections, so there are no seams.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: transparent; color: var(--ink); font-family: var(--sans);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* the canvas: a crimson bloom at the top, fading to near-black */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(70% 46% at 50% -6%, color-mix(in srgb, var(--funnel-gold) 20%, transparent), transparent 70%),
    radial-gradient(60% 40% at 50% 112%, color-mix(in srgb, var(--funnel-gold) 7%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
body::after { /* grain, stops banding */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page { flex: 1 1 auto; min-width: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.sect { padding-block: clamp(56px, 9vh, 112px); position: relative; }
.center { text-align: center; }

/* ------------------------------- Type ------------------------------- */
.eyebrow { margin: 0 0 16px; font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.h1 { margin: 0 auto; max-width: 940px; font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.h1 .hl { color: var(--accent); }
.h1 .dim, .h2 .dim { color: var(--muted); font-weight: 500; }
.h2 { margin: 0 auto; max-width: 820px; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.3rem); line-height: 1.12; letter-spacing: -0.022em; text-wrap: balance; }
.sub { margin: 20px auto 0; max-width: 640px; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem); color: var(--muted); text-wrap: balance; }
.lede { font-size: 1.06rem; color: var(--ink-2); }
.head { margin-bottom: clamp(36px, 5vw, 56px); text-align: center; } /* breathing room before media */

/* ------------------------------ Buttons ------------------------------ */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 16px 34px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.005em; text-decoration: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: var(--accent-ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--funnel-gold) 50%, transparent), 0 18px 40px -16px color-mix(in srgb, var(--funnel-gold) 60%, transparent);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28), transparent 70%); transition: transform 0.7s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--funnel-gold) 70%, transparent), 0 24px 50px -16px color-mix(in srgb, var(--funnel-gold) 75%, transparent); }
.btn:hover::after { transform: translateX(120%); }
.btn .arr { width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn-row { display: flex; justify-content: center; margin-top: clamp(32px, 5vw, 48px); }

/* --------------------- Video slots (display only) --------------------- */
.vframe {
  position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 900px; margin-inline: auto; overflow: hidden;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--hair-2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px color-mix(in srgb, var(--funnel-gold) 12%, transparent), 0 0 80px -30px color-mix(in srgb, var(--funnel-gold) 35%, transparent);
}
.vframe img { width: 100%; height: 100%; object-fit: cover; }
.vframe__play {
  position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--funnel-gold) 18%, transparent), 0 20px 50px -10px color-mix(in srgb, var(--funnel-gold) 70%, transparent);
  display: grid; place-items: center; transition: transform 0.4s var(--ease);
}
.vframe__play::before { content: ""; width: 0; height: 0; margin-left: 6px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.vframe:hover .vframe__play { transform: translate(-50%, -50%) scale(1.06); }
.vframe--sm .vframe__play { width: 54px; height: 54px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--funnel-gold) 16%, transparent); }
.vframe--sm .vframe__play::before { margin-left: 4px; border-left-width: 15px; border-top-width: 10px; border-bottom-width: 10px; }

/* A swap slot: looks like a real dark studio frame until the photo lands */
.swap {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 18px;
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(245, 241, 240, 0.06), transparent 70%),
    radial-gradient(90% 70% at 50% 120%, color-mix(in srgb, var(--funnel-gold) 18%, transparent), transparent 70%),
    linear-gradient(180deg, #1a1314, #0e0a0b);
}
.swap span { position: relative; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); background: rgba(11, 8, 9, 0.6); border: 1px solid var(--hair); padding: 6px 10px; border-radius: 999px; }
.swap--shot { justify-content: center; }

/* --------------------------- Pillars (3) --------------------------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar { position: relative; padding: 30px 26px 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(245, 241, 240, 0.045), rgba(245, 241, 240, 0.015)); border: 1px solid var(--hair); text-align: center; }
.pillar__n { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--funnel-gold) 45%, transparent); color: var(--accent); font-family: var(--display); font-weight: 700; }
.pillar__t { margin: 0 0 10px; font-family: var(--display); font-weight: 700; font-size: 1.16rem; line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
.pillar__d { margin: 0; font-size: 0.96rem; color: var(--muted); line-height: 1.55; }

/* ---------------------- Case cards (2-up) ---------------------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 900px; margin-inline: auto; }
.ccard__name { margin: 16px 0 4px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.ccard__cap { margin: 0; text-align: center; font-size: 0.95rem; color: var(--muted); }

/* ---------------------- Win screenshots (2 x 4) ---------------------- */
.wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 900px; margin: clamp(40px, 6vw, 64px) auto 0; }
.win { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair); background: var(--surface); }
.win img { width: 100%; height: 100%; object-fit: cover; }
.win .swap span { font-size: 0.6rem; letter-spacing: 0.12em; }

/* ------------------------- Application popup ------------------------- */
.amodal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(6, 4, 5, 0.78); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s; }
.amodal.open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.amodal__card { position: relative; width: min(980px, 100%); height: min(720px, 92svh); border-radius: 20px; overflow: hidden; background: var(--bg); border: 1px solid var(--hair-2); box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.95); transform: translateY(16px) scale(0.98); transition: transform 0.45s var(--ease); }
.amodal.open .amodal__card { transform: none; }
.amodal iframe { width: 100%; height: 100%; border: 0; display: block; }
.xbtn { position: absolute; top: 12px; right: 12px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(245, 241, 240, 0.12); border: 1px solid rgba(245, 241, 240, 0.3); color: var(--ink); font-size: 1.5rem; line-height: 1; transition: background 0.25s var(--ease), transform 0.35s var(--ease); }
.xbtn:hover { background: rgba(245, 241, 240, 0.22); transform: rotate(90deg); }

/* ----------------------------- Reveal ----------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ===================== Specimen pages (emails, scripts) ===================== */
.doc { padding: clamp(52px, 8vh, 100px) 0 clamp(56px, 8vh, 100px); }
.doc .container { max-width: 780px; }
.doc__intro { text-align: center; margin: 0 auto clamp(40px, 6vw, 64px); }
.doc__meta { margin: 14px 0 0; font-size: 0.92rem; color: var(--muted); }
.doc__meta b { color: var(--ink); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 26px); }

.email { background: rgba(22, 17, 18, 0.72); border: 1px solid var(--hair); border-radius: 18px; padding: clamp(22px, 3vw, 34px); }
.email__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.email__tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.email__count { font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); }
.email__lbl { display: block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.email__subject { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.45rem); line-height: 1.22; letter-spacing: -0.012em; }
.email__pv { margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--hair); font-size: 0.92rem; color: var(--muted); }
.email__body p { margin: 0 0 14px; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.email__body p:last-child { margin-bottom: 0; }
.email__sign { margin: 18px 0 0; color: var(--muted); }
.email__ps { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 0.94rem; color: var(--muted); }
.tok-link, .tok-merge { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84em; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.tok-link { color: var(--funnel-gold-light); background: color-mix(in srgb, var(--funnel-gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--funnel-gold) 32%, transparent); }
.tok-merge { color: var(--ink-2); background: rgba(245, 241, 240, 0.06); border: 1px solid var(--hair); }
.confirm { color: var(--funnel-gold-light); font-size: 0.92em; }

.sec { background: rgba(22, 17, 18, 0.6); border: 1px solid var(--hair); border-radius: 18px; padding: clamp(22px, 3vw, 36px); }
.sec__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.sec__num { font-family: var(--display); font-weight: 700; color: var(--accent); font-size: 0.95rem; letter-spacing: 0.08em; }
.sec__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); letter-spacing: -0.012em; }
.sec__body p { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.65; color: var(--ink-2); }
.sec__body p:last-child { margin-bottom: 0; }
.cue { margin: 6px 0 16px; padding: 12px 16px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); font-size: 0.9rem; color: var(--ink-2); }
.cue b { display: block; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* ------------------------------ Mobile ------------------------------ */
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .wins { grid-template-columns: repeat(2, 1fr); max-width: 460px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .cases { grid-template-columns: 1fr; max-width: 520px; }
  .vframe__play { width: 66px; height: 66px; }
  .btn { width: 100%; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn::after, .amodal, .amodal__card { transition: none; }
}

/* ---- mobile hardening (references/mobile.md) ---- */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
p, li, td, th, blockquote, figcaption, h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }
table, pre { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 700px) {
  .tag, [class*="badge"], [class*="pill"] { margin-left: 0; }
}
@media (max-width: 420px) {
  .tok-merge, .tok-link, code { white-space: normal; }
}

/* Marks every Wicklord-branded specimen as a sample so it can never pass for his live funnel */
.sample-tag { position: fixed; z-index: 95; left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(11, 8, 9, 0.82); border: 1px solid var(--hair-2); color: var(--ink-2); font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; backdrop-filter: blur(8px); pointer-events: none; }
.sample-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f5b740; }
.form-note { margin: 12px 0 0; font-size: 0.82rem; color: var(--muted); }

/* phone-mock pages: keep the sample marker off the phone */
body:has(.iphone) .sample-tag, body:has(.phone) .sample-tag { top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; }
