:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(123, 134, 175, 0.14);
  --text: #182033;
  --muted: #66718b;
  --muted-soft: #8e97ad;
  --accent: #89a7ff;
  --accent-strong: #6887ea;
  --lavender: #cdbdff;
  --mint: #bde9d3;
  --shadow-lg: 0 40px 90px rgba(125, 137, 175, 0.16);
  --shadow-md: 0 24px 60px rgba(125, 137, 175, 0.12);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lexend", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(195, 175, 255, 0.45), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(145, 195, 255, 0.40), transparent 28%),
    radial-gradient(circle at 22% 74%, rgba(150, 230, 190, 0.5), transparent 26%),
    linear-gradient(180deg, #fcfdff 0%, #f2f5fc 38%, #f8fafd 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 35%);
  pointer-events: none;
  z-index: -2;
}

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

button,
input {
  font: inherit;
}

.page-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.60;
}

.glow-lilac {
  width: 380px;
  height: 380px;
  top: 4%;
  left: -4%;
  background: rgba(195, 175, 255, 0.52);
}

.glow-blue {
  width: 440px;
  height: 440px;
  top: 12%;
  right: -8%;
  background: rgba(145, 195, 255, 0.42);
}

.glow-mint {
  width: 360px;
  height: 360px;
  bottom: 8%;
  left: 12%;
  background: rgba(150, 230, 190, 0.5);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
    radial-gradient(circle at 20% 20%, rgba(140, 147, 190, 0.28) 1px, transparent 1px);
  background-size: 100% 100%, 14px 14px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 32px), var(--max-width));
  transform: translateX(-50%);
  margin-top: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(128, 136, 170, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scale(1.1);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at center, transparent 38%, rgba(255, 255, 255, 0.2) 78%, rgba(255, 255, 255, 0.45) 100%);
  pointer-events: none;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-copy small,
.eyebrow,
.section-lead,
.site-nav a,
.lead,
.problem-card p,
.story-step p,
.compare-list,
.cta-card p,
.card-label {
  color: var(--muted);
}

.site-nav {
  display: inline-flex;
  gap: 22px;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.nav-cta,
.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #7a98ff, #8b7dff);
  box-shadow: 0 18px 36px rgba(111, 127, 223, 0.24);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
}

.nav-cta:hover,
.button:hover {
  transform: translateY(-2px);
}

.section-shell,
.story-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.section-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 104px 0 56px;
}

.hero {
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.headline,
.section-title,
.hero-card h2,
.screen-panel h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.headline {
  font-size: clamp(3.6rem, 8vw, 6.4rem);
}

.lead,
.section-lead {
  margin-top: 18px;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.hero-phone-wrap {
  position: relative;
  min-height: 640px;
  display: grid;
  place-items: center;
  align-content: start;
  padding-top: 8px;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(137, 167, 255, 0.18);
}

.orbit-one {
  width: 520px;
  height: 520px;
  animation: spin 20s linear infinite;
}

.orbit-two {
  width: 620px;
  height: 620px;
  border-color: rgba(205, 189, 255, 0.18);
  animation: spin 28s linear infinite reverse;
}

.phone-scene {
  perspective: 1800px;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translateY(8px);
}

.phone-device {
  position: relative;
  width: min(296px, 70vw);
  height: 592px;
  padding: 14px;
  border-radius: 54px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(227, 232, 245, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 60px 120px rgba(126, 139, 177, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 8px rgba(186, 194, 223, 0.28);
  transform-style: preserve-3d;
  transition: box-shadow 240ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.phone-side {
  position: absolute;
  left: -3px;
  width: 3px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(219, 226, 242, 0.86), rgba(184, 193, 217, 0.7));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  z-index: 2;
  opacity: 0.7;
}

.phone-side.side-left {
  top: 152px;
}

.phone-side.side-left.lower {
  top: 230px;
  height: 64px;
}

.phone-side.side-right {
  left: auto;
  right: -3px;
  top: 184px;
  height: 78px;
}

.hero-phone {
  transform:
    rotateX(calc(var(--tilt-x, -8) * 1deg))
    rotateY(calc(var(--tilt-y, 12) * 1deg))
    rotateZ(calc(var(--twist, -6) * 1deg))
    translateY(-20px)
    scale(var(--hero-scale, 0.92));
}

.story-device {
  transform:
    rotateX(calc(var(--story-tilt-x, -5) * 1deg))
    rotateY(calc(var(--story-tilt-y, -10) * 1deg))
    rotateZ(calc(var(--story-twist, 4) * 1deg))
    translateY(-14px)
    scale(var(--story-scale, 0.95));
}

.phone-edge {
  position: absolute;
  inset: 5px;
  border-radius: 50px;
  border: 1px solid rgba(130, 139, 173, 0.11);
  pointer-events: none;
}

.phone-glare {
  position: absolute;
  inset: 10px;
  border-radius: 46px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.56), transparent 36%, transparent 58%, rgba(255, 255, 255, 0.18) 80%);
  transform: translateZ(40px);
  pointer-events: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 42px;
  background:
    radial-gradient(circle at top left, rgba(207, 196, 255, 0.36), transparent 28%),
    radial-gradient(circle at top right, rgba(145, 188, 255, 0.32), transparent 24%),
    radial-gradient(circle at 20% 88%, rgba(189, 233, 211, 0.24), transparent 18%),
    linear-gradient(180deg, #fdfdff 0%, #f4f7fd 100%);
  transform: translateZ(0);
  border: 1px solid rgba(44, 53, 80, 0.04);
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  width: 96px;
  height: 24px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(18, 21, 29, 0.96), rgba(8, 10, 14, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 5px 14px rgba(17, 20, 30, 0.08);
  opacity: 0.94;
}

.dynamic-island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(77, 84, 103, 0.46);
}

.screen-gradient,
.screen-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen-gradient {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 40%);
}

.screen-noise {
  opacity: 0.08;
  background-image: radial-gradient(circle, rgba(112, 120, 162, 0.5) 0.8px, transparent 0.8px);
  background-size: 14px 14px;
}

.app-ui,
.screen-state {
  position: relative;
  z-index: 1;
  padding: 54px 24px 24px;
}

.hero-ui {
  animation: heroUiBreathe 8s ease-in-out infinite;
  --ui-shift-x: 0px;
  --ui-shift-y: 0px;
}

.hero-splash-screen {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(230, 220, 255, 0.5) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.65), inset 0 2px 12px rgba(175, 150, 255, 0.18);
}

.splash-ui {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.splash-status {
  color: rgba(100, 90, 140, 0.85); /* Darker text for light background */
  font-weight: 500;
  transform: translate3d(calc(var(--ui-shift-x) * -0.4), calc(var(--ui-shift-y) * -0.4), 0);
}

.splash-logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-20px);
}

