:root {
  /* Brand palette: navy #333652, gold #FAD02C, steel #90ADC5 */
  --c-navy:        #333652;
  --c-navy-deep:   #1f2138;
  --c-blue:        #4a4e6f;
  --c-blue-bright: #90adc5;
  --c-accent:      #fad02c;
  --c-accent-soft: #ffe07a;
  --c-text:        #333652;
  --c-text-soft:   #6b7090;
  --c-bg:          #ffffff;
  --c-bg-soft:     #f4f5fa;
  --c-line:        #e2e4ee;

  --max-width: 1180px;
  --gutter-d: clamp(1.5rem, 5vw, 4rem);
  --gutter-m: 1.25rem;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-card: 0 22px 50px -25px rgba(51, 54, 82, 0.35);
  --shadow-card-lg: 0 40px 80px -40px rgba(51, 54, 82, 0.55);

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--c-blue); }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--c-navy);
  color: #fff;
}
.btn--primary:hover { background: var(--c-blue); }
.btn--accent {
  background: var(--c-accent);
  color: var(--c-navy);
  box-shadow: 0 10px 25px -10px rgba(250, 208, 44, 0.7);
}
.btn--accent:hover { background: var(--c-accent-soft); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}
.btn--ghost-dark {
  background: transparent;
  color: var(--c-navy);
  border-color: rgba(51, 54, 82, 0.25);
}
.btn--ghost-dark:hover {
  background: rgba(51, 54, 82, 0.06);
  border-color: var(--c-navy);
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-accent);
  margin: 0 0 1rem;
}
.eyebrow--dark { color: var(--c-blue); }

.section-head { margin-bottom: 2.5rem; }
.section-head--center { text-align: center; }
.section-head__title {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  color: var(--c-text);
}
.section-head__title--light { color: #fff; }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav.is-scrolled {
  border-color: var(--c-line);
  background: rgba(255, 255, 255, 0.95);
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem var(--gutter-d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo img {
  height: 48px;
  width: auto;
}
.nav__cta { position: relative; }
.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  position: relative;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0.6;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
@media (max-width: 600px) {
  .nav__logo img { height: 40px; }
  .nav__cta { padding: 0.7em 1.1em; font-size: 0.9rem; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--c-navy);
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 85% 10%, rgba(144, 173, 197, 0.32), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(250, 208, 44, 0.20), transparent 60%),
    linear-gradient(160deg, var(--c-navy) 0%, var(--c-navy-deep) 100%);
  z-index: -1;
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter-d) clamp(4rem, 10vw, 7rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__headline {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero__headline-accent {
  display: inline-block;
  font-weight: 400;
  font-style: italic;
  color: var(--c-accent);
}
.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 38ch;
  margin: 0 0 2rem;
}
.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(1rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
}
.hero__stats li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero__stats strong {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--c-accent);
  line-height: 1;
}
.hero__stats span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
}

/* Phone mockup */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}
.phone {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 9 / 18;
  background: #0d0d12;
  border-radius: 42px;
  border: 9px solid #1a1a22;
  overflow: hidden;
  box-shadow:
    var(--shadow-card-lg),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-4deg);
  transition: transform 0.4s ease;
}
.phone:hover { transform: rotate(-2deg) translateY(-4px); }
.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}
.phone__video, .phone__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(160deg, var(--c-blue) 0%, var(--c-navy-deep) 100%);
}
.phone__fallback { z-index: 0; }
.phone__video { z-index: 1; }
.phone.is-no-video .phone__video { display: none; }

