/* EdtechVN: white paper, plum ink, sakura pink and Palingo blue.
   Display: Mochiy Pop One. Text: Zen Maru Gothic. */
:root {
  --paper: #ffffff;
  --ink: #2e2440;
  --ink-soft: #655a78;
  --line: #ece6f2;
  --sakura: #e84f8a;
  --sakura-tint: #fff0f5;
  --sakura-deep: #c2356d;
  --sky: #4651f0;
  --sky-tint: #eef1ff;
  --butter: #ffd467;
  --butter-tint: #fff8e3;
  --mint-tint: #e9f7f0;
  --display: "Mochiy Pop One", "Zen Maru Gothic", system-ui, sans-serif;
  --text: "Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.01em; }
.brand img { height: 46px; width: auto; flex: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); font-weight: 700; font-size: 0.98rem; }
.nav a { text-decoration: none; padding: 6px 2px; }
.nav a:hover { color: var(--sakura-deep); }
@media (max-width: 520px) { .nav a.nav-extra { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid var(--ink); background: var(--ink); color: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(46, 36, 64, 0.16); }
.btn.quiet { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(20px, 4vw, 56px); padding-block: clamp(32px, 6vw, 72px) clamp(40px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); line-height: 1.22; }
.hero .lede { margin-top: 22px; font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 34em; }
.hero .btn-row { margin-top: 30px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 520px; margin-inline: auto; }
}

