:root {
  --paper: #e8e3d8;
  --paper-deep: #d8d0c1;
  --ink: #18201e;
  --ink-soft: #4f5753;
  --forest: #17332d;
  --forest-light: #24483f;
  --copper: #a25335;
  --line: rgba(24, 32, 30, .2);
  --cream: #f3efe6;
  --serif: "Noto Serif TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: .13;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 999; padding: 10px 16px; background: var(--cream); }
.skip-link:focus { top: 16px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--cream);
  border-bottom: 1px solid rgba(243, 239, 230, .2);
  transition: background .25s, color .25s, border-color .25s;
}
.site-header.is-scrolled { background: rgba(232, 227, 216, .96); color: var(--ink); border-color: var(--line); backdrop-filter: blur(10px); }
.header-inner { width: min(1240px, calc(100% - 48px)); height: 76px; margin: auto; display: flex; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark-logo { height: 36px; width: auto; filter: brightness(1.1); }
.site-header.is-scrolled .wordmark-logo { filter: brightness(.2); }
.site-nav { display: flex; gap: 36px; margin-left: auto; }
.site-nav a { position: relative; font-size: 13px; letter-spacing: .08em; }
.site-nav a::after { content: ""; position: absolute; right: 100%; bottom: -7px; left: 0; height: 1px; background: currentColor; transition: right .2s; }
.site-nav a:hover::after { right: 0; }
.menu-button { display: none; border: 0; background: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 47%) minmax(0, 53%); min-height: 900px; background: var(--forest); color: var(--cream); }
.hero::before { content: ""; position: absolute; inset: 0 53% 0 0; background: linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 80px 100%; opacity: .3; }
.hero-copy { position: relative; z-index: 2; align-self: center; width: min(520px, calc(100% - 96px)); margin: -34px auto 90px; }
.hero-index { position: absolute; top: -84px; left: 0; opacity: .45; font-size: 11px; letter-spacing: .28em; }
.eyebrow { margin: 0 0 22px; color: #c8a88f; font-size: 13px; letter-spacing: .28em; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(76px, 7.8vw, 126px); line-height: .88; letter-spacing: .03em; }
.hero h1 span { display: block; }
.hero h1 span:last-child { margin-left: 1.05em; color: transparent; -webkit-text-stroke: 1px rgba(243,239,230,.78); }
.hero-lead { margin: 34px 0 8px; font: 500 clamp(20px, 2vw, 28px)/1.5 var(--serif); letter-spacing: .12em; }
.hero-intro { max-width: 450px; margin: 0; color: rgba(243,239,230,.64); font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 36px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid rgba(243,239,230,.45); font-size: 13px; letter-spacing: .08em; transition: .2s; }
.button-primary { background: var(--paper); border-color: var(--paper); color: var(--forest); }
.button-primary:hover { background: #fff; transform: translateY(-2px); }
.text-link { font-size: 13px; }
.text-link span { display: inline-block; margin-left: 6px; transition: transform .2s; }
.text-link:hover span { transform: translateX(5px); }

.hero-art { position: relative; min-width: 0; overflow: hidden; background: var(--paper-deep); }
.hero-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,51,45,.02), rgba(23,51,45,.35)), url("../media/server-info-bg.jpg") 54% center / cover; filter: grayscale(1) contrast(.85) brightness(1.25); opacity: .42; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--forest), transparent 20%); opacity: .6; }
.hero-art > img { position: absolute; z-index: 2; right: -7%; bottom: 63px; width: min(770px, 94%); filter: saturate(.55) sepia(.08) contrast(.95); }
.hero-art-label { position: absolute; z-index: 3; top: 117px; right: 42px; color: rgba(24,32,30,.62); font: 700 10px/1 var(--sans); letter-spacing: .36em; writing-mode: vertical-rl; }
.hero-art-note { position: absolute; z-index: 3; right: 42px; bottom: 152px; color: var(--ink); font: 700 13px/1.6 var(--serif); letter-spacing: .08em; text-align: right; }
.hero-art-note span { display: block; margin-bottom: 8px; color: var(--copper); font: 700 28px/1 var(--sans); }

.opening-card { position: absolute; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 47% 53%; min-height: 118px; border-top: 1px solid rgba(243,239,230,.22); }
.opening-title { display: flex; align-items: center; justify-content: space-between; padding: 24px max(48px, calc((100vw - 1240px) / 2)); padding-right: 48px; }
.opening-title span { color: rgba(243,239,230,.55); font-size: 11px; letter-spacing: .22em; }
.opening-title b { font: 500 clamp(15px, 1.6vw, 21px)/1.3 var(--serif); letter-spacing: .08em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); color: var(--ink); }
.countdown div { display: flex; align-items: baseline; justify-content: center; gap: 7px; padding: 25px 10px; border-left: 1px solid var(--line); }
.countdown strong { font: 500 clamp(28px, 3vw, 44px)/1 var(--serif); }
.countdown span { font-size: 10px; color: var(--ink-soft); }

