:root {
  --paper: #f8f5ef;
  --ink: #1d2a2e;
  --muted: #667476;
  --line: #d8d1c4;
  --green: #355f4d;
  --blue: #2b5c7a;
  --brick: #9a4f39;
  --gold: #d9b15f;
  --white: #fffdf8;
  --header-h: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

[data-lang="zh"] [data-en],
[data-lang="en"] [data-zh] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 54px);
  color: var(--white);
  gap: 22px;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-solid {
  background: rgba(248, 245, 239, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(29, 42, 46, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.76rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.05;
}

.brand small {
  color: currentColor;
  opacity: 0.78;
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: clamp(14px, 2.2vw, 30px);
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: auto;
}

nav a {
  position: relative;
  padding: 8px 0;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
}

.language-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
}

.language-switch button.is-active {
  font-weight: 900;
}

.site-header:not(.is-solid) .language-switch button.is-active {
  background: var(--white);
  color: var(--ink);
}

.site-header.is-solid .language-switch button.is-active {
  background: var(--ink);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #17282d;
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 24, 27, 0.78) 0%, rgba(14, 24, 27, 0.48) 38%, rgba(14, 24, 27, 0.18) 100%),
    linear-gradient(0deg, rgba(14, 24, 27, 0.8), rgba(14, 24, 27, 0.04) 45%),
    url("/assets/classroom.jpg") center / cover no-repeat;
  transform: scale(1.03);
  animation: settle 1200ms ease forwards;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: calc(var(--header-h) + 60px) clamp(22px, 6vw, 72px) 72px;
  color: var(--white);
  animation: rise 720ms ease 120ms both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brick);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7.5vw, 6.6rem);
  max-width: 12ch;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.4rem);
  max-width: 13ch;
}

[data-lang="zh"] h1,
[data-lang="zh"] h2 {
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 800;
}

h3 {
  font-size: 1.08rem;
}

.lead {
  max-width: 600px;
  margin: 24px 0 0;
  color: rgba(255, 253, 248, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.section-note {
  max-width: 430px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--gold);
  color: #17282d;
}

.button.secondary {
  border: 1px solid rgba(255, 253, 248, 0.7);
  color: var(--white);
}

.notice-band {
  padding: 18px clamp(22px, 6vw, 72px);
  background: var(--green);
  color: var(--white);
}

.notice-band p {
  margin: 0;
  max-width: 1080px;
}

.section {
  padding: clamp(70px, 10vw, 132px) clamp(22px, 6vw, 72px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) minmax(280px, 1fr);
  gap: clamp(34px, 7vw, 90px);
}

.program-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.program-list article {
  min-height: 220px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.program-list article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.program-list span {
  color: var(--brick);
  font-weight: 900;
  font-size: 0.78rem;
}

.program-list h3 {
  margin-top: 28px;
}

.program-list p,
.event-row p,
.split p,
.news-grid p,
.hours p,
footer p {
  color: var(--muted);
}

.calendar {
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 38px;
}

.event-table {
  border-top: 2px solid var(--ink);
}

.event-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.event-row time {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.event-row time small {
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
}

.event-row p {
  margin: 8px 0 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.85fr);
  gap: clamp(34px, 8vw, 110px);
  align-items: start;
}

.split p {
  max-width: 660px;
  font-size: 1.12rem;
}

.facts {
  margin: 0;
  border-top: 2px solid var(--ink);
}

.facts div {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--brick);
  font-weight: 900;
}

.facts dd {
  margin: 8px 0 0;
  font-size: 1.05rem;
}

.news {
  background: #e7edf0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(29, 42, 46, 0.18);
}

.news-grid article {
  min-height: 260px;
  padding: 26px;
  background: #f6f8f8;
  transition: transform 180ms ease, background 180ms ease;
}

.news-grid article:hover {
  transform: translateY(-4px);
  background: var(--white);
}

.news-grid time {
  color: var(--blue);
  font-weight: 800;
  font-size: 0.84rem;
}

.news-grid h3 {
  margin-top: 28px;
}

.contact {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: clamp(34px, 8vw, 120px);
  padding: clamp(70px, 10vw, 120px) clamp(22px, 6vw, 72px);
  background: var(--ink);
  color: var(--white);
}

address {
  margin-top: 28px;
  color: rgba(255, 253, 248, 0.82);
  font-style: normal;
  font-size: 1.1rem;
}

.hours {
  border-top: 2px solid var(--gold);
  padding-top: 24px;
}

.hours p {
  color: rgba(255, 253, 248, 0.78);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(22px, 6vw, 72px);
  background: #121d20;
  color: rgba(255, 253, 248, 0.74);
  font-size: 0.85rem;
}

footer p {
  margin: 0;
  color: inherit;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle {
  to {
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 70px;
  }

  .site-header {
    height: auto;
    min-height: var(--header-h);
    align-items: center;
    flex-wrap: wrap;
    padding: 0 18px;
    row-gap: 4px;
  }

  nav {
    gap: 12px;
    font-size: 0.78rem;
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 8px;
  }

  .brand small {
    display: none;
  }

  .language-switch {
    margin-left: auto;
  }

  .language-switch button {
    padding: 7px 8px;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-copy {
    padding: calc(var(--header-h) + 42px) 22px 46px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .intro,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .program-list,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .program-list article:nth-child(odd) {
    border-right: 0;
  }

  .section-heading {
    display: block;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  footer {
    display: block;
  }

  footer p + p {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
