/* The WICK Protocol landing page, rebuilt from the Lovable project "Crimson Protocol Pulse".
   Same tokens (oklch), same type (Plus Jakarta Sans 800), same red-on-black. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../assets/fonts/pjs-300.woff2") format("woff2"); font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../assets/fonts/pjs-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../assets/fonts/pjs-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../assets/fonts/pjs-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../assets/fonts/pjs-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --background: oklch(0.04 0 0);
  --foreground: oklch(0.98 0 0);
  --card: oklch(0.07 0.005 27);
  --muted-foreground: oklch(0.68 0.02 27);
  --border: oklch(1 0 0 / 8%);
  --brand: var(--funnel-gold);
  --brand-glow: var(--funnel-gold-light);
  --grid-line: color-mix(in srgb, var(--funnel-gold) 5%, transparent);
  --particle: var(--funnel-gold-light);
  --brand-shadow: 0 0 35px -10px color-mix(in srgb, var(--funnel-gold) 65%, transparent);
  --brand-text-shadow: 0 0 10px color-mix(in srgb, var(--funnel-gold) 60%, transparent);
  --hero-wash: radial-gradient(ellipse 70% 65% at 50% 0%, color-mix(in srgb, var(--funnel-gold) 25%, transparent), transparent 80%);
  --cta-fill: linear-gradient(to bottom, var(--funnel-gold), var(--funnel-gold-deep));
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--background); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--background); color: var(--foreground); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--brand); color: var(--foreground); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ------------------------- Animated background ------------------------- */
.wic-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--hero-wash); }
.wic-bg::after { content: ""; position: absolute; inset: 0; opacity: 0.35;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 68px 68px; -webkit-mask-image: linear-gradient(#000, transparent 85%); mask-image: linear-gradient(#000, transparent 85%); }
.wic-bg canvas { width: 100%; height: 100%; display: block; }
.page { position: relative; z-index: 1; }

/* -------------------------------- Hero -------------------------------- */
.hero { max-width: 64rem; margin: 0 auto; padding: 24px 16px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__title { margin: 0; max-width: 64rem; font-size: 1.65rem; font-weight: 800; line-height: 1.18; letter-spacing: 0; text-wrap: balance; }
.ul { position: relative; display: inline-block; }
.ul__bar { position: absolute; left: 0; bottom: -4px; width: 100%; height: 6px; border-radius: 999px; background: var(--brand); box-shadow: var(--brand-shadow); }
.ul__bar--thin { height: 2px; border-radius: 0; }
.brand-text { color: var(--brand); text-shadow: var(--brand-text-shadow); }
.hero__sub { margin: 20px auto 0; max-width: 42rem; font-size: 1rem; font-weight: 300; color: var(--muted-foreground); }

.wic-cta { position: relative; overflow: hidden; margin-top: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 32px; border-radius: 8px; background: var(--cta-fill); color: var(--foreground);
  font-size: 18px; font-weight: 700; box-shadow: var(--brand-shadow); transition: transform 0.2s, filter 0.2s; }
.wic-cta:hover { transform: translateY(-2px); filter: brightness(1.12); }
.wic-cta__sheen { position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%); background: linear-gradient(to right, transparent, oklch(0.98 0 0 / 20%), transparent); transition: transform 0.7s; }
.wic-cta:hover .wic-cta__sheen { transform: translateX(100%); }
.wic-cta__arr { position: relative; font-size: 1.25rem; line-height: 1; transition: transform 0.2s; }
.wic-cta:hover .wic-cta__arr { transform: translateX(4px); }

/* --------------------------- Loading surfaces --------------------------- */
.loading { position: relative; width: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 0 24px; text-align: center;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--funnel-gold) 25%, transparent);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--funnel-gold) 10%, transparent), transparent 65%), var(--card); }
.loading--video { aspect-ratio: 16 / 9; max-width: 100%; }
.loading--app { min-height: 320px; }
.loading__text { display: flex; flex-direction: column; gap: 8px; }
.loading__text b { font-size: 1rem; font-weight: 700; }
.loading__text > span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 0.875rem; color: var(--muted-foreground); }
@keyframes breathe-glow {
  0%, 100% { box-shadow: 0 0 24px -12px color-mix(in srgb, var(--funnel-gold) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--funnel-gold) 18%, transparent); }
  50% { box-shadow: 0 0 48px -10px color-mix(in srgb, var(--funnel-gold) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--funnel-gold) 35%, transparent); }
}
.breathing-glow { animation: breathe-glow 4.5s ease-in-out infinite; }
.loader-ring { position: relative; display: block; width: 64px; height: 64px; }
.loader-ring::before { content: ""; position: absolute; inset: -14px; border-radius: 999px; background: radial-gradient(circle, color-mix(in srgb, var(--funnel-gold) 35%, transparent), transparent 70%); animation: loader-pulse 2.4s ease-in-out infinite; }
.loader-ring svg { position: relative; width: 100%; height: 100%; animation: loader-spin 1.1s linear infinite; }
.ring-track { stroke: oklch(0.98 0 0 / 10%); }
.ring-arc { stroke: var(--brand); }
.loader-dots i { font-style: normal; animation: loader-dot 1.4s ease-in-out infinite; }
.loader-dots i:nth-child(2) { animation-delay: 0.2s; }
.loader-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.92); } 50% { opacity: 0.8; transform: scale(1.04); } }
@keyframes loader-dot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* --------------------------------- VSL --------------------------------- */
.vsl { max-width: 64rem; margin: 0 auto; padding: 0 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.vsl__label { margin: 0; font-size: 0.875rem; font-weight: 600; text-transform: uppercase; color: var(--muted-foreground); }

/* ------------------------------ Application ------------------------------ */
.apply { max-width: 48rem; margin: 0 auto; padding: 0 16px 64px; scroll-margin-top: 24px; }
.apply__title { margin: 0 0 24px; text-align: center; font-size: 1.5rem; font-weight: 800; line-height: 1.25; }

/* -------------------------------- Results -------------------------------- */
.results { max-width: 72rem; margin: 0 auto; padding: 20px 24px 56px; }
.results__title { margin: 0; text-align: center; font-size: 1.875rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.025em; text-wrap: balance; }
.rc { position: relative; margin-top: 40px; }
.rc__track { display: flex; align-items: center; justify-content: center; gap: 16px; }
.rc__card { position: relative; flex: none; display: none; width: 20%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; cursor: pointer; font: inherit; color: inherit;
  background: var(--card); border: 1px solid oklch(0.98 0 0 / 10%); opacity: 0.4; filter: blur(1px); transform: scale(0.9);
  flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 16px; transition: all 0.5s; }
.rc__card:hover { opacity: 0.6; }
.rc__card.is-on { display: flex; width: 64%; opacity: 1; filter: none; transform: none; border-color: color-mix(in srgb, var(--funnel-gold) 50%, transparent); cursor: default; z-index: 1; }
.rc__lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.rc__arrow { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid oklch(0.98 0 0 / 10%); background: oklch(0.04 0 0 / 60%); color: var(--foreground); font-size: 1.5rem; line-height: 1; cursor: pointer;
  backdrop-filter: blur(8px); transition: border-color 0.2s, color 0.2s; }
.rc__arrow:hover { border-color: color-mix(in srgb, var(--funnel-gold) 50%, transparent); color: var(--brand); }
.rc__arrow--prev { left: -4px; } .rc__arrow--next { right: -4px; }
.rc__dots { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rc__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: oklch(0.98 0 0 / 20%); cursor: pointer; transition: all 0.3s; }
.rc__dot:hover { background: oklch(0.98 0 0 / 40%); }
.rc__dot.is-on { width: 24px; background: var(--brand); }
.results__cta { display: flex; justify-content: center; margin-top: 16px; }

/* Marks the page 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: oklch(0.04 0 0 / 82%); border: 1px solid oklch(1 0 0 / 18%); color: oklch(0.85 0.01 27); 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; }

/* ------------------------------ Breakpoints ------------------------------ */
@media (min-width: 640px) {
  .hero { padding: 48px 24px 48px; }
  .hero__title { font-size: 3rem; }
  .ul__bar { bottom: -8px; height: 8px; }
  .ul__bar--thin { bottom: -8px; height: 4px; }
  .hero__sub { margin-top: 32px; font-size: 1.125rem; }
  .wic-cta { margin-top: 40px; }
  .apply { padding: 0 24px 96px; }
  .apply__title { margin-bottom: 32px; font-size: 2.25rem; }
  .loading--app { min-height: 520px; }
  .loading__text b { font-size: 1.125rem; }
  .results { padding: 28px 24px 80px; }
  .results__title { font-size: 3rem; }
  .rc { margin-top: 56px; }
  .rc__track { gap: 32px; }
  .rc__card { display: flex; aspect-ratio: 9 / 16; }
  .rc__card.is-on { width: 36%; }
  .rc__lbl { font-size: 12px; }
  .rc__arrow { width: 48px; height: 48px; }
  .rc__arrow--prev { left: -24px; } .rc__arrow--next { right: -24px; }
  .results__cta { margin-top: 24px; }
}
@media (min-width: 768px) {
  .hero__title { font-size: 3.75rem; }
  .hero__sub { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- mobile hardening (references/mobile.md) ---- */
img, svg, video, canvas, iframe { max-width: 100%; }
p, li, h1, h2, h3 { overflow-wrap: anywhere; }

/* the working application, inside the same glowing frame the Lovable page used */
.app-frame { position: relative; height: 640px; border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--funnel-gold) 25%, transparent); background: var(--card); }
.app-frame iframe { display: block; width: 100%; height: 100%; max-width: 100%; border: 0; }
@media (max-width: 639px) { .app-frame { height: 600px; } }

/* VSL thumbnail (Lovable: "Added thumbnail to VSL and OB") */
.loading__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.loading__shade { position: absolute; inset: 0; background: oklch(0.04 0 0 / 55%); }
.loading--thumb .loader-ring, .loading--thumb .loading__text { position: relative; }

.rc__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