.section { padding: 130px max(48px, calc((100vw - 1240px) / 2)); }
.section-heading { display: grid; grid-template-columns: 190px minmax(240px, 1fr) minmax(240px, 380px); align-items: end; gap: 20px; margin-bottom: 64px; }
.section-no { margin: 0; color: var(--copper); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.section-heading h2 { margin: 0; font: 700 clamp(36px, 5vw, 66px)/1.1 var(--serif); letter-spacing: .05em; }
.section-heading > p:last-child { margin: 0; color: var(--ink-soft); font-size: 14px; }

.server-section { background: var(--paper); }
.server-ledger { display: grid; grid-template-columns: 32% 68%; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.ledger-primary { display: flex; flex-direction: column; justify-content: center; padding: 45px 42px 45px 0; border-right: 1px solid var(--line); }
.ledger-primary span { color: var(--ink-soft); font-size: 11px; letter-spacing: .16em; }
.ledger-primary strong { margin: 10px 0 2px; font: 700 clamp(26px, 3vw, 40px)/1.3 var(--serif); }
.ledger-primary small { color: var(--copper); font-size: 12px; }
.server-ledger dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.server-ledger dl div { min-height: 112px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.server-ledger dl div:nth-child(3n) { border-right: 0; }
.server-ledger dl div:nth-last-child(-n+3) { border-bottom: 0; }
.server-ledger dt { margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; letter-spacing: .12em; }
.server-ledger dd { margin: 0; font: 700 clamp(20px, 2vw, 28px)/1.3 var(--serif); }
.server-footnote { display: flex; gap: 22px; margin-top: 18px; color: var(--ink-soft); font-size: 11px; }
.server-footnote span + span::before { content: "·"; margin-right: 22px; color: var(--copper); }

.class-section { background: var(--forest); color: var(--cream); overflow: hidden; }
.section-heading-light > p:last-child { color: rgba(243,239,230,.58); }
.class-track { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 12px; }
.class-card { min-width: 0; margin: 0; border-top: 1px solid rgba(243,239,230,.45); }
.class-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: grayscale(.8) sepia(.15) contrast(.92); transition: filter .35s, transform .35s; }
.class-card:hover img { filter: grayscale(0) saturate(.8); transform: translateY(-5px); }
.class-card figcaption { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 16px 2px; }
.class-card figcaption span { grid-row: 1 / span 2; color: #bd7658; font-size: 9px; }
.class-card figcaption b { font: 700 17px/1.3 var(--serif); letter-spacing: .08em; }
.class-card figcaption small { color: rgba(243,239,230,.45); font-size: 10px; white-space: nowrap; }
.swipe-hint { display: none; }

.feature-section { background: var(--paper-deep); }
.feature-intro { display: grid; grid-template-columns: 2fr 1fr; gap: 60px; align-items: end; margin-bottom: 70px; }
.feature-intro .section-heading { display: block; margin: 0; }
.feature-intro .section-heading h2 { margin-top: 22px; }
.feature-intro > p { max-width: 380px; margin: 0 0 7px auto; color: var(--ink-soft); font-size: 14px; }
.feature-list { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.feature-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 180px; align-items: center; gap: 28px; min-height: 145px; border-bottom: 1px solid var(--line); }
.feature-list li > span { color: var(--copper); font: 500 12px/1 var(--serif); }
.feature-list h3 { margin: 0 0 8px; font: 700 clamp(21px, 2.2vw, 30px)/1.3 var(--serif); letter-spacing: .05em; }
.feature-list p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.feature-list li > b { color: rgba(24,32,30,.22); font-size: 10px; letter-spacing: .24em; text-align: right; }

.feature-grid-wrap a:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(24,32,30,.1); }

.news-section { padding: 130px max(48px, calc((100vw - 1240px) / 2)); background: var(--copper); color: var(--cream); }
.news-inner { display: grid; grid-template-columns: 190px 1fr auto; gap: 20px; align-items: start; }
.news-inner .section-no { color: rgba(243,239,230,.7); }
.news-inner h2 { margin: 0; font: 700 clamp(38px, 5vw, 68px)/1.24 var(--serif); letter-spacing: .04em; }
.news-inner div p { margin: 28px 0 0; color: rgba(243,239,230,.7); font-size: 13px; }
.news-inner time { padding-left: 45px; border-left: 1px solid rgba(243,239,230,.35); font: 500 14px/1.1 var(--serif); }
.news-inner time strong { font-size: clamp(32px, 4vw, 56px); }

.site-footer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 32px; padding: 30px max(48px, calc((100vw - 1240px) / 2)); background: var(--ink); color: var(--cream); }
.footer-mark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); letter-spacing: .1em; }
.footer-mark span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(243,239,230,.6); font-size: 12px; }
.site-footer p, .site-footer small { margin: 0; color: rgba(243,239,230,.45); font-size: 10px; letter-spacing: .12em; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 52% 48%; min-height: 820px; }
  .hero::before { right: 48%; }
  .hero-copy { width: min(440px, calc(100% - 56px)); }
  .hero-art > img { right: -24%; width: 130%; }
  .opening-card { grid-template-columns: 52% 48%; }
  .opening-title { padding-left: 28px; padding-right: 28px; }
  .opening-title span { display: none; }
  .section-heading { grid-template-columns: 140px 1fr; }
  .section-heading > p:last-child { grid-column: 2; }
  .server-ledger { grid-template-columns: 28% 72%; }
  .server-ledger dl { grid-template-columns: repeat(2, 1fr); }
  .server-ledger dl div:nth-child(3n) { border-right: 1px solid var(--line); }
  .server-ledger dl div:nth-child(2n) { border-right: 0; }
  .server-ledger dl div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .server-ledger dl div:nth-last-child(-n+2) { border-bottom: 0; }
  .class-track { grid-template-columns: repeat(7, 190px); overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
  .class-card { scroll-snap-align: start; }
  .swipe-hint { display: block; margin: 12px 0 0; color: rgba(243,239,230,.45); font-size: 10px; letter-spacing: .16em; }
}

