:root {
  --bg: #f5f7f8;
  --bg-accent: #ebf1f3;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #11181b;
  --text-muted: #5b6a71;
  --line: rgba(17, 24, 27, 0.11);
  --primary: #008481;
  --primary-strong: #006f6c;
  --radius: 20px;
  --shadow-soft: 0 18px 46px rgba(8, 20, 24, 0.08);
  --shadow-strong: 0 24px 55px rgba(8, 20, 24, 0.14);
  --phone-bezel: #cfd5dc;
  --phone-bezel-edge: #b8c0c8;
}

body[data-theme="dark"] {
  --bg: #0e1215;
  --bg-accent: #121920;
  --surface: rgba(26, 32, 37, 0.66);
  --surface-strong: rgba(31, 38, 44, 0.86);
  --text: #edf3f5;
  --text-muted: #9fb0b7;
  --line: rgba(237, 243, 245, 0.14);
  --primary: #1ab6b2;
  --primary-strong: #12a29e;
  --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.42);
  --phone-bezel: #3b444e;
  --phone-bezel-edge: #596573;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% -10%, var(--bg-accent) 0%, var(--bg) 48%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 320ms ease, color 240ms ease;
}

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

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

main,
footer,
header {
  position: relative;
  z-index: 2;
}

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(86px);
  opacity: 0.36;
}

.ambient-a {
  width: 360px;
  height: 360px;
  right: -110px;
  top: -120px;
  background: rgba(0, 132, 129, 0.32);
  animation: breathe 16s ease-in-out infinite;
}

.ambient-b {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -120px;
  background: rgba(91, 170, 255, 0.18);
  animation: breathe 20s ease-in-out infinite reverse;
}

.topbar,
.hero-copy,
.hero-visual,
.stats article,
.glass,
.timeline-item,
.link-card,
.footer,
.legal-switcher,
.legal-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: min(1080px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background-color 220ms ease, box-shadow 220ms ease;
}

