/* ==========================================================
   Subat — Portfolio
   Dark, quiet, editorial. Shared by / (en) and /zh/ (zh-Hant)
   ========================================================== */

:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --bg-2: #100f0d;
  --bg-3: #161412;
  --ink: #e9e4dc;
  --body: #c9c2b8;
  --muted: #8f877e;
  --faint: #5c554e;
  --line: rgba(233, 228, 220, .1);
  --line-strong: rgba(233, 228, 220, .26);
  --gold: #c2a57a;
  --gold-dim: rgba(194, 165, 122, .55);
  --gold-soft: rgba(194, 165, 122, .12);
  --accent: var(--gold);

  --font-display: "Cormorant Garamond", "Noto Serif TC", "Songti TC", Georgia, serif;
  --font-body: "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Film grain over everything — subtle texture */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 120; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .055;
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
}

html[lang="zh-Hant"] body { font-size: 15.5px; line-height: 2; letter-spacing: .05em; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }
html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2,
html[lang="zh-Hant"] h3 { font-weight: 300; letter-spacing: .1em; line-height: 1.6; }
html[lang="zh-Hant"] h1 em,
html[lang="zh-Hant"] h2 em,
html[lang="zh-Hant"] h3 em { font-style: normal; }

p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 130;
  background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* Small spaced-out label used across the site */
.label {
  display: inline-flex; align-items: center; gap: 1.1em;
  font-family: var(--font-body); font-weight: 400;
  font-size: .68rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 28px;
}
.label::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
html[lang="zh-Hant"] .label { font-size: .78rem; letter-spacing: .32em; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .9em;
  padding: 1.15em 2.3em;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font-family: var(--font-body); font-weight: 400;
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: color .6s var(--ease), border-color .6s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease-out);
}
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::before { transform: scaleY(1); }
.btn-gold, .btn-primary { border-color: var(--gold-dim); color: var(--gold); }
.btn-gold::before, .btn-primary::before { background: var(--gold); }
.btn-gold:hover, .btn-primary:hover { color: var(--bg); border-color: var(--gold); }
.btn-sm { padding: .95em 1.6em; font-size: .64rem; }
html[lang="zh-Hant"] .btn { font-size: .8rem; letter-spacing: .26em; }
html[lang="zh-Hant"] .btn-sm { font-size: .74rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background .6s var(--ease), border-color .6s var(--ease), transform .6s var(--ease);
}
.site-header.is-solid {
  background: rgba(11, 10, 9, .72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 40px); }
.nav a {
  position: relative; text-decoration: none;
  font-size: .66rem; font-weight: 400; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(233, 228, 220, .66); transition: color .4s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-num { display: none; }
.nav .nav-cta { display: none; }
html[lang="zh-Hant"] .nav a { font-size: .8rem; letter-spacing: .24em; }

.header-actions { display: flex; align-items: center; gap: 22px; }
.lang { display: inline-flex; align-items: center; gap: .7em; font-size: .66rem; letter-spacing: .2em; }
.lang span { color: var(--faint); }
.lang a { text-decoration: none; color: var(--faint); transition: color .3s; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: var(--ink); }

.menu-toggle {
  display: none; width: 40px; height: 40px; padding: 0; border: 0; background: none;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before {
  display: block; width: 26px; height: 1px; background: var(--ink); position: relative;
  transition: transform .5s var(--ease-out);
}
.menu-toggle span::before { content: ""; position: absolute; left: 0; top: 7px; width: 18px; }
.menu-toggle span { transform: translateY(-3px); }
.menu-open .menu-toggle span { transform: rotate(45deg); }
.menu-open .menu-toggle span::before { transform: translateY(-7px) rotate(-90deg); width: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  display: grid; place-items: center; text-align: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 120px;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; transition: opacity 2.8s var(--ease), transform 4.5s var(--ease-out); }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  filter: brightness(.88) saturate(.92) contrast(1.04);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.07) translate(-1%, -1%); } }
.js .hero-bg { opacity: 0; transform: scale(1.14); }
.is-entered .hero-bg { opacity: 1; transform: scale(1); }