@media (max-width: 720px) {
  .header-inner { width: calc(100% - 32px); height: 66px; }
  .menu-button { display: grid; width: 46px; height: 42px; margin-left: auto; padding: 8px; place-content: center; gap: 4px; }
  .menu-button span { width: 20px; height: 1px; background: currentColor; }
  .menu-button em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .site-nav { position: absolute; top: 66px; right: 0; left: 0; display: none; flex-direction: column; gap: 0; padding: 12px 16px 20px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .hero { display: block; min-height: 0; padding-top: 66px; }
  .hero::before { display: none; }
  .hero-copy { width: auto; min-height: 575px; margin: 0; padding: 76px 28px 56px; }
  .hero-index { top: 32px; left: 28px; }
  .hero h1 { font-size: clamp(68px, 22vw, 94px); }
  .hero h1 span:last-child { margin-left: .76em; }
  .hero-intro { max-width: 360px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-art { height: 540px; }
  .hero-art::after { background: linear-gradient(180deg, var(--forest), transparent 18%); }
  .hero-art > img { right: -11%; bottom: 18px; width: 118%; max-width: none; }
  .hero-art-label { top: 36px; right: 20px; }
  .hero-art-note { right: 20px; bottom: 36px; }
  .opening-card { position: relative; display: block; }
  .opening-title { justify-content: center; min-height: 86px; padding: 20px; }
  .countdown div { padding: 22px 4px; }
  .section { padding: 86px 24px; }
  .section-heading { display: block; margin-bottom: 44px; }
  .section-heading h2 { margin-top: 18px; }
  .section-heading > p:last-child { margin-top: 18px; }
  .server-ledger { display: block; }
  .ledger-primary { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .server-ledger dl div { min-height: 98px; padding: 20px 12px; }
  .server-footnote { align-items: flex-start; flex-direction: column; gap: 5px; }
  .server-footnote span + span::before { display: none; }
  .class-track { margin-right: -24px; grid-template-columns: repeat(7, minmax(185px, 61vw)); }
  .feature-intro { display: block; margin-bottom: 44px; }
  .feature-intro > p { margin: 22px 0 0; }
  .feature-list li { grid-template-columns: 42px 1fr; gap: 10px; min-height: 0; padding: 26px 0; }
  .feature-list li > span { align-self: start; margin-top: 8px; }
  .feature-list li > b { display: none; }
  .news-section { padding: 86px 24px; }
  .news-inner { grid-template-columns: 1fr; gap: 38px; }
  .news-inner time { padding: 24px 0 0; border-top: 1px solid rgba(243,239,230,.35); border-left: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 10px; padding: 30px 24px; }
}

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