/* ==============================================
   CUO Landing Page — lp.css
   Design tokens ported from app/globals.css
   ============================================== */

/* ── Design Tokens ── */
:root {
  /* Background */
  --bg-base: #111111;

  /* Bloom blobs (aggressive preset: purple + magenta) */
  --bloom-a: rgba(139, 92, 246, 0.26);
  --bloom-b: rgba(220, 38, 127, 0.22);
  --bloom-c: rgba(59, 130, 246, 0.12);

  /* Glass panel */
  --glass-bg:     rgba(10, 6, 18, 0.30);
  --glass-border: rgba(255, 255, 255, 0.07);

  /* Rim highlights */
  --rim-outer:      rgba(255, 255, 255, 0.14);
  --rim-glow:       rgba(180, 80, 255, 0.07);
  --rim-outer-h:    rgba(255, 255, 255, 0.24);
  --rim-glow-h:     rgba(180, 80, 255, 0.12);
  --rim-top:        rgba(255, 255, 255, 0.10);
  --rim-bottom:     rgba(50, 0, 70, 0.45);
  --rim-top-h:      rgba(255, 255, 255, 0.16);
  --rim-bottom-h:   rgba(50, 0, 70, 0.55);
  --shadow:         rgba(0, 0, 0, 0.55);

  /* Specular streak */
  --streak-a:  rgba(255, 255, 255, 0.16);
  --streak-b:  rgba(255, 255, 255, 0.05);
  --streak-ah: rgba(255, 255, 255, 0.24);
  --streak-bh: rgba(255, 255, 255, 0.08);

  /* Theme accent (purple hue 271) */
  --accent:        hsl(271 91% 65%);
  --accent-glow:   hsl(271 70% 60% / 0.18);
  --accent-border: hsl(271 60% 55% / 0.22);

  /* Text */
  --text-main:  #ededed;
  --text-sub:   #9f9f9f;
  --text-muted: #555555;

  /* Layout */
  --max-width:      1100px;
  --section-pad-x:  1.25rem;
  --section-pad-y:  5rem;
}


/* ═══════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Geist', Arial, Helvetica, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  color: var(--text-main);
}


/* ═══════════════════════════════════════════
   Background Bloom (fixed layer)
   5 radial blobs + vignette + noise
   ported from globals.css .cuo-bg-bloom
   ═══════════════════════════════════════════ */

.bg-bloom {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 52% at  8%  8%,  var(--bloom-a) 0%, transparent 62%),
    radial-gradient(ellipse 52% 62% at 94% 88%,  var(--bloom-b) 0%, transparent 62%),
    radial-gradient(ellipse 32% 28% at 75% 12%,  var(--bloom-b) 0%, transparent 55%),
    radial-gradient(ellipse 28% 35% at 16% 78%,  var(--bloom-a) 0%, transparent 55%),
    radial-gradient(ellipse 45% 38% at 50% 112%, var(--bloom-c) 0%, transparent 58%),
    var(--bg-base);
}

/* Vignette: center-to-edge darkening */
.bg-bloom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 110% 110% at 50% 45%,
    transparent 35%,
    rgba(0, 0, 0, 0.55) 80%,
    rgba(0, 0, 0, 0.75) 100%
  );
  pointer-events: none;
}

/* Noise texture (SVG turbulence, very subtle) */
.bg-bloom::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="250" height="250" filter="url(%23n)"/></svg>');
  background-size: 250px 250px;
  opacity: 0.032;
  pointer-events: none;
}


/* ═══════════════════════════════════════════
   Layout Helpers
   ═══════════════════════════════════════════ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Two-column row (image + text) */
.row {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.row .col-image,
.row .col-text {
  width: 100%;
}

/* Horizontal divider between sections */
.section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    hsl(271 60% 55% / 0.20) 20%,
    hsl(271 60% 55% / 0.20) 80%,
    transparent
  );
  max-width: var(--max-width);
  margin: 0 auto;
}