.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 75% 65% at 50% 45%, rgba(11,10,9,.12) 0%, rgba(11,10,9,.42) 70%, rgba(11,10,9,.7) 100%),
    linear-gradient(180deg, rgba(11,10,9,.45) 0%, rgba(11,10,9,0) 20%, rgba(11,10,9,0) 78%, var(--bg) 100%);
}
/* Slow breathing light under the skylight */
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: -12%; width: min(70vw, 900px); height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 234, 200, .16), rgba(255, 234, 200, 0) 65%);
  mix-blend-mode: screen;
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: .35; } to { opacity: 1; } }

.hero-content { max-width: 780px; }
.hero .label { justify-content: center; }
.hero .label::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
.hero h1 {
  font-size: clamp(2rem, 4.1vw, 3.45rem);
  line-height: 1.2; letter-spacing: .005em;
}
html[lang="zh-Hant"] .hero h1 { font-size: clamp(1.55rem, 3.2vw, 2.6rem); letter-spacing: .16em; line-height: 1.75; }
.hero .lead {
  max-width: 520px; margin: 30px auto 46px;
  font-size: .98rem; color: rgba(233, 228, 220, .7);
}
html[lang="zh-Hant"] .hero .lead { font-size: .95rem; }
.hero-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: .6rem; letter-spacing: .4em; text-transform: uppercase; text-decoration: none;
  color: var(--muted);
}
html[lang="zh-Hant"] .scroll-cue { font-size: .7rem; letter-spacing: .4em; }
.scroll-cue i { position: relative; display: block; width: 1px; height: 56px; background: var(--line-strong); overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold);
  animation: cue 2.6s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

/* Intro sequence after "Enter" */
.js .intro { opacity: 0; transform: translateY(18px); filter: blur(8px); }
.is-entered .intro {
  opacity: 1; transform: none; filter: none;
  transition: opacity 1.8s var(--ease-out), transform 1.8s var(--ease-out), filter 1.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * .22s + .7s);
}
.js .scroll-cue.intro { transform: translate(-50%, 18px); }
.is-entered .scroll-cue.intro { transform: translateX(-50%); }

/* ---------- Sections ---------- */
section { position: relative; padding: clamp(110px, 14vw, 190px) 0; }
.section-grid { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 40px clamp(32px, 6vw, 96px); }
.section-label { margin-top: 12px; align-self: start; }
.section-grid h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
html[lang="zh-Hant"] .section-grid h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section-intro { max-width: 560px; color: var(--muted); margin-top: 26px; }

/* ---------- About ---------- */
.about { background: var(--bg); }
.statement { font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.12; margin-bottom: 56px; }
html[lang="zh-Hant"] .statement { font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.6; }
.about-body { columns: 2 280px; column-gap: 56px; max-width: 900px; }
.about-body p { break-inside: avoid; }
.about-body p:first-child::first-letter {
  float: left; font-family: var(--font-display); font-size: 3.6em; line-height: .82;
  padding: .06em .12em 0 0; color: var(--gold); font-weight: 300;
}
html[lang="zh-Hant"] .about-body p:first-child::first-letter { font-size: 2.6em; line-height: 1; padding-right: .18em; }

.pillars { list-style: none; padding: 0; margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.pillars li { border-top: 1px solid var(--line); padding-top: 28px; }
.pillar-num, .step-num {
  display: block; font-family: var(--font-display); font-style: italic; font-size: 1.15rem;
  color: var(--gold); margin-bottom: 16px;
}
.pillars strong, .steps strong {
  display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem;
  color: var(--ink); margin-bottom: 10px; letter-spacing: .01em;
}
html[lang="zh-Hant"] .pillars strong, html[lang="zh-Hant"] .steps strong { font-size: 1.12rem; letter-spacing: .1em; }
.pillars li > span:last-child, .steps li > span:last-child { color: var(--muted); font-size: .92rem; display: block; }

/* ---------- Services ---------- */
.services { background: var(--bg-2); }
.service-list { list-style: none; padding: 0; margin: clamp(64px, 8vw, 100px) 0 0; border-bottom: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px clamp(24px, 4vw, 64px);
  padding: clamp(40px, 5vw, 60px) 0; border-top: 1px solid var(--line);
  transition: background .8s var(--ease);
}
.service-num { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--gold); padding-top: .3em; }
.service h3 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); transition: color .6s var(--ease), transform .8s var(--ease-out); }
html[lang="zh-Hant"] .service h3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.service:hover h3 { color: var(--gold); transform: translateX(10px); }
.service-detail p { color: var(--body); margin-bottom: 22px; }
.service-detail ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.service-detail li { font-size: .84rem; color: var(--muted); display: flex; gap: 12px; align-items: baseline; }
.service-detail li::before { content: ""; flex: none; width: 10px; height: 1px; background: var(--gold-dim); transform: translateY(-4px); }