/* Petals: the one piece of ambient motion on the site */
.petals { position: absolute; inset: 0; pointer-events: none; }
.petals i { position: absolute; top: -24px; width: 14px; height: 11px; background: #f8a9c6; border-radius: 80% 10% 80% 10%; opacity: 0.8; animation: fall linear infinite; }
.petals i:nth-child(1) { left: 8%; animation-duration: 15s; animation-delay: -3s; }
.petals i:nth-child(2) { left: 31%; animation-duration: 19s; animation-delay: -11s; width: 10px; height: 8px; }
.petals i:nth-child(3) { left: 52%; animation-duration: 17s; animation-delay: -7s; background: #ffc9da; }
.petals i:nth-child(4) { left: 74%; animation-duration: 21s; animation-delay: -15s; }
.petals i:nth-child(5) { left: 92%; animation-duration: 16s; animation-delay: -1s; width: 10px; height: 8px; background: #ffc9da; }
@keyframes fall {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-90px, 760px, 0) rotate(300deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals { display: none; }
  .btn { transition: none; }
}

/* Sections */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; }

/* App panels: tinted, with a scalloped top edge like a cloud or a lace doily */
.app { --tint: var(--sakura-tint); --accent: var(--sakura-deep); position: relative; background: var(--tint); border-radius: 0 0 36px 36px; margin-top: 22px; padding: clamp(28px, 4.5vw, 60px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.app::before { content: ""; position: absolute; left: 0; right: 0; top: -21px; height: 22px; background: radial-gradient(circle at 22px 22px, var(--tint) 21.5px, transparent 22px) 0 0 / 44px 22px repeat-x; }
.app + .app { margin-top: clamp(64px, 8vw, 96px); }
.app.palingo { --tint: var(--sky-tint); --accent: var(--sky); }
.app.palexa { --tint: #fff3e8; --accent: #c8501c; }
.app.flip .app-shots { order: -1; }
.app-title { display: flex; align-items: center; gap: 16px; }
.app-title img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 0 rgba(46, 36, 64, 0.1); flex: none; }
.app-title h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.app-title p { color: var(--accent); font-weight: 700; margin-top: 2px; }
.app-copy > p { margin-top: 20px; max-width: 32em; }
.facts { margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding-top: 10px; border-top: 2px dotted rgba(46, 36, 64, 0.18); }
.facts dt { font-weight: 700; color: var(--accent); }
.facts dd { margin: 0; }
.app .btn-row { margin-top: 28px; }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 18px; border-radius: 999px; background: #fff; font-weight: 700; border: 2px dashed var(--accent); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--butter); box-shadow: 0 0 0 3px rgba(255, 212, 103, 0.4); }
.app-note { margin-top: 14px; font-size: 0.95rem; color: var(--ink-soft); }
.app-note a { font-weight: 700; color: var(--accent); }

.app-shots { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.phone { width: 44%; max-width: 230px; border-radius: 26px; border: 6px solid #fff; box-shadow: 0 14px 30px rgba(46, 36, 64, 0.16); overflow: hidden; background: #fff; position: relative; }
.phone img { width: 100%; aspect-ratio: 6 / 13; object-fit: cover; object-position: top; }
.phone.side { width: 36%; max-width: 188px; }
.phone.left { transform: rotate(-6deg) translateX(18%); }
.phone.right { transform: rotate(6deg) translateX(-18%); }
.phone.mid { z-index: 2; }
.mascot { position: absolute; z-index: 3; width: clamp(110px, 30%, 170px); right: -2%; bottom: -8%; filter: drop-shadow(0 8px 10px rgba(46, 36, 64, 0.12)); }
.app.flip .mascot { right: auto; left: -3%; transform: scaleX(-1); }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; border-radius: 0 0 28px 28px; }
  .app.flip .app-shots { order: 0; }
  .app-shots { min-height: 0; padding-block: 8px 24px; }
}
@media (max-width: 420px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* How we make apps */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(32px, 6vw, 80px); margin: 0; padding: 0; list-style: none; }
.ways li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; }
.ways .dot { width: 52px; height: 52px; border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; display: grid; place-items: center; }
.ways .dot svg { width: 26px; height: 26px; }
.ways li:nth-child(1) .dot { background: var(--butter-tint); }
.ways li:nth-child(2) .dot { background: var(--sky-tint); }
.ways li:nth-child(3) .dot { background: var(--sakura-tint); }
.ways li:nth-child(4) .dot { background: var(--mint-tint); }
.ways h3 { font-size: 1.25rem; }
.ways p { margin-top: 8px; color: var(--ink-soft); }
@media (max-width: 720px) { .ways { grid-template-columns: 1fr; } }

/* Company */
.company { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.company img { mix-blend-mode: multiply; max-width: 420px; width: 100%; margin-inline: auto; }
.company h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.company p { margin-top: 16px; color: var(--ink-soft); max-width: 34em; }
.details { margin: 26px 0 0; display: grid; gap: 10px; }
.details div { display: grid; grid-template-columns: 8em 1fr; gap: 12px; padding-top: 10px; border-top: 2px dotted var(--line); }
.details dt { font-weight: 700; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details a { color: var(--sakura-deep); font-weight: 700; }
@media (max-width: 820px) {
  .company { grid-template-columns: 1fr; }
  .company img { max-width: 300px; }
}
@media (max-width: 420px) { .details div { grid-template-columns: 1fr; gap: 2px; } }

/* Footer */
.site-footer { border-top: 2px dotted var(--line); padding-block: 32px 44px; font-size: 0.97rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 700; }
.site-footer a { text-decoration: none; color: var(--ink); }
.site-footer a:hover { color: var(--sakura-deep); }

/* Legal pages */
.legal-head { background: var(--sakura-tint); position: relative; padding-block: clamp(36px, 6vw, 64px) clamp(44px, 6vw, 72px); }
.legal-head.sky { background: var(--sky-tint); }
.legal-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; background: radial-gradient(circle at 22px 22px, var(--paper) 21.5px, transparent 22px) 0 0 / 44px 22px repeat-x; }
.legal-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.legal-head p { margin-top: 14px; color: var(--ink-soft); max-width: 40em; }
.legal-head .dates { font-weight: 700; color: var(--ink); }
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px); align-items: start; }
.toc { position: sticky; top: 92px; font-size: 0.95rem; }
.toc h2 { font-family: var(--text); font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 6px; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--sakura-deep); text-decoration: underline; }
.doc { max-width: 44em; counter-reset: sec; }
.doc section { scroll-margin-top: 92px; }
.doc section + section { margin-top: 44px; }
.doc h2 { font-size: 1.45rem; counter-increment: sec; }
.doc h2::before { content: counter(sec) ". "; color: var(--sakura-deep); }
.doc h3 { font-family: var(--text); font-weight: 700; font-size: 1.1rem; margin-top: 24px; }
.doc p, .doc ul, .doc table { margin-top: 14px; }
.doc ul { padding-left: 1.3em; display: grid; gap: 8px; }
.doc li::marker { color: var(--sakura); }
.doc a { color: var(--sakura-deep); font-weight: 700; overflow-wrap: anywhere; }
.doc .summary { background: var(--butter-tint); border-radius: 22px; padding: 22px 26px; margin-bottom: 44px; }
.doc .summary h2 { font-size: 1.2rem; counter-increment: none; }
.doc .summary h2::before { content: none; }
.table-scroll { overflow-x: auto; margin-top: 14px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.97rem; margin-top: 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 2px dotted var(--line); }
.doc th { font-weight: 700; background: var(--sakura-tint); }
.doc address { font-style: normal; margin-top: 14px; }
@media (max-width: 860px) {
  .legal { grid-template-columns: 1fr; }
  .toc { position: static; background: #faf8fc; border-radius: 20px; padding: 18px 22px; }
}