.splash-logo {
  width: 260px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(160, 140, 220, 0.25));
  animation: splashBreathe 5s ease-in-out infinite;
}

@keyframes splashBreathe {
  0%, 100% { transform: translate3d(calc(var(--ui-shift-x) * 1.5), calc(var(--ui-shift-y) * 1.5), 0) scale(1); }
  50% { transform: translate3d(calc(var(--ui-shift-x) * 1.5), calc(var(--ui-shift-y) * 1.5 - 8px), 0) scale(1.03); }
}

.status-row,
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-row {
  font-size: 0.92rem;
  color: #49536c;
  margin-bottom: 24px;
}

.hero-card,
.mini-card,
.progress-card,
.screen-panel {
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.hero-card {
  padding: 22px;
  border-radius: 28px;
  animation: heroCardFloat 6.5s ease-in-out infinite;
  transform-origin: center;
}

.chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #586480;
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-card h2 {
  margin-top: 14px;
  font-size: 2.1rem;
}

.hero-card p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.mini-grid,
.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.mini-card,
.progress-card,
.screen-panel {
  padding: 16px;
  border-radius: 24px;
}

.hero-ui .mini-card:nth-child(1) {
  animation: cardDriftLeft 7s ease-in-out infinite;
}

.hero-ui .mini-card:nth-child(2) {
  animation: cardDriftRight 7.8s ease-in-out infinite;
}

.mini-card strong,
.screen-panel h3,
.screen-panel strong {
  display: block;
  margin-top: 10px;
}

.mini-card p {
  margin: 8px 0 0;
  color: var(--muted-soft);
  font-size: 0.92rem;
}

.progress-card {
  margin-top: 12px;
  animation: progressCardFloat 7.2s ease-in-out infinite;
}

.track {
  width: 100%;
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(114, 127, 183, 0.12);
}

.track span {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c9aff, #8e81ff);
}

.hero-ui .track {
  position: relative;
}

.hero-ui .track span {
  position: relative;
  overflow: hidden;
}

.hero-ui .track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-120%);
  animation: progressSweep 3.8s ease-in-out infinite;
}

.problem {
  grid-template-rows: auto 1fr;
  gap: 28px;
}

.section-copy {
  max-width: 640px;
}

