:root {
  color-scheme: light;
  --black: #000;
  --white: #fff;
  --panel: #fafafa;
  --home-panel: #f5f5f7;
  --muted: #6e6e73;
  --accent: #3aa6f0;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--white); }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  color: var(--black);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { color: var(--black); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}

button, input { font: inherit; }

img { max-width: 100%; }

.logo-mark { display: block; width: 22px; height: auto; }
.footer-logo { width: 18px; }

.home-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  pointer-events: none;
}

.home-nav {
  width: max-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 12px 34px 14px;
  border-radius: 0 0 22px 22px;
  background: #000;
  white-space: nowrap;
  pointer-events: auto;
}

.home-nav a { color: rgba(255,255,255,.8); font-size: 13px; transition: color .2s ease; }
.home-nav a:hover { color: #fff; }

.product-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.product-nav {
  max-width: 1080px;
  height: 44px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-nav > a { display: flex; align-items: center; }
.product-nav-links { display: flex; gap: 30px; font-size: 13px; }
.product-nav-links a { transition: color .2s ease; }
.product-nav-links a[aria-current="page"] { color: #000; font-weight: 600; }

@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pullUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

.home-stack { position: relative; display: grid; gap: 12px; background: #fff; }

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  padding: 150px 22px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #000;
  color: #fff;
  animation: heroIn .9s ease both;
}

.home-hero video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.32), rgba(0,0,0,.18) 45%, rgba(0,0,0,.62));
  pointer-events: none;
}