.process { margin-top: clamp(90px, 11vw, 140px); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { border-top: 1px solid var(--line); padding-top: 28px; }

/* ---------- Work ---------- */
.work { background: var(--bg); }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(56px, 7vw, 88px); }
.work-head h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
html[lang="zh-Hant"] .work-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.filters { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.filters button {
  position: relative; background: none; border: 0; padding: 6px 0;
  font-size: .64rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase; color: var(--faint);
  transition: color .4s;
}
html[lang="zh-Hant"] .filters button { font-size: .78rem; letter-spacing: .2em; }
.filters button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform .5s var(--ease-out);
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(56px, 7vw, 96px) clamp(28px, 4vw, 56px); }
.work-grid .project.is-offset { transform: translateY(clamp(40px, 7vw, 110px)); }
.js .work-grid .project.reveal.is-offset { transform: translateY(calc(clamp(40px, 7vw, 110px) + 30px)); }
.js .work-grid .project.reveal.is-visible.is-offset { transform: translateY(clamp(40px, 7vw, 110px)); }
.work-grid { padding-bottom: clamp(40px, 7vw, 110px); }
.project[hidden] { display: none; }
.project-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-3); }
.project-media > .art, .project-media img { transition: transform 1.6s var(--ease-out), filter 1.2s var(--ease); }
.project-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82) saturate(.85); }
.project:hover .project-media > .art, .project:hover .project-media img { transform: scale(1.045); }
.project-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.project-body { padding-top: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }
.tag { font-size: .6rem; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
html[lang="zh-Hant"] .tag { font-size: .72rem; letter-spacing: .24em; }
.project h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 12px; }
html[lang="zh-Hant"] .project h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
.project p { color: var(--muted); font-size: .92rem; max-width: 460px; margin-bottom: 20px; }
.project-link {
  display: inline-flex; align-items: center; gap: .8em; text-decoration: none;
  font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink);
}
html[lang="zh-Hant"] .project-link { font-size: .76rem; letter-spacing: .22em; }
.project-link::after { content: ""; width: 28px; height: 1px; background: var(--gold); transition: width .6s var(--ease-out); }
.project-link:hover::after { width: 52px; }

