:root {
  --color-mist: #EAF4F1;
  --color-pine: #183B37;
  --color-teal: #2E6F6A;
  --color-sand: #D9C7A2;
  --color-ink: #101616;
  --color-ivory: #F7F4EE;
  --color-graphite: #1A2221;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", sans-serif;
  --shadow-soft: 0 18px 40px rgba(16, 22, 22, 0.08);
  --radius: 6px;
  --max: 1120px;
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(46, 111, 106, 0.12), transparent 60%),
    linear-gradient(180deg, var(--color-mist) 0%, #f3f7f5 40%, var(--color-mist) 100%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-teal); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--color-pine); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-pine);
  margin: 0 0 0.75rem;
}

p { margin: 0 0 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn--primary {
  background: var(--color-pine);
  color: var(--color-mist);
  border-color: var(--color-pine);
}

.btn--primary:hover {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
  transform: translateY(-2px);
}

.btn--secondary {
  background: rgba(217, 199, 162, 0.25);
  color: var(--color-pine);
  border-color: var(--color-sand);
}

.btn--secondary:hover {
  background: rgba(217, 199, 162, 0.45);
  transform: translateY(-2px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(234, 244, 241, 0.78);
  border-bottom: 1px solid rgba(24, 59, 55, 0.12);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-pine);
}

.site-header__mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--color-teal);
  box-shadow: 0 0 0 4px rgba(46, 111, 106, 0.15);
}

.site-header__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-header__nav a {
  color: var(--color-pine);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.site-header__nav a:hover { color: var(--color-teal); }

.site-header__cta {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-pine);
  border-radius: var(--radius);
  background: transparent;
}

.site-header__toggle {
  display: none;
  background: none;
  border: 0;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  height: 2px;
  margin: 6px 4px;
  background: var(--color-pine);
}

/* Hero home — asymmetric editorial */
.hero-home {
  padding: 4.5rem 0 3rem;
}

.hero-home__grid {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem 3rem;
  align-items: end;
}

.hero-home__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.hero-home__title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  max-width: 12ch;
  margin-bottom: 1.25rem;
}

.hero-home__lead {
  font-size: 1.12rem;
  max-width: 36ch;
  color: rgba(16, 22, 22, 0.82);
}

.hero-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-home__figure {
  position: relative;
  margin: 0;
}

.hero-home__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(24, 59, 55, 0.18);
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  transition: transform 0.6s ease;
}

.hero-home__caption {
  position: absolute;
  left: -1.25rem;
  bottom: 1.5rem;
  max-width: 14rem;
  padding: 0.85rem 1rem;
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.15);
  font-size: 0.85rem;
  color: var(--color-pine);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

.section {
  padding: 4.5rem 0;
}

.section--offset {
  padding-top: 2rem;
}

.section__head {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 2.25rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  align-items: end;
}

.section__head h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  max-width: 12ch;
}

.section__head p {
  margin: 0;
  color: rgba(16, 22, 22, 0.78);
}

.section__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.card-grid {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-4px); }

.card__media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.card__body p {
  flex: 1;
  font-size: 0.98rem;
  color: rgba(16, 22, 22, 0.8);
}

.card__link {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-pine);
  text-decoration: none;
  border-bottom: 1px solid var(--color-sand);
  align-self: flex-start;
}

.feature-band {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
}

.feature-band__media {
  margin: 0;
}

.feature-band__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 1px solid rgba(24, 59, 55, 0.15);
  box-shadow: var(--shadow-soft);
}

.feature-band--flip .feature-band__media { order: 2; }
.feature-band--flip .feature-band__text { order: 1; }

.quote-strip {
  width: min(100% - 2.5rem, 820px);
  margin: 0 auto;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(24, 59, 55, 0.12);
  border-bottom: 1px solid rgba(24, 59, 55, 0.12);
}

.quote-strip blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  color: var(--color-pine);
  line-height: 1.55;
}

.quote-strip cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-size: 0.92rem;
  color: var(--color-teal);
}

.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero__inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.page-hero__inner h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 16ch;
}

.page-hero__inner p {
  max-width: 42ch;
  font-size: 1.08rem;
}

.page-hero--media {
  padding-bottom: 0;
}

.page-hero--media .page-hero__figure {
  width: min(100%, var(--max));
  margin: 2rem auto 0;
  padding: 0 1.25rem;
}

.page-hero--media img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid rgba(24, 59, 55, 0.14);
}

.prose {
  width: min(100% - 2.5rem, 720px);
  margin: 0 auto;
  padding-bottom: 3.5rem;
}

.prose h2 { margin-top: 2.25rem; font-size: 1.45rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }

.prose--wide {
  width: min(100% - 2.5rem, var(--max));
}

.detail-layout {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2.5rem;
}

