@font-face {
  font-family: "Terence";
  src: url("../assets/fonts/TerenceFont-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1a1a2e;
  --ink-soft: #343648;
  --gold: #c9a24f;
  --gold-dark: #886821;
  --paper: #fbfbf8;
  --white: #ffffff;
  --mist: #eef2f1;
  --teal: #356a64;
  --red: #c5221f;
  --line: #d9d9d2;
  --muted: #666978;
  --shadow: 0 14px 35px rgba(26, 26, 46, 0.1);
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  transform: translateY(-150%);
  padding: 9px 14px;
  background: var(--white);
  border: 1px solid var(--ink);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: rgba(251, 251, 248, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(26, 26, 46, 0.06);
}

.header-inner {
  width: min(calc(100% - 40px), var(--content));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
}

.brand span {
  font-family: "Terence", "Segoe UI", sans-serif;
  font-size: 27px;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav a {
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:not(.nav-youtube):hover {
  color: var(--gold-dark);
}

.nav-youtube {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
}

.nav-youtube svg {
  width: 17px;
  height: 17px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.hero-art {
  position: absolute;
  top: -18%;
  right: 0;
  width: 58%;
  height: 136%;
  background-image: url("../assets/images/hero-taiji.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--content));
  min-height: 610px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 70px 0 76px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.featured-copy h2,
.study-intro h2,
.source-heading h2,
.about-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

.hero h1 {
  max-width: 720px;
  font-size: 72px;
}

.hero-lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.55;
}

.hero-chinese {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 15px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  color: var(--white);
  background: var(--ink);
}

.button-primary:hover {
  background: var(--teal);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.button-youtube {
  color: var(--white);
  background: var(--red);
}

.difference-band {
  background: var(--ink);
  color: var(--white);
}

.difference-inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 82px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.difference-inner strong {
  color: #f1d486;
}

.section {
  padding: 104px 0;
}

.section-inner,
.footer-inner {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
}

.featured {
  background: var(--mist);
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: 64px;
}

.featured-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(26, 26, 46, 0.12);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.featured-media img,
.lesson-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-media img {
  transition: transform 300ms ease;
}

.featured-media:hover img {
  transform: scale(1.015);
}

.play-control {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #f1d486;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(26, 26, 46, 0.28);
}

.play-control svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.featured-copy h2,
.section-heading h2,
.study-intro h2,
.source-heading h2,
.about-copy h2 {
  font-size: 46px;
}

.featured-copy > p:not(.section-kicker),
.section-heading > p:not(.section-kicker),
.study-intro > p:not(.section-kicker) {
  color: var(--muted);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.lesson-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lesson-meta svg {
  width: 16px;
  height: 16px;
}

.text-link,
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover,
.card-link:hover {
  color: var(--gold-dark);
}

.text-link svg,
.card-link svg {
  width: 16px;
  height: 16px;
}

.lessons-section {
  background: var(--paper);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading > p:last-child {
  max-width: 680px;
  margin: 20px 0 0;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.lesson-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.lesson-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}

.lesson-image img {
  transition: transform 250ms ease;
}

.lesson-card:hover .lesson-image img {
  transform: scale(1.025);
}

.lesson-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
}

.lesson-number {
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.lesson-body h3,
.benefit-item h3,
.study-item h3,
.faith-note h3 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.lesson-body p {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.lesson-body .card-link {
  margin-top: auto;
}

.channel-cta {
  margin-top: 40px;
  padding: 26px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.channel-cta p {
  margin: 0;
  color: var(--muted);
}

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

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.benefit-item {
  min-height: 285px;
  padding: 44px 36px;
  border-right: 1px solid var(--line);
}

.benefit-item:last-child {
  border-right: 0;
}

.benefit-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 50%;
}

.benefit-icon svg {
  width: 20px;
  height: 20px;
}

.benefit-item p {
  color: var(--muted);
}

.benefit-item > span:last-child {
  color: var(--gold-dark);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 750;
}

.study-band {
  padding: 104px 0;
  background: var(--mist);
}

.study-intro {
  max-width: 720px;
}

.study-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #cbd3d1;
}

.study-item {
  padding: 34px 36px 34px 0;
  border-bottom: 1px solid #cbd3d1;
}

.study-item + .study-item {
  padding-left: 36px;
  border-left: 1px solid #cbd3d1;
}

.study-item > span {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.study-item p {
  color: var(--muted);
  font-size: 15px;
}

.faith-note {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid #cbd3d1;
}

.faith-note > svg {
  width: 34px;
  height: 34px;
  color: var(--teal);
}

.faith-note h3 {
  margin-top: 0;
}

.faith-note p {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.source-section {
  padding: 110px 0;
  color: var(--white);
  background: var(--ink);
}

.source-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 88px;
}

.source-heading .section-kicker {
  color: #f1d486;
}

.source-copy > p {
  color: #c8cad4;
}

.source-copy .source-lead {
  margin-top: 0;
  color: var(--white);
  font-size: 21px;
}

.source-copy strong {
  color: #f1d486;
}

.source-list {
  margin: 38px 0 0;
  border-top: 1px solid #444657;
}

.source-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  padding: 15px 0;
  border-bottom: 1px solid #444657;
}

.source-list dt {
  color: #9fa2b2;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.source-list dd {
  margin: 0;
}

.about {
  background: var(--paper);
}

.about-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: center;
  gap: 80px;
}

.about-mark {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--gold);
  border: 14px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, "Microsoft JhengHei", serif;
  font-size: 160px;
  line-height: 1;
}

.about-copy p:not(.section-kicker) {
  max-width: 700px;
  color: var(--muted);
}

.site-footer {
  padding: 54px 0 30px;
  color: var(--white);
  background: #10101d;
}

.error-page {
  width: min(calc(100% - 40px), 680px);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page img {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

.error-page h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
}

.error-page p:not(.section-kicker) {
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px 60px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  font-family: "Terence", "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 400;
}

.footer-brand span,
.footer-note,
.footer-contact,
.copyright {
  color: #999cab;
  font-size: 12px;
}

.footer-contact a {
  color: #f1d486;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #f1d486;
}

.footer-note,
.footer-contact,
.copyright {
  margin: 0;
}

.copyright {
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (max-width: 1050px) {
  .hero h1 {
    font-size: 60px;
  }

  .hero-art {
    right: -10%;
    width: 64%;
    opacity: 0.55;
  }

  .featured-layout,
  .source-layout,
  .about-layout {
    gap: 46px;
  }

  .lesson-card {
    grid-template-columns: 1fr;
  }

  .lesson-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .about-mark {
    min-height: 300px;
    font-size: 130px;
  }
}

@media (max-width: 820px) {
  .site-header {
    height: 64px;
  }

  .header-inner {
    width: min(calc(100% - 28px), var(--content));
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand span {
    font-size: 23px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    transform: translateX(102%);
    transition: transform 200ms ease;
  }

  .primary-nav.is-open {
    transform: translateX(0);
    box-shadow: -16px 24px 35px rgba(26, 26, 46, 0.16);
  }

  .primary-nav a {
    padding: 15px 4px;
    border-bottom: 1px solid var(--line);
  }

  .nav-youtube {
    justify-content: center;
    margin-top: 22px;
    padding: 12px;
    border: 0;
  }

  .hero,
  .hero-inner {
    min-height: 590px;
  }

  .hero-art {
    top: -9%;
    right: -24%;
    width: 100%;
    height: 118%;
    opacity: 0.25;
  }

  .hero-inner {
    width: min(calc(100% - 32px), var(--content));
    padding: 62px 0;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-lead {
    max-width: 560px;
    font-size: 19px;
  }

  .difference-inner {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 20px 0;
  }

  .section,
  .study-band,
  .source-section {
    padding: 78px 0;
  }

  .featured-layout,
  .source-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .featured-copy h2,
  .section-heading h2,
  .study-intro h2,
  .source-heading h2,
  .about-copy h2 {
    font-size: 40px;
  }

  .lesson-grid,
  .benefit-grid,
  .study-grid {
    grid-template-columns: 1fr;
  }

  .benefit-item {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .benefit-item:last-child {
    border-bottom: 0;
  }

  .study-item,
  .study-item + .study-item {
    padding: 28px 0;
    border-left: 0;
  }

  .source-layout {
    gap: 38px;
  }

  .about-mark {
    width: 280px;
    min-height: 280px;
    font-size: 120px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .hero,
  .hero-inner {
    min-height: 570px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-actions,
  .channel-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .channel-cta .button {
    width: 100%;
  }

  .featured-copy h2,
  .section-heading h2,
  .study-intro h2,
  .source-heading h2,
  .about-copy h2 {
    font-size: 35px;
  }

  .lesson-grid {
    gap: 18px;
  }

  .lesson-card {
    grid-template-columns: 1fr;
  }

  .lesson-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .lesson-body,
  .benefit-item {
    padding: 24px;
  }

  .faith-note {
    grid-template-columns: 1fr;
  }

  .source-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .about-mark {
    width: 230px;
    min-height: 230px;
    border-width: 10px;
    font-size: 98px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-nav {
    flex-wrap: wrap;
  }

  .copyright {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
