/* ═══════════════════════════════════════════════════════════════
   CHATGPT MAX — LIQUID GLASS DESIGN SYSTEM
   Adapted from Aetacorp Liquid Glass (specular edges, morphing
   ambient blobs, 3D tilt/glare, 3D scroll timeline, pill geometry)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --lg-bg: #060a12;
  --lg-surface: #0d1321;
  --lg-surface2: #141b2d;
  --lg-glass: rgba(255, 255, 255, 0.025);
  --lg-glass2: rgba(255, 255, 255, 0.045);
  --lg-border: rgba(255, 255, 255, 0.07);
  --lg-border-hover: rgba(20, 184, 166, 0.32);
  --lg-accent: #14b8a6;
  --lg-accent-sky: #38bdf8;
  --lg-accent-alt: #f9735c;
  --lg-accent-violet: #8b5cf6;
  --lg-accent-glow: rgba(20, 184, 166, 0.28);
  --lg-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lg-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lg-radius-sm: 10px;
  --lg-radius-md: 16px;
  --lg-radius-lg: 24px;
  --lg-radius-xl: 32px;
  --lg-radius-pill: 100px;
}

/* ── Ambient Background Blobs Removed for Clean Canvas ── */
.glass-bg {
  display: none;
}

.glass-bg svg {
  display: none;
}

.glass-noise {
  display: none;
}

/* Keep main page sections above .glass-bg */
nav, main, footer, .main {
  position: relative;
  z-index: 2;
}

/* ── Core Liquid Glass Surface (specular translucent glass; backdrop-filter reserved for overlays) ── */
.liquid-glass {
  background: rgba(13, 19, 33, 0.72);
  border: 1px solid var(--lg-border);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  position: relative;
}

.nav__inner.liquid-glass,
.nav-inner.liquid-glass {
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
}

.liquid-glass:not(.nav__inner):not(.nav-inner) > *:not(.card-glow):not(.glass-reflection):not(.glass-edge):not(.lt-spotlight) {
  position: relative;
  z-index: 2;
}

.liquid-glass .glass-edge {
  display: none;
}

.liquid-glass .glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
}

.liquid-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.liquid-glass-hover {
  transition:
    border-color 0.28s var(--lg-ease),
    box-shadow 0.28s var(--lg-ease),
    background-color 0.28s var(--lg-ease),
    transform 0.18s var(--lg-ease);
}

