/* Mirei landing — getmirei.com. Builds on style.css (fonts, palette). No third-party imagery:
   the visuals are the app's own screenshots and widgets recreated in HTML. */

body.landing { overflow-x: hidden; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }
.accent { color: var(--orange); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 27, 0.72);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links > a { color: var(--text-sub); text-decoration: none; }
.nav-links > a:hover { color: var(--text); }
.nav-links .nav-cta { color: #FFFFFF; background: var(--blue); padding: 9px 16px; border-radius: 12px; font-weight: 600; }
.nav-links .nav-cta:hover { color: #FFFFFF; filter: brightness(1.1); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 72px 0 56px; overflow-x: clip; } /* the tilted side phones may peek past the edge on narrow screens */
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(36rem 26rem at 78% 30%, rgba(0, 101, 255, 0.35), transparent 70%),
    radial-gradient(24rem 18rem at 62% 70%, rgba(255, 166, 23, 0.12), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; font-weight: 600; color: var(--blue-soft); margin: 0 0 18px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 70px); line-height: 1.04; margin: 0; letter-spacing: -0.035em; }
.lead { font-size: 20px; max-width: 30em; margin: 0 0 32px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.play-badge { display: inline-block; line-height: 0; }
.play-badge img { height: 64px; width: auto; margin: -9px -11px; }  /* the official badge carries its own padding */
.hero-note { font-size: 15px; color: var(--text-muted); }
/* Stands in for the Play badge until the app is published (build.py, PLAY_LIVE). Same height as the badge. */
.soon-badge {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.soon-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 166, 23, 0.18); }

.hero-phones { position: relative; height: 620px; }
.hero-phones .phone { position: absolute; top: 50%; left: 50%; }
.phone-center { width: 268px; translate: calc(-50% + var(--px, 0px)) calc(-50% + var(--py, 0px)); z-index: 3; animation: float 7s ease-in-out infinite; }
.phone-left { width: 222px; translate: calc(-50% - 180px + var(--px, 0px)) calc(-46% + var(--py, 0px)); rotate: -9deg; z-index: 2; opacity: 0.92; animation: float 8s ease-in-out -2s infinite; }
.phone-right { width: 222px; translate: calc(-50% + 180px + var(--px, 0px)) calc(-46% + var(--py, 0px)); rotate: 9deg; z-index: 2; opacity: 0.92; animation: float 9s ease-in-out -4s infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.float-chip {
  position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap;
  background: rgba(22, 28, 44, 0.78); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  translate: var(--px, 0px) var(--py, 0px);
  animation: float 6s ease-in-out infinite;
}
.chip-rating { top: 14%; left: -2%; animation-delay: -1s; }
.chip-streak { bottom: 18%; right: -4%; animation-delay: -3s; }
.chip-next { bottom: 6%; left: 8%; animation-delay: -2s; }
.float-chip .star { color: var(--orange); }
.float-chip .check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); font-size: 12px; }
.flame-dot { width: 12px; height: 16px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: linear-gradient(#FFD66B, #FF5A1F); box-shadow: 0 0 12px rgba(255, 140, 30, 0.8); }

/* ------------------------------------------------------------------ phone frame */
.phone {
  padding: 6px; border-radius: 36px; background: #0D1017;
  border: 1.5px solid rgba(120, 154, 212, 0.45);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.phone img {
  display: block; width: 100%; aspect-ratio: 1080 / 2290; object-fit: cover; object-position: 50% 100%; /* hides the status bar */
  border-radius: 30px;
}
.phone-solo { width: min(300px, 80%); margin: 0 auto; }

/* ------------------------------------------------------------------ marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: rgba(255, 255, 255, 0.02); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: "Space Grotesk", "Jost", sans-serif; font-weight: 700; font-size: 22px; color: var(--text); white-space: nowrap; }
.marquee-track i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.marquee-track i:nth-of-type(3n) { background: var(--blue); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ feature sections */
.feature { padding: 120px 0; position: relative; }
.feature.alt { background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)); }
.feature-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.feature-grid.reverse .feature-copy { order: 2; }
.kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; font-weight: 600; color: var(--orange); margin: 0 0 12px; }
.feature h2, .cta h2 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 16px; letter-spacing: -0.03em; }
.feature-copy > p { font-size: 18px; max-width: 32em; }
.section-head { text-align: center; margin-bottom: 48px; }