.detail-panel {
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.detail-panel dt {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-top: 1rem;
}

.detail-panel dt:first-child { margin-top: 0; }
.detail-panel dd { margin: 0.35rem 0 0; }

.list-check {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.list-check li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--color-teal);
  border-radius: 1px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  padding: 1rem 0 1rem 3rem;
  border-top: 1px solid rgba(24, 59, 55, 0.12);
  position: relative;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1rem;
  font-family: var(--font-serif);
  color: var(--color-teal);
  font-size: 1.1rem;
}

.pricing-table {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 3rem;
  border-collapse: collapse;
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
}

.pricing-table th,
.pricing-table td {
  text-align: left;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(24, 59, 55, 0.1);
  vertical-align: top;
}

.pricing-table th {
  font-family: var(--font-serif);
  color: var(--color-pine);
  background: rgba(46, 111, 106, 0.08);
}

.review-grid {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.review-card {
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.review-card__meta {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-teal);
}

.story-block {
  width: min(100% - 2.5rem, 820px);
  margin: 0 auto 4rem;
  padding: 2rem;
  background: rgba(24, 59, 55, 0.04);
  border-left: 3px solid var(--color-teal);
}

.curriculum-path {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(24, 59, 55, 0.12);
}

.curriculum-path__num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-sand);
  line-height: 1;
}

.contact-layout {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
}

.contact-card {
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  height: fit-content;
}

.form {
  display: grid;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--color-pine);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(24, 59, 55, 0.25);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-ink);
}

.form textarea { min-height: 140px; resize: vertical; }

.form__error {
  color: #8b2e2e;
  font-size: 0.85rem;
  margin: 0;
}

.form-message {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.form-message--success {
  background: rgba(46, 111, 106, 0.12);
  color: var(--color-pine);
  border: 1px solid rgba(46, 111, 106, 0.3);
}

.form-message--error {
  background: rgba(139, 46, 46, 0.08);
  color: #8b2e2e;
  border: 1px solid rgba(139, 46, 46, 0.25);
}

.team-grid {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.14);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.team-card__body { padding: 1.15rem 1.25rem 1.4rem; }
.team-card__role { font-size: 0.88rem; color: var(--color-teal); margin: 0; }

/* Footer */
.site-footer {
  background: var(--color-graphite);
  color: rgba(234, 244, 241, 0.88);
  padding: 4rem 0 0;
  margin-top: 2rem;
}

.site-footer a { color: var(--color-sand); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.site-footer__inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

.site-footer__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--color-mist);
  margin-bottom: 0.75rem;
}

.site-footer__heading {
  font-family: var(--font-serif);
  color: var(--color-mist);
  margin-bottom: 0.85rem;
}

.site-footer__tagline,
.site-footer__note {
  font-size: 0.92rem;
  color: rgba(234, 244, 241, 0.7);
}

.site-footer__contact {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-top: 1.25rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li { margin-bottom: 0.45rem; }

.newsletter-form {
  display: grid;
  gap: 0.55rem;
}

.newsletter-form input {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 199, 162, 0.35);
  background: rgba(255,255,255,0.04);
  color: var(--color-mist);
}

.site-footer__legal {
  border-top: 1px solid rgba(234, 244, 241, 0.12);
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.site-footer__legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
}

.cookie-banner__inner {
  max-width: 920px;
  margin: 0 auto;
  background: var(--color-ivory);
  border: 1px solid rgba(24, 59, 55, 0.2);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
}

.cookie-banner__title {
  font-family: var(--font-serif);
  color: var(--color-pine);
  margin: 0 0 0.35rem;
}

.cookie-banner__text p:last-child { margin: 0; font-size: 0.92rem; }

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-banner__error {
  grid-column: 1 / -1;
  margin: 0;
  color: #8b2e2e;
  font-size: 0.88rem;
}

.fade-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-section.is-visible {
  opacity: 1;
  transform: none;
}

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-page h1 { font-size: 3rem; }

@media (max-width: 900px) {
  .site-header__toggle { display: block; }

  .site-header__nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(234, 244, 241, 0.97);
    border-bottom: 1px solid rgba(24, 59, 55, 0.12);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }

  .site-header__nav[data-open="true"] { display: flex; }
  .site-header__nav a { padding: 0.7rem 0; width: 100%; }

  .hero-home__grid,
  .section__head,
  .feature-band,
  .feature-band--flip .feature-band__media,
  .feature-band--flip .feature-band__text,
  .card-grid,
  .detail-layout,
  .review-grid,
  .contact-layout,
  .team-grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .feature-band--flip .feature-band__media,
  .feature-band--flip .feature-band__text { order: initial; }

  .hero-home__caption { left: 0.75rem; right: 0.75rem; max-width: none; }
  .cookie-banner__inner { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
}
