/* ============================================================
   Flowing Light 流光拾曜 — Shared Stylesheet
   Brand: luxury, minimalist, editorial. Black + gold only.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:wght@300;400;500&family=Noto+Serif+TC:wght@300;400;500;600&family=Allura&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Noto Serif TC', 'DM Sans', serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0A0A;
  --bg-deeper: #060606;
  --card: #141414;
  --card-2: #1A1714;
  --border: #2A2518;
  --border-2: #3A3220;
  --gold: #C4922A;
  --gold-light: #E8C97A;
  --gold-deep: #8B6620;
  --cream: #F5EDD6;
  --muted: #888070;
  --deep-muted: #554530;
  --success: #2D6A4F;
  --error: #8B1A1A;

  --max: 1240px;
  --pad-x: clamp(20px, 5vw, 60px);
  --section-y: clamp(80px, 12vw, 140px);

  --serif-en: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --serif-cn: 'Noto Serif TC', 'Cormorant Garamond', serif;
  --sans: 'DM Sans', 'Noto Serif TC', system-ui, sans-serif;
  --script: 'Allura', 'Cormorant Garamond', cursive;
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.display-cn {
  font-family: var(--serif-cn);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.15;
  letter-spacing: 0.05em;
  color: var(--cream);
}
.h1 {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: 0;
}
.h1-cn {
  font-family: var(--serif-cn);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.h2 {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.h2-cn {
  font-family: var(--serif-cn);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--deep-muted);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 0.5px;
  background: var(--gold-deep);
  display: inline-block;
}
.eyebrow.no-line::before { display: none; }
.eyebrow.gold { color: var(--gold); }
.eyebrow.gold::before { background: var(--gold); }

.lede {
  font-family: var(--serif-cn);
  font-weight: 300;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.85;
  color: var(--muted);
  max-width: 60ch;
}
.lede-en {
  font-family: var(--serif-en);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--muted);
}
.body-cn { font-family: var(--serif-cn); font-weight: 300; }
.body-en { font-family: var(--sans); font-weight: 300; }

.num-deco {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(56px, 7vw, 92px);
  line-height: 1;
  color: var(--deep-muted);
  letter-spacing: -0.02em;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); position: relative; }
.section.tight { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 80px); }
.hr-gold { height: 0.5px; background: var(--gold-deep); border: 0; opacity: 0.45; }
.hr-gold.short { width: 64px; opacity: 1; background: var(--gold); }
.hr-row { display: flex; align-items: center; gap: 18px; color: var(--deep-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 0.5px solid transparent;
  transition: filter 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: #0A0A0A; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(196, 146, 42, 0.08); color: var(--gold-light); border-color: var(--gold-light); }
.btn .arrow { font-family: var(--serif-en); font-size: 16px; letter-spacing: 0; transform: translateY(-1px); transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translate(3px, -1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 0;
  border-bottom: 0.5px solid var(--gold-deep);
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}
.link-arrow:hover { color: var(--gold-light); border-color: var(--gold-light); gap: 14px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 72px;
  display: flex; align-items: center;
  background: rgba(6, 6, 6, 0.0);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 0.5px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand-mark { width: 28px; height: 28px; }
.nav-brand-text {
  font-family: var(--script);
  font-weight: 400;
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--gold-light);
}
.nav-brand-text .cn { font-family: var(--serif-cn); font-style: normal; font-size: 10px; letter-spacing: 0.32em; color: var(--deep-muted); display: block; margin-top: 6px; }

.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-link {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative; padding: 4px 0;
  transition: color 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link.active::after {
  content: ""; position: absolute; left: 50%; bottom: -10px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
  transform: translateX(-50%);
}
.nav-link .cn { display: inline; }
.nav-link .en { display: none; }
body.lang-en .nav-link .cn { display: none; }
body.lang-en .nav-link .en { display: inline; }

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 0.5px solid var(--border-2); border-radius: 999px;
  padding: 3px;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.12em;
}
.lang-toggle button {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-toggle button.active { background: rgba(196, 146, 42, 0.12); color: var(--gold); }

.nav-mobile-btn { display: none; padding: 8px; color: var(--gold-light); }

/* ---------- Bilingual visibility ---------- */
[data-cn], [data-en] { display: inline; }
.show-cn { display: inline; }
.show-en { display: none; }
body:not(.lang-en) .show-en { display: none !important; }
body.lang-en .show-cn { display: none !important; }
body.lang-en .show-en { display: inline; }

.block-cn { display: block; }
.block-en { display: none; }
body:not(.lang-en) .block-en { display: none !important; }
body.lang-en .block-cn { display: none !important; }
body.lang-en .block-en { display: block; }

/* ---------- Page hero ---------- */
.page-hero {
  padding-top: clamp(140px, 18vw, 200px);
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
}
.page-hero .eyebrow { margin-bottom: 32px; }
.page-hero-title { display: grid; gap: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}
.card:hover { border-color: var(--border-2); }
.card-corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 0.5px solid var(--gold-deep);
  opacity: 0.7;
  pointer-events: none;
}
.card-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.card-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.card-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ---------- Footer ---------- */
.footer {
  border-top: 0.5px solid var(--border);
  padding-top: 72px; padding-bottom: 36px;
  background: var(--bg-deeper);
  font-family: var(--sans);
  font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 0.5px solid var(--border);
}
.footer h4 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--deep-muted);
}
.footer-mark { display: flex; align-items: center; gap: 14px; }
.footer-mark img { width: 38px; height: 38px; opacity: 0.92; }
.footer-tag {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--gold-light);
  margin-top: 8px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }

/* ---------- Decorative ornament ---------- */
.ornament {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--gold-deep);
  font-family: var(--serif-en); font-size: 14px;
}
.ornament::before, .ornament::after {
  content: ""; width: 40px; height: 0.5px; background: var(--gold-deep);
}

/* ---------- Section headers ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head .left { display: grid; gap: 18px; max-width: 34rem; }
.section-head .right { color: var(--muted); max-width: 28rem; padding-bottom: 6px; }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .right { padding-bottom: 0; }
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 0.5px solid var(--gold-deep);
  border-radius: 999px;
  background: rgba(196, 146, 42, 0.04);
}
.tag.muted { color: var(--muted); border-color: var(--border); background: transparent; }
.tag.solid { background: rgba(196, 146, 42, 0.14); border-color: var(--gold); color: var(--gold-light); }

/* ---------- Form ---------- */
.field { display: grid; gap: 10px; }
.field label {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--cream);
  font-family: var(--serif-cn);
  font-size: 15px;
  width: 100%;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: #181410;
}
.field input::placeholder, .field textarea::placeholder { color: var(--deep-muted); }

/* ---------- Selection ---------- */
::selection { background: var(--gold); color: #0A0A0A; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(12px);
    padding: 32px var(--pad-x);
    border-bottom: 0.5px solid var(--border);
    gap: 24px;
    align-items: flex-start;
  }
  .nav-mobile-btn { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