.hero-lines { display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-brand {
  position: absolute;
  top: 10px;
  left: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  animation: pullUp .7s cubic-bezier(.16,1,.3,1) .05s both;
  color: #fff;
  pointer-events: auto;
}
.home-brand span { color: #fff; font-size: 18px; font-weight: 600; }
.home-brand .logo-mark { width: 20px; }
.home-title {
  max-width: 16em;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: .06em;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.02em;
}
.home-title span { display: inline-block; white-space: nowrap; opacity: 0; animation: pullUp .7s cubic-bezier(.16,1,.3,1) both; }
.home-title span:nth-child(1) { animation-delay: .18s; }
.home-title span:nth-child(2) { animation-delay: .26s; }
.home-title span:nth-child(3) { animation-delay: .34s; }
.home-title span:nth-child(4) { animation-delay: .42s; }
.hero-tabs { margin-top: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; opacity: 0; animation: pullUp .7s cubic-bezier(.16,1,.3,1) .55s both; }
.pill {
  box-sizing: border-box;
  height: 44px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  background: transparent;
  color: rgba(255,255,255,.9);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.pill:hover { transform: translateY(-1px); background: rgba(255,255,255,.16); border-color: #fff; color: #fff; }
.pill[aria-pressed="true"] { border-color: #fff; background: #fff; color: #000; }
.pill[aria-pressed="true"]:hover { background: rgba(255,255,255,.88); color: #000; }
.tab-description {
  min-height: 1.7em;
  max-width: 24em;
  margin: 24px 0 0;
  color: rgba(255,255,255,.86);
  font-size: 19px;
  line-height: 1.7;
  text-wrap: pretty;
  opacity: 0;
  animation: pullUp .7s cubic-bezier(.16,1,.3,1) .68s both;
}
.tab-description.is-changing { animation: tabSwap .32s ease both; }
@keyframes tabSwap { 0% { opacity: .25; transform: translateY(4px); } 100% { opacity: 1; transform: translateY(0); } }

.home-tile { background: var(--home-panel); text-align: center; }
.eyebrow { margin: 0; color: var(--muted); font-size: 17px; }
.product-tile { display: block; padding: 72px 22px 0; overflow: hidden; }
.product-meta span { margin: 0 6px; color: #b1b1b6; }
.product-meta strong { color: #000; font-weight: 600; }
#teaching-products, #self-study-products { scroll-margin-top: 12px; }
.product-tile .tile-title { margin: 12px 0 0; color: #000; font-size: 30px; line-height: 1.26; font-weight: 600; text-wrap: pretty; }
.more { margin: 20px 0 0; color: var(--muted); font-size: 15px; transition: color .25s ease, transform .25s ease; }
.product-tile:hover .more { color: #000; transform: translateX(3px); }
.mobi-preview { max-width: 700px; margin: 44px auto 0; }
.mobi-preview img { border-radius: 14px 14px 0 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair .product-tile { min-height: 560px; padding: 88px 40px 0; display: flex; flex-direction: column; }
.pair .product-tile .tile-title { font-size: 38px; line-height: 1.24; }
.pair .product-tile .more { margin-top: 24px; }
.tile-media { margin-top: auto; padding-top: 56px; }
.tile-media.easystem-media { padding-inline: 8%; }
.tile-media.wordme-media { padding-top: 48px; display: flex; justify-content: center; }
.tile-media img { display: block; width: 100%; border-radius: 14px 14px 0 0; box-shadow: 0 26px 60px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.06); }
.tile-media.wordme-media img { width: 248px; max-width: 62%; border-radius: 20px 20px 0 0; box-shadow: 0 30px 60px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06); }

.shot { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s cubic-bezier(.2,.7,.2,1); }
.home-tile:hover .shot, .product-card:hover .shot { transform: translateY(-6px) scale(1.01); box-shadow: 0 40px 80px rgba(0,0,0,.2), 0 6px 16px rgba(0,0,0,.08); }

.home-end { padding: 176px 22px 192px; text-align: center; }
.end-title { max-width: 22em; margin: 0 auto; font-size: 56px; line-height: 1.16; font-weight: 600; letter-spacing: -.01em; }
.home-end p { max-width: 26em; margin: 24px auto 0; color: var(--muted); font-size: 20px; line-height: 1.6; }

.product-hero {
  position: relative;
  isolation: isolate;
  padding: 132px 22px 148px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  animation: heroIn .9s ease both;
}
.product-hero--mobi { background: #34d6a8; }
.product-hero--easystem { background: #3aa6f0; }
.product-hero--wordme { background: #1f1f22; }
.shader-background { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; }
.shader-background.shader-fallback { background: #111; }
.product-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% 45%, rgba(0,0,0,.5), rgba(0,0,0,.3)), linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.5)); pointer-events: none; }
.product-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.product-brand p { margin: 0; }
.product-brand p:first-child { color: #fff; font-size: 24px; font-weight: 600; }
.product-brand p:last-child { color: rgba(255,255,255,.75); font-size: 16px; }
.product-hero h1 { max-width: 24em; margin: 20px auto 0; font-size: 64px; line-height: 1.14; font-weight: 600; letter-spacing: -.01em; }
.booking-button {
  all: unset;
  box-sizing: border-box;
  margin-top: 44px;
  padding: 14px 28px;
  display: inline-block;
  border-radius: 980px;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-size: 16px;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.booking-button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.22); background: rgba(255,255,255,.9); }
.booking-button--dark { margin-top: 40px; background: #000; color: #fff; }
.booking-button--dark:hover { background: #1d1d1f; box-shadow: 0 12px 32px rgba(0,0,0,.16); }

.product-rail { max-width: 1080px; margin: 0 auto; padding: 12px 22px 0; display: grid; gap: 12px; }
.product-card { min-height: 460px; padding: 56px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: center; gap: 32px; overflow: hidden; border-radius: 22px; background: var(--panel); }
.product-card.media-first { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
.product-card.compact { min-height: 440px; }
.product-card.tall { min-height: 480px; }
.product-card .eyebrow { font-size: 17px; }
.card-head { margin: 10px 0 0; color: #000; font-size: 38px; line-height: 1.2; font-weight: 600; }
.card-copy { max-width: 22em; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.card-media { display: flex; align-items: center; justify-content: center; gap: 20px; }
.card-media img { display: block; border-radius: 14px; box-shadow: 0 26px 60px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.06); }
.card-media .full { width: 100%; }
.card-media .wide60 { width: calc(60% - 10px); }
.card-media .narrow40 { width: calc(40% - 10px); }
.card-media .half { width: calc(50% - 10px); }
.card-media .phone { width: 232px; min-width: 0; flex: 1 1 auto; border-radius: 18px; }
.card-media .phone-single { width: 260px; max-width: 100%; border-radius: 18px; }
.card-media .parent-phone { width: 44%; max-width: 200px; border-radius: 20px; box-shadow: 0 22px 48px rgba(0,0,0,.22); }
.product-end { padding: 160px 22px 176px; text-align: center; }

.site-footer { background: var(--panel); }
.site-footer.home-footer { background: var(--home-panel); }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 32px 22px 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--muted); font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: #000; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 60; padding: 24px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: modalFade .22s ease both; }
.modal-panel { width: 100%; max-width: 520px; padding: 34px 34px 30px; border-radius: 22px; background: #fff; color: #000; box-shadow: 0 40px 90px rgba(0,0,0,.22); animation: modalLift .32s cubic-bezier(.16,1,.3,1) both; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalLift { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-title { margin: 0; font-size: 24px; font-weight: 600; }
.modal-copy { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.modal-close { all: unset; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; color: var(--muted); cursor: pointer; font-size: 18px; transition: color .2s ease, background .2s ease; }
.modal-close:hover { color: #000; background: #f0f0f0; }
.booking-form { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.booking-form input { width: 100%; height: 54px; padding: 0 22px; border: 1px solid #d9d9de; border-radius: 980px; outline: none; background: #fff; color: #000; font-size: 16px; transition: border-color .2s ease, box-shadow .2s ease; }
.booking-form input:focus { border-color: #000; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.form-submit { all: unset; box-sizing: border-box; width: 100%; height: 54px; margin-top: 8px; border-radius: 980px; background: #ebebef; color: #a1a1a8; cursor: not-allowed; font-size: 16px; font-weight: 500; line-height: 54px; text-align: center; transition: background .2s ease, color .2s ease, transform .2s ease; }
.form-submit:not(:disabled) { background: #000; color: #fff; cursor: pointer; }
.form-submit:not(:disabled):hover { transform: translateY(-1px); background: #1d1d1f; }
.form-success { padding: 30px 0 10px; text-align: center; }
.form-success p:first-child { margin: 0; font-size: 18px; font-weight: 600; }
.form-success p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .home-nav { margin: 0 8px 0 auto; padding-inline: 18px; gap: 15px; }
  .home-brand { top: 13px; left: 16px; gap: 6px; }
  .home-brand span { font-size: 13px; }
  .home-brand .logo-mark { width: 15px; }
  .product-hero h1 { font-size: 40px; }
  .end-title { font-size: 36px; }
  .product-card, .product-card.media-first { grid-template-columns: 1fr; min-height: 0; padding: 40px 28px; }
  .product-card > * { order: 0; }
  .card-head { font-size: 30px; }
  .card-media { margin-top: 32px; padding-left: 0; }
  .product-rail { padding-inline: 16px; }
  .pair { grid-template-columns: 1fr; }
  .home-tile { padding: 56px 24px 0; }
  .product-tile .tile-title { font-size: 34px; }
}

@media (max-width: 380px) {
  .home-nav a { font-size: 12px; }
  .product-nav { padding-inline: 16px; }
  .product-nav-links { gap: 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-hero, .product-hero, .home-brand, .home-title span, .hero-tabs, .tab-description { animation: none; opacity: 1; }
  .shot, .pill, .booking-button, .more { transition: none; }
  .home-tile:hover .shot, .product-card:hover .shot, .pill:hover, .booking-button:hover { transform: none; }
}