/* ═══════════════════════════════════════════
   Header
   ═══════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
}

.site-logo .logo-full-name {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-weight: 400;
  text-transform: none;
}

.site-logo .logo-accent {
  color: var(--accent);
}


/* ═══════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════ */

/* Section eyebrow label */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Section heading */
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

/* Body copy block */
.section-body {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.85;
}

.section-body p + p {
  margin-top: 1rem;
}


/* ═══════════════════════════════════════════
   Section Image
   ═══════════════════════════════════════════ */

.section-image {
  width: 100%;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px var(--rim-outer),
    0 0 32px hsl(271 70% 60% / 0.18),
    0 16px 48px rgba(0, 0, 0, 0.6);
}

/* Mobile screenshot (narrow, phone-like) */
.screenshot-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.screenshot-image {
  width: 220px;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px var(--rim-outer),
    0 0 28px hsl(271 70% 60% / 0.25),
    0 16px 48px rgba(0, 0, 0, 0.6);
}


/* ═══════════════════════════════════════════
   § 1  Hero
   ═══════════════════════════════════════════ */

.hero {
  padding: 3rem var(--section-pad-x) 2rem;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.hero-image-wrap {
  max-width: 680px;
  margin: 0 auto 2.75rem;
}

.hero-title {
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-sub);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.85;
}


/* Hero music player */
.hero-music {
  margin-top: 1.25rem;
  text-align: center;
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 20px;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}

.music-btn.is-playing {
  color: var(--accent);
  border-color: var(--accent-border);
  animation: pulse-music 2s ease-in-out infinite;
}

@keyframes pulse-music {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 12px hsl(271 91% 65% / 0.25); }
}


/* ═══════════════════════════════════════════
   CTA Button
   ═══════════════════════════════════════════ */

.cta-btn {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  background: var(--accent);
  color: #0a0a0a;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    0 0 18px hsl(271 91% 65% / 0.55),
    0 0 40px hsl(271 91% 65% / 0.25);
  transition: box-shadow 250ms ease, transform 150ms ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 28px hsl(271 91% 65% / 0.75),
    0 0 60px hsl(271 91% 65% / 0.40);
}

.cta-btn--large {
  padding: 1.1rem 2.75rem;
  font-size: 1.1rem;
}

.header-cta {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
}


/* ═══════════════════════════════════════════
   § 2  Problem
   ═══════════════════════════════════════════ */

.problem-quote {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 600;
  line-height: 1.75;
  color: var(--text-main);
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 1.5rem;
}


/* ═══════════════════════════════════════════
   § 3  What is CUO
   ═══════════════════════════════════════════ */

/* Inline code / input example block */
.input-example {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  line-height: 2;
}

/* Output type tags */
.output-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid hsl(271 60% 55% / 0.35);
  color: var(--accent);
}


/* ═══════════════════════════════════════════
   § 4  Features Grid
   ═══════════════════════════════════════════ */

.features-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.features-hero-image {
  max-width: 640px;
  margin: 0 auto 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Glass Card — ported from globals.css .glass */
.glass-card {
  position: relative;
  isolation: isolate;
  background: var(--glass-bg);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-radius: 12px;
  padding: 1.25rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--rim-outer),
    0 0 0 2px var(--rim-glow),
    0 12px 40px var(--shadow),
    inset 0  1px 0 var(--rim-top),
    inset 0 -1px 0 var(--rim-bottom);
  transition: box-shadow 280ms ease;
}

.glass-card:hover {
  box-shadow:
    0 0 0 1px var(--rim-outer-h),
    0 0 0 2px var(--rim-glow-h),
    0 14px 48px var(--shadow),
    inset 0  1px 0 var(--rim-top-h),
    inset 0 -1px 0 var(--rim-bottom-h);
}

