/* 小菠萝中文班 — site styles */

:root {
  --bg: #1b1b1b;
  --bg-2: #232323;
  --bg-3: #2c2c2c;
  --cream: #f5f5f0;
  --text: #d6d6d0;
  --muted: #9a9a94;
  --teal: #0e8a7c;
  --teal-2: #14a695;
  --coral: #fd6262;
  --gold: #d9b26a;
  --line: rgba(245, 245, 240, 0.12);
  --radius: 18px;
  --max: 1120px;
  --font-cn: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-head: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-en: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en), var(--font-cn);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh"] body { font-family: var(--font-cn); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--cream); font-weight: 600; line-height: 1.3; margin: 0 0 0.6em; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4 { font-family: var(--font-en); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.eyebrow { color: var(--gold); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.78rem; font-family: var(--font-en); margin-bottom: 1rem; }
.lead { font-size: 1.1rem; color: var(--text); }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.center { text-align: center; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 27, 27, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.04em; }
.brand svg { width: 38px; height: 38px; }
.brand .en { font-family: var(--font-en); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; line-height: 1.1; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 0.95rem; color: var(--text); position: relative; padding: 6px 0; transition: color 0.2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.nav a:hover, .nav a.active { color: var(--cream); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.btn { padding: 9px 18px; color: var(--bg); }
.nav .btn::after { display: none; }
.lang-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 6px; display: flex; gap: 2px; cursor: pointer; font-family: var(--font-en); font-size: 0.75rem;
}
.lang-toggle span { padding: 3px 9px; border-radius: 999px; transition: 0.2s; }
.lang-toggle span.on { background: var(--cream); color: var(--bg); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--cream); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--cream); margin: 4px auto; transition: 0.25s; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 500; font-size: 0.95rem;
  background: var(--cream); color: var(--bg); border: 1px solid var(--cream);
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.btn.ghost { background: transparent; color: var(--cream); }
.btn.ghost:hover { background: rgba(245,245,240,0.08); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.teal:hover { background: var(--teal-2); }
.btn.sm { padding: 9px 18px; font-size: 0.85rem; }

/* hero */
.hero { position: relative; overflow: hidden; min-height: 82vh; display: flex; align-items: center; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60% 70% at 20% 30%, rgba(14,138,124,0.22), transparent 70%),
  radial-gradient(40% 50% at 85% 80%, rgba(217,178,106,0.14), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { margin-bottom: 0.5em; }
.hero h1 .sig { display: block; font-size: 0.55em; color: var(--gold); font-weight: 400; margin-top: 0.4em; letter-spacing: 0.06em; }
.hero .lead { max-width: 34em; margin-bottom: 2rem; }
.hero-art { position: relative; aspect-ratio: 4 / 5; border-radius: 200px 200px 28px 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
.hero-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(245,245,240,0.15); border-radius: inherit; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* cards & grids */
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(245,245,240,0.25); background: var(--bg-3); }
.card .icon { width: 44px; height: 44px; margin-bottom: 18px; }
.card .icon svg { width: 100%; height: 100%; }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; color: var(--text); font-size: 0.97rem; }

/* split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .art { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.45); aspect-ratio: 1; }
.split .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.split .art:hover img { transform: scale(1.04); }

/* grade list */
.grades { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
.grades li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; font-size: 0.97rem; }
.grades li .n { font-family: var(--font-en); font-size: 0.72rem; color: var(--gold); letter-spacing: 0.1em; min-width: 2.2em; }
.grades li.ap { border-color: rgba(14,138,124,0.5); }
.grades li.ap .n { color: var(--teal-2); }

/* band with image */
.band { position: relative; overflow: hidden; }
.band .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.35; }
.band .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(27,27,27,0.3) 50%, var(--bg) 100%); }
.band .wrap { position: relative; }

/* CTA */
.cta { text-align: center; padding: 110px 0; }
.cta h2 { margin-bottom: 0.5em; }
.cta p { max-width: 36em; margin: 0 auto 2rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: #161616; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-family: var(--font-en); font-weight: 500; margin-bottom: 14px; }
.site-footer a:hover { color: var(--cream); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 0.95rem; }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 16px; font-size: 0.82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* page hero (inner pages) */
.page-hero { padding: 88px 0 56px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 80% 20%, rgba(14,138,124,0.18), transparent 70%); }
.page-hero .wrap { position: relative; }
.page-hero p { max-width: 40em; }

/* course objectives */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 80px 1fr; gap: 20px; padding: 22px 26px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; align-items: start; transition: border-color 0.25s, transform 0.25s; }
.timeline li:hover { border-color: rgba(217,178,106,0.5); transform: translateX(4px); }
.timeline .g { font-family: var(--font-en); color: var(--gold); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 4px; }
.timeline .g b { display: block; font-size: 1.6rem; color: var(--cream); font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.timeline h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline p { margin: 0; font-size: 0.95rem; }
.timeline li.ap { border-color: rgba(14,138,124,0.5); background: linear-gradient(135deg, rgba(14,138,124,0.14), var(--bg-2)); }
.timeline li.ap .g { color: var(--teal-2); }
.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.08em; background: rgba(14,138,124,0.2); color: var(--teal-2); border-radius: 999px; padding: 3px 10px; font-family: var(--font-en); margin-left: 8px; vertical-align: middle; }

.quote-block { border-left: 2px solid var(--gold); padding: 8px 0 8px 28px; font-family: var(--font-head); font-size: 1.15rem; color: var(--cream); max-width: 40em; }
html[lang="en"] .quote-block { font-family: var(--font-en); font-weight: 300; }

/* testimonials */
.masonry { columns: 2; column-gap: 24px; }
.masonry .t { break-inside: avoid; margin-bottom: 24px; }
.t { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 26px; position: relative; }
.t::before { content: "“"; position: absolute; top: 8px; right: 22px; font-family: Georgia, serif; font-size: 4rem; color: rgba(217,178,106,0.25); line-height: 1; }
.t p { font-size: 0.97rem; margin-bottom: 18px; }
.t .who { display: flex; align-items: center; gap: 12px; }
.t .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--gold)); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 0.9rem; font-family: var(--font-en); }
.t .name { color: var(--cream); font-weight: 500; font-size: 0.92rem; }
.t .role { color: var(--muted); font-size: 0.8rem; }

/* showcase */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.work .item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.25s, border-color 0.25s; display: flex; flex-direction: column; }
.work .item:hover { transform: translateY(-4px); border-color: rgba(245,245,240,0.25); }
.work .thumb { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.work .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.work .item:hover .thumb img { transform: scale(1.05); }
.work .num { position: absolute; top: 16px; left: 16px; background: rgba(27,27,27,0.75); backdrop-filter: blur(6px); color: var(--gold); font-family: var(--font-en); font-size: 0.75rem; letter-spacing: 0.14em; padding: 5px 10px; border-radius: 999px; }
.work .body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work .body h3 { margin: 0; }
.work .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.link-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.85rem; color: var(--cream); transition: 0.2s; }
.link-pill:hover { border-color: var(--gold); color: var(--gold); }
.link-pill svg { width: 14px; height: 14px; }

/* video */
.video-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.video-frame video { width: 100%; display: block; aspect-ratio: 16 / 9; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.info-list .ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(14,138,124,0.18); color: var(--teal-2); display: grid; place-items: center; flex-shrink: 0; }
.info-list .ic svg { width: 18px; height: 18px; }
.info-list .lab { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-en); }
.info-list .val { color: var(--cream); font-size: 1.02rem; word-break: break-all; }
.note { background: linear-gradient(135deg, rgba(217,178,106,0.12), var(--bg-2)); border: 1px solid rgba(217,178,106,0.35); border-radius: 14px; padding: 22px 24px; font-size: 0.95rem; }
.note h3 { font-size: 1rem; margin-bottom: 6px; color: var(--gold); }
.note p { margin: 0; }

form.enroll { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
form.enroll h3 { margin-bottom: 6px; }
form.enroll .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.85rem; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--cream); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(20,166,149,0.2); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-msg { margin-top: 14px; font-size: 0.9rem; min-height: 1.4em; }
.form-msg.ok { color: var(--teal-2); }
.form-msg.err { color: var(--coral); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; } .reveal.d2 { transition-delay: 0.2s; } .reveal.d3 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* responsive */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; aspect-ratio: 4 / 4.6; }
  .split, .contact-grid, .work, .grid.three, .grid.two { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .nav { position: fixed; inset: 74px 0 auto 0; background: rgba(22,22,22,0.97); flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: 0.25s; }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 14px; justify-content: center; border-bottom: none; }
  .nav .lang-toggle { margin-top: 14px; align-self: flex-start; }
  .menu-btn { display: block; }
  .menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-btn.open span:nth-child(2) { opacity: 0; }
  .menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hdr-lang { display: none; }
  .grades { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .field-row { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .brand { font-size: 1.1rem; }
}
@media (min-width: 761px) { .nav .lang-toggle { display: none; } }