/* Floating chips — slide outward, hold, slide back in */
.hero__chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.hero__chip {
  position: absolute;
  background: #fff;
  color: var(--c-navy);
  padding: 0.6em 1em;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  opacity: 0;
  /* Resting (off) state: translated inward toward phone centre + scaled down.
     --dx / --dy are set per chip by JS based on which area it sits in. */
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(0.55);
  /* Exit easing: smooth pull-back behind the phone. */
  transition:
    opacity 0.3s ease-in,
    transform 0.4s cubic-bezier(0.4, 0, 0.7, 1);
  will-change: opacity, transform;
}
.hero__chip.is-active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  /* Enter easing: spring outward from behind. */
  transition:
    opacity 0.35s ease-out,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero__chip[data-cat="challenge"] {
  background: var(--c-accent);
  color: var(--c-navy);
}
.hero__chip[data-cat="comp"] {
  background: var(--c-navy);
  color: #fff;
}
.hero__chip[data-cat="transfer"] {
  background: var(--c-blue-bright);
  color: var(--c-navy);
}
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; text-align: left; }
  .hero__lede { max-width: none; }
  .hero__visual { min-height: 0; }
}
@media (max-width: 480px) {
  .hero__stats { gap: 1.25rem; }
  .hero__chip { font-size: 0.82rem; padding: 0.5em 0.85em; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__chip { transition-duration: 0.01ms; }
}

/* ============ Features ============ */
.features {
  padding: clamp(4rem, 8vw, 7rem) var(--gutter-d);
  max-width: var(--max-width);
  margin: 0 auto;
}
.features__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.features__list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.feature {
  position: relative;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 1.6rem clamp(1.25rem, 2.5vw, 1.9rem);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--c-blue-bright);
  box-shadow: var(--shadow-card);
}
.feature__num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-accent);
  background: var(--c-navy);
  padding: 0.35em 0.7em;
  border-radius: var(--r-pill);
  letter-spacing: 0.12em;
  margin-bottom: 0.9rem;
}
.feature__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  color: var(--c-text-soft);
  font-size: 0.97rem;
}

/* Carousel showcase column */
.features__showcase {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.phone--carousel {
  width: min(300px, 80vw);
  aspect-ratio: 9 / 18;
  background: #ffffff;
  transform: rotate(-2deg);
}
.phone--carousel:hover { transform: rotate(0deg) translateY(-3px); }
.carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.carousel__slide.is-active { opacity: 1; }
.carousel__dots {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}
.carousel__dots li {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-line);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.carousel__dots li.is-active {
  background: var(--c-navy);
  transform: scale(1.3);
}

@media (max-width: 820px) {
  .features__layout {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 6vw, 3rem);
  }
  .features__showcase { position: static; }
}

/* ============ Testimonials ============ */
.testimonials {
  background: var(--c-navy);
  color: #fff;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter-d);
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 90% 0%, rgba(144, 173, 197, 0.22), transparent 60%);
  pointer-events: none;
}
.testimonials > * { position: relative; }
.testimonials .section-head { margin: 0 auto 3rem; max-width: var(--max-width); }
.testimonials__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  max-width: var(--max-width);
  margin: 0 auto;
}
.testimonial {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  padding: 2.25rem 1.75rem 1.75rem;
  backdrop-filter: blur(4px);
}
.testimonial__mark {
  position: absolute;
  top: -8px;
  left: 1.25rem;
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--c-accent);
}
.testimonial blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}
@media (max-width: 720px) {
  .testimonials__list { grid-template-columns: 1fr; }
}

/* ============ Signup ============ */
.signup {
  padding: clamp(4rem, 8vw, 7rem) var(--gutter-d);
  max-width: 880px;
  margin: 0 auto;
}
.signup__card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-card);
}
.signup .section-head { margin-bottom: 0.75rem; }
.signup__lede {
  text-align: center;
  color: var(--c-text-soft);
  margin: 0 0 2rem;
}
.signup__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.signup__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.signup__field { display: flex; flex-direction: column; gap: 0.4rem; }
.signup__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.signup__field input[type="text"],
.signup__field input[type="email"] {
  font: inherit;
  padding: 0.85em 1em;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.signup__field input:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(51, 54, 82, 0.22);
}
.signup__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--c-text-soft);
}
.signup__check input { margin-top: 0.25rem; accent-color: var(--c-blue); }
.signup__submit {
  align-self: center;
  margin-top: 0.75rem;
  min-width: 200px;
}
.signup__success {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-soft) 100%);
  border-radius: var(--r-md);
  text-align: center;
  color: var(--c-navy);
}
.signup__success p { margin: 0 0 0.5rem; }
.signup__success p:last-child { margin-bottom: 0; }
.signup__blog {
  margin-top: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: var(--c-text-soft);
}
.signup__blog p { margin: 0; }

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

/* ============ Footer ============ */
.footer {
  background: var(--c-navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter-d) 0;
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
.footer__brand { }
.footer__logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer__heading {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.footer__col p { margin: 0; }
.footer__col a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer__col a:hover { color: var(--c-accent); }

.social { display: flex; gap: 0.75rem; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social svg { width: 18px; height: 18px; }
.social a:hover {
  background: var(--c-accent);
  color: var(--c-navy);
  transform: translateY(-2px);
}

.footer__strip {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
}
.footer__strip p { margin: 0; }

@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ============ Motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
