:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --subtle: #8e8e93;
  --line: #2c2c2e;
  --max: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { opacity: 0.78; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--fg); color: #000; padding: 12px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
}
.site-header ul { display: flex; gap: 4px; }
.site-header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 14px; color: var(--muted); text-decoration: none;
}
.site-header nav { margin-left: auto; }
.site-header nav li:last-child a { color: var(--fg); }
.lang-switch {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0 0 16px; margin-left: 4px;
  border-left: 1px solid var(--line); font-size: 14px; text-decoration: none;
}
.site-header nav a:hover { color: var(--fg); opacity: 1; }

/* Shared type */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.index { color: var(--subtle); margin-right: 10px; font-variant-numeric: tabular-nums; }
h1 {
  font-size: clamp(48px, 8.4vw, 104px);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 650;
}
h2 {
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.08; letter-spacing: -0.035em; font-weight: 600;
}
h1 span, h2 span { color: var(--subtle); }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.prose p + p, .prose p + blockquote { margin-top: 1.1em; }
.prose { color: #d2d2d7; }
.narrow { max-width: 640px; }
.note { margin-top: 32px; font-size: 15px; color: var(--muted); }
.note a, .prose a { text-decoration: underline; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.actions.start { justify-content: flex-start; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; background: var(--fg); color: #000; border: 1px solid var(--fg);
  font-size: 15px; font-weight: 600; text-decoration: none; text-align: center;
}
.button-ghost { background: transparent; color: var(--fg); border-color: #5a5a5e; }
.button-ghost:hover { border-color: var(--fg); }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: clamp(64px, 10vw, 112px) var(--gutter) clamp(80px, 12vw, 136px);
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-logo { width: min(300px, 72vw); margin: 0 auto 44px; }
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 { margin-bottom: 28px; }
.lede {
  max-width: 620px; margin: 0 auto 36px;
  font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: #c7c7cc;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) var(--gutter);
  border-top: 1px solid var(--line);
}
.section-head { margin-bottom: clamp(40px, 6vw, 64px); max-width: 820px; }
.section-head .eyebrow { margin-bottom: 20px; }
.section-intro { margin-top: 20px; font-size: 19px; color: #c7c7cc; max-width: 680px; }

/* About */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.quote { margin-top: 36px; padding-left: 20px; border-left: 2px solid var(--fg); }
.quote p { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.35; letter-spacing: -0.015em; color: var(--fg); }
.quote footer { margin-top: 12px; font-size: 14px; color: var(--muted); }
.facts { border-top: 1px solid var(--fg); padding-top: 20px; }
.facts-title { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dl > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { overflow-wrap: anywhere; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: 15px; text-decoration: underline; }

.pillars {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  margin-top: clamp(56px, 8vw, 88px);
}
.pillars li { border-top: 1px solid var(--line); padding-top: 24px; }
.pillars h3 { margin-bottom: 10px; }
.pillars p { color: var(--muted); font-size: 16px; }

/* Events */
.events-layout {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.event-photo { margin: 0; }
.event-photo img { width: 100%; height: auto; background: #111; }
.event-photo figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.event-list > li { border-top: 1px solid var(--line); padding: 20px 0 24px; }
.event-list > li:first-child { border-top-color: var(--fg); }
.event-date { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.event-list h3 { margin-bottom: 6px; }
.event-list p:not(.event-date) { color: var(--muted); font-size: 16px; }
.event-gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: clamp(40px, 6vw, 64px);
}

/* Services */
.services {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 80px);
  counter-reset: service;
}
.services > li {
  counter-increment: service;
  border-top: 1px solid var(--fg);
  padding: 24px 0 48px;
}
.services > li::before {
  content: counter(service, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font-size: 13px; color: var(--subtle); font-variant-numeric: tabular-nums;
}
.services h3 { margin-bottom: 12px; }
.services > li > p:not(.deliver-label) { color: #c7c7cc; font-size: 16px; }
.deliver-label { margin-top: 20px; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.services ul li { position: relative; padding-left: 18px; font-size: 15px; color: var(--muted); }
.services ul li + li { margin-top: 4px; }
.services ul li::before { content: "—"; position: absolute; left: 0; color: var(--subtle); }

.process { margin-top: clamp(40px, 6vw, 64px); }
.process-title { margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.steps li { border-top: 1px solid var(--line); padding-top: 20px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-bottom: 14px;
  border: 1px solid #5a5a5e; border-radius: 50%;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.steps h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.steps p { font-size: 15px; color: var(--muted); }
.process .note { margin-top: 28px; }

.cta-row {
  margin-top: clamp(48px, 7vw, 72px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-row p { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em; font-weight: 600; }
.cta-row .button { overflow-wrap: anywhere; }

/* What's next */
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px !important;
  padding: 8px 16px; border: 1px solid #5a5a5e; border-radius: 999px;
  font-size: 14px; color: var(--fg);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--fg); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
.contact-item { border-top: 1px solid var(--fg); padding-top: 24px; }
.contact-item h3 { margin-bottom: 8px; }
.contact-item > p:not(.email-line) { color: var(--muted); font-size: 16px; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; }
.email {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.01em; text-decoration: underline; overflow-wrap: anywhere;
}
.copy {
  min-height: 36px; min-width: 64px; padding: 0 14px;
  background: transparent; color: var(--fg); border: 1px solid #5a5a5e; border-radius: 999px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.copy:hover { border-color: var(--fg); }

/* Contact form */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-form-wrap { border-top: 1px solid var(--fg); padding-top: 24px; }
.contact-form-wrap > h3 { margin-bottom: 16px; }
.form-hint { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 15px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: #0d0d0f; color: var(--fg); border: 1px solid #636366; border-radius: 10px;
  font: inherit; font-size: 16px; line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 150px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f5f5f7' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--fg); }
.field [aria-invalid="true"] { border-color: #ff8a80; }
.field-hint { margin-top: 6px; font-size: 14px; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 14px; color: #ff8a80; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { margin: 4px 0 20px; font-size: 14px; color: var(--muted); }
.form-notice a, .form-fallback a { text-decoration: underline; }
.contact-form .button { cursor: pointer; font-family: inherit; }
.contact-form .button:disabled { opacity: 0.6; cursor: progress; }
.form-status { margin-top: 12px; font-size: 15px; color: var(--fg); }
.form-status:empty { display: none; }
.form-success { border: 1px solid var(--fg); border-radius: 16px; padding: 24px; }
.form-success-title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.form-success p:not(.form-success-title), .form-fallback { color: var(--muted); }
.contact-emails .contact-item + .contact-item { margin-top: 40px; }

/* Footer */
.site-footer {
  max-width: var(--max); margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px;
  font-size: 14px; color: var(--muted);
}
.footer-name { color: var(--fg); margin-bottom: 6px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: flex-end; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.copyright { grid-column: 1 / -1; font-size: 13px; color: var(--subtle); }

/* Document pages (privacy, legal, 404) */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter) clamp(72px, 10vw, 120px); }
.doc .eyebrow { margin-bottom: 20px; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.04em; margin-bottom: 20px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: #d2d2d7; }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 1em; }
.doc ul { list-style: disc; padding-left: 1.3em; }
.doc ul li + li { margin-top: 6px; }
.doc a { text-decoration: underline; overflow-wrap: anywhere; }
.doc code { font-size: 0.92em; background: #1c1c1e; padding: 1px 6px; border-radius: 4px; }
.summary { border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; }
.summary ul { margin-top: 8px; }
.doc .facts { margin-top: 8px; border-top: 0; padding-top: 0; }
.doc .facts dd, .doc .facts dt { color: inherit; }
.doc .facts dt { color: var(--muted); }
.facts dd a { display: inline-flex; align-items: center; min-height: 24px; }

/* Traditional Chinese typography */
html[lang="zh-Hant-TW"] body { line-height: 1.8; }
html[lang="zh-Hant-TW"] h1 { letter-spacing: 0.01em; line-height: 1.15; }
html[lang="zh-Hant-TW"] h2 { letter-spacing: 0.01em; line-height: 1.25; }
html[lang="zh-Hant-TW"] h3, html[lang="zh-Hant-TW"] h4 { letter-spacing: 0.02em; }
html[lang="zh-Hant-TW"] .quote p { letter-spacing: 0.02em; line-height: 1.5; }
html[lang="zh-Hant-TW"] .eyebrow, html[lang="zh-Hant-TW"] .facts-title, html[lang="zh-Hant-TW"] .deliver-label { letter-spacing: 0.12em; }
html[lang="zh-Hant-TW"] .event-date { letter-spacing: 0.04em; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, button { transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
}

@media (max-width: 900px) {
  .about-grid, .events-layout { grid-template-columns: minmax(0, 1fr); }
  .event-photo-tall { max-width: 420px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header { padding-top: 6px; padding-bottom: 6px; }
  .site-header nav a { padding: 0 10px; font-size: 14px; }
  .site-header nav li:first-child a { padding-left: 0; }
  .pillars, .services, .contact-grid, .event-gallery, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .event-photo-tall { max-width: none; }
  .event-photo-tall img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; }
  .pillars { gap: 28px; }
  .services > li { padding-bottom: 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .facts dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cta-row .button { width: 100%; font-size: 14px; padding: 0 16px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .footer-nav ul { justify-content: flex-start; flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .wordmark { order: 1; }
  .lang-switch { order: 2; margin-left: auto; }
  .site-header nav { order: 3; width: 100%; margin-left: 0; }
}