.topbar.scrolled {
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.nav {
  display: inline-flex;
  gap: 1.15rem;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 999px;
  height: 2.2rem;
  padding: 0 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: border-color 200ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 132, 129, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 22px rgba(0, 132, 129, 0.22);
  transition: transform 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-alt {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.btn-small {
  padding: 0.58rem 0.96rem;
  font-size: 0.94rem;
}

.hero,
.stats,
.features,
.story,
.awards,
.footer,
.legal-main {
  width: min(1080px, calc(100% - 2rem));
  margin: 1.35rem auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 1rem;
}

.hero-story {
  min-height: min(68vh, 700px);
  align-items: center;
}

.hero-copy,
.hero-visual,
.stats article,
.glass,
.timeline-item,
.link-card,
.footer,
.legal-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  padding: clamp(1.1rem, 1.8vw, 1.7rem);
}

.hero-copy h1 {
  margin: 0.5rem 0 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.08;
}

.hero-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.eyebrow {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  padding-top: 4rem;
}

.cta-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.caption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
}

.hero-visual {
  overflow: hidden;
  min-height: 360px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.hero-visual img {
  width: min(72%, 340px);
  max-height: 620px;
  height: auto;
  object-fit: contain;
  transform: translateY(0);
}

.experience {
  margin-top: 4.2rem;
  margin-bottom: 4.8rem;
}

.experience .section-head {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.experience-reel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.reel-stage {
  position: sticky;
  top: 86px;
  margin: 0;
  width: 100%;
  min-height: calc(100vh - 100px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.phone-shell {
  position: relative;
  border-radius: 28px;
  padding: 14px;
  background: var(--phone-bezel);
  border: 1px solid var(--phone-bezel-edge);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  width: min(42vw, 430px);
  margin: 0 auto;
  overflow: hidden;
}

#experience-screen {
  width: 100%;
  border-radius: 16px;
  border: 0;
  aspect-ratio: 9/19.5;
  object-fit: cover;
  object-position: center top;
  height: min(80vh, 860px);
  max-height: none;
  transition: opacity 260ms ease, transform 380ms ease;
}

#experience-screen.is-changing {
  opacity: 0.35;
  transform: scale(0.985);
}

.reel-caption span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.reel-caption h3 {
  margin: 0.42rem 0 0.45rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
}

.reel-caption p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 44ch;
}

.reel-progress-wrap {
  grid-column: 1 / -1;
}

.reel-progress {
  margin-top: 0.2rem;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}

.reel-progress-bar {
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  transition: width 340ms ease;
}

.reel-controls {
  display: none;
}

.reel-track {
  margin-top: calc(-1 * (100vh - 100px));
}

.reel-trigger {
  min-height: 56vh;
}

.story {
  margin-top: 5rem;
}

.story-chapters {
  display: grid;
  gap: 1.2rem;
}

.chapter {
  padding: 1.7rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.chapter span {
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.chapter h3 {
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-family: "Space Grotesk", sans-serif;
}

.chapter p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 70ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.stats article {
  padding: 1rem;
}

.stats h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.stats p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.section-head {
  margin-bottom: 0.9rem;
}

.section-head h1,
.section-head h2 {
  margin: 0.35rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

.section-head p {
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.glass {
  padding: 1rem;
  transition: transform 200ms ease;
}

.glass:hover {
  transform: translateY(-2px);
}

.glass h3 {
  margin: 0 0 0.35rem;
  font-family: "Space Grotesk", sans-serif;
}

.glass p {
  margin: 0;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--primary), transparent);
  opacity: 0.5;
}

.timeline-item {
  margin-left: 48px;
  padding: 0.9rem 1rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: -33px;
  top: 22px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item span {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.timeline-item h3 {
  margin: 0.35rem 0;
  font-family: "Space Grotesk", sans-serif;
}

.timeline-item p {
  margin: 0;
  color: var(--text-muted);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.2rem;
}

.link-card {
  padding: 1.4rem 0.45rem;
  border-radius: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  transition: color 180ms ease, text-underline-offset 180ms ease;
  text-align: center;
}

.link-card:hover {
  color: var(--primary-strong);
  text-underline-offset: 0.26em;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.link-card::after {
  content: " ->";
  font-weight: 700;
}

.footer {
  margin-bottom: 2rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  margin: 0;
  color: var(--text-muted);
}

.legal-main {
  margin-top: 1.5rem;
}

.legal-switcher {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.45rem;
  border-radius: 999px;
}

.switch-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 0.96rem;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.switch-btn.active {
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: #ffffff;
}

.legal-panel {
  margin-top: 1rem;
  padding: 0.95rem;
  display: none;
}

.legal-panel.active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.panel-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.legal-rich {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  padding: clamp(1rem, 1.8vw, 1.5rem);
}

.legal-rich h1,
.legal-rich h2,
.legal-rich h3,
.legal-rich h4,
.legal-rich h5,
.legal-rich h6 {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  margin: 1.1rem 0 0.5rem;
  line-height: 1.35;
}

.legal-rich h1,
.legal-rich h2 {
  margin-top: 0;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
}

.legal-rich h3 {
  font-size: clamp(1.04rem, 1.8vw, 1.22rem);
}

.legal-rich h4 {
  font-size: clamp(0.96rem, 1.5vw, 1.06rem);
}

.legal-rich p,
.legal-rich li {
  margin: 0.45rem 0;
  color: var(--text);
  line-height: 1.66;
}

.legal-rich ul {
  margin: 0.4rem 0 0.8rem 1.2rem;
  padding: 0;
}

.legal-rich ol {
  margin: 0.4rem 0 0.8rem 1.2rem;
  padding: 0;
}

.legal-rich ul li {
  list-style: disc;
}

.legal-rich ol li {
  list-style: decimal;
}

.legal-rich a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-loading {
  margin: 0;
  color: var(--text-muted);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.legal-frame {
  width: 100%;
  min-height: min(76vh, 980px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

body[data-theme="dark"] .legal-frame {
  background: #0f1418;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms ease, transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes breathe {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4px, -6px) scale(1.04);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .reel-stage {
    position: relative;
    top: 0;
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 1.1rem;
    gap: 1rem;
  }

  .phone-shell {
    max-width: 290px;
    width: 100%;
    padding: 12px;
  }

  #experience-screen {
    object-fit: contain;
    object-position: center;
    height: auto;
    max-height: 72vh;
  }

  .reel-caption p {
    margin-inline: auto;
  }

  .reel-progress {
    margin-inline: auto;
  }

  .reel-track {
    display: none;
  }

  .reel-trigger {
    min-height: 18vh;
  }

  .reel-controls {
    display: inline-flex;
    gap: 0.55rem;
    margin-top: 0.95rem;
  }

  .reel-controls button {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-family: inherit;
    font-weight: 600;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .topbar {
    width: calc(100% - 1rem);
  }
}

@media (max-width: 640px) {
  .btn {
    width: 100%;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .cta-row {
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-story {
    min-height: auto;
  }

  .hero-visual img {
    width: min(74%, 290px);
  }

  .experience {
    margin-top: 2.6rem;
    margin-bottom: 3.2rem;
  }

  .reel-stage {
    border-radius: 20px;
  }

  .phone-shell {
    max-width: 245px;
    width: 100%;
    padding: 10px;
  }

  #experience-screen {
    max-height: 68vh;
  }

  .chapter {
    padding: 1.2rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-item {
    margin-left: 34px;
  }

  .timeline-item::before {
    left: -26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
