/* LearnUp: tông app (xanh #1f63f0 trên nền trắng lạnh), khoá sáng vì screenshot app đều nền sáng. */
@font-face {
  font-family: "Geist"; src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
:root {
  --bg: #f4f7fc; --bg-2: #e9eff9; --card: #fbfcfe; --fg: #0f1b33; --muted: #536079; --line: #d8e1ef;
  --accent: #1f63f0; --accent-2: #4a8bff; --accent-fg: #f7faff; --tint: #e3edff; --deep: #0d2a6b;
  --r: 16px; --r-lg: 32px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--fg); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.06; font-weight: 650; }
h2 { font-size: clamp(30px, 4.2vw, 48px); max-width: 16ch; text-wrap: balance; }
h3 { font-size: 20px; letter-spacing: -0.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:hover { background: #1652d6; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn span { transition: transform .2s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 17px 28px; font-size: 17px; }
.btn-light { background: var(--accent-fg); color: var(--deep); box-shadow: 0 14px 30px -14px rgb(0 0 0 / .45); }
.btn-light:hover { background: #fff; }

main > section { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Phone frame chung: viền mỏng sáng, bóng xanh */
.phone { margin: 0; border-radius: 40px; padding: 8px; background: #fdfdff; border: 1px solid var(--line);
  box-shadow: 0 40px 80px -36px rgb(13 42 107 / .45), 0 2px 6px rgb(13 42 107 / .06); }
.phone img { border-radius: 32px; width: 100%; }

/* HERO */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  min-height: calc(100dvh - 64px); padding-top: 32px; padding-bottom: 56px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--tint);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); margin-bottom: 22px; max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; border-radius: 99px;
  background: color-mix(in srgb, var(--accent-2) 35%, transparent); transform-origin: left; animation: underline 1s .5s var(--ease) both; }
@keyframes underline { from { transform: scaleX(0); } }
.lead { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 34ch; margin-bottom: 30px; }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-note { color: var(--muted); font-size: 14px; }
.proof { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.proof li { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; }
.proof strong { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.proof .stars { color: #f5a524; font-size: 13px; letter-spacing: 1px; }
.proof li > span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }

.hero-visual { position: relative; min-height: 600px; display: flex; justify-content: flex-end; align-items: center; }
.halo { position: absolute; right: -4%; top: 50%; width: min(92%, 500px); aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #8ab6ff 0%, #2a6cf3 52%, #1747b8 100%); }
.halo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .55;
  background: radial-gradient(rgb(255 255 255 / .4) 1px, transparent 1.5px) 0 0 / 22px 22px;
  mask: radial-gradient(circle, transparent 35%, #000 75%); -webkit-mask: radial-gradient(circle, transparent 35%, #000 75%); }
.phone-hero { position: relative; width: min(56%, 290px); margin-right: 8%; transform: rotate(3deg); border-color: rgb(255 255 255 / .6); }
.chat { position: absolute; inset: 0; pointer-events: none; }
.bubble { position: absolute; max-width: 250px; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.4;
  background: var(--card); color: var(--fg); box-shadow: 0 18px 40px -18px rgb(13 42 107 / .45);
  opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.bubble.on { opacity: 1; transform: none; }
.bubble.tutor { left: 0; border-bottom-left-radius: 6px; }
.bubble.you { left: 14%; background: var(--accent); color: var(--accent-fg); border-bottom-right-radius: 6px; }
.bubble[data-step="0"] { top: 12%; }
.bubble[data-step="1"] { top: 29%; }
.bubble[data-step="2"] { top: 45%; }
.bubble.score { left: 4%; bottom: 10%; display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.bubble.score b { color: #0f8a4a; font-size: 15px; }
.bubble.score u { text-decoration-color: var(--accent); text-decoration-thickness: 2px; color: var(--fg); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-3px); opacity: .4; } }
.caption { position: absolute; bottom: 1%; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); }

/* HOW: tab trái, điện thoại phải */
.how { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-top: 72px; padding-bottom: 40px; }
.how h2 { margin-bottom: 36px; }
.tabs { display: grid; gap: 10px; }
.tabs button { all: unset; cursor: pointer; display: grid; gap: 6px; padding: 20px 24px; border-radius: var(--r); border: 1px solid transparent;
  transition: background .25s, border-color .25s; position: relative; }
.tabs button b { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.tabs button span { color: var(--muted); max-width: 46ch; display: none; }
.tabs button[aria-selected="true"] { background: var(--card); border-color: var(--line); box-shadow: 0 12px 30px -22px rgb(13 42 107 / .5); }
.tabs button[aria-selected="true"] span { display: block; }
.tabs button[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 3px; border-radius: 3px; background: var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.phone-how { width: min(100%, 330px); justify-self: center; }
.phone-how img { transition: opacity .3s; }
.phone-how img.swap { opacity: 0; }

/* LANGUAGES */
.langs { padding-top: 120px; padding-bottom: 40px; }
.langs-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.langs-head p { color: var(--muted); max-width: 36ch; }
.lang-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-grid a { display: inline-flex; padding: 12px 20px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; font-size: 16px; transition: border-color .2s, color .2s, transform .2s var(--ease), background .2s; }
.lang-grid a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.lang-grid a.current { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

/* SITUATIONS: ảnh trái chữ phải */
.situations { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-top: 120px; padding-bottom: 40px; }
.phone-tilt { width: min(100%, 320px); justify-self: center; transform: rotate(3deg); }
.sit-copy h2 { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 9px 15px; border-radius: 999px; background: var(--tint); color: var(--deep); font-size: 15px; font-weight: 500; }

/* HABIT: bento lệch */
.habit { padding-top: 120px; padding-bottom: 40px; }
.habit h2 { margin-bottom: 36px; }
.bento { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: 560px; gap: 16px; }
.cell { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.cell-tint { background: var(--tint); border-color: transparent; }
.cell-text { padding: 28px 28px 0; display: grid; gap: 6px; }
.cell-text p { color: var(--muted); }
.cell-shot img { width: 76%; margin: 28px auto 0; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px -20px rgb(13 42 107 / .35);
  transition: transform .6s var(--ease); }
.cell-shot:hover img { transform: translateY(-8px); }
.cell-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cell-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 22 56 / .82), transparent 55%); }
.on-photo { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 28px; color: #f4f7fc; }
.on-photo p { color: rgb(244 247 252 / .82); }

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; padding-top: 120px; padding-bottom: 40px; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: 18px; font-weight: 550; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
details p { color: var(--muted); padding: 0 40px 22px 0; max-width: 62ch; }

/* FINAL CTA */
.final { padding-top: 120px; padding-bottom: 96px; }
.final-box { position: relative; overflow: hidden; border-radius: 40px; padding: clamp(48px, 7vw, 88px) var(--pad); text-align: center;
  display: grid; justify-items: center; gap: 24px; color: var(--accent-fg);
  background: radial-gradient(90% 120% at 50% 0%, #5b97ff 0%, #2366f0 45%, #123c9e 100%); }
.final-box img { border-radius: 22px; box-shadow: 0 18px 40px -16px rgb(0 0 0 / .5); }
.final-box h2 { max-width: 18ch; margin: 0 auto; }
.stores { font-size: 14px; color: rgb(247 250 255 / .8); }
.stores a { color: #fff; }

.footer { max-width: 1200px; margin: 0 auto; padding: 28px var(--pad) 40px; display: flex; justify-content: space-between; gap: 16px;
  color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.footer nav { display: flex; gap: 20px; }

/* Reveal (chỉ khi cho phép motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .phone-tilt.reveal.in { transform: rotate(3deg); }
  .phone-hero { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: rotate(2deg) translateY(-10px); } }
}
@media (prefers-reduced-motion: reduce) {
  .bubble { opacity: 1; transform: none; transition: none; }
  .hero h1 em::after { animation: none; }
}

/* Mobile */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero, .how, .situations, .faq { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-top: 28px; }
  .hero-visual { min-height: 540px; }
  .how .phone-how { order: -1; width: min(72%, 300px); }
  .situations .phone-tilt { width: min(72%, 300px); }
  .bento { grid-template-columns: 1fr; grid-template-rows: none; }
  .cell-photo { min-height: 440px; }
  .cell-shot { max-height: 520px; }
  .faq { gap: 24px; }
  .how, .langs, .situations, .habit, .faq, .final { padding-top: 88px; }
}
@media (max-width: 520px) {
  .btn-sm { padding: 8px 12px; font-size: 13px; }
  .hero h1 { font-size: 40px; }
  .bubble { max-width: 200px; font-size: 14px; padding: 10px 13px; }
  .phone-hero { margin-right: 0; width: 58%; }
  .bubble.you { left: 8%; }
  .proof { gap: 20px; }
  .footer { flex-direction: column; }
}
