/* ============================================================
   IAESTUDA — Página inicial (landing)
   Reusa os tokens de main.css; aqui vive só o que é da landing.
   ============================================================ */

body.landing {
  max-width: 100%;
  overflow-x: clip;
}

.landing-topbar {
  background: linear-gradient(to bottom, oklch(0.1 0.03 268 / 0.92), oklch(0.1 0.03 268 / 0.6) 70%, transparent);
}
.landing-nav { display: flex; gap: 26px; margin-inline: auto; }
.landing-nav a {
  color: var(--ink-dim); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  transition: color var(--t-fast);
}
.landing-nav a:hover { color: var(--ink); }
.landing-cta-group { display: flex; gap: 10px; align-items: center; }
.btn-s { padding: 8px 16px; font-size: 0.85rem; }
.btn-l { padding: 14px 28px; font-size: 1rem; }

.grad-text {
  background: linear-gradient(100deg, var(--cyan), var(--violet) 60%, var(--orange));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

main { position: relative; z-index: 2; }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: clip;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
  padding: calc(var(--shell-h) + 40px) 24px 90px;
}

/* aurora que respira por trás do hero */
.hero-aurora {
  position: absolute; inset: -10% 0 auto 0;
  height: 70%;
  z-index: -1;
  background:
    radial-gradient(45% 55% at 30% 40%, oklch(0.6 0.16 215 / 0.22), transparent 70%),
    radial-gradient(40% 50% at 72% 30%, oklch(0.6 0.16 295 / 0.2), transparent 70%),
    radial-gradient(35% 45% at 55% 65%, oklch(0.7 0.16 60 / 0.12), transparent 70%);
  filter: blur(30px);
  animation: aurora 14s ease-in-out infinite;
}
@keyframes aurora {
  0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: 0.9; }
  50% { transform: translate3d(3%, 4%, 0) scale(1.08); opacity: 1; }
}

/* entrada em cascata */
.anim-up { opacity: 0; transform: translateY(22px); animation: heroUp 0.8s var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
.anim-in { opacity: 0; transform: translateY(30px) scale(0.98); animation: heroIn 1s var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes heroUp { to { opacity: 1; transform: none; } }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.7rem; letter-spacing: 0.2em; color: var(--cyan);
  margin-bottom: 20px;
  padding: 6px 14px 6px 10px;
  border: 1px solid oklch(0.83 0.13 215 / 0.25);
  border-radius: 99px;
  background: oklch(0.83 0.13 215 / 0.06);
}
.eyebrow-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 oklch(0.8 0.16 150 / 0.7);
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 oklch(0.8 0.16 150 / 0.6); }
  70% { box-shadow: 0 0 0 7px oklch(0.8 0.16 150 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.8 0.16 150 / 0); }
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.hero-sub {
  color: var(--ink-dim); font-size: 1.1rem; line-height: 1.65;
  max-width: 54ch; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.btn-launch.btn-l { position: relative; overflow: hidden; }
.btn-launch.btn-l::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, oklch(1 0 0 / 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 65% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* linha de confiança */
.hero-trust {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.trust-stars { font-size: 0.85rem; color: var(--ink-dim); }
.trust-stars span { color: var(--gold); letter-spacing: 1px; }
.trust-stars strong { color: var(--ink); }
.trust-stars small { color: var(--ink-faint); }
.trust-sep { width: 1px; height: 18px; background: var(--line-strong); }
.trust-free { font-size: 0.85rem; color: oklch(0.85 0.13 150); }
.hero-proof { font-size: 0.78rem; color: var(--ink-faint); }
.hero-proof span { color: var(--ink-dim); }

/* demo com cartões flutuantes */
.hero-demo {
  position: relative;
  min-width: 0;
}
.demo-glow {
  position: absolute; inset: -30px 0;
  z-index: -1;
  background: radial-gradient(closest-side, oklch(0.6 0.16 215 / 0.18), transparent 75%);
  animation: aurora 10s ease-in-out infinite;
}

/* Janela de demo do chat */
.demo-window {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-l);
  background: oklch(0.14 0.033 268 / 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px oklch(0.05 0.02 268 / 0.7), 0 0 70px oklch(0.83 0.13 215 / 0.09);
  overflow: hidden;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }

/* cartões de conquista a flutuar à volta da janela */
.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-m);
  background: oklch(0.17 0.035 268 / 0.95);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 40px oklch(0.05 0.02 268 / 0.6);
  backdrop-filter: blur(10px);
  z-index: 3;
  animation: floatCard 6s ease-in-out infinite;
}
.float-card .fc-icon { font-size: 1.1rem; }
.float-card b { display: block; font-size: 0.9rem; line-height: 1.1; }
.float-card small { font-size: 0.68rem; color: var(--ink-faint); }
.float-card-xp {
  top: -24px; left: -30px;
  color: var(--gold); border-color: oklch(0.86 0.14 92 / 0.4);
  animation-delay: 0s;
}
.float-card-streak {
  bottom: -20px; left: -26px;
  color: var(--orange); border-color: oklch(0.78 0.15 60 / 0.4);
  animation-delay: 1.4s;
}
.float-card-level {
  top: 38%; right: -30px;
  color: var(--cyan); border-color: oklch(0.83 0.13 215 / 0.4);
  animation-delay: 2.6s;
}
.float-card .fc-up { color: var(--cyan); }
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* indicador de scroll */
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none;
  opacity: 0; animation: heroUp 1s var(--ease-out) 0.9s forwards;
}
.hero-scroll span.mono { font-size: 0.6rem; letter-spacing: 0.22em; color: var(--ink-faint); }
.hero-scroll-mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  position: relative;
}
.hero-scroll-mouse::after {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 99px;
  background: var(--cyan);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 80% { opacity: 0; top: 16px; } 100% { opacity: 0; } }