/* Placeholder artwork (until real images are added) — muted for the dark palette */
.art { position: absolute; inset: 0; filter: saturate(.5) brightness(.55) contrast(1.05); }
.project:hover .art { filter: saturate(.65) brightness(.68) contrast(1.05); }
.art-interior {
  background:
    linear-gradient(180deg, transparent 62%, #8a6a4f 62%, #8a6a4f 64%, #a7835f 64%),
    radial-gradient(circle at 72% 30%, #f6e2c3 0 12%, transparent 13%),
    linear-gradient(90deg, #d9c5ad 0 38%, #e7d8c4 38% 39%, #cdb79c 39%);
}
.art-interior::before {
  content: ""; position: absolute; left: 14%; bottom: 22%; width: 34%; height: 22%;
  background: #6f4e37; border-radius: 6px 6px 2px 2px; box-shadow: 0 -18px 0 -6px #8f6b4e;
}
.art-interior::after { content: ""; position: absolute; right: 18%; top: 0; width: 2px; height: 26%; background: #3b2a1e; }
.art-visual {
  background: #d8dccb;
  background-image:
    radial-gradient(circle at 34% 48%, #4f6b4a 0 18%, transparent 18.5%),
    radial-gradient(circle at 52% 48%, #b5543a 0 18%, transparent 18.5%),
    linear-gradient(90deg, transparent 72%, #1f1c19 72% 73%, transparent 73%);
}
.art-visual::after {
  content: "Aa"; position: absolute; right: 9%; bottom: 10%;
  font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); color: #1f1c19; font-style: italic;
}
.art-env {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(224,138,111,.55), transparent 60%),
    repeating-linear-gradient(90deg, #2c2622 0 22px, #352e29 22px 24px);
}
.art-env::before {
  content: ""; position: absolute; left: 50%; top: 18%; width: 46%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; border: 2px solid rgba(239,232,223,.55);
  box-shadow: 0 0 0 18px rgba(239,232,223,.08), 0 0 0 40px rgba(239,232,223,.05), 0 0 60px rgba(224,138,111,.5);
}
.art-retail { background: linear-gradient(180deg, #ece4d8 0 70%, #c9bba8 70%); }
.art-retail::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: 20%; height: 40%;
  background: repeating-linear-gradient(90deg, #b5543a 0 14%, transparent 14% 20%, #1f1c19 20% 21%, transparent 21% 34%);
  opacity: .85; border-top: 3px solid #1f1c19;
}
.art-retail::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 14%; height: 8%; background: #1f1c19; }

/* Sound projects: waveform + play */
.art-sound { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #221d18, #0f0d0c 75%); }
.art-sound.alt { background: radial-gradient(ellipse at 50% 60%, #1a1f1c, #0d0f0e 75%); }
.wave { display: flex; align-items: center; gap: 3px; height: 42%; width: 72%; }
.wave i { flex: 1; height: var(--h, 40%); background: rgba(194, 165, 122, .45); transform-origin: center; transition: background .4s; }
.is-playing .wave i { background: var(--gold); animation: bounce 1.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bounce { 50% { transform: scaleY(.4); } }
.play {
  position: absolute; left: 22px; bottom: 20px; z-index: 2;
  display: inline-flex; align-items: center; gap: 14px; background: none; border: 0; padding: 0;
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink);
}
html[lang="zh-Hant"] .play { font-size: .74rem; letter-spacing: .22em; }
.play .pi {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-dim);
  display: grid; place-items: center; color: var(--gold); transition: background .4s, color .4s;
}
.play:hover:not(:disabled) .pi { background: var(--gold); color: var(--bg); }
.play svg { width: 11px; height: 11px; }
.play .i-pause { display: none; }
.is-playing .play .i-play { display: none; }
.is-playing .play .i-pause { display: block; }
.play:disabled { opacity: .55; cursor: default; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); text-align: center; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(900px, 120vw); aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(194, 165, 122, .09), transparent);
  animation: breathe 8s ease-in-out infinite alternate;
}
.contact-inner { position: relative; max-width: 860px; }
.contact .label { justify-content: center; }
.contact .label::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
.contact h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.12; }
html[lang="zh-Hant"] .contact h2 { font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.7; }
.contact .lead { color: var(--muted); max-width: 520px; margin: 30px auto 48px; }
.email-line { margin: 36px 0 0; }
.email-line a {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-style: italic;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat;
  padding-bottom: 4px; transition: color .4s;
}
.email-line a:hover { color: var(--gold); }
.socials { list-style: none; padding: 0; margin: 48px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 36px; }
.socials a {
  font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; text-decoration: none; color: var(--muted);
  transition: color .4s;
}
.socials a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 36px; background: var(--bg-2); }
.footer-inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--faint);
}
html[lang="zh-Hant"] .footer-inner { font-size: .74rem; letter-spacing: .16em; }
.footer-inner a { text-decoration: none; transition: color .3s; margin-right: 130px; }
.footer-inner a:hover { color: var(--ink); }

/* ---------- Welcome screen ---------- */
.gate { display: none; }
.js.gate-open { overflow: hidden; }
.js.gate-open .gate { display: flex; }
.gate {
  position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center; text-align: center;
  background: #050505;
}
.gate.is-leaving {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 1.8s var(--ease) .5s, visibility 0s linear 2.3s;
}
.gate-bg { position: absolute; inset: 0; overflow: hidden; animation: gate-bg-in 4s var(--ease) both; }
@keyframes gate-bg-in { from { opacity: 0; } }
.gate-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  filter: brightness(.65) saturate(.85);
  animation: gate-zoom 18s var(--ease-out) both;
}
@keyframes gate-zoom { from { transform: scale(1.18); } to { transform: scale(1.04); } }
.gate-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 65% at 50% 50%, rgba(5,5,5,.3) 0%, rgba(5,5,5,.62) 80%, rgba(5,5,5,.85) 100%);
}
.gate-inner { position: relative; max-width: 900px; padding: 24px; transition: opacity .9s var(--ease), transform 1.2s var(--ease-out), filter .9s var(--ease); }
.gate.is-leaving .gate-inner { opacity: 0; transform: translateY(-16px); filter: blur(8px); }

.gate-line {
  display: block; width: 1px; height: 0; margin: 0 auto 34px;
  background: linear-gradient(transparent, var(--gold));
  animation: grow 1.6s var(--ease-out) .3s forwards;
}
@keyframes grow { to { height: 76px; } }

.g-step { opacity: 0; animation: rise 1.8s var(--ease-out) forwards; animation-delay: calc(var(--i) * .45s + .9s); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: none; }
}
.gate .label { justify-content: center; }
.gate .label::before { display: none; }
.gate h2 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); margin-bottom: 60px; letter-spacing: .01em; }
html[lang="zh-Hant"] .gate h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); letter-spacing: .2em; }