.section-title {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.problem-card,
.emotion-card,
.compare-card,
.cta-card {
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.problem-card {
  padding: 26px;
}

.problem-index,
.compare-label {
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.problem-card h3 {
  margin: 14px 0 10px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.problem-card p {
  margin: 0;
  line-height: 1.75;
}

.story {
  position: relative;
  min-height: 440vh;
}

.story-inner {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  align-items: center;
  padding: 96px 0 48px;
}

.story-copy {
  position: relative;
  min-height: 460px;
}

.story-step {
  position: absolute;
  inset: 0;
  max-width: 520px;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 420ms ease, transform 420ms ease;
}

.story-step.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.story-step p:last-child {
  margin-top: 14px;
  line-height: 1.9;
}

.story-phone {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.sticky-scene {
  position: relative;
}

.screen-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 420ms ease, transform 420ms ease;
}

.story-screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 42px;
}

.screen-state.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.screen-panel.large {
  margin-top: 8px;
  min-height: 220px;
}

.screen-panel h3 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.screen-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.screen-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}

.routine-stack,
.mood-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.routine-stack {
  flex-wrap: wrap;
}

.routine-stack span {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #55607c;
  font-size: 0.92rem;
  box-shadow: 0 14px 30px rgba(122, 136, 178, 0.12);
}

.mood-row span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(122, 136, 178, 0.1);
}

.mood-row span.active {
  background: linear-gradient(135deg, #7c9aff, #8e81ff);
}

.screen-panel.compact strong {
  font-size: 1rem;
  line-height: 1.5;
}

.emotion {
  place-items: center;
}

.emotion-card {
  max-width: 1040px;
  padding: 80px;
  text-align: center;
}

.emotion-card p:last-child {
  max-width: 56ch;
  margin: 14px auto 0;
  line-height: 1.9;
  color: var(--muted);
}

.difference {
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.difference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.compare-card {
  padding: 26px;
}

.compare-card.featured {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(240, 244, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
}

.compare-label.muted {
  color: #98a1b5;
}

.compare-list {
  margin: 18px 0 0;
  padding-left: 18px;
  line-height: 2;
}

.team {
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  padding-right: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.team-avatar {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: rgba(60, 50, 100, 0.75);
  margin-right: 16px;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-info {
  display: grid;
  gap: 4px;
}

.team-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.team-info span {
  font-size: 0.82rem;
  color: var(--accent-strong);
  font-weight: 500;
}

.cta {
  place-items: center;
}

.cta-card {
  width: min(100%, 920px);
  padding: 40px;
  text-align: center;
}

.cta-card p {
  max-width: 54ch;
  margin: 14px auto 0;
  line-height: 1.8;
}

.cta-form {
  display: flex;
  gap: 12px;
  width: min(100%, 520px);
  margin: 24px auto 0;
}

.cta-form input {
  flex: 1;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(121, 132, 169, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
}

.download-app-button {
  gap: 10px;
  margin-top: 16px;
  border: 1px solid #a97fff;
}

.download-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.download-app-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.download-app-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  min-height: 24px;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 720ms ease, transform 720ms ease;
}

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

.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.split-text.is-visible .split-char {
  opacity: 1;
  transform: translateY(0);
}

.split-space {
  display: inline-block;
  width: 0.34em;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes heroUiBreathe {
  0%, 100% { transform: translate3d(calc(var(--ui-shift-x) * 0.6), calc(var(--ui-shift-y) * 0.6), 0); }
  50% { transform: translate3d(calc(var(--ui-shift-x) * 0.6), calc(var(--ui-shift-y) * 0.6 - 4px), 0); }
}

@keyframes heroCardFloat {
  0%, 100% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.45), calc(var(--ui-shift-y) * 0.45), 0) rotate(0deg);
  }
  50% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.45), calc(var(--ui-shift-y) * 0.45 - 6px), 0) rotate(-0.35deg);
  }
}

@keyframes cardDriftLeft {
  0%, 100% {
    transform: translate3d(calc(var(--ui-shift-x) * -0.28), calc(var(--ui-shift-y) * -0.28), 0);
  }
  50% {
    transform: translate3d(calc(var(--ui-shift-x) * -0.28 - 4px), calc(var(--ui-shift-y) * -0.28 - 5px), 0);
  }
}

@keyframes cardDriftRight {
  0%, 100% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.28), calc(var(--ui-shift-y) * 0.28), 0);
  }
  50% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.28 + 4px), calc(var(--ui-shift-y) * 0.28 - 4px), 0);
  }
}

@keyframes progressCardFloat {
  0%, 100% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.18), calc(var(--ui-shift-y) * 0.18), 0);
  }
  50% {
    transform: translate3d(calc(var(--ui-shift-x) * 0.18), calc(var(--ui-shift-y) * 0.18 - 5px), 0);
  }
}

