/* GoPyAI marketing home — Cloudflare Pages only */
:root {
  --bg-deep: #070d18;
  --bg-card: rgba(14, 22, 42, 0.92);
  --text: #e8edf5;
  --text-muted: #9eb0d0;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #2a3f63;
  --pain: #f472b6;
  --cure: #4ade80;
  /* GoPy app primary control (see GoPyAI/public/styles/gopy-common.css) */
  --gopy-btn-radius: 10px;
  --gopy-btn-border: #355a90;
  --gopy-btn-border-hover: #4c76b4;
  --gopy-btn-bg-top: #1e3a5f;
  --gopy-btn-bg-bot: #0f2440;
  --gopy-btn-text: #eef6ff;
  --gopy-btn-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), 0 2px 6px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(244, 114, 182, 0.06), transparent);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  direction: ltr;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header .brand img {
  height: 40px;
  width: auto;
  display: block;
}

.landing-lang-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.landing-change-lang-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing-lang-buttons {
  position: relative;
}

.landing-lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  line-height: 0;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

.landing-lang-chip:hover {
  filter: brightness(1.08);
  border-color: var(--accent);
}

.landing-lang-flag-img {
  display: block;
  width: 36px;
  height: 27px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.landing-lang-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: transparent;
}

.landing-lang-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-end: 0;
  left: auto;
  min-width: 288px;
  max-width: 96vw;
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  background: rgba(16, 24, 48, 0.97);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 9999;
}

.landing-lang-search {
  width: 100%;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.45rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
}

.landing-lang-search:focus {
  border-color: var(--accent);
}

.landing-lang-options {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-inline-end: 2px;
}

.landing-lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.42rem 0.55rem;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: start;
}

.landing-lang-option:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--text);
}

.landing-lang-option.active {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.landing-lang-option-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.landing-lang-option-english {
  flex: 1;
  min-width: 0;
}

.landing-lang-option-native {
  font-size: 0.72rem;
  color: #8b9cb8;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-lang-option-currency {
  font-size: 0.72rem;
  color: #b8c3d9;
  background: rgba(10, 18, 36, 0.9);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.75rem;
}

.hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 750;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 auto 1.75rem;
}

.pain-cure {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: start;
  direction: ltr;
  unicode-bidi: isolate;
}

@media (min-width: 720px) {
  .pain-cure {
    grid-template-columns: 1fr 1fr;
  }
}

.pain-cure article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
}

.pain-cure h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.pain-cure article:first-child h2 {
  color: var(--pain);
}

.pain-cure article:last-child h2 {
  color: var(--cure);
}

.pain-cure p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-muted);
  white-space: pre-line;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border: 1px solid var(--gopy-btn-border);
  border-radius: var(--gopy-btn-radius);
  background: linear-gradient(180deg, var(--gopy-btn-bg-top) 0%, var(--gopy-btn-bg-bot) 100%);
  color: var(--gopy-btn-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--gopy-btn-shadow);
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  border-color: var(--gopy-btn-border-hover);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

/* Hero Launch CTA: neon pipe border + halo (tubelight read; breath anim refines halo). */
.hero .cta-row .btn-primary {
  border-width: 2px;
  border-style: solid;
  border-color: #7dd3fc;
  box-shadow:
    var(--gopy-btn-shadow),
    0 0 0 2px rgba(125, 211, 252, 0.75),
    0 0 10px rgba(56, 189, 248, 0.9),
    0 0 22px rgba(59, 130, 246, 0.7),
    0 0 42px rgba(34, 211, 238, 0.4);
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.2s ease;
}

