:root {
  --bg: #E8DFD0;
  --surface: #FFFEFA;
  --text: #2A2420;
  --muted: #7A7265;
  --accent: #C41E3A;
  --secondary: #5C4033;
  --line: #E4DCD0;
  --max: 1100px;
  font-family: "Segoe UI", "PingFang HK", "Noto Sans TC", "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
body.modal-open { overflow: hidden; }
a { color: inherit; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: #0F0F0F;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  min-height: 4.5rem;
}
.logo-link { display: inline-flex; text-decoration: none; flex-shrink: 0; }
.logo-img {
  display: block; width: min(168px, 36vw); height: auto;
  background: transparent;
}
.header-right {
  display: flex; align-items: center; gap: 1.25rem;
  justify-content: flex-end;
}
.nav { display: flex; align-items: center; gap: .35rem 1.05rem; }
.nav a, .nav button.nav-cta {
  color: rgba(243,237,228,.78); text-decoration: none; font-size: .95rem; white-space: nowrap;
  font: inherit; background: none; cursor: pointer;
}
.nav a:hover { color: #fff; }
.nav-cta {
  display: inline-block; padding: .42rem .85rem;
  border: 1px solid rgba(243,237,228,.55); color: #F3EDE4 !important;
  border-radius: .35rem; font-weight: 600;
}
.nav-cta:hover { background: #fff; color: #0F0F0F !important; border-color: #fff; }

.lang { display: inline-flex; align-items: center; gap: .2rem; }
.lang-btn {
  border: 0; background: transparent; color: rgba(243,237,228,.65);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; padding: .2rem .25rem;
}
.lang-btn:hover { color: #fff; }
.lang-btn.is-active { color: #ff8a80; }
.lang-sep { color: rgba(255,255,255,.25); font-size: .85rem; }

.hero {
  display: grid; grid-template-columns: 1.15fr .95fr; gap: 2.75rem; align-items: center;
  padding: 4.25rem 0 3.75rem;
}
.eyebrow {
  color: var(--accent); font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; margin: 0 0 .9rem;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem); line-height: 1.22;
  margin: 0 0 1.1rem; color: var(--text); font-weight: 700;
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 38rem; margin: 0 0 1.75rem; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: .8rem 1.25rem; border-radius: .45rem; font-weight: 600; border: none; cursor: pointer; font: inherit;
}
.btn:hover { filter: brightness(1.05); }

.hero-media { min-height: 280px; }
.hero-video-slot {
  height: 100%; min-height: 280px; background: var(--surface);
  border: 1px solid var(--line); border-radius: .75rem;
  display: grid; place-content: center; text-align: center; padding: 0;
  overflow: hidden;
}
.hero-video-slot video {
  width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; border-radius: .75rem;
}
.slot-label { margin: 0 0 .4rem; color: var(--secondary); font-weight: 700; letter-spacing: .06em; font-size: .85rem; }
.slot-note { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; padding: 2rem 1.25rem; }

.section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.section-label {
  color: var(--accent); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; margin: 0 0 .45rem;
}
.section-title {
  margin: 0 0 1.5rem; font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  color: var(--secondary); line-height: 1.25;
}
.muted { color: var(--muted); }

.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.principle-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: .6rem; padding: 1.25rem 1.1rem;
}
.principle-num { display: block; color: var(--accent); font-weight: 700; font-size: .85rem; margin-bottom: .5rem; }
.principle-card h3 { margin: 0 0 .45rem; font-size: 1.08rem; }
.principle-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.story-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; }
.story-grid p { color: var(--muted); margin: 0 0 1rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line);
}
.timeline .year { font-weight: 700; color: var(--secondary); }
.timeline .event { color: var(--muted); }

.contact-email { font-size: 1.12rem; margin: 1rem 0; }
.contact-email a { color: var(--accent); text-decoration: none; font-weight: 600; }
.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: .7rem;
  padding: 1.35rem; display: grid; gap: .85rem;
}
.contact-form label { display: grid; gap: .35rem; font-size: .88rem; color: var(--secondary); font-weight: 600; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: .4rem;
  background: #fff; color: var(--text); font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid rgba(196,30,58,.22); border-color: var(--accent);
}

/* Contact modal */
.contact-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 1.25rem;
}
.contact-modal[hidden] { display: none !important; }
.contact-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 15, 15, 0.62);
  cursor: pointer;
}
.contact-modal-panel {
  position: relative; z-index: 1;
  width: min(100%, 720px); max-height: min(90vh, 880px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: .85rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}
.contact-modal-close {
  position: absolute; top: .65rem; right: .75rem;
  width: 2.25rem; height: 2.25rem;
  border: 0; border-radius: .4rem;
  background: transparent; color: var(--secondary);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.contact-modal-close:hover { background: rgba(92,64,51,.08); color: var(--accent); }
.contact-modal-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem;
  padding-top: .25rem;
}
.contact-modal-copy p { margin: 0 0 .75rem; color: var(--muted); }
.contact-modal-copy .section-title { margin-bottom: .85rem; }
.contact-modal-copy .contact-email { margin: .85rem 0; }

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 1.35rem 0 1.8rem; color: var(--muted); font-size: .85rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-links { display: inline-flex; align-items: center; gap: .5rem; }
.footer-contact {
  border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.footer-contact:hover { color: var(--secondary); }
.footer-sep { color: var(--muted); opacity: .6; }

/* Mid widths: let header wrap before content overflows */
@media (max-width: 1100px) {
  .header-right, .nav { flex-wrap: wrap; }
  .logo-img { width: min(148px, 34vw); }
}

/* Tablet: keep Editorial sections, stack hero only when needed */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; }
  .principle-grid { grid-template-columns: 1fr 1fr; }
  .header-right { flex-wrap: wrap; }
}

@media (max-width: 700px) {
  .wrap { width: min(100% - 1.5rem, var(--max)); }
  .header-inner { min-height: 3.75rem; gap: .75rem; }
  .nav { gap: .25rem .75rem; flex-wrap: wrap; }
  .story-grid, .contact-modal-body { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0 2.5rem; }
  .contact-modal-panel { padding: 1.5rem 1.1rem 1.25rem; }
}

@media (max-width: 480px) {
  .principle-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: .25rem; }
  .header-inner { align-items: flex-start; padding: .65rem 0; }
}