@keyframes progressSweep {
  0%, 100% { transform: translateX(-120%); }
  55% { transform: translateX(140%); }
}

@media (max-width: 1080px) {
  .site-nav {
    display: none;
  }

  .hero,
  .story-inner,
  .problem-grid,
  .difference-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 20px;
  }

  .hero-copy,
  .section-copy,
  .story-step {
    max-width: none;
  }

  .story {
    min-height: auto;
    padding-bottom: 40px;
  }

  .story-inner {
    position: relative;
    gap: 20px;
    padding: 92px 0 40px;
  }

  .story-copy {
    min-height: 300px;
  }

  .story-phone {
    order: -1;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand-copy small,
  .nav-cta {
    display: none;
  }

  .section-shell,
  .story-inner {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .section-shell {
    padding-top: 88px;
    padding-bottom: 44px;
  }

  .headline {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .section-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-phone-wrap {
    min-height: 500px;
  }

  .orbit-one {
    width: 340px;
    height: 340px;
  }

  .orbit-two {
    width: 420px;
    height: 420px;
  }

  .phone-device {
    width: min(252px, 78vw);
    height: 504px;
    border-radius: 44px;
  }

  .hero-phone {
    transform:
      rotateX(calc(var(--tilt-x, -8) * 1deg))
      rotateY(calc(var(--tilt-y, 12) * 1deg))
      rotateZ(calc(var(--twist, -6) * 1deg))
      translateY(-10px)
      scale(var(--hero-scale, 0.92));
  }

  .story-device {
    transform:
      rotateX(calc(var(--story-tilt-x, -5) * 1deg))
      rotateY(calc(var(--story-tilt-y, -10) * 1deg))
      rotateZ(calc(var(--story-twist, 4) * 1deg))
      translateY(-6px)
      scale(var(--story-scale, 0.95));
  }

  .phone-screen {
    border-radius: 34px;
  }

  .dynamic-island {
    top: 10px;
    width: 84px;
    height: 20px;
  }

  .app-ui,
  .screen-state,
  .problem-card,
  .compare-card,
  .cta-card,
  .emotion-card {
    padding: 20px;
  }

  .mini-grid,
  .dashboard-cards,
  .cta-form {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .story-copy {
    min-height: 380px;
  }

  .story-step {
    position: absolute;
  }
}

/* =========================
   Mobile Menu Styles
   ========================= */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 21;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 999px;
  transition: all 300ms ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-top: none;
  border-radius: 0 0 24px 24px;
  padding: 1rem 0;
  box-shadow: 0 18px 45px rgba(128, 136, 170, 0.15);
  animation: slideDown 300ms ease;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 200ms ease, color 200ms ease;
  border-bottom: 1px solid rgba(123, 134, 175, 0.08);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  background: rgba(137, 167, 255, 0.08);
  color: var(--accent-strong);
}

.mobile-nav-cta {
  background: linear-gradient(135deg, #7a98ff, #8b7dff) !important;
  color: #fff !important;
  font-weight: 600;
  margin: 0.5rem 1rem;
  padding: 0.75rem 1.25rem !important;
  border-radius: 999px;
  border-bottom: none !important;
  text-align: center;
}

.mobile-nav-cta:hover {
  background: linear-gradient(135deg, #6a88ff, #7b6dff) !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Mobile layout improvements
   ========================= */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .site-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .brand-copy small {
    font-size: 0.7rem;
  }

  .site-nav {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .section-shell {
    padding-inline: 1.25rem;
    padding-top: 6rem;
  }

  .hero {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-phone-wrap {
    margin-inline: auto;
    max-width: 260px;
  }

  .phone-device {
    transform: scale(0.9);
    transform-origin: top center;
  }

  .story-inner {
    flex-direction: column;
    gap: 2rem;
    padding-top: 6rem;
  }

  .story-copy {
    max-width: 100%;
  }

  .story-phone {
    position: static;
    max-width: 260px;
    margin: 0 auto 1.5rem;
  }

  .sticky-scene {
    position: relative;
    top: auto;
  }

  .difference-grid,
  .problem-grid,
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-card {
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
  }

  .team-avatar {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .team-avatar img,
  .problem-card,
  .compare-card,
  .cta-card,
  .emotion-card {
    width: 100%;
    height: auto;
  }

  .cta-card {
    padding: 1.5rem 1.25rem;
  }

  .emotion-card {
    padding: 2rem 1.5rem;
  }

  .cta-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .cta-form input[type="email"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    order: 3;
  }

  .hero-actions .button {
    flex: 1 1 100%;
    text-align: center;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .hero .headline {
    font-size: 2.1rem;
  }
}