.gate-enter {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--gold-dim); background: rgba(5, 5, 5, .25); color: var(--ink);
  font-size: .64rem; font-weight: 400; letter-spacing: .38em; text-transform: uppercase; padding-left: .38em;
  transition: background .8s var(--ease), border-color .8s var(--ease), transform .8s var(--ease-out);
}
html[lang="zh-Hant"] .gate-enter { font-size: .82rem; letter-spacing: .5em; padding-left: .5em; }
.gate-enter::before, .gate-enter::after {
  content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1px solid rgba(194, 165, 122, .2);
  animation: halo 3.6s var(--ease) infinite;
}
.gate-enter::after { animation-delay: 1.8s; }
@keyframes halo { 0% { transform: scale(.92); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.gate-enter:hover { background: var(--gold-soft); border-color: var(--gold); transform: scale(1.04); }
.gate-enter .eq i { background: var(--gold); animation: eq 1.2s ease-in-out infinite; }
.gate-enter .eq i:nth-child(2) { animation-delay: -.45s; }
.gate-enter .eq i:nth-child(3) { animation-delay: -.2s; }
.gate-enter .eq i:nth-child(4) { animation-delay: -.7s; }
.gate-note { margin: 44px 0 6px; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
html[lang="zh-Hant"] .gate-note { font-size: .74rem; letter-spacing: .26em; }
.gate-quiet {
  background: none; border: 0; padding: 6px; font-size: .62rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--faint); transition: color .4s;
}
html[lang="zh-Hant"] .gate-quiet { font-size: .74rem; letter-spacing: .2em; }
.gate-quiet:hover { color: var(--ink); }

/* ---------- Background music toggle ---------- */
.music-toggle {
  position: fixed; right: 26px; bottom: 24px; z-index: 40;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 2px; background: none; border: 0;
  font-size: .6rem; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  transition: color .4s;
}
html[lang="zh-Hant"] .music-toggle { font-size: .72rem; letter-spacing: .2em; }
.music-toggle:hover { color: var(--ink); }
.eq { display: flex; align-items: flex-end; gap: 2px; width: 15px; height: 13px; }
.eq i { flex: 1; height: 30%; background: var(--gold); opacity: .8; transition: height .4s; }
.eq i:nth-child(2) { height: 55%; }
.eq i:nth-child(3) { height: 40%; }
.music-toggle.is-playing .eq i { animation: eq 1.1s ease-in-out infinite; }
.music-toggle.is-playing .eq i:nth-child(2) { animation-delay: -.45s; }
.music-toggle.is-playing .eq i:nth-child(3) { animation-delay: -.2s; }
.music-toggle.is-playing .eq i:nth-child(4) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.6s var(--ease-out), transform 1.6s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .section-grid { grid-template-columns: 1fr; gap: 0; }
  .service { grid-template-columns: 60px 1fr; }
  .service-detail { grid-column: 2; }
  .pillars, .steps { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 30px;
    background: rgba(8, 7, 6, .97);
    opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav a {
    font-family: var(--font-display); font-size: 2rem; letter-spacing: .04em; text-transform: none;
    color: var(--ink); display: flex; align-items: baseline; gap: 14px;
    opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), color .4s;
  }
  html[lang="zh-Hant"] .nav a { font-size: 1.5rem; letter-spacing: .2em; }
  .menu-open .nav a { opacity: 1; transform: none; }
  .menu-open .nav a:nth-child(2) { transition-delay: .08s; }
  .menu-open .nav a:nth-child(3) { transition-delay: .16s; }
  .menu-open .nav a:nth-child(4) { transition-delay: .24s; }
  .menu-open .nav a:nth-child(5) { transition-delay: .32s; }
  .nav a::after { display: none; }
  .nav-num { display: inline; font-family: var(--font-body); font-size: .6rem; letter-spacing: .2em; color: var(--gold); }
  .nav .nav-cta {
    display: inline-flex; margin-top: 20px; font-family: var(--font-body); font-size: .68rem;
    letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
    border: 1px solid var(--gold-dim); padding: 1em 2em;
  }
  html[lang="zh-Hant"] .nav .nav-cta { font-size: .8rem; }
  .header-actions { margin-left: auto; }
  .work-grid { grid-template-columns: 1fr; padding-bottom: 0; }
  .work-grid .project.is-offset,
  .js .work-grid .project.reveal.is-visible.is-offset { transform: none; }
  .js .work-grid .project.reveal.is-offset { transform: translateY(30px); }
}

@media (max-width: 620px) {
  .service { grid-template-columns: 1fr; gap: 14px; }
  .service-detail { grid-column: auto; }
  .service-detail ul { grid-template-columns: 1fr; }
  .hero { padding-bottom: 140px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .music-toggle { right: 18px; bottom: 16px; }
  .gate-enter { width: 116px; height: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .intro, .g-step { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js .hero-bg { opacity: 1; transform: none; }
  .gate-line { height: 76px; }
  .js .scroll-cue.intro { transform: translateX(-50%) !important; }
}

@media (max-width: 620px) { .footer-inner a { margin-right: 0; } .site-footer { padding-bottom: 64px; } }

/* Line breaks that only apply on phones, and balanced wrapping for headings */
.br-m { display: none; }
@media (max-width: 620px) { .br-m { display: inline; } .hero .lead br { display: none; } }
h1, h2, .hero .lead, .contact .lead, .section-intro { text-wrap: balance; }

/* Keep text readable on the brighter photo */
.hero-content, .gate-inner { text-shadow: 0 2px 24px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4); }
.hero .lead { color: rgba(239, 232, 223, .82); }

/* Music button hint (shown if the browser blocked playback) */
.music-toggle.is-hint { color: var(--gold); animation: hint-pulse 1.6s ease-in-out infinite; }
@keyframes hint-pulse { 50% { opacity: .45; } }

/* Readability over the photo — phones only (desktop unchanged) */
@media (max-width: 620px) {
  .site-header:not(.is-solid) .lang a { color: rgba(233, 228, 220, .6); }
  .site-header:not(.is-solid) .lang a[aria-current="true"] { color: #fff; }
  .site-header:not(.is-solid) .lang span { color: rgba(233, 228, 220, .4); }
  .hero .btn { background: rgba(11, 10, 9, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .hero .btn-gold { color: #d9bf94; border-color: rgba(217, 191, 148, .7); }
  .gate-note { color: rgba(233, 228, 220, .78); }
  .gate-quiet { color: rgba(233, 228, 220, .6); }
}

/* Mobile: keep the discipline label on one line; fully opaque menu */
@media (max-width: 620px) {
  .hero .label, .gate .label { font-size: .58rem; letter-spacing: .2em; gap: .8em; }
  .hero .label::before, .hero .label::after { width: 18px; }
  html[lang="zh-Hant"] .hero .label, html[lang="zh-Hant"] .gate .label { font-size: .72rem; letter-spacing: .26em; }
}
@media (max-width: 860px) { .nav { background: #080706; } }
section[hidden] { display: none !important; }

