/* Chai Chuan Fook — digital namecard. Gold / navy. Mobile-first. */
:root {
  --bg: #0b1424;
  --bg-elev: #121c2e;
  --bg-card: #162338;
  --bg-soft: #18243a;
  --line: rgba(201, 162, 74, 0.32);
  --line-strong: rgba(201, 162, 74, 0.7);
  --gold: #c9a24a;
  --gold-2: #e8d5a3;
  --gold-3: #8a7030;
  --cream: #f4ecd8;
  --text: #f3ede0;
  --muted: #9aa6b8;
  --muted-2: #7d8aa0;
  --ink: #0b1424;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-serif: "Noto Serif SC", "Cormorant Garamond", "Noto Serif CJK SC", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans SC", "Source Sans 3", "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --font-latin: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --header-h: 4.25rem;
  --radius: 2px;
  --max: 1120px;
}

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 74, 0.07), transparent 55%),
    radial-gradient(900px 500px at 0% 20%, rgba(40, 80, 140, 0.16), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
img[hidden], .namecard-mono[hidden] { display: none !important; }
a { color: var(--gold-2); text-decoration-color: rgba(201, 162, 74, 0.45); text-underline-offset: 0.2em; }
a:hover { color: var(--cream); text-decoration-color: var(--gold); }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  z-index: 100;
  font-weight: 600;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 2.25rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(11, 20, 36, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }
.logo-mark {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-2);
  letter-spacing: 0.04em;
  flex: none;
}
.brand-name {
  font-family: var(--font-latin);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .brand { flex-direction: row; }
  .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
  .brand-sub { display: block; margin-top: 0.15rem; }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.site-nav {
  display: none;
}
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.35rem 0.15rem;
}
.site-nav a:hover { color: var(--gold-2); }

@media (max-width: 879px) {
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: rgba(11, 20, 36, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.125rem 1.25rem;
  }
}
@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    position: static;
    background: none;
    border: 0;
    padding: 0;
  }
  .header-inner { display: grid; grid-template-columns: auto 1fr auto; }
  .site-nav { justify-content: flex-end; padding-right: 1rem; }
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.72rem/1 var(--font-sans);
  letter-spacing: 0.08em;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
}
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--cream); }

/* Hero */
.hero {
  display: grid;
  gap: 2.75rem;
  padding: 3.25rem 0 4.25rem;
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.12fr 0.88fr;
    gap: 3.5rem;
    align-items: center;
    min-height: min(52rem, calc(100svh - var(--header-h)));
    padding: 3.5rem 0 4.5rem;
  }
}

.kicker {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.05rem, 5.6vw, 3.85rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: 14em;
}
.lead {
  margin: 0 0 1.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}
.lead strong { color: var(--cream); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { color: inherit; }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"] { cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(180deg, #efdbae 0%, #c9a24a 100%);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(201, 162, 74, 0.18);
}
.btn-gold:hover { background: linear-gradient(180deg, #f4e6c0 0%, #d4b05a 100%); color: var(--ink); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--gold-2);
}
.btn-ghost:hover { border-color: var(--gold-2); color: var(--cream); background: rgba(201, 162, 74, 0.06); }

.hero-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.hero-creds a,
.hero-creds span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--gold-2);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.6rem;
  background: rgba(18, 28, 46, 0.7);
}
.hero-creds a:hover { border-color: var(--gold); color: var(--cream); }

