:root {
  --bg: #0f1420;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --accent: #4ca4fc;
  --badge-bg: #141b2a;
  --badge-border: #2a3040;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

body {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  font-family: "Lexend", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 60% 40%;
  align-items: center;
  gap: clamp(1.2rem, 2.6vw, 2.8rem);
  padding: clamp(1.4rem, 2.5vw, 2.2rem) clamp(1rem, 3.7vw, 4.25rem);
  padding-bottom: clamp(4.5rem, 12vh, 6.75rem);
  overflow: visible;
  background-color: var(--bg);
}

/* Viewport-anchored so waves span true edge-to-edge (not the padded grid box). */
.hero-waves-svg {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(2.75rem, 8vh, 5.25rem);
  width: 100%;
  height: clamp(8.75rem, 22vh, 13.5rem);
  margin: 0;
  padding: 0;
  border: none;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
  color: var(--accent);
  display: block;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  height: min(100%, 870px);
  justify-content: center;
  overflow: visible;
}

.brand-top {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.arvo-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.hero-copy {
  width: 100%;
}

h1 {
  margin: 0;
  max-width: 20ch;
  font-weight: 700;
  line-height: 1.1;
  font-size: clamp(1.85rem, 3vw + 0.6rem, 3.5rem);
  letter-spacing: -0.01em;
}

.headline-emphasis {
  color: #38e8c6;
}

.subline {
  margin: clamp(0.95rem, 1.9vw, 1.45rem) 0 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 0.72rem + 0.55vw, 1.18rem);
  line-height: 1.6;
}

.topic-ielts {
  color: #38e8c6;
  font-weight: 600;
}

.topic-mock {
  color: #4ca4fc;
  font-weight: 600;
}

.topic-upsc {
  color: #f8da78;
  font-weight: 600;
}

.feature-rotator-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: clamp(1.35rem, 2.8vw, 2rem) 0 clamp(1.35rem, 2.8vw, 2rem);
  max-width: 58ch;
}

.feature-rotator-icon {
  flex-shrink: 0;
  margin-top: 0.12em;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-rotator-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.feature-rotator {
  margin: 0;
  flex: 1;
  min-width: 0;
  min-height: 1.55em;
  color: var(--text-muted);
  font-size: clamp(0.88rem, 0.68rem + 0.45vw, 1.02rem);
  font-weight: 400;
  line-height: 1.5;
}

.feature-rotator-line {
  display: inline;
  transition: opacity 0.22s ease;
}

.feature-rotator-line.feature-rotator--fade {
  opacity: 0;
}

.store-ctas {
  display: flex;
  gap: 0.78rem;
  margin-top: clamp(1.25rem, 2vw, 1.85rem);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 176px;
  height: 52px;
  border-radius: 12px;
  line-height: 0;
  text-decoration: none;
  outline-offset: 3px;
  transition: transform 180ms ease, box-shadow 220ms ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(5, 11, 23, 0.4);
}

.store-badge:focus-visible {
  outline: 2px solid var(--accent);
}

.store-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.legal-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  padding-top: 1.3rem;
}

.legal-links a {
  color: var(--text-muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--text-main);
  text-decoration: underline;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  isolation: isolate;
}

.phone-glow {
  position: absolute;
  width: min(84%, 380px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(76, 164, 252, 0.22) 0%, rgba(76, 164, 252, 0.05) 42%, rgba(15, 20, 32, 0) 72%);
  transform: translate(3%, 2%);
  filter: blur(6px);
}

.phone-frame {
  position: relative;
  margin: 0;
  transform: none;
  transform-origin: center;
  width: min(96%, 560px);
  max-height: min(88vh, 900px);
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 24px 42px rgba(3, 8, 17, 0.6));
}

.placeholder-phone {
  display: grid;
  place-items: center;
  min-height: min(72vh, 720px);
  border: 1px solid #263148;
  background: linear-gradient(180deg, #0e1322 0%, #121a2b 100%);
}

.placeholder-card {
  width: calc(100% - 1.6rem);
  border-radius: 20px;
  border: 1px dashed #3a4765;
  background: rgba(16, 23, 39, 0.7);
  color: #bfd2ee;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
}

.placeholder-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #eff6ff;
  font-size: 0.82em;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 1.25rem 1rem clamp(5.25rem, 18vh, 7.5rem);
    gap: 1.1rem;
    overflow: visible;
  }

  .hero-waves-svg {
    bottom: clamp(2rem, 7vh, 4.5rem);
    height: clamp(7.5rem, 20vh, 11rem);
  }

  .hero-content {
    height: auto;
    justify-content: flex-start;
  }

  .brand-top {
    position: static;
    margin-bottom: 1.4rem;
  }

  .arvo-logo {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  h1 {
    max-width: 100%;
  }

  .subline {
    max-width: 100%;
    margin-top: clamp(1.45rem, 5vw, 2.15rem);
  }

  .feature-rotator-wrap {
    max-width: 100%;
  }

  .store-ctas {
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .store-badge {
    width: min(46%, 156px);
    height: auto;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 0;
  }

  .store-badge img {
    width: 100%;
    height: auto;
    object-fit: initial;
  }

  .hero-visual {
    min-height: 36vh;
    padding-bottom: 0.6rem;
  }

  .phone-glow {
    width: min(86%, 300px);
  }

  .phone-frame {
    width: min(88vw, 440px);
    transform: none;
  }

  .legal-links {
    margin-top: 1.1rem;
    padding-top: 0.6rem;
  }
}
