/* starstudent.me — marketing site.
   Palette and type are lifted from the app (src/styles/app.css) on purpose:
   the site should feel like the front door of the same building. */

:root {
  --ink: #0b0818;
  --ink-2: #150f2b;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-line: rgba(240, 217, 154, 0.16);
  --gold: #f0d99a;
  /* Sampled from the mascot's own body, so the word matches the star. */
  --star-gold: #ffe860;
  --gold-dim: rgba(240, 217, 154, 0.62);
  --text: #ece7fb;
  --text-dim: rgba(236, 231, 251, 0.62);
  --violet: #7c5cff;
  --violet-soft: rgba(124, 92, 255, 0.22);
  --good: #57d9a3;
  --radius: 16px;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --gutter: clamp(18px, 5vw, 40px);
  --shell: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, #241a4d 0%, transparent 62%),
    radial-gradient(900px 520px at 94% 2%, #3a1b46 0%, transparent 58%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--gold);
  color: #17102c;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 50;
}
.skip-link:focus { left: 12px; }

/* ---------- starfield ---------- */

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 78% 12%, rgba(240,217,154,0.6), transparent),
    radial-gradient(1.6px 1.6px at 34% 62%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.2px 1.2px at 88% 54%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.3px 1.3px at 58% 30%, rgba(240,217,154,0.45), transparent),
    radial-gradient(1.1px 1.1px at 22% 84%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 68% 88%, rgba(255,255,255,0.3), transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 8, 24, 0.72);
  border-bottom: 1px solid rgba(240, 217, 154, 0.1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.02em;
  color: #fff7df;
}
/* "Star" carries the star's own yellow, in bold rather than italic. */
.wordmark__text em {
  font-style: normal;
  font-weight: 700;
  color: var(--star-gold);
}
.wordmark:hover { text-decoration: none; }
.wordmark__mark {
  width: auto;
  height: 46px;
  filter: drop-shadow(0 4px 12px rgba(139, 105, 255, 0.45));
}
@media (max-width: 560px) {
  .site-header__inner { min-height: 66px; }
  .wordmark { font-size: 20px; gap: 8px; }
  .wordmark__mark { height: 38px; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 26px);
}
.site-nav__links a {
  color: var(--text-dim);
  font-size: 15px;
}
.site-nav__links a:hover { color: var(--text); text-decoration: none; }
.site-nav__links { display: flex; gap: clamp(12px, 2.4vw, 26px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Gold with the cap's purple on it — the pairing the mascot already uses. */
.btn.btn--primary {
  background: linear-gradient(180deg, #f8e7bb, #e9cd85);
  color: #3a1a80;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(240, 191, 67, 0.22);
}
.btn.btn--primary:hover { box-shadow: 0 14px 30px rgba(240, 191, 67, 0.34); }

/* The reverse, for the header — purple with the gold on it. */
.btn.btn--violet {
  background: linear-gradient(180deg, #6b3fd4, #52299f);
  color: #ffdd8a;
  font-weight: 700;
  border-color: rgba(255, 221, 138, 0.35);
  box-shadow: 0 8px 22px rgba(107, 63, 212, 0.35);
}
.btn.btn--violet:hover { box-shadow: 0 12px 26px rgba(107, 63, 212, 0.5); }
.btn--ghost {
  background: var(--panel);
  border-color: var(--panel-line);
  color: var(--text);
}
.btn--sm { padding: 9px 18px; font-size: 15px; }

/* ---------- section furniture ---------- */

section {
  position: relative;
  z-index: 1;
}
/* Keep the sticky header from covering a heading you jumped to. */
section[id] { scroll-margin-top: 86px; }

.band { padding-block: clamp(56px, 9vw, 104px); }
.band--tinted {
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.07) 40%, transparent);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 16px;
}
h1 { font-size: clamp(38px, 6.4vw, 64px); }
h2 { font-size: clamp(30px, 4.4vw, 44px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); line-height: 1.25; }

.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 0 28px;
}

.eyebrow--icon {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow--icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(124, 92, 255, 0.45));
}

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 52px); }

/* ---------- hero ---------- */

