/* Trang chủ grooedu.com — chỉ nạp ở trang chủ */
.home {
  --blue: #1487c4;
  --blue-2: #2aa6e6;
  --blue-deep: #0d5f8e;
  --sun: #ffd43b;
  --display: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
}
.home-main { padding: 0; }

/* đầu trang nằm đè lên khối xanh */
.home .top { position: absolute; left: 0; right: 0; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.home .top .nav a, .home .top .lang { color: #fff; }
.home .top .nav a:hover { color: var(--sun); }
.home .top .lang { border-color: rgba(255, 255, 255, .45); }

.home h1, .home h2, .home h3 { font-family: var(--display); letter-spacing: -0.01em; }

/* ---------------- đầu trang ---------------- */
.h-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(120% 90% at 85% 10%, #4ec5ff 0%, var(--blue-2) 35%, var(--blue) 70%, var(--blue-deep) 100%);
  padding: 128px 0 140px;
}
.h-pattern {
  position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image:
    radial-gradient(circle at 0 100%, transparent 26px, #fff 27px, #fff 29px, transparent 30px),
    radial-gradient(circle at 100% 100%, transparent 26px, #fff 27px, #fff 29px, transparent 30px);
  background-size: 60px 30px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 35%, #000 70%, transparent);
}
.h-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-weight: 700; font-size: 14px; }
.h-hero h1 { font-size: clamp(42px, 5.2vw, 74px); line-height: 1; margin: 0 0 22px; font-weight: 800; }
.h-hero h1 span { display: block; white-space: nowrap; }
@media (max-width: 400px) { .h-hero h1 span { white-space: normal; } }
.h-hero h1 mark { background: none; color: var(--sun); position: relative; white-space: nowrap; }
.h-hero h1 mark::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .14em; border-radius: 99px; background: rgba(255, 212, 59, .45); z-index: -1; }
.h-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; max-width: 520px; margin: 0 0 30px; color: rgba(255, 255, 255, .92); }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn-white, .btn-ghost {
  display: inline-flex; align-items: center; height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 800; font-size: 16px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-white { background: #fff; color: var(--blue-deep); box-shadow: 0 10px 24px rgba(4, 52, 84, .25); }
.btn-white:hover { color: var(--blue-deep); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(4, 52, 84, .3); }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .6); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* cụm ảnh app bên phải */
.h-hero-art { position: relative; height: 520px; }
.hero-shot { position: absolute; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(3, 40, 66, .35); }
.hero-shot img { display: block; width: 100%; height: auto; }
.hs-phone { border-radius: 34px; border: 8px solid #10151b; }
.hs0 { width: 210px; left: 34%; top: 10px; z-index: 3; transform: rotate(4deg); }
.hs1 { width: 190px; left: 6%; top: 70px; z-index: 2; transform: rotate(-6deg); }
.hs-browser { width: 380px; left: 16%; top: 330px; z-index: 1; transform: rotate(-2deg); border-radius: 14px; }
.hs2.hs-browser { left: 30%; top: 300px; z-index: 4; }
.hs2.hs-phone { width: 190px; left: auto; right: 4%; top: 80px; z-index: 2; transform: rotate(6deg); }
.float-icon { position: absolute; z-index: 5; border-radius: 26px; box-shadow: 0 14px 28px rgba(3, 40, 66, .35); animation: bob 5s ease-in-out infinite; }
.float-icon img { display: block; width: 78px; height: 78px; border-radius: 22px; }
.fi0 { right: 2%; top: 30px; }
.fi1 { left: 0; top: 290px; animation-delay: -1.6s; }
.fi2 { right: 8%; top: 300px; animation-delay: -3.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; display: block; }
.wave.flip { top: -1px; bottom: auto; transform: scaleY(-1); }

/* ---------------- danh sách app ---------------- */
.h-apps-intro { text-align: center; padding: 72px 0 8px; }
.h-apps-intro h2 { font-size: clamp(34px, 4.6vw, 52px); margin: 0 0 8px; font-weight: 800; }
.h-apps-intro p { color: var(--muted); font-size: 18px; margin: 0; }

.h-app { position: relative; padding: 72px 0; }
.h-app.alt { background: color-mix(in srgb, var(--app) 7%, var(--bg)); }
.h-app-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.h-app.alt .h-app-copy { order: 2; }
.app-name { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.app-name img { border-radius: 16px; box-shadow: 0 8px 18px color-mix(in srgb, var(--app) 35%, transparent); }
.app-name span { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 4.4vw, 52px); line-height: 1; color: var(--app); letter-spacing: -0.02em; }
.h-app h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; margin: 0 0 22px; font-weight: 800; }
.h-app .kicker { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--app); background: color-mix(in srgb, var(--app) 12%, transparent); }
.feat { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.feat li { position: relative; padding-left: 32px; line-height: 1.55; color: var(--muted); }
.feat li strong { color: var(--text); }
.feat li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--app) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.app-note { margin: 0 0 6px; font-weight: 700; color: var(--app); }
.app-platforms { margin: 0 0 22px; font-size: 14px; color: var(--muted); font-weight: 600; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.btn-app { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--app); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 10px 22px color-mix(in srgb, var(--app) 35%, transparent); transition: transform .15s ease; }
.btn-app:hover { color: #fff; transform: translateY(-2px); }
.store-badge { display: inline-flex; line-height: 0; transition: transform .15s ease; }
.store-badge img { height: 48px; width: auto; display: block; }
.store-badge:hover { transform: translateY(-2px); }
.btn-store { display: inline-flex; flex-direction: column; justify-content: center; height: 48px; padding: 0 18px; border-radius: 12px; background: #111; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.1; }
.btn-store small { font-size: 10.5px; font-weight: 500; opacity: .85; }
.btn-store:hover { color: #fff; background: #000; }
.btn-soon { display: inline-flex; align-items: center; height: 48px; padding: 0 20px; border-radius: 999px; border: 2px dashed color-mix(in srgb, var(--app) 55%, transparent); color: var(--app); font-weight: 800; }
.link-help { font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; margin-left: 4px; }
.link-help:hover { color: var(--app); }

/* mockup */
.mock { position: relative; }
.mock::before { content: ''; position: absolute; inset: 8% 4%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--app) 28%, transparent), transparent); filter: blur(10px); z-index: 0; }
.mock-phones { display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 520px; }
.phone { position: relative; z-index: 1; width: 230px; border-radius: 38px; border: 9px solid #10151b; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(20, 16, 19, .25); }
.phone img { display: block; width: 100%; height: auto; }
.ph0 { z-index: 2; transform: translateY(-10px); }
.ph1 { margin-left: -46px; transform: translateY(24px) rotate(5deg) scale(.92); }
.ph2 { display: none; }
.mock-posters { display: flex; justify-content: center; min-height: 520px; align-items: center; }
.poster { position: relative; z-index: 1; width: 220px; height: auto; border-radius: 26px; box-shadow: 0 26px 50px rgba(20, 16, 19, .22); }
.poster.p0 { z-index: 3; }
.poster.p1 { margin-left: -60px; transform: rotate(5deg) translateY(30px) scale(.94); z-index: 2; }
.poster.p2 { margin-left: -60px; transform: rotate(9deg) translateY(60px) scale(.88); }
.mock-browser { min-height: 440px; display: flex; flex-direction: column; justify-content: center; }
.browser { position: relative; z-index: 1; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(20, 16, 19, .22); border: 1px solid rgba(0, 0, 0, .06); }
.browser img { display: block; width: 100%; height: auto; }
.browser.second { width: 78%; margin: -18% 0 0 auto; transform: rotate(2deg); z-index: 2; }
.browser-bar { display: flex; gap: 6px; padding: 9px 12px; background: #f1edef; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9d1d5; }
.browser-bar i:first-child { background: #ff6b5e; }
.browser-bar i:nth-child(2) { background: #ffbd2e; }
.browser-bar i:nth-child(3) { background: #28c840; }

/* ---------------- cách dạy ---------------- */
.h-how { padding: 84px 0 110px; text-align: center; }
.h-how h2 { font-size: clamp(32px, 4vw, 46px); margin: 0 0 36px; font-weight: 800; }
.how-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.how-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 26px; }
.how-emoji { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #e3f3fc; font-size: 28px; margin-bottom: 14px; }
.how-grid h3 { font-size: 23px; margin: 0 0 6px; font-weight: 800; }
.how-grid p { margin: 0; color: var(--muted); }

/* ---------------- liên hệ ---------------- */
.h-cta { position: relative; color: #fff; text-align: center; background: linear-gradient(135deg, var(--blue-2), var(--blue) 55%, var(--blue-deep)); padding: 150px 0 96px; }
.h-cta h2 { font-size: clamp(32px, 4.4vw, 50px); margin: 0 0 10px; font-weight: 800; }
.h-cta p { margin: 0 0 26px; font-size: 18px; color: rgba(255, 255, 255, .9); }
.h-cta .h-actions { justify-content: center; }
.home .foot { border-top: 0; }

/* hiện dần khi cuộn tới */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-color-scheme: dark) {
  .how-emoji { background: #102a38; }
  .browser-bar { background: #2a2328; }
}
@media (prefers-reduced-motion: reduce) {
  .float-icon { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- màn hình hẹp ---------------- */
@media (max-width: 960px) {
  .h-hero { padding: 104px 0 120px; }
  .h-hero-grid, .h-app-grid { grid-template-columns: 1fr; gap: 28px; }
  .h-hero-art { height: 420px; max-width: 520px; width: 100%; margin: 0 auto; }
  .h-app.alt .h-app-copy { order: 0; }
  .how-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home .top .nav a:first-child { display: none; }
  .h-hero-art { height: 360px; }
  .hs0 { width: 150px; left: 46%; }
  .hs1 { width: 140px; left: 4%; }
  .hs0 { left: 35%; }
  .hs2.hs-phone { width: 140px; right: 4%; top: 60px; }
  .hs-browser { width: 250px; left: 8%; top: 250px; }
  .hs2.hs-browser { left: 14%; top: 235px; }
  .float-icon img { width: 58px; height: 58px; border-radius: 16px; }
  .fi1 { top: 205px; }
  .fi2 { top: 200px; right: 0; }
  .mock-phones, .mock-posters { min-height: 400px; }
  .phone { width: 170px; border-width: 7px; border-radius: 30px; }
  .poster { width: 160px; }
  .h-app { padding: 56px 0; }
}
.app-actions { flex-wrap: nowrap; }
.app-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-weight: 700; font-size: 15px; color: var(--muted); }
.app-links a { color: var(--app); text-decoration: none; }
.app-links a:hover { text-decoration: underline; }
@media (max-width: 380px) { .app-actions { flex-wrap: wrap; } }