.widget {
  margin-top: 28px; padding: 22px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.widget-title { color: var(--text); font-weight: 600; margin: 0 0 12px; }
.hint { font-size: 14px; color: var(--text-muted); margin: 0; }
button { font: inherit; cursor: pointer; }
.btn-small { border: 0; border-radius: 12px; padding: 10px 16px; background: var(--blue); color: #FFFFFF; font-weight: 600; }
.btn-small:hover, .btn-primary:hover { filter: brightness(1.12); }
.btn-primary { width: 100%; border: 0; border-radius: 14px; padding: 15px; margin-top: 14px; background: var(--blue); color: #FFFFFF; font-weight: 600; font-size: 17px; }

/* tracker */
.tracker-head { display: flex; align-items: center; gap: 14px; }
.tracker-cover { width: 52px; height: 78px; border-radius: 10px; flex: none; object-fit: cover; background: var(--card); }
.tracker-title { display: flex; flex-direction: column; line-height: 1.3; }
.tracker-title strong { font-size: 18px; }
.tracker-count { margin-left: auto; font-weight: 600; color: var(--text); background: rgba(0, 101, 255, 0.16); padding: 6px 12px; border-radius: 999px; font-size: 15px; }
.progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); margin: 18px 0; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-soft)); border-radius: 3px; transition: width 0.45s cubic-bezier(.2, .8, .2, 1); }
.season-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.season-tabs button {
  border: 1px solid var(--line); background: transparent; color: var(--text-sub);
  padding: 8px 14px; border-radius: 12px; font-size: 14px; line-height: 1.25; text-align: left;
}
.season-tabs button small { display: block; color: var(--text-muted); font-size: 12px; }
.season-tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.season-tabs button[aria-selected="true"] small { color: rgba(255, 255, 255, 0.8); }
.episodes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.episodes button {
  height: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--text-sub); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.episodes button:hover { border-color: rgba(76, 141, 255, 0.6); }
.episodes button:active { transform: scale(0.94); }
.episodes button.watched { background: rgba(0, 101, 255, 0.22); border-color: rgba(0, 101, 255, 0.6); color: var(--text); }
.episodes button.watched::before { content: "✓"; color: var(--blue-soft); font-size: 13px; }
.episodes button.next { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.tracker-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* rating */
.rating-top { display: flex; align-items: center; justify-content: center; gap: 18px; }
.rating-emoji { font-size: 54px; line-height: 1; display: inline-block; }
.rating-emoji.pop { animation: pop 0.35s ease; }
@keyframes pop { 40% { transform: scale(1.3) rotate(-6deg); } }
.rating-number { font-family: "Space Grotesk", sans-serif; color: var(--text-muted); font-size: 22px; }
.rating-number b { color: var(--orange); font-size: 64px; letter-spacing: -0.04em; }
.rating-label { text-align: center; color: var(--text); font-weight: 600; font-size: 20px; margin: 6px 0 18px; min-height: 1.5em; }
#rating-input { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--orange) 0 var(--fill, 78%), rgba(255, 255, 255, 0.1) var(--fill, 78%) 100%); }
#rating-input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #0B0F1B; border: 4px solid var(--orange); box-shadow: 0 4px 14px rgba(255, 166, 23, 0.45); }
#rating-input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #0B0F1B; border: 4px solid var(--orange); }
.rating-scale { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 13px; margin: 10px 2px 12px; }
.rating .hint { text-align: center; }

/* ai */
.ai-prompt {
  display: flex; align-items: flex-start; gap: 10px; min-height: 64px; padding: 16px 18px; border-radius: 16px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(76, 141, 255, 0.35); color: var(--text); font-size: 17px;
}
.spark { color: var(--orange); }
.caret { width: 2px; height: 1.2em; background: var(--blue-soft); animation: blink 1s steps(1) infinite; margin-left: -6px; }
@keyframes blink { 50% { opacity: 0; } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-chips button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text-sub); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.ai-chips button:hover, .ai-chips button.active { border-color: var(--blue-soft); color: var(--text); }
.ai-results { display: grid; gap: 10px; margin-top: 14px; }
.ai-results:empty { display: none; }
.ai-thinking { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 6px 2px; }
.ai-thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-soft); animation: think 1s ease-in-out infinite; }
.ai-thinking i:nth-child(2) { animation-delay: 0.15s; } .ai-thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think { 50% { transform: translateY(-5px); opacity: 0.5; } }
.pick {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  opacity: 0; transform: translateY(10px); animation: pick-in 0.45s ease forwards;
}
.pick:nth-child(2) { animation-delay: 0.12s; } .pick:nth-child(3) { animation-delay: 0.24s; }
@keyframes pick-in { to { opacity: 1; transform: none; } }
.pick-cover { width: 52px; height: 78px; border-radius: 10px; flex: none; object-fit: cover; background: var(--card); }
.pick strong { color: var(--text); display: block; }
.pick .meta { color: var(--text-muted); font-size: 13px; }
.pick p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }

/* bento: streak, stats, friends */
.bento { display: grid; gap: 18px; grid-template-columns: 1fr 1fr 300px; grid-template-areas: "streak counters phone" "genres match phone"; }
.bento .widget { margin: 0; }
.bento .streak { grid-area: streak; text-align: center; }
.bento .counters { grid-area: counters; }
.bento .genres { grid-area: genres; }
.bento .match { grid-area: match; }
.phone-bento { grid-area: phone; align-self: center; }

.flame { width: 74px; height: 92px; margin: 4px auto 6px; filter: drop-shadow(0 0 22px rgba(255, 120, 30, 0.6)); }
.flame svg { width: 100%; height: 100%; overflow: visible; }
.fl-outer { transform-origin: 50% 100%; animation: flicker 1.6s ease-in-out infinite; }
.fl-inner { transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out -0.4s infinite reverse; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0); } 33% { transform: scale(0.97, 1.05) skewX(2deg); } 66% { transform: scale(1.02, 0.97) skewX(-2deg); } }
.streak-num { font-family: "Space Grotesk", sans-serif; color: var(--text); font-size: 20px; }
.streak-num b { font-size: 52px; letter-spacing: -0.04em; color: var(--orange); }
.milestones { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ms { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; border: 1px solid var(--line); color: var(--text-muted); }
.ms.done { background: rgba(255, 166, 23, 0.16); border-color: rgba(255, 166, 23, 0.6); color: var(--orange); }

.counters { display: grid; gap: 14px; align-content: center; }
.counter { display: flex; align-items: baseline; gap: 12px; }
.counter b { font-family: "Space Grotesk", sans-serif; font-size: 44px; color: var(--text); letter-spacing: -0.03em; min-width: 3.2ch; }
.counter span { color: var(--text-muted); }

.genre { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; margin: 10px 0; font-size: 15px; }
.genre i { display: block; height: 10px; border-radius: 5px; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-soft)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.genre:first-of-type i { background: linear-gradient(90deg, #FF7A1A, var(--orange)); }
.genres.in .genre i, html:not(.js) .genre i { width: var(--w); }
.genres.in .genre:nth-of-type(2) i { transition-delay: 0.1s; } .genres.in .genre:nth-of-type(3) i { transition-delay: 0.2s; }
.genres.in .genre:nth-of-type(4) i { transition-delay: 0.3s; } .genres.in .genre:nth-of-type(5) i { transition-delay: 0.4s; }

.match { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 120px; height: 120px; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring-bg { stroke: rgba(255, 255, 255, 0.08); }
.ring-fg { stroke: var(--blue-soft); stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.match.in .ring-fg, html:not(.js) .ring-fg { stroke-dashoffset: 42.5; }   /* 87 % of 2πr (r = 52) */
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; color: var(--text); font-size: 18px; }
.ring-label b { font-size: 34px; }
.avatars { display: flex; margin-bottom: 8px; }
.avatars span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #FFFFFF; border: 2px solid #0B0F1B; }
.avatars span:first-child { background: var(--blue); }
.avatars span:last-child { background: var(--orange); margin-left: -10px; color: #0B0F1B; }
.match .muted { margin: 0; font-size: 15px; }

/* import + cta */
.sources { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.sources span { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font-weight: 600; }
.cta { padding: 120px 0 140px; position: relative; }
.cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(40rem 20rem at 50% 60%, rgba(0, 101, 255, 0.25), transparent 70%); }
.cta h2 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 32px; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.footer-inner nav a { color: var(--text-muted); }
.footer-bottom { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; }
.footer-bottom p { margin: 0; }

/* reveal on scroll (only when JS runs, so nothing stays hidden without it) */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero-grid, .feature-grid { grid-template-columns: 1fr; }
  .feature-grid.reverse .feature-copy { order: 0; }
  .hero { padding-top: 40px; }
  .hero-phones { height: 540px; margin-top: 8px; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "streak counters" "genres match" "phone phone"; }
  .phone-bento { width: min(300px, 80%); justify-self: center; }
  .feature { padding: 88px 0; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav-links { gap: 14px; }
  .hero-phones { height: 470px; }
  .phone-center { width: 218px; }
  .phone-left { width: 180px; translate: calc(-50% - 112px + var(--px, 0px)) calc(-46% + var(--py, 0px)); }
  .phone-right { width: 180px; translate: calc(-50% + 112px + var(--px, 0px)) calc(-46% + var(--py, 0px)); }
  .chip-rating { left: 0; top: 4%; } .chip-streak { right: 0; } .chip-next { left: 2%; bottom: 2%; }
  .float-chip { font-size: 13px; padding: 8px 12px; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "streak" "counters" "genres" "match" "phone"; }
  .episodes { grid-template-columns: repeat(4, 1fr); }
  .match { grid-template-columns: 96px 1fr; }
  .ring { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .genre i { width: var(--w) !important; }
  .ring-fg { stroke-dashoffset: 42.5 !important; }
}