.hero .cta-row .btn-primary:hover {
  filter: brightness(1.12);
  border-color: #bae6fd;
  box-shadow:
    var(--gopy-btn-shadow),
    0 0 0 2px rgba(224, 242, 254, 0.95),
    0 0 14px rgba(125, 211, 252, 1),
    0 0 28px rgba(56, 189, 248, 0.85),
    0 0 52px rgba(34, 211, 238, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  /* Short glow “breaths” after the CTA enters the viewport (wired from home.js; class removed when done). */
  .hero .cta-row .btn-primary.hero-cta-breathe {
    animation: heroCtaGlowBreathe 2.6s ease-in-out 3 both;
    transition-property: transform, filter, border-color;
  }

  @keyframes heroCtaGlowBreathe {
    0%,
    100% {
      border-color: #7dd3fc;
      box-shadow:
        var(--gopy-btn-shadow),
        0 0 0 2px rgba(125, 211, 252, 0.75),
        0 0 10px rgba(56, 189, 248, 0.9),
        0 0 22px rgba(59, 130, 246, 0.7),
        0 0 42px rgba(34, 211, 238, 0.4);
      filter: brightness(1.02);
    }

    50% {
      border-color: #e0f2fe;
      box-shadow:
        var(--gopy-btn-shadow),
        0 0 0 3px rgba(240, 249, 255, 1),
        0 0 18px rgba(125, 211, 252, 1),
        0 0 36px rgba(56, 189, 248, 0.95),
        0 0 64px rgba(34, 211, 238, 0.65);
      filter: brightness(1.14);
    }
  }
}

.section {
  margin-bottom: 2.75rem;
}

.section h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  font-size: 0.98rem;
}

.video-shell {
  max-width: min(340px, 92vw);
  margin: 0 auto;
  border-radius: 12px;
  overflow: visible;
  border: none;
  background: transparent;
}

/* Promo clip: portrait framing; show page background where alpha-encoded video is transparent. */
.video-shell-promo {
  max-width: min(380px, 92vw);
  border: none;
  background: transparent;
  overflow: visible;
}

.video-shell-promo .video-promo-stage {
  position: relative;
  border-radius: 12px;
  border: 2px solid rgba(248, 250, 252, 0.92);
  box-sizing: border-box;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(7, 13, 24, 0.2),
    0 4px 24px rgba(0, 0, 0, 0.35);
  /*
   Portrait promo: reserve canvas before dimensions decode (avoids collapse before metadata).
   Target export 1100×1500 ⇒ 11/15. Video uses object-fit: cover so browser/MPEG quirks can’t inset it.
   (Encoded black rails in-file are cropped symmetrically unless you change object-position.)
  */
  aspect-ratio: 11 / 15;
  /* Match body base + glows so letterbox/object-fit corners don’t read as a different patch. */
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(244, 114, 182, 0.06), transparent);
  min-height: 0;
}

.video-shell-promo .video-promo-stage video {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  cursor: pointer;
  background-color: var(--bg-deep);
  z-index: 0;
}

/*
 * Prefer below-deck `.promo-caption-strip` driven by JS (`TextTrack.mode = hidden`).
 * WebKit paints in-frame captions via a separate layer; hide it when that path is active.
 */
.video-shell-promo .video-promo-stage video::-webkit-media-text-track-display {
  display: none !important;
}