.liquid-glass-hover:hover {
  border-color: var(--lg-border-hover);
  box-shadow:
    0 12px 42px rgba(0, 0, 0, 0.22),
    0 0 48px rgba(20, 184, 166, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  background: rgba(18, 26, 44, 0.8);
}

/* Light mode Liquid Glass overrides */
:root[data-theme="light"] .liquid-glass {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

:root[data-theme="light"] .liquid-glass .glass-edge {
  border-color: rgba(255, 255, 255, 0.55);
}

:root[data-theme="light"] .liquid-glass .glass-reflection {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
}

:root[data-theme="light"] .nav__inner.liquid-glass,
:root[data-theme="light"] .nav-inner.liquid-glass {
  background: rgba(255, 255, 255, 0.78);
  transform-style: flat;
}

:root[data-theme="light"] .liquid-glass::after {
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .liquid-glass-hover:hover {
  border-color: rgba(20, 184, 166, 0.35);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.09),
    0 0 48px rgba(20, 184, 166, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── 3D Tilt Glare ── */
.refract-content {
  transition: transform 0.25s var(--lg-ease);
}

.card-glow {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
}

:root[data-theme="light"] .card-glow {
  mix-blend-mode: normal;
}

/* ── Liquid-In Overshoot Entrance (GPU-composited only, no blur animation) ── */
@keyframes liquidIn {
  0% { opacity: 0; transform: scale(0.95) translate3d(0, 22px, 0); }
  55% { opacity: 1; transform: scale(1.012) translate3d(0, -2px, 0); }
  100% { opacity: 1; transform: scale(1) translate3d(0, 0, 0); }
}

.liquid-in {
  animation: liquidIn 0.55s var(--lg-ease) forwards;
}

/* ── Optical Liquid Gradient Text ── */
.liquid-text {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    135deg,
    #14b8a6 0%,
    #38bdf8 48%,
    #f9735c 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes lgLiquidShimmer {
  0% { background-position: 200% 0; }
  50% { background-position: -50% 0; }
  100% { background-position: 200% 0; }
}

/* ── Floating Glass Badge ── */
.hero-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  padding: 9px 22px;
  border-radius: var(--lg-radius-pill);
  background: rgba(20, 184, 166, 0.09);
  border: 1px solid rgba(20, 184, 166, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 20px rgba(0, 0, 0, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent, #14b8a6);
  width: fit-content;
}

:root[data-theme="light"] .hero-glass {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(20, 184, 166, 0.28);
  color: #0d9488;
}

/* ── 3D Liquid Scroll Timeline ── */
.lt-stage {
  perspective: 950px;
  perspective-origin: 50% 40%;
  margin-top: 2rem;
}

.lt-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  position: relative;
}

.lt-card {
  width: 100%;
  max-width: 820px;
  padding: 44px 48px;
  border-radius: var(--lg-radius-xl);
  position: relative;
  transition:
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.55s var(--lg-ease),
    border-color 0.35s ease;
  overflow: hidden;
}

.lt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.35), rgba(56, 189, 248, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 3;
}

.lt-card .lt-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(20, 184, 166, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.lt-card:hover .lt-spotlight {
  opacity: 1;
}

.lt-slide.behind .lt-card {
  transform: perspective(1000px) rotateX(14deg) translate3d(0, 48px, -70px);
  opacity: 0;
  pointer-events: none;
}

.lt-slide.active .lt-card {
  transform: perspective(1000px) rotateX(0) translate3d(0, 0, 0);
  opacity: 1;
}

.lt-slide.active .lt-card::before {
  opacity: 1;
}

.lt-slide.above .lt-card {
  transform: perspective(1000px) rotateX(-14deg) translate3d(0, -48px, -70px);
  opacity: 0;
  pointer-events: none;
}

.lt-card-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.25rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.lt-art {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lt-art svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.lt-number {
  font-family: var(--font-serif, 'Instrument Serif', serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent, #14b8a6);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.lt-card h3 {
  font-family: var(--font-serif, 'Instrument Serif', serif);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}

.lt-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 48ch;
  margin: 0;
}

.lt-card strong {
  color: var(--text-primary);
}

/* Timeline SVG stroke-draw & pulse animations */
@keyframes ltDraw { to { stroke-dashoffset: 0; } }
@keyframes ltPopIn { 0% { opacity: 0; transform: scale(0.4); } 60% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ltProgressFill { 0% { width: 0; opacity: 1; } 100% { width: 112px; opacity: 1; } }
@keyframes ltRingPulse { 0%, 100% { opacity: 0.08; transform: scale(0.95); } 50% { opacity: 0.28; transform: scale(1.06); } }

.lt-draw { stroke-dasharray: 260; stroke-dashoffset: 260; }
.lt-slide.active .lt-draw { animation: ltDraw 0.9s 0.15s var(--lg-ease) forwards; }
.lt-slide.active .lt-draw-d2 { animation: ltDraw 0.8s 0.4s var(--lg-ease) forwards; }
.lt-pop { opacity: 0; transform-origin: center; }
.lt-slide.active .lt-pop { animation: ltPopIn 0.45s 0.35s var(--lg-ease) forwards; }
.lt-slide.active .lt-pop-d2 { animation: ltPopIn 0.45s 0.6s var(--lg-ease) forwards; }
.lt-fill-bar { width: 0; opacity: 0; }
.lt-slide.active .lt-fill-bar { animation: ltProgressFill 0.8s 0.45s var(--lg-ease) forwards; }
.lt-ring { transform-origin: center; }
.lt-slide.active .lt-ring { animation: ltRingPulse 2.6s ease-in-out infinite; }

@media (max-width: 768px) {
  .lt-slide { padding: 12px 0; }
  .lt-card {
    padding: 28px 22px;
    border-radius: var(--lg-radius-lg);
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
  }
  .lt-slide.behind .lt-card,
  .lt-slide.above .lt-card {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
  }
  .lt-card-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }
  .lt-art { height: 130px; max-width: 240px; margin: 0 auto; }
  .lt-card p { margin: 0 auto; }
}

/* ── Alternating Editorial Glass Stripes ("Why ChatGPT Max") ── */
.why-stripes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 3rem;
}

.why-row {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 36px 44px;
  border-radius: var(--lg-radius-lg);
  position: relative;
  text-align: left;
  overflow: hidden;
}

.why-row-reverse {
  flex-direction: row-reverse;
}

.why-visual {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.why-number {
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--accent, #14b8a6);
  text-shadow: 0 0 24px rgba(20, 184, 166, 0.25);
}

.why-row-reverse .why-number {
  color: var(--accent-alt, #f9735c);
  text-shadow: 0 0 24px rgba(249, 115, 92, 0.25);
}

.why-illustration {
  width: 72px;
  height: 72px;
}

.why-text {
  flex: 1;
  min-width: 0;
}

.why-text h3 {
  font-family: var(--font-serif, 'Instrument Serif', serif);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.why-text p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.why-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--lg-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-dim, rgba(20, 184, 166, 0.12));
  color: var(--accent, #14b8a6);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.why-row-reverse .why-tag {
  background: rgba(249, 115, 92, 0.12);
  color: var(--accent-alt, #f9735c);
  border-color: rgba(249, 115, 92, 0.22);
}

.why-connector {
  display: flex;
  justify-content: center;
  padding: 2px 0;
}

.why-connector-inner {
  width: 2px;
  height: 22px;
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.35), rgba(249, 115, 92, 0.35));
  border-radius: 1px;
}

@media (max-width: 768px) {
  .why-row,
  .why-row-reverse {
    flex-direction: column;
    padding: 28px 22px;
    gap: 18px;
    text-align: center;
  }
  .why-visual { flex: 0 0 auto; }
}

/* ── CTA Liquid Glass Box ── */
.cta-box {
  max-width: 740px;
  margin: 0 auto;
  border-radius: var(--lg-radius-xl);
  padding: 52px 36px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .cta-box {
    padding: 36px 20px;
    border-radius: var(--lg-radius-lg);
  }
}

/* ── Reduced Motion Support ── */
@media (prefers-reduced-motion: reduce) {
  .lt-ring {
    animation: none !important;
  }
  .lt-slide.behind .lt-card,
  .lt-slide.above .lt-card {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
