/* =========================================================================
   VSL Sales Page — background canvas (dark grey gradient, scrollable)
   ========================================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100svh;
  background: #3a3a3c;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* Fixed gradient backdrop — stays put while the page scrolls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(125% 115% at 50% 40%, #636365 0%, #4d4d4f 42%, #3c3c3e 74%, #343436 100%);
}

/* -------------------------------- Hero ---------------------------------- */
.hero {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(44px, 9vh, 104px) var(--gutter, 24px) 48px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4.7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
  overflow-wrap: break-word;
  animation: heroUp 0.9s var(--ease) both;
}
.hero__title .dim { color: var(--muted); }
.hero__sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 640px;
  margin: 26px auto 0;
  text-wrap: pretty;
  animation: heroUp 0.9s var(--ease) 0.12s both;
}
.hero__sub .up { color: var(--ink); }
@keyframes heroUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__title, .hero__sub { animation: none; } }
@media (max-width: 640px) {
  .hero { padding-top: clamp(40px, 7vh, 64px); }
  .hero__title { font-size: 1.7rem; line-height: 1.16; letter-spacing: -0.015em; }
  .hero__sub { font-size: 1.02rem; }
}

/* Very fine grain to stop banding on large flat gradients */
body::after {
  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");
  background-size: 140px 140px;
}

/* ------------------------------ Apply CTA ------------------------------- */
.applycta { text-align: center; max-width: 680px; margin: clamp(22px, 4vh, 40px) auto 0; padding: 0 var(--gutter, 24px); }
.applycta__title { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.applycta__sub { margin: 16px auto 0; max-width: 500px; font-family: var(--sans); font-size: 1.02rem; line-height: 1.5; color: var(--muted); }
.applycta__btn { display: inline-flex; align-items: center; gap: 9px; margin-top: 0; padding: 16px 34px; border-radius: 12px;
  background: var(--ink); color: #0e0e12; font-family: var(--sans); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.applycta__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(232, 234, 237, 0.16); }
.applycta__btn .arr { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); display: inline-block; }

/* -------------------------------- Video --------------------------------- */
.video { margin: clamp(36px, 6vh, 60px) auto 0; max-width: 720px; width: 100%; }
.video__btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5);
}
.video__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.video__btn:hover .video__thumb { transform: scale(1.03); }
.video__scrim { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 52%, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.5)); }
.video__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
  animation: vidPulse 2.8s ease-out infinite;
}
.video__play::before {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #101014;
}
.video__btn:hover .video__play { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
@keyframes vidPulse {
  0% { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70%, 100% { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 22px rgba(255, 255, 255, 0); }
}

/* ------------------------------ Email gate ------------------------------ */
.gate {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 5vw, 40px);
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.gate.open { opacity: 1; visibility: visible; }
.gate__card {
  position: relative;
  width: 100%; max-width: 440px;
  background: #161619;
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 40px);
  text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  transform: scale(0.97);
  transition: transform 0.35s var(--ease);
}
.gate.open .gate__card { transform: scale(1); }
.gate__eyebrow { margin: 0 0 12px; font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.gate__title { margin: 0 0 10px; font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.14; letter-spacing: -0.01em; color: var(--ink); }
.gate__sub { margin: 0 0 22px; font-family: var(--sans); font-size: 0.98rem; line-height: 1.5; color: var(--muted); }
.gate__form { display: flex; flex-direction: column; gap: 12px; }
.gate__form[hidden] { display: none; }
.gate__input {
  width: 100%; padding: 15px 18px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair);
  color: var(--ink); font-family: var(--sans); font-size: 1rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.gate__input::placeholder { color: var(--muted); }
.gate__input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.gate__submit {
  width: 100%; padding: 15px 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: #fff; color: #0d0d10;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.gate__submit:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 255, 255, 0.16); }
.gate__submit:active { transform: scale(0.98); }
.gate__submit .btn__arrow { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); display: inline-block; }
.gate__fine { margin: 14px 0 0; font-size: 0.78rem; color: var(--muted); }
.gate__done { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.gate__close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.04); color: var(--ink);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.gate__close:hover { background: rgba(255, 255, 255, 0.1); transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce) {
  .video__play { animation: none; }
  .gate, .gate__card { transition: none; }
  .video__thumb { transition: none; }
}

/* ------------------------------ Case studies ---------------------------- */
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter, 24px); }
.cases {
  --cs-blue: #5AA9FF; --cs-blue-tip: #8FCBFF; --cs-blue-deep: #1B3A78;
  --cs-line: rgba(0,0,0,0.42); --cs-card: rgba(0,0,0,0.34);
  position: relative;
  padding: clamp(72px, 11vh, 128px) 0 clamp(56px, 9vh, 104px);
}
.cases .container { position: relative; z-index: 1; max-width: 980px; }
.cases__head { text-align: center; margin-bottom: clamp(44px, 7vh, 76px); }
.cases__eyebrow { margin: 0 0 14px; font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #9FC4FF; }
.cases__title { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.02em; color: #F4F7FA; }

.cases__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.4vw, 30px); }