/* Namecard */
.namecard {
  position: relative;
  background:
    linear-gradient(165deg, rgba(232, 213, 163, 0.05), transparent 42%),
    linear-gradient(180deg, #18253c, #10192b);
  border: 1px solid var(--line);
  padding: 2rem 1.7rem 1.6rem;
  box-shadow: var(--shadow);
}
.namecard::before,
.namecard::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold);
  border-style: solid;
}
.namecard::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.namecard::after { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.namecard .corners-b,
.namecard .corners-br {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold);
  border-style: solid;
  pointer-events: none;
}
.namecard .corners-b { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
.namecard .corners-br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }
.namecard-label {
  margin: 0 0 1.35rem;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.portrait {
  margin-bottom: 1.15rem;
}
.namecard-mono {
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--font-latin);
  font-size: 1.25rem;
  color: var(--gold-2);
}
.headshot {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--gold);
  background: var(--bg-card);
}
.namecard h2 {
  margin: 0 0 0.15rem;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: 0.01em;
  color: var(--cream);
}
.namecard .cn-name {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 0.12em;
}
.namecard .aka {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.namecard hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 1.1rem;
}
.namecard ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.namecard li {
  position: relative;
  padding: 0.28rem 0 0.28rem 1rem;
  color: var(--gold-2);
  font-size: 0.95rem;
}
.namecard li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.4rem;
  height: 1px;
  background: var(--gold);
}
.namecard .place {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

/* Sections */
.section {
  padding: 4.25rem 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
  max-width: 50rem;
}
.section-index {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.25;
  color: var(--cream);
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

/* About */
.about-block {
  border: 1px solid var(--line);
  background: rgba(18, 28, 46, 0.55);
  padding: 1.6rem 1.4rem;
}
@media (min-width: 720px) {
  .about-block { padding: 2.1rem 2.2rem; }
}
.about-block h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-2);
}
.about-block p {
  margin: 0;
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Credentials */
.cred-list { display: flex; flex-direction: column; }
.cred {
  display: grid;
  gap: 0.35rem 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .cred {
    grid-template-columns: 7.5rem 1fr auto;
    align-items: baseline;
  }
}
.cred:first-child { border-top: 1px solid var(--line); }
.cred-year {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.cred h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  font-weight: 650;
  color: var(--cream);
  font-family: var(--font-serif);
}
.cred p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cred-source {
  font-size: 0.82rem;
  color: var(--gold-2);
  white-space: nowrap;
  margin-top: 0.35rem;
}
@media (min-width: 720px) {
  .cred-source { margin-top: 0; }
}

/* Services */
.svc-grid {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 800px) and (max-width: 1079px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1080px) {
  .svc-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.svc {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 35, 56, 0.9), rgba(14, 22, 38, 0.9));
  padding: 1.7rem 1.45rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.svc-num {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.85rem;
}
.svc h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--cream);
}
.svc p { margin: 0 0 0.8rem; color: var(--muted); flex: 1; }
.svc p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2rem 1.15rem 0;
  font-weight: 600;
  color: var(--cream);
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.1rem;
  color: var(--gold);
  font-weight: 500;
  font-size: 1.2rem;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  max-width: 48rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 800px) {
  .contact-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.contact-panel {
  border: 1px solid var(--line);
  background: rgba(18, 28, 46, 0.55);
  padding: 1.6rem 1.4rem;
}
.contact-panel h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--cream);
}
.contact-panel p { margin: 0 0 1.1rem; color: var(--muted); }
.wa-note {
  display: none;
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--line-strong);
  color: var(--gold-2);
  font-size: 0.9rem;
}
.wa-note.is-on { display: block; }

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--cream);
}
.socials a:hover { color: var(--gold-2); }
.socials small { color: var(--muted); font-size: 0.85rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
  color: var(--muted-2);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }

/* Typography helpers */
.nowrap { white-space: nowrap; }
.section-head h2,
.about-block h3,
.svc h3,
.faq-list summary,
.namecard h2 {
  text-wrap: balance;
}
br.hero-break { display: none; }
@media (max-width: 699px) {
  br.hero-break { display: block; }
}
@media (max-width: 720px) {
  .section-head h2[data-i18n="aboutTitle"] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1em;
    text-wrap: unset;
  }
}
.section-head p,
.lead,
.about-block p,
.cred p,
.svc p,
.faq-list details p,
.missing p,
.contact-panel p {
  text-wrap: pretty;
}

@media (max-width: 430px) {
  .brand-name { font-size: 0.95rem; }
  .lang-switch button { padding: 0.4rem 0.45rem; }
  .header-tools { gap: 0.45rem; }
  .wrap { width: min(var(--max), calc(100% - 1.75rem)); }
}

/* Utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (min-width: 960px) {
  .wrap { width: min(var(--max), calc(100% - 4rem)); }
}
