:root {
  --bg: #f1f0eb;
  --surface: #fbfaf6;
  --ink: #171723;
  --muted: #777586;
  --line: #d7d4df;
  --line-strong: #bbb6cc;
  --red: #6c4df6;
  --red-dark: #5437dc;
  --blue: #6c4df6;
  --cyan: #19a8a0;
  --green: #24a06b;
  --navy: #151522;
  --soft-blue: #ece8ff;
  --soft-red: #f1edff;
  --radius: 10px;
  --shadow: 0 28px 70px rgba(28, 22, 62, .16);
}

body { background: var(--bg); }
.site-header { background: rgba(251,250,246,.9); }
.logo-mark { border-radius: 2px; background: var(--ink); }
.nav-cta, .btn { border-radius: 3px; background: var(--ink); border-color: var(--ink); }
.btn:hover, .nav-cta:hover { background: var(--red); border-color: var(--red); }
.btn-secondary { color: var(--ink); background: transparent; }

.hero {
  min-height: 840px;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(108,77,246,.1) 50%, transparent 50.1%),
    var(--surface);
}
.hero::after { background: radial-gradient(circle at 78% 35%, rgba(108,77,246,.15), transparent 26rem); }
.live-badge { border-radius: 3px; color: var(--red); border-color: var(--line-strong); background: white; }
.app-window { border-radius: 4px; border: 1px solid #9690a9; box-shadow: 18px 18px 0 #ded9f3; }
.presence-card { border-radius: 3px; }
.presence-one { box-shadow: 7px 7px 0 rgba(108,77,246,.18); }
.presence-two { display: none; }

.timezone-bar { border-color: var(--ink); }
.timezone { border-color: var(--ink); }
.timezone small { color: var(--red); font-weight: 800; }

.feature-grid { gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.feature-card { border: 0; border-radius: 0; background: var(--surface); }
.feature-card:hover { border-color: transparent; box-shadow: inset 0 0 0 3px var(--red); transform: none; }
.feature-icon { border-radius: 2px; }
.download-card, .scene-card, .quote, .price-card, .help-card, .download-row, .requirement { border-radius: 4px; }
.scene-grid, .quotes { gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.scene-card, .quote { border: 0; }
.cta-panel { border-radius: 4px; background: var(--red); }

.flip-section {
  padding: 0;
  color: white;
  background: var(--navy);
  position: relative;
}
.flip-intro { padding: 105px 0 30px; }
.flip-intro .title { color: white; }
.flip-intro .intro { color: #aaa6bb; }
.flip-stage {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
  align-items: start;
}
.flip-copy { padding-bottom: 15vh; }
.flip-step {
  min-height: 72vh;
  padding: 18vh 0 60px;
  opacity: .36;
  transition: opacity .35s ease;
}
.flip-step.active { opacity: 1; }
.flip-index {
  display: inline-flex;
  margin-bottom: 22px;
  color: #9f8cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.flip-step h3 { max-width: 460px; margin: 0; font-size: clamp(34px,4.5vw,58px); line-height: 1.08; letter-spacing: -.05em; }
.flip-step p { max-width: 500px; margin: 20px 0 0; color: #a9a5b6; font-size: 14px; }
.flip-step ul { padding: 0; margin: 24px 0 0; list-style: none; color: #d0ccd9; font-size: 12px; }
.flip-step li { margin: 9px 0; }
.flip-step li::before { content: "↳"; margin-right: 8px; color: #9f8cff; }
.flip-visual {
  height: calc(100vh - 72px);
  position: sticky;
  top: 72px;
  display: grid;
  place-items: center;
  perspective: 1400px;
}
.page-stack {
  width: min(100%, 690px);
  aspect-ratio: 4 / 3;
  position: relative;
}
.page-sheet {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid #544f68;
  border-radius: 3px;
  background: #242333;
  box-shadow: 0 35px 90px rgba(0,0,0,.35);
  opacity: 0;
  transform-origin: left center;
  transform: rotateY(-28deg) translateX(34px) scale(.96);
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.page-sheet.active { opacity: 1; transform: rotateY(0) translateX(0) scale(1); z-index: 4; }
.page-sheet.previous { opacity: .16; transform: rotateY(24deg) translateX(-34px) scale(.94); z-index: 1; }
.page-sheet img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #0e0e17; }
.page-label { position: absolute; left: 16px; top: 16px; padding: 7px 10px; color: white; background: rgba(23,23,35,.82); border: 1px solid #68617e; font-size: 9px; letter-spacing: .12em; }
.page-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, transparent 49%, #6c4df6 50%);
}
.page-counter { position: absolute; right: 0; bottom: -40px; color: #716d80; font: 700 11px Consolas, monospace; letter-spacing: .12em; }

.section-dark { background: #1b1a28; }
.section-dark .btn-secondary { border-color: #69627f; }
.page-hero { background: var(--surface); }
.page-media { border-radius: 4px; box-shadow: 12px 12px 0 #ded9f3; }
.help-nav, .search-box { border-radius: 4px; }

@media (max-width: 900px) {
  .flip-stage { grid-template-columns: 1fr; gap: 0; }
  .flip-copy { padding-bottom: 0; }
  .flip-step { min-height: auto; padding: 70px 0; opacity: 1; }
  .flip-visual { height: auto; min-height: 520px; position: relative; top: 0; order: -1; }
  .page-stack { width: min(100%, 640px); }
}

@media (max-width: 680px) {
  .flip-intro { padding-top: 75px; }
  .flip-visual { min-height: 360px; }
  .page-counter { bottom: -28px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-sheet { transition: none; transform: none; }
}

/* Final media safeguards */
.hero-grid { align-items: center; }
.hero-visual, .page-media { align-self: center; height: auto; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; }
.app-window img, .page-media img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: center;
  clip-path: none;
  transform: none;
}