.demo-window-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: oklch(0.35 0.04 268); }
.demo-window-title { margin-left: 10px; font-size: 0.62rem; letter-spacing: 0.18em; color: var(--ink-faint); }
.demo-thread {
  padding: 18px;
  min-height: 320px;
  display: flex; flex-direction: column; gap: 12px;
}
.demo-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: var(--r-m);
  font-size: 0.88rem; line-height: 1.55;
  animation: msg-in var(--t-med) var(--ease-out);
}
.demo-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, oklch(0.45 0.1 220 / 0.5), oklch(0.4 0.1 280 / 0.5));
  border: 1px solid oklch(0.83 0.13 215 / 0.25);
}
.demo-msg-ai {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.demo-msg-ai .caret {
  display: inline-block; width: 7px; height: 1em;
  vertical-align: text-bottom;
  background: var(--cyan);
  animation: blink 0.8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.demo-badge {
  align-self: flex-start;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--gold);
  padding: 6px 12px;
  border: 1px solid oklch(0.86 0.14 92 / 0.35);
  border-radius: 99px;
  animation: msg-in var(--t-med) var(--ease-out);
}

/* ============ HISTÓRIA ============ */
.story { max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.chapter { text-align: center; padding: clamp(50px, 10vh, 110px) 0; }
.chapter-n {
  font-size: 0.7rem; letter-spacing: 0.24em; color: var(--orange);
  margin-bottom: 16px;
}
.chapter h2, .try h2, .plans h2, .final-cta h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 18px;
}
.chapter-text {
  color: var(--ink-dim); font-size: 1.05rem; line-height: 1.7;
  max-width: 58ch; margin: 0 auto 18px;
}
.chapter-text em { color: var(--ink); font-style: italic; }
.chapter-visual { margin: 36px auto; }

/* animação de entrada por scroll */
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal-on-scroll.is-in { opacity: 1; transform: none; }

/* gauge no capítulo 2 */
.gauge-demo { --grade-c: var(--cyan); }
.chapter-visual .gauge { margin-bottom: 26px; }
.story-skills {
  list-style: none;
  max-width: 380px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.story-skills li { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--ink-dim); }
.story-skills i {
  display: block; height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  width: 0;
  transition: width 1.2s var(--ease-out) 0.4s;
}
.is-in .story-skills i { width: var(--w); }

/* constelação do capítulo 3 */
.story-const { width: 100%; max-width: 560px; }
.story-const line { stroke: oklch(0.75 0.08 250 / 0.25); stroke-width: 1; }
.story-const circle {
  fill: oklch(0.85 0.1 215);
  filter: drop-shadow(0 0 8px oklch(0.83 0.13 215 / 0.9));
  opacity: 0; transform-origin: center;
}
.story-const text {
  fill: oklch(0.78 0.03 255); font-size: 12px; text-anchor: middle;
  font-family: var(--font-ui);
  opacity: 0;
}
.is-in .story-star circle { animation: star-pop 0.6s var(--ease-out) var(--d) forwards; }
.is-in .story-star text { animation: fade-up 0.5s var(--ease-out) calc(var(--d) + 0.2s) forwards; }
@keyframes star-pop { from { opacity: 0; transform: scale(0); } 70% { transform: scale(1.6); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ DEMO INTERATIVA ============ */
.try { padding: clamp(50px, 10vh, 110px) 24px; }
.try-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.try-card {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid oklch(0.78 0.15 60 / 0.35);
  border-radius: var(--r-l);
  background: oklch(0.15 0.035 268 / 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 60px oklch(0.78 0.15 60 / 0.08);
  text-align: left;
}
.try-q-label { font-size: 0.68rem; letter-spacing: 0.2em; color: var(--orange); margin-bottom: 12px; }
.try-q { font-size: 1.15rem; line-height: 1.45; margin-bottom: 18px; }
.try-card textarea {
  width: 100%;
  padding: 14px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: oklch(0.12 0.03 268 / 0.8);
  resize: vertical; min-height: 100px;
  line-height: 1.6; font-size: 0.95rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.try-card textarea:focus { border-color: oklch(0.78 0.15 60 / 0.5); box-shadow: 0 0 20px oklch(0.78 0.15 60 / 0.1); }
/* checklist ao vivo */
.try-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.try-check {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 0.78rem; color: var(--ink-faint);
  transition: color var(--t-med), border-color var(--t-med), background var(--t-med), transform var(--t-fast) var(--ease-out);
}
.try-check::before {
  content: "○";
  font-size: 0.7rem;
  transition: inherit;
}
.try-check.is-ok {
  color: oklch(0.85 0.13 150);
  border-color: oklch(0.8 0.16 150 / 0.45);
  background: oklch(0.8 0.16 150 / 0.08);
  transform: translateY(-1px);
}
.try-check.is-ok::before { content: "✓"; }

.try-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.try-hint { font-size: 0.78rem; color: var(--ink-faint); }

.try-result {
  display: flex; gap: 26px; align-items: center;
  margin-top: 22px; padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: view-in var(--t-slow) var(--ease-out);
}
.try-gauge { position: relative; width: 110px; flex: 0 0 auto; }
.try-gauge svg { width: 100%; transform: rotate(-90deg); }
.try-gauge circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.try-gauge-bg { stroke: oklch(0.28 0.04 268); }
.try-gauge-fg {
  stroke: var(--try-c, var(--cyan));
  stroke-dasharray: 314.16;               /* 2πr, r=50 */
  stroke-dashoffset: 314.16;
  filter: drop-shadow(0 0 8px var(--try-c, var(--cyan)));
  transition: stroke-dashoffset 1.6s var(--ease-out), stroke 0.5s;
}
.try-gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.try-score-n {
  font-size: 1.9rem; font-weight: 700; line-height: 1;
  color: var(--try-c, var(--cyan));
}
.try-score-sub { color: var(--ink-faint); font-size: 0.75rem; margin-top: 2px; }
.try-feedback p:first-child { font-weight: 600; margin-bottom: 8px; }
.try-upsell { font-size: 0.85rem; color: var(--ink-dim); line-height: 1.55; }
.try-upsell a { color: var(--cyan); }

/* ============ PROVA SOCIAL ============ */
.proof { max-width: 980px; margin: 0 auto; padding: clamp(40px, 8vh, 90px) 24px; text-align: center; }
.proof-stats {
  display: flex; justify-content: center; gap: clamp(30px, 7vw, 90px);
  flex-wrap: wrap;
  margin-bottom: 46px;
}
.proof-stat span { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--cyan); }
.proof-stat small { color: var(--ink-faint); font-size: 0.82rem; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.quotes blockquote {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: oklch(0.16 0.035 268 / 0.7);
  font-size: 0.92rem; line-height: 1.6; color: var(--ink-dim);
  text-align: left;
}
.quotes footer { margin-top: 12px; font-size: 0.78rem; color: var(--ink-faint); }
.proof-note { margin-top: 18px; font-size: 0.7rem; color: var(--ink-faint); }

/* ============ PLANOS ============ */
.plans { max-width: 1040px; margin: 0 auto; padding: clamp(50px, 10vh, 110px) 24px; text-align: center; }
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 40px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: oklch(0.16 0.035 268 / 0.8);
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast);
}
.plan:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.plan-hot {
  border-color: oklch(0.78 0.15 60 / 0.55);
  background: oklch(0.18 0.045 60 / 0.22);
  box-shadow: 0 0 50px oklch(0.78 0.15 60 / 0.14);
  transform: scale(1.03);
}
.plan-hot:hover { transform: scale(1.03) translateY(-4px); }
.plan-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em;
  padding: 4px 14px; border-radius: 99px;
  background: var(--orange); color: oklch(0.16 0.05 60);
}
.plan h3 { font-size: 1.2rem; margin-bottom: 8px; }
.plan-price { margin-bottom: 4px; color: var(--ink-dim); }
.plan-price span { font-size: 2rem; font-weight: 700; color: var(--ink); }
.plan-tag { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 18px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; flex: 1; }
.plan li { font-size: 0.88rem; color: var(--ink-dim); padding-left: 22px; position: relative; }
.plan li::before { content: "✦"; position: absolute; left: 0; color: var(--cyan); font-size: 0.75rem; }
.plan-hot li::before { color: var(--orange); }
.plan-cta { width: 100%; }

/* ============ CTA FINAL / FOOTER ============ */
.final-cta { text-align: center; padding: clamp(60px, 12vh, 130px) 24px; }
.final-cta .btn { margin-top: 10px; }
.landing-footer {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
  padding: 26px 24px 90px;
  font-size: 0.8rem; color: var(--ink-faint);
  border-top: 1px solid var(--line);
}
.landing-footer a { color: var(--ink-dim); }

/* ============ MODAL DE REGISTO ============ */
.reg-modal {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; place-items: center;
  background: oklch(0.07 0.02 268 / 0.82);
  backdrop-filter: blur(8px);
  animation: fade-in 0.35s var(--ease-out);
  padding: 16px;
}
.reg-card {
  position: relative;
  width: min(420px, 100%);
  padding: 34px 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-l);
  background: oklch(0.15 0.035 268 / 0.98);
  box-shadow: 0 30px 90px oklch(0.04 0.02 268 / 0.8);
  animation: levelup-in 0.5s var(--ease-out);
}
.reg-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-faint);
}
.reg-close:hover { color: var(--ink); background: oklch(0.3 0.05 268 / 0.5); }
.reg-card h3 { font-size: 1.5rem; margin: 6px 0; }
.reg-sub { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 22px; }
.reg-card form { display: flex; flex-direction: column; gap: 14px; }
.reg-submit { margin-top: 6px; }
.reg-note { margin-top: 16px; font-size: 0.75rem; color: var(--ink-faint); text-align: center; }

/* ============ RESPONSIVO ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--shell-h) + 40px); padding-bottom: 70px; }
  .hero-copy { text-align: center; }
  .hero-sub, .hero-actions, .hero-trust { margin-inline: auto; justify-content: center; }
  .hero-eyebrow { text-align: left; }
  .landing-nav { display: none; }
  .float-card-xp { left: 4px; }
  .float-card-streak { left: 8px; }
  .float-card-level { right: 6px; }
  .hero-scroll { display: none; }
}
@media (max-width: 640px) {
  .landing-topbar .btn-ghost { display: none; }
  .try-result { flex-direction: column; text-align: center; }
  .plan-hot { transform: none; }
  /* cartões flutuantes escondem-se em ecrãs muito pequenos para não sobrepor */
  .float-card { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-window, .float-card, .hero-aurora, .demo-glow, .btn-launch.btn-l::after,
  .eyebrow-live, .hero-scroll-mouse::after { animation: none; }
  .anim-up, .anim-in, .hero-scroll { opacity: 1; transform: none; animation: none; }
  .reveal-on-scroll { opacity: 1; transform: none; }
}