/* Specular streak */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--streak-a) 0%,
    var(--streak-b) 22%,
    transparent 46%
  );
  pointer-events: none;
  z-index: 1;
  transition: background 280ms ease;
}

.glass-card:hover::before {
  background: linear-gradient(
    135deg,
    var(--streak-ah) 0%,
    var(--streak-bh) 22%,
    transparent 46%
  );
}

/* Panel noise */
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.88" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="180" height="180" filter="url(%23n)"/></svg>');
  background-size: 180px 180px;
  opacity: 0.042;
  pointer-events: none;
  z-index: 1;
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.feature-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.75;
}

.badge-beta {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: hsl(43 96% 56%);
  margin-left: 0.4rem;
  vertical-align: middle;
}


/* ═══════════════════════════════════════════
   § 5  How to Use — 3 Steps
   ═══════════════════════════════════════════ */

.howto-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Step card is a glass-card with horizontal layout */
.step-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid hsl(271 60% 55% / 0.40);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.8;
}


/* ═══════════════════════════════════════════
   § 7  CTA — Final
   ═══════════════════════════════════════════ */

.cta-section {
  text-align: center;
}

.cta-image-wrap {
  max-width: 440px;
  margin: 0 auto 2.75rem;
}

.cta-title {
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.cta-sub {
  font-size: 1rem;
  color: var(--text-sub);
  max-width: 520px;
  margin: 0 auto 2.25rem;
  line-height: 1.85;
}

.share-links {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.share-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.85rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-sub);
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}


/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */

.site-footer {
  padding: 2rem var(--section-pad-x);
  text-align: center;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}


/* ═══════════════════════════════════════════
   Scroll Fade-in Animation
   ═══════════════════════════════════════════ */

[data-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-fade="delay-1"] { transition-delay: 0.10s; }
[data-fade="delay-2"] { transition-delay: 0.20s; }
[data-fade="delay-3"] { transition-delay: 0.30s; }
[data-fade="delay-4"] { transition-delay: 0.40s; }


/* ═══════════════════════════════════════════
   Responsive — 768px+
   ═══════════════════════════════════════════ */

@media (min-width: 768px) {
  :root {
    --section-pad-x: 2rem;
  }

  /* Two-column row */
  .row {
    flex-direction: row;
    gap: 4rem;
    align-items: flex-start;
  }

  .row .col-image {
    width: 44%;
    flex-shrink: 0;
  }

  .row .col-text {
    flex: 1;
  }

  /* Reverse layout: image on the right */
  .row.row--reverse {
    flex-direction: row-reverse;
  }

  /* Feature cards: 2 columns on tablet */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Screenshot a bit larger */
  .screenshot-image {
    width: 260px;
  }
}

@media (min-width: 1024px) {
  /* Feature cards: 3 columns on desktop */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ═══════════════════════════════════════════
   Fallbacks & Performance
   ═══════════════════════════════════════════ */

/* backdrop-filter not supported */
@supports not (backdrop-filter: blur(1px)) {
  .glass-card {
    background: rgba(10, 6, 20, 0.92);
  }

  .site-header {
    background: rgba(17, 17, 17, 0.98);
  }
}

/* Mobile: reduce blur cost */
@media (max-width: 767px) {
  :root {
    --section-pad-y: 3.5rem;
  }

  .glass-card {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
  }

  /* Hero image: full bleed on mobile */
  .hero-image-wrap {
    max-width: none;
    margin-left: calc(var(--section-pad-x) * -2);
    margin-right: calc(var(--section-pad-x) * -2);
  }

  .hero-image-wrap .section-image {
    border-radius: 0;
  }

  /* Screenshot image: larger on mobile */
  .screenshot-image {
    width: 260px;
  }

  /* Headings: remove forced <br> for natural line wrapping */
  .hero-title br,
  .cta-title br {
    display: none;
  }
}

@media (max-width: 410px) {
  .hero-title {
    font-size: clamp(1.5rem, 5.5vw, 3rem);
  }
}