.ccard {
  appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; position: relative;
  display: flex; flex-direction: column;
  background: var(--cs-card); border: 1px solid var(--cs-line); border-radius: 20px; padding: 12px 12px 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.ccard:hover { transform: translateY(-6px); border-color: rgba(122,178,255,0.35); box-shadow: 0 26px 60px rgba(27,58,120,0.45); }
.ccard:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: 3px; }
/* ice-blue top edge-light on hover */
.ccard::before { content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cs-blue), transparent); opacity: 0; transition: opacity 0.4s var(--ease); }
.ccard:hover::before { opacity: 0.9; }
/* subtle blue cursor spotlight */
.ccard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(90,169,255,0.10), transparent 45%); transition: opacity 0.35s var(--ease); }
.ccard:hover::after { opacity: 1; }

.ccard__thumb { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; margin-bottom: 15px; }
.ccard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.ccard:hover .ccard__thumb img { transform: scale(1.06); }
.ccard__thumb::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4,8,16,0) 42%, rgba(4,8,16,0.45)); }

/* blue glass play button */
.ccard__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%;
  background: rgba(90,169,255,0.16); border: 1.5px solid var(--cs-blue); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(6,26,64,0.4); transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.ccard__play::before { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%); border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.ccard__play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(90,169,255,0.6); opacity: 0; pointer-events: none; }
.ccard:hover .ccard__play { transform: translate(-50%,-50%) scale(1.08); background: var(--cs-blue); box-shadow: 0 10px 28px rgba(6,26,64,0.55); }
.ccard.pinged .ccard__play::after { animation: playping 0.9s ease-out 1; }
.ccard:hover .ccard__play::after { animation: playpulse 1.8s ease-out infinite; }
@keyframes playping { 0% { opacity: 0.8; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.65); } }
@keyframes playpulse { 0% { opacity: 0.55; transform: scale(0.85); } 100% { opacity: 0; transform: scale(1.65); } }

.ccard__name { margin: 2px 4px 6px; text-align: center; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #9FC4FF; }
.ccard__cap { margin: 0; padding: 0 12px; text-align: center; font-family: var(--sans); font-weight: 500; font-size: clamp(0.98rem, 1.5vw, 1.08rem); line-height: 1.32; color: #EEF2F7; }
.ccard__cap .hl { color: var(--cs-blue-tip); font-weight: 700; }
.ccard__cap .cap-arrow { color: var(--muted); margin: 0 0.18em; font-weight: 400; }

/* Scroll reveal (used by the case section) */
.reveal { opacity: 0; transform: translateY(28px) scale(0.985); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
.cases__grid .reveal { transition-delay: calc(var(--i, 0) * 70ms); }

/* Case video modal */
.vmodal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 5vw, 56px);
  background: rgba(6,6,8,0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease); }
.vmodal.open { opacity: 1; visibility: visible; }
.vmodal__frame { width: 100%; max-width: 980px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000;
  border: 1px solid var(--hair); box-shadow: 0 40px 100px rgba(0,0,0,0.6); transform: scale(0.97); transition: transform 0.3s var(--ease); }
.vmodal.open .vmodal__frame { transform: scale(1); }
.vmodal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vmodal__close { position: absolute; top: clamp(14px, 3vw, 26px); right: clamp(14px, 3vw, 26px); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hair); background: rgba(255,255,255,0.06); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease); }
.vmodal__close:hover { background: rgba(255,255,255,0.15); transform: rotate(90deg); }

@media (max-width: 640px) {
  .cases__grid { grid-template-columns: 1fr; }
  .cases .container { max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cases__grid .reveal { transition-delay: 0s; }
  .ccard, .ccard__thumb img, .ccard__play { transition: none; }
  .ccard.pinged .ccard__play::after, .ccard:hover .ccard__play::after { animation: none; }
  .vmodal, .vmodal__frame { 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; }
}