/* The art is the background of the whole section; a scrim keeps the headline
   readable over it — dark down the left on desktop, down the top on phones,
   fading into the page colour at the bottom either way. */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  padding-block: clamp(40px, 8vw, 72px) clamp(300px, 82vw, 460px);
}
.hero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 8, 24, 0.93) 0%,
    rgba(11, 8, 24, 0.9) 52%,
    rgba(11, 8, 24, 0.62) 66%,
    rgba(11, 8, 24, 0.12) 76%,
    rgba(11, 8, 24, 0) 80%,
    rgba(11, 8, 24, 0.35) 89%,
    rgba(11, 8, 24, 0.75) 95%,
    var(--ink) 100%
  );
}
.hero__grid { position: relative; z-index: 2; }
.hero__copy { max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { margin: 18px 0 0; font-size: 14px; color: var(--text-dim); }

@media (min-width: 900px) {
  .hero {
    align-items: center;
    min-height: min(78vh, 680px);
    padding-block: clamp(56px, 8vw, 110px);
  }
  .hero__scrim {
    background:
      linear-gradient(
        90deg,
        rgba(11, 8, 24, 0.96) 0%,
        rgba(11, 8, 24, 0.92) 32%,
        rgba(11, 8, 24, 0.72) 46%,
        rgba(11, 8, 24, 0.28) 60%,
        rgba(11, 8, 24, 0) 76%
      ),
      linear-gradient(180deg, rgba(11, 8, 24, 0.3) 0%, transparent 22%, transparent 86%, var(--ink) 100%);
  }
}

/* ---------- app store placeholders ----------
   Dimensioned like the real Apple and Google badges (about 160x54 at 1x), so
   swapping the official art in later does not move anything on the page. */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.stores--center { justify-content: center; margin: 26px 0; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  min-height: 54px;
  padding: 8px 16px;
  border: 1px dashed var(--panel-line);
  border-radius: 12px;
  background: rgba(11, 8, 24, 0.6);
  color: var(--text-dim);
}
.store__icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--gold-dim); }
.store__text { display: grid; line-height: 1.25; }
.store__text small { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.store__text strong { font-size: 16px; font-weight: 600; color: var(--text); }

.closing__mascot { width: 150px; height: auto; margin: 0 auto 18px; }

/* ---------- movement ----------
   Everything here is decoration: the page is complete and readable without it,
   and the reduced-motion block at the end of this file switches all of it off. */

/* Fade up as each piece arrives. The class is added by main.js, so no script
   means no hidden content. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease-out, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* The hero art drifts, very slowly, like the clouds it is painted on. This
   pans the crop rather than transforming the element: a transform on an image
   this size promotes it to its own layer, which some browsers then fail to
   paint on first frame. */
@keyframes drift {
  from { object-position: center 100%; }
  to { object-position: center 88%; }
}
.hero__art img { animation: drift 22s ease-in-out infinite alternate; }

/* Sparkles around the headline. */
@keyframes sparkle {
  0%, 100% { opacity: 0.15; transform: scale(0.75) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(18deg); }
}
.sparkle {
  position: absolute;
  z-index: 2;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  animation: sparkle 3.6s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(240, 217, 154, 0.7);
}
/* Kept clear of the copy column so nothing twinkles under the text. */
.sparkle--1 { top: 13%; left: 4%; animation-delay: 0s; }
.sparkle--2 { top: 9%; right: 26%; font-size: 13px; animation-delay: 1.1s; }
.sparkle--3 { top: 74%; left: 2%; font-size: 15px; animation-delay: 2.2s; }
@media (max-width: 899px) {
  .sparkle--2 { top: 6%; right: 8%; }
  .sparkle--3 { top: 46%; }
}

/* The mascot in the closing section bobs gently. */
@keyframes bob {
  from { transform: translateY(0); }
  to { transform: translateY(-9px); }
}
.closing__mascot.is-visible { animation: bob 3.4s ease-in-out infinite alternate; }

/* Deck backs breathe on their own, and stand up straight when pointed at. */
@keyframes deck-bob {
  from { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  to { transform: translateY(-7px) rotate(var(--tilt, 0deg)); }
}
.deck-rail__card.is-visible {
  animation: deck-bob 3.8s ease-in-out infinite alternate;
  animation-delay: var(--reveal-delay, 0ms);
}

/* Icons give a small hop when you point at their card. */
@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-7px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}
.card:hover .card__icon { animation: hop 0.6s ease; }

/* The wordmark's star wiggles when you point at it. */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}
.wordmark:hover img { animation: wiggle 0.7s ease; }

