:root {
  --p-900: #241c42;
  --p-700: #4b3a9e;
  --p-600: #6c56f0;
  --p-500: #8975f9;
  --p-400: #9ab0fd;
  --p-100: #efeaff;
  --sky-100: #e4f1ff;
  --white: #ffffff;
  --ink: #241c42;
  --ink-soft: #5b527e;
  --surface-tint: #f7f5ff;
  --line: rgba(36, 28, 66, 0.1);

  --wood: #3f9463;
  --fire: #ef6c8e;
  --earth: #c99a4b;
  --metal: #8c8ca0;
  --water: #4c7fef;

  --radius-s: 10px;
  --radius-m: 20px;
  --radius-l: 32px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--white);
  color: var(--ink);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .intro-overlay {
    display: none;
  }
}
::selection {
  background: var(--p-600);
  color: var(--white);
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mono {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.grad-bg {
  background: linear-gradient(
    135deg,
    #4f37e6 0%,
    #5f49e8 35%,
    #7c67f5 50%,
    #99a9fd 75%,
    #d9e9ff 100%
  );
}
.svg-bottom {
  height: 125px;
  margin-top: 15px;
  background-color: "#ef6c8e";
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
header.on-grad {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  position: relative;
  display: inline-block;
  height: 30px;
  width: 40px; /* reserve space for the logo — adjust to match your logo's aspect ratio at 30px tall */
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Header brand-mark holds two stacked logos that crossfade
   depending on whether the header is still over the gradient hero
   (light logo) or has gone solid-white (dark logo). */
header .brand-mark img {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.2s ease;
}
header .brand-mark .logo-dark {
  opacity: 0;
}
header:not(.on-grad) .brand-mark .logo-light {
  opacity: 0;
}
header:not(.on-grad) .brand-mark .logo-dark {
  opacity: 1;
}
.brand-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.brand-name b {
  font-weight: 800;
}

nav.navlinks {
  display: flex;
  align-items: center;
  gap: 34px;
}
nav.navlinks a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}
nav.navlinks a:hover,
nav.navlinks a:focus-visible {
  color: var(--white);
}
nav.navlinks a.active {
  color: #5136e7 !important;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--white);
  color: var(--p-600);
  text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--white);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(36, 28, 66, 0.4);
}
.btn-solid {
  background: var(--p-600);
  color: var(--white);
  border-color: var(--p-600);
}
.btn-solid:hover {
  box-shadow: 0 8px 20px -6px rgba(108, 86, 240, 0.5);
}

/* ---------- Mobile nav toggle ---------- */
.navbar-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 61;
}
.hamburger-box {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 16px;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}
.hamburger-inner {
  top: 7px;
}
.hamburger-inner::before {
  content: "";
  top: -7px;
}
.hamburger-inner::after {
  content: "";
  top: 7px;
}

/* dark icon once header is solid (past hero) */
header:not(.on-grad) .hamburger-inner,
header:not(.on-grad) .hamburger-inner::before,
header:not(.on-grad) .hamburger-inner::after {
  background: #5136e7;
}

/* X state */
.navbar-toggle[aria-expanded="true"] .hamburger-inner {
  background: transparent;
}
.navbar-toggle[aria-expanded="true"] .hamburger-inner::before {
  top: 0;
  transform: rotate(45deg);
  background: #5136e7;
}
.navbar-toggle[aria-expanded="true"] .hamburger-inner::after {
  top: 0;
  transform: rotate(-45deg);
  background: #5136e7;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 66, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 54;
}
header.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px 0 70px;
  color: var(--white);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    700px 460px at 12% 92%,
    rgba(255, 255, 255, 0.1),
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* ocean-curve bottom edge */
.hero-curve {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 5;
  line-height: 0;
  pointer-events: none;
}
.hero-curve svg {
  display: block;
  width: 100%;
  height: 70px;
}
.hero-curve path {
  fill: var(--white);
}
@media (max-width: 560px) {
  .hero-curve svg {
    height: 40px;
  }
}

/* grain texture for depth */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* cursor-reactive spotlight */
.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    520px circle at var(--mx, 70%) var(--my, 40%),
    rgba(255, 255, 255, 0.14),
    transparent 62%
  );
  transition: background 0.25s ease;
}

.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(32px, 3.6vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 6px;
}
.hero-title .line {
  display: block;
  font-style: italic;
  /* font-weight: 800; */
}

.hero .zh-line {
  display: block;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.68);
  margin: 16px 0 28px;
}
.hero p.lede {
  font-size: 17.5px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
  margin-bottom: 10px;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cta-button img {
  width: 150px;
  border: 2px solid transparent;
}

.cta-button img:hover {
  border-color: #ffffff;
  border: 2px solid white;
  border-radius: 8px;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 999px;
  text-decoration: none;
  color: var(--p-700);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.store-badge svg {
  width: 18px;
  height: 18px;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(10, 5, 40, 0.5);
}
.hero-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.964);
}

