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

:root {
  /* ── Brand palette extracted from logo ── */
  --ink:        #111111;
  --ivory:      #f6f5f2;
  --silver:     #ADADAD;   /* logo background tone */
  --silver-lt:  #d0cfcc;
  --silver-dk:  #666;   /* darkened for readability */
  --gold:       #b8975a;   /* accent — kept for warmth */
  --gold-light: #d4b47a;
  --slate:      #2a2a2a;   /* darkened for readability */
  --mid:        #5a5a5a;   /* darkened for readability */
  --rule:       rgba(17,17,17,0.11);
  --rule-silver:rgba(173,173,173,0.35);
  --hk-jade:    #3d7a6e;   /* HK jade — tram livery, ceramic glaze */
  --hk-jade-lt: #4e9688;   /* lighter jade for hover */
  --hk-jade-rule: rgba(61,122,110,0.2);
  --hk-teak:    #7a4f2e;   /* colonial teak — shophouse timber, tram seats */
  --hk-teak-lt: #9e6840;   /* lighter teak */
  --hk-teak-rule: rgba(122,79,46,0.2);
  --hk-red:     #c0392b;   /* bauhinia red — used very sparingly */
  --hk-red-rule:rgba(192,57,43,0.15);
  /* Legacy aliases so existing references still work */
  --brown:      #7a4f2e;
  --brown-lt:   #9e6840;
  --brown-rule: rgba(122,79,46,0.2);
  --green:      #3d7a6e;
  --green-lt:   #4e9688;
  --green-rule: rgba(61,122,110,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 4rem;
  background: rgba(246,245,242,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  display: flex; align-items: center; gap: 0;
  text-decoration: none;
}

.nav-logo-img {
  display: none;
}

.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1;
}

.nav-logo-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem; font-weight: 300;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink);
}

.nav-logo-sub {
  font-size: 0.52rem; font-weight: 300;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--silver-dk);
  margin-top: 0.25rem;
}

.nav-links { display: flex; gap: 2.4rem; list-style: none; }
.nav-links a {
  font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mid); text-decoration: none;
  transition: color 0.25s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--hk-jade);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; background: var(--hk-jade); }
.nav-links a.active { color: var(--ink); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule); padding: 2.8rem 4rem;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ivory);
}
.footer-logo {
  display: flex; align-items: center; gap: 0.9rem; text-decoration: none;
}
.footer-logo-img { width: 46px; height: 32px; border-radius: 4px; }
.footer-logo-name {
  font-family: 'DM Sans', sans-serif; font-size: 0.75rem; font-weight: 200;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink);
}
.footer-copy { font-size: 0.7rem; letter-spacing: 0.07em; color: var(--slate); }
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--ink); }

/* ── LAYOUT ── */
.page-hero { padding: 14rem 4rem 6rem; max-width: 1200px; margin: 0 auto; }

.overline {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.63rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 1.6rem;
}
.overline::before {
  content: ''; display: inline-block;
  width: 20px; height: 1px; background: var(--hk-jade);
}

h1.display {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(3rem, 6vw, 6.5rem); font-weight: 300;
  line-height: 1.05; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink); max-width: 860px;
}
h1.display em { font-style: normal; color: var(--hk-jade); }

h2.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 300;
  line-height: 1.15; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 1.2rem;
}
h2.section-title em { font-style: normal; color: var(--hk-jade); }

.lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 300; color: var(--slate);
  max-width: 580px; line-height: 1.8; margin-top: 1.8rem;
}

/* Arc motif — pulled from logo */
.arc-motif {
  display: block;
  width: 48px; height: 48px;
  margin-bottom: 0.4rem;
}

.rule-line { width: 40px; height: 1px; background: var(--hk-teak); margin: 2rem 0; opacity: 0.7; }
.section { padding: 6rem 4rem; max-width: 1200px; margin: 0 auto; }
.section-bordered { border-top: 1px solid var(--rule); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 300; padding: 0.9rem 2.2rem;
  border: 1px solid var(--hk-teak); color: var(--hk-teak);
  background: transparent; text-decoration: none;
  cursor: pointer; transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--hk-teak); color: var(--ivory); border-color: var(--hk-teak); }
.btn-silver { border-color: var(--silver); color: var(--silver-dk); }
.btn-silver:hover { background: var(--silver-dk); color: var(--ivory); border-color: var(--silver-dk); }
.btn-dark { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn-dark:hover { background: var(--slate); }

/* ── CARDS ── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; background: var(--rule); margin-top: 4rem;
}
.card {
  padding: 2.8rem 2.4rem;
  background: var(--ivory); transition: background 0.3s;
}
.card:hover { background: #eeede9; }
.card-number {
  font-family: 'DM Sans', sans-serif; font-size: 0.62rem;
  font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 1.2rem;
}
.card h3 {
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem;
  font-weight: 300; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 0.8rem;
}
.card p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem; color: var(--slate); line-height: 1.75;
}

/* ── PASSWORD GATE ── */
.gate-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #ADADAD 0%, #A0A0A0 100%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem;
}
.gate-overlay.hidden { display: none; }

.gate-logo-wrap { margin-bottom: 3rem; }
.gate-logo-wrap img { width: 140px; height: auto; border-radius: 10px; }

.gate-box {
  width: 100%; max-width: 380px;
  border: 1px solid rgba(255,255,255,0.3); padding: 3rem 2.4rem; text-align: center;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(8px);
}
.gate-label {
  font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 0.6rem; display: block;
}
.gate-title {
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 200;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: #fff; margin-bottom: 0.5rem;
}
.gate-sub { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 2rem; line-height: 1.6; }
.gate-input {
  width: 100%; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25); color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; letter-spacing: 0.1em;
  padding: 0.9rem 1.2rem; outline: none; transition: border-color 0.25s;
  text-align: center; border-radius: 0; margin-bottom: 1rem;
}
.gate-input::placeholder { color: rgba(255,255,255,0.3); }
.gate-input:focus { border-color: rgba(255,255,255,0.7); }
.gate-btn {
  width: 100%; background: transparent;
  border: 1px solid rgba(255,255,255,0.5); color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 0.65rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  padding: 0.9rem; cursor: pointer; transition: background 0.25s;
}
.gate-btn:hover { background: rgba(255,255,255,0.15); }
.gate-error { font-size: 0.74rem; color: rgba(255,255,255,0.7); margin-top: 0.8rem; letter-spacing: 0.05em; min-height: 1.2em; }
.gate-footer { margin-top: 3rem; font-size: 0.62rem; letter-spacing: 0.14em; color: rgba(255,255,255,0.25); text-transform: uppercase; }


/* ── CHINESE CHARACTER TREATMENT ── */
.hanzi {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--silver);
  opacity: 0.55;
  display: inline-block;
  user-select: none;
}
.hanzi-hero {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  font-size: 1rem;
  letter-spacing: 0.4em;
  color: var(--silver);
  opacity: 0.60;
  display: block;
  margin-top: 1.4rem;
}
.nav-logo-hanzi {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  color: var(--silver-dk);
  opacity: 0.7;
  margin-top: 0.2rem;
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1.2rem 1.6rem; }
  .nav-links { gap: 1.2rem; }
  .page-hero { padding: 10rem 1.6rem 4rem; }
  .section { padding: 4rem 1.6rem; }
  footer { flex-direction: column; gap: 1.4rem; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .card-grid { grid-template-columns: 1fr; }
}