.btn:active { transform: translateY(1px) scale(0.99); }

/* The main call to action glows softly, so the eye finds it. */
@keyframes pulse-glow {
  from { box-shadow: 0 10px 26px rgba(240, 191, 67, 0.2); }
  to { box-shadow: 0 12px 34px rgba(240, 191, 67, 0.42); }
}
.hero__actions .btn--primary { animation: pulse-glow 2.8s ease-in-out infinite alternate; }

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: clamp(18px, 3vw, 26px);
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 36px);
  color: var(--gold);
}
.stat__label { font-size: 13px; color: var(--text-dim); }

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}
.card p { margin: 0; color: var(--text-dim); }
.card__icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 14px rgba(124, 92, 255, 0.35));
}
.card__step {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--panel-line);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 18px;
  margin-bottom: 14px;
}

/* ---------- split feature ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split + .split { margin-top: clamp(40px, 7vw, 80px); }
.split--flip .split__art { order: -1; }
.split__art {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 40px);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 24px;
}
.split__art img { width: min(240px, 70%); }

.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  color: var(--text-dim);
}
.ticks li::before {
  content: '\2726';
  color: var(--gold);
  line-height: 1.6;
}
.ticks strong { color: var(--text); font-weight: 600; }

/* ---------- symbol rail ---------- */

.rail {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 30px);
  justify-content: center;
  align-items: center;
  margin-top: clamp(28px, 4vw, 44px);
}
.rail img {
  width: clamp(52px, 8vw, 74px);
  opacity: 0.9;
  filter: drop-shadow(0 6px 16px rgba(124, 92, 255, 0.3));
}

/* ---------- deck rail ---------- */

.deck-rail {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 16px);
  margin: 4px 0 28px;
  padding-block: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.deck-rail::-webkit-scrollbar { display: none; }
.deck-rail__card {
  flex: 0 0 auto;
  width: clamp(76px, 12vw, 116px);
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--panel-line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}
.deck-rail__card:nth-child(odd) { --tilt: -2deg; transform: rotate(var(--tilt)); }
.deck-rail__card:nth-child(even) { --tilt: 2deg; transform: rotate(var(--tilt)); }
.deck-rail__card:hover { --tilt: 0deg; transform: translateY(-8px); animation-play-state: paused; }

/* ---------- turn a card over ---------- */