.hero-visual {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}
.phone-frame {
  position: relative;
  filter: drop-shadow(0 30px 60px rgba(20, 10, 60, 0.35));
}
.phone-tilt {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
  transform-style: preserve-3d;
  will-change: transform;
}
.phone-tilt img {
  width: 200px;
  border-radius: 26px;
  display: block;
}
.glow-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.28) 0%,
    transparent 65%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.element-pills {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
}
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ---------- Section shared ---------- */
section {
  padding: 70px 0;
}
.section-tint {
  background: var(--surface-tint);
}
.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}
.eyebrow-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-600);
  margin-bottom: 16px;
}
.eyebrow-dark::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--p-600);
  border-radius: 2px;
}
.section-head h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 16px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 16.5px;
}

/* ---------- Module cards ---------- */
.modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.module {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px 20px;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.module:hover {
  box-shadow: 0 20px 40px -24px rgba(36, 28, 66, 0.25);
  transform: translateY(-2px);
}
.module .glyph-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.module h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.module .zh-title {
  font-size: 13px;
  color: var(--p-600);
  font-weight: 600;
  margin-bottom: 16px;
}
.module ul {
  list-style: none;
  margin-top: 14px;
}
.module li {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
}
.module li:first-child {
  border-top: none;
}
.module li::before {
  content: "✦";
  color: var(--p-500);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Study / Journal split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.split-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 40px 36px;
}
.split-panel .index {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--p-600);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: block;
}
.split-panel h3 {
  font-size: 23px;
  margin-bottom: 12px;
}
.split-panel p {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 20px;
}
.split-panel .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--p-100);
  color: var(--p-700);
}

/* ---------- Screenshots ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}
.phone-real {
  background: linear-gradient(160deg, #7c67f5 0%, #99a9fd 100%);
  border-radius: 30px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-real img {
  border-radius: 16px;
  width: 100%;
}
.phone-mock {
  aspect-ratio: 9/19.5;
  background: linear-gradient(160deg, #7c67f5 0%, #99a9fd 100%);
  border-radius: 26px;
  padding: 12px;
  position: relative;
}
.phone-mock .screen {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--p-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.phone-mock .screen svg {
  width: 42px;
  height: 42px;
  opacity: 0.4;
}
.phone-mock .screen span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-700);
  text-align: center;
  padding: 0 18px;
}
.phone-mock .notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 16px;
  background: #4b3a9e;
  border-radius: 10px;
}
.screen-caption {
  margin-top: 18px;
  text-align: center;
}
.screen-caption .name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 3px;
}
.screen-caption .desc {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
}
.cta {
  width: 80%;
  display: flex;
  justify-content: center; /* centers horizontally */
  align-items: center; /* centers vertically */
  padding: 10px 0; /* optional, gives it some height to center within */
}

/* ---------- Final CTA ---------- */
.final-cta {
  color: var(--white);
  text-align: center;
  padding: 110px 0;
}
.final-cta h2 {
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 16px;
}
.final-cta p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  margin: 0 auto 38px;
  font-size: 17px;
}
.final-cta .cta-row {
  justify-content: center;
  margin-bottom: 0;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 0.7s ease 2.1s both;
}
.scroll-cue span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: "#ffffff";
}
.scroll-track {
  width: 2px;
  height: 46px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}
.scroll-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--white);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0% {
    transform: translateY(-8px);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(34px);
    opacity: 0;
  }
}

/* ---------- Footer ---------- */
footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
}
footer .brand-name {
  color: #5136e7;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: auto;
    padding: 90px 0 60px;
    text-align: left;
  }
  .modules {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .screens {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
    gap: 48px;
  }

  .navbar-toggle {
    display: inline-flex;
  }
  nav.navlinks {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 300px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 96px 28px 32px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
    box-shadow: -16px 0 40px -16px rgba(36, 28, 66, 0.3);
    z-index: 55;
  }
  header.nav-open nav.navlinks {
    transform: translateX(0);
  }
  nav.navlinks a {
    color: var(--ink) !important;
    font-size: 19px;
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-visual {
    margin-top: 20px;
  }
  .scroll-cue {
    display: none;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 20px;
  }
  .nav {
    padding: 14px 20px;
  }
  section {
    padding: 52px 0;
  }
  .split-panel {
    padding: 30px 24px;
  }
  .module {
    padding: 28px 22px;
  }
}

:focus-visible {
  outline: 2px solid var(--p-600);
  outline-offset: 2px;
}

/* ---------- Motion ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.hero .eyebrow {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero-title {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s both;
}
.hero .zh-line {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.32s both;
}
.hero p.lede {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.4s both;
}
.hero .cta-row {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s both;
}
.hero .hero-note {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.58s both;
}
.hero .element-pills {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.66s both;
}
.hero-visual {
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s both;
}
.phone-frame {
  animation: floatY 6s ease-in-out 1.2s infinite;
}
.glow-ring {
  animation: pulseGlow 6s ease-in-out 0.4s infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.reveal-stagger .reveal:nth-child(3) {
  transition-delay: 0.16s;
}