.video-shell-promo .video-promo-stage video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.promo-caption-strip {
  margin-top: 1rem;
  min-height: 3.65em;
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  background: rgba(14, 22, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

@media (max-width: 380px) {
  .promo-caption-strip {
    font-size: 1.06rem;
    padding: 0.65rem 0.65rem;
  }
}

.video-shell-promo + .promo-shell-note,
.promo-shell-note {
  text-align: center;
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.video-shell video {
  display: block;
  width: 100%;
  height: auto;
}

/* Standalone promo video page — click-to-play overlay */
.video-embed-wrap {
  position: relative;
}

/* Above the video picture; stays clickable when play overlay covers the stage (autoplay blocked). */
.video-promo-mute-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(226, 232, 246, 0.35);
  border-radius: 10px;
  cursor: pointer;
  color: rgba(248, 250, 252, 0.95);
  background: rgba(7, 13, 24, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.video-promo-mute-btn:hover {
  background: rgba(7, 13, 24, 0.72);
  border-color: rgba(226, 232, 246, 0.5);
}

.video-promo-mute-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.video-promo-mute-btn .promo-mute-i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.video-promo-mute-btn .promo-mute-i svg {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
}

.video-promo-mute-btn.is-muted .promo-mute-i-on {
  display: none;
}

.video-promo-mute-btn.is-unmuted .promo-mute-i-off {
  display: none;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  background: rgba(7, 13, 24, 0.45);
  transition: background 0.22s ease, opacity 0.2s ease;
}

.video-shell-promo .video-play-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.video-play-overlay:hover {
  background: rgba(7, 13, 24, 0.35);
}

.video-shell-promo .video-play-overlay:hover {
  background: rgba(0, 0, 0, 0.32);
}

.video-play-overlay:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.video-play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-play-overlay .video-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 2px solid rgba(248, 250, 252, 0.92);
  background: transparent;
  color: rgba(248, 250, 252, 0.95);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(7, 13, 24, 0.15),
    0 16px 40px rgba(7, 13, 24, 0.2);
  backdrop-filter: blur(2px);
}

.video-page-main {
  max-width: min(440px, 94vw);
  margin: 0 auto;
}

.video-page-back {
  text-align: center;
  margin-top: 1.5rem;
}

.video-page-back a {
  color: var(--accent-hover);
}

.video-hint {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.65rem 0 0;
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .figure-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.figure-grid figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.figure-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-grid figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.landing-compare-showcase h2#compare-heading {
  font-size: clamp(1.75rem, 3.6vw, 2.15rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.landing-compare-showcase .landing-compare-search-line,
.landing-compare-showcase .landing-compare-results-lead {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.12rem, 2.4vw, 1.3rem);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

.landing-compare-showcase .landing-compare-search-line {
  margin-bottom: 1rem;
}

.landing-compare-showcase .landing-compare-results-lead {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* Same framing as captions strip; typography matches `.pain-cure p` ("Every AI model…") */
.landing-compare-showcase .landing-compare-prompt {
  max-width: min(52rem, 94vw);
  margin: 0 auto 1.25rem;
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  white-space: pre-line;
  color: var(--text-muted);
  background: rgba(14, 22, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

@media (max-width: 380px) {
  .landing-compare-showcase .landing-compare-prompt {
    padding: 0.65rem 0.65rem;
  }
}

.landing-compare-showcase .figure-grid {
  justify-items: center;
  gap: 0.5rem;
}

.landing-compare-showcase .figure-grid figure {
  max-width: min(380px, 100%);
  width: 100%;
  border: 2px solid rgba(248, 250, 252, 0.92);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow:
    0 0 0 1px rgba(7, 13, 24, 0.2),
    0 4px 20px rgba(0, 0, 0, 0.35);
}

.landing-compare-showcase .figure-grid img {
  aspect-ratio: 11 / 15;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.landing-compare-showcase .landing-compare-caption {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-align: center;
}

/* “Crap” row: dingy grey */
.landing-compare-showcase .landing-compare-caption-gamble {
  color: #5c6473;
  text-shadow: none;
  opacity: 0.9;
}

/* “Brilliant” row: warm bright + soft glow */
.landing-compare-showcase .landing-compare-caption-gopy {
  color: #fffbeb;
  text-shadow:
    0 0 8px rgba(253, 186, 116, 0.55),
    0 0 18px rgba(251, 191, 36, 0.35);
}

.landing-compare-showcase .figure-grid figcaption {
  font-size: inherit;
  color: inherit;
}

/* Bottom of /dev: shared prompt + side-by-side explorer example (poor vs good JPEGs). */
.landing-gamble-vs .landing-vs-prompt-lead {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.landing-gamble-vs .landing-vs-prompt {
  margin: 0 auto 1.35rem;
  max-width: min(52rem, 94vw);
  padding: 1rem 1.2rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
  font-style: normal;
}

.landing-gamble-vs .landing-vs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  max-width: min(960px, 94vw);
  margin: 0 auto;
}

@media (min-width: 720px) {
  .landing-gamble-vs .landing-vs-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.landing-vs-card {
  margin: 0;
}

.landing-vs-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(248, 250, 252, 0.88);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  background: var(--bg-deep);
}

.landing-vs-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-vs-label {
  margin: 0.68rem 0 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.landing-vs-label-gamble {
  color: var(--pain);
}

.landing-vs-label-gopy {
  color: var(--accent-hover);
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