.pull {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  flex-wrap: wrap;
}
.pull-card {
  --lift: 0px;
  position: relative;
  width: clamp(132px, 22vw, 190px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translateY(var(--lift));
  transition: transform 0.25s ease;
}
.pull-card:hover { --lift: -8px; }
.pull-card__inner {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
}
/* A flat squash-and-swap rather than a 3D rotation: preserve-3d promotes the
   card to its own compositing layer, which some browsers fail to paint on the
   first frame. This reads the same and always draws. */
@keyframes flip {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0.04); }
  100% { transform: scaleX(1); }
}
.pull-card.is-turning .pull-card__inner { animation: flip 0.62s ease-in-out; }
.pull-card__face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
}
/* The face swap happens at the midpoint, while the card is edge-on. */
.pull-card__face--front {
  opacity: 0;
  transition: opacity 0s linear 0.31s;
}
.pull-card.is-flipped .pull-card__face--front { opacity: 1; }
.pull-card__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pull-card__hint {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.pull-detail {
  max-width: 640px;
  margin: clamp(26px, 4vw, 40px) auto 0;
  padding: clamp(20px, 3vw, 30px);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  animation: card-detail 0.5s ease-out;
}
@keyframes card-detail {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.pull-detail__name { margin-bottom: 8px; }
.pull-detail__essence { margin: 0 0 18px; color: var(--text-dim); }
.pull-detail__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: rgba(11, 8, 24, 0.5);
  font-size: 14px;
}
.chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(124, 92, 255, 0.4));
}
.chip--plain { padding-left: 14px; }
.chip__label { color: var(--text-dim); }
.chip__value { color: var(--text); font-weight: 600; }
.pull-detail__foot {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- faq ---------- */

.faq { display: grid; gap: 10px; max-width: 800px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  padding: 16px 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq p { color: var(--text-dim); margin: 12px 0 0; }

/* ---------- signup ---------- */

.signup {
  text-align: center;
  border: 1px solid var(--panel-line);
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(124, 92, 255, 0.18), transparent 70%),
    var(--panel);
  border-radius: 24px;
  padding: clamp(32px, 6vw, 60px) clamp(20px, 4vw, 48px);
}
.signup .lede { margin-inline: auto; }
.signup__form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.signup__form input {
  flex: 1 1 280px;
  max-width: 340px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: rgba(11, 8, 24, 0.6);
  color: var(--text);
  font: inherit;
}
.signup__form input::placeholder { color: rgba(236, 231, 251, 0.4); }
.signup__small { font-size: 13px; color: var(--text-dim); margin-top: 14px; }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(240, 217, 154, 0.1);
  padding-block: 36px;
  color: var(--text-dim);
  font-size: 14px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-footer__brand img {
  width: auto;
  height: 52px;
  filter: drop-shadow(0 4px 12px rgba(139, 105, 255, 0.4));
}
.site-footer__brand .wordmark__text {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  color: #fff7df;
  letter-spacing: -0.02em;
}
.site-footer__brand small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .split--flip .split__art { order: 0; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .site-nav__links { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .store { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- phone frames: the app itself, not a picture of an idea ---------- */

.phone {
  margin: 0 auto;
  width: min(290px, 78vw);
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(160deg, #221a3d, #0c0918);
  border: 1px solid rgba(240, 217, 154, 0.22);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(124, 92, 255, 0.08);
  transition: transform 0.5s ease;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}
.phone--tilt-right { transform: rotate(2.5deg); }
.phone--tilt-left { transform: rotate(-2.5deg); }
.phone:hover { transform: rotate(0deg) translateY(-6px); }

/* ---------- the tutor, drawn in layers like the app ---------- */

.tutor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 22px 0 18px;
}
.tutor-star {
  position: relative;
  width: 76px;
  aspect-ratio: 1;
  animation: tutor-float 5s ease-in-out infinite alternate;
}
.tutor-star:nth-child(2) { animation-delay: -1s; }
.tutor-star:nth-child(3) { animation-delay: -2s; }
.tutor-star:nth-child(4) { animation-delay: -3s; }
.tutor-star:nth-child(5) { animation-delay: -4s; }
.tutor-star--lead { width: 92px; }
.tutor-star img,
.tutor-star__tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tutor-star__tint { filter: var(--star-filter, none); }
.tutor-star__blink { opacity: 0; animation: tutor-blink 6s steps(1, end) infinite; }
.tutor-star__eyes { animation: tutor-eyes 6s steps(1, end) infinite; }
.tutor-star:nth-child(2) .tutor-star__blink,
.tutor-star:nth-child(2) .tutor-star__eyes { animation-delay: -2.2s; }
.tutor-star:nth-child(4) .tutor-star__blink,
.tutor-star:nth-child(4) .tutor-star__eyes { animation-delay: -3.7s; }
@keyframes tutor-float { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes tutor-blink {
  0%, 89.99% { opacity: 0; }
  90%, 92.79% { opacity: 1; }
  92.8%, 100% { opacity: 0; }
}
@keyframes tutor-eyes {
  0%, 89.99% { opacity: 1; }
  90%, 92.79% { opacity: 0; }
  92.8%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tutor-star, .tutor-star__blink, .tutor-star__eyes, .phone { animation: none; transition: none; }
  .tutor-star__blink { opacity: 0; }
  .tutor-star__eyes { opacity: 1; }
}

/* A phone is its own frame: drop the art panel behind it. */
.split__art:has(> .phone) {
  background: none;
  border: 0;
  padding: 10px 0;
}
/* All five tutors on one line, even on a small phone. */
.tutor-row { flex-wrap: nowrap; }
.tutor-star { width: clamp(52px, 14vw, 76px); }
.tutor-star--lead { width: clamp(62px, 17vw, 92px); }
