/* =============================================================================
 * Novalty.ai: go.novalty.ai VSL page
 *
 * The layout follows our VSL pattern (hero, built-with strip, video, one
 * WhatsApp button). The look is novalty.ai's: white page, Apple system font,
 * ink #1D1D1F, grey #6E6E73, hairlines #E5E5EA, and the #4F6BFF -> #8B5CFF
 * gradient on the one thing we want tapped.
 * ========================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;

  --brand-1: #4f6bff;
  --brand-2: #8b5cff;
  --brand-ai: #6d7aff; /* the ".ai" in the wordmark */
  --gradient: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  --live: #34c759;
  --wa: #25d366; /* WhatsApp green: the button people already trust */
  --wa-dark: #1ebe5a;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

  --w: 760px; /* copy column */
  --player-w: 1280px; /* the video may be much wider than the copy */
  --r: 20px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Backstop: the marquee track and the full-width player can never make the
     page scroll sideways. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }

/* The CTA reveal is gated on `hidden`; make it beat any display rule. */
[hidden] { display: none !important; }

.stage {
  max-width: var(--w);
  margin: 0 auto;
  padding: 34px 20px 0;
  text-align: center;
}

.stage-lower { padding-bottom: 56px; }

/* --- Branding -------------------------------------------------------------- */

.brand {
  display: block;
  width: max-content;
  margin: 0 auto 28px;
  font-family: Poppins, var(--font);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand span { color: var(--brand-ai); }

/* --- Hero copy ------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  flex: none;
}

.headline {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 60px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subhead {
  margin: 0 auto 30px;
  max-width: 38em;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* --- Built-with marquee ---------------------------------------------------- */

.marquee {
  margin: 22px 0 34px;
  overflow: hidden;
}

.marquee-label {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fade both edges so logos glide in and out. */
.marquee-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
  will-change: transform;
}

/* Four identical groups, sliding one group's width (25%): the loop is seamless
   even on very wide screens. */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-right: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.logo:hover { opacity: 1; color: var(--ink); }

/* The logo files draw in currentColor; as <img> they render black, so tone
   them down to match the grey labels. */
.logo img {
  height: 24px;
  width: auto;
  flex: none;
  opacity: 0.6;
}

.logo-wordmark img { height: 30px; }

/* --- Player ---------------------------------------------------------------- */

/* The player breaks out of the copy column (left edge at the column's centre,
   pulled back by half its own width) and sizes itself to stay above the fold. */
.player {
  position: relative;
  width: min(
    var(--player-w),
    calc(100vw - 24px),
    max(820px, calc((100vh - 330px) * (var(--player-ratio, 16 / 9))))
  );
  margin: 0 0 28px 50%;
  transform: translateX(-50%);
  aspect-ratio: var(--player-ratio, 16 / 9);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(79, 107, 255, 0.25), 0 10px 26px rgba(29, 29, 31, 0.08);
}

.player video,
.player .player-embed,
.player .player-embed iframe,
.player .player-embed wistia-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player .player-embed video { object-fit: contain; }

/* Only used for a self-hosted mp4 or while no video is set. */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  background: radial-gradient(70% 70% at 50% 40%, rgba(79, 107, 255, 0.12), rgba(255, 255, 255, 0) 70%);
  transition: opacity 0.25s ease;
}

.player[data-state="playing"] .player-overlay { opacity: 0; pointer-events: none; }

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 14px 40px rgba(79, 107, 255, 0.35);
  position: relative;
  transition: transform 0.18s ease;
}

.play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}

.player-overlay:hover .play-icon { transform: scale(1.06); }

.play-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.player-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(29, 29, 31, 0.12);
}

.player-bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient);
  transition: width 0.25s linear;
}

/* --- Pitch + CTA ----------------------------------------------------------- */

.pitch {
  margin: 0 auto 26px;
  max-width: 36em;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.cta-block { margin: 0 0 10px; }

/* Big, WhatsApp-green and unmistakably a button: the one saturated thing on
   the page, so the thumb finds it straight away. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(500px, 100%);
  padding: 23px 40px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4), 0 0 0 7px rgba(37, 211, 102, 0.12);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  background: var(--wa-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.46), 0 0 0 9px rgba(37, 211, 102, 0.14);
}

.cta:active { transform: translateY(0); }

/* No number in config.js yet: looks the same, but can't be tapped. */
.cta[aria-disabled="true"] { pointer-events: none; cursor: default; }

.cta-icon { width: 27px; height: 27px; flex: none; }

/* --- Demo line ------------------------------------------------------------- */

.demo {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.demo a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

/* --- Footer ---------------------------------------------------------------- */

.foot {
  padding: 0 20px 36px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.foot p { margin: 0; }

/* --- Phone ----------------------------------------------------------------- */

@media (max-width: 640px) {
  .stage { padding: 24px 18px 0; }
  .stage-lower { padding-bottom: 44px; }
  .brand { font-size: 22px; margin-bottom: 22px; }
  .eyebrow { font-size: 12px; }

  /* Edge to edge, by cancelling the parent's padding rather than with 100vw,
     which in-app browsers (where ad traffic lands) don't report reliably. */
  .player {
    width: auto;
    margin-left: -18px;
    margin-right: -18px;
    transform: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .play-icon { width: 64px; height: 64px; }
  .play-icon::after { border-width: 11px 0 11px 18px; }

  .cta { width: 100%; padding: 22px 24px; font-size: 20px; }

}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }

  /* Freeze the strip and let the logos wrap into a static row. */
  .marquee-track {
    animation: none;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .marquee-group ~ .marquee-group { display: none; }

  .marquee-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-group { flex-wrap: wrap; justify-content: center; gap: 24px 32px; padding-right: 0; }
}
