:root {
  /* Brand colours, sampled from the PulseCraft logo */
  --ink: #1f2020;
  --ink-2: #282a29;
  --line: #3a3c3b;
  --paper: #f2efea;
  --muted: #a6a9a6;
  --pulse: #ff914d;
  --pulse-deep: #e8732b;

  --font-display: "General Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "General Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; }

/* Loading screen: the logo's pulse, shown until the page has loaded */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 40px;
  background: var(--ink);
  transition: opacity .6s ease, visibility .6s;
  /* Safety net: fade out on its own if the script never runs */
  animation: loader-out .6s 6s forwards;
}
.loader.done { opacity: 0; visibility: hidden; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
.loader-pulse { position: relative; width: 56px; height: 56px; }
.loader-pulse > * { position: absolute; inset: 0; border-radius: 50%; }
.loader-pulse .dot { background: var(--pulse); box-shadow: 0 0 50px 6px rgba(255,145,77,.35); animation: loader-beat 1.2s ease-in-out infinite; }
.loader-pulse .ring { border: 2px solid var(--pulse); animation: pulse-ring 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.loader-pulse .ring:nth-child(2) { animation-delay: .8s; }
.loader-pulse .ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes loader-beat { 50% { transform: scale(.82); } }
/* Fixed size, same in-app browser fix as the header logo */
.loader-wordmark { width: 180px; height: 45px; max-width: none; margin-top: 48px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--pulse); color: var(--ink); padding: 8px 12px; }

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

/* Type */
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.02; letter-spacing: -0.03em; }
h1 { font-size: clamp(3rem, 7.4vw, 6.75rem); font-weight: 400; line-height: .96; letter-spacing: -0.04em; max-width: 13ch; }
.section-title { font-size: clamp(2.4rem, 5.2vw, 4.5rem); font-weight: 400; max-width: 18ch; }
/* Section numbers: a large faded 01–05 behind each heading, with an
   orange // marker leading into the title */
.section-title[data-num] { position: relative; isolation: isolate; padding-left: 1.45em; max-width: calc(18ch + 1.45em); }
.section-title[data-num]::after {
  content: attr(data-num); position: absolute; z-index: -1; left: 0; top: -.24em;
  font-size: 2.2em; font-weight: 500; line-height: .8; letter-spacing: -0.06em;
  background: linear-gradient(180deg, rgba(242,239,234,.13) 0%, rgba(242,239,234,.04) 75%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  pointer-events: none;
}
/* Headings in a half-width column (and all headings on phones) put the
   number above instead, with the title overlapping its lower half */
#about-title[data-num], #contact-title[data-num] { padding-left: 0; padding-top: .95em; max-width: 18ch; }
#about-title[data-num]::after, #contact-title[data-num]::after { top: -.06em; font-size: 2em; }
/* 04 sits over the behind-the-scenes photos, so it needs more light to read */
#about-title[data-num]::after { background-image: linear-gradient(180deg, rgba(242,239,234,.34) 0%, rgba(242,239,234,.1) 75%); }
/* Chinese line breaks come from the translation; the ch-based width only suits English */
:lang(zh) #about-title[data-num], :lang(zh) #contact-title[data-num] { max-width: none; }
/* 04 shares the row with the About text, so its Chinese lines are sized to that column */
@media (min-width: 961px) { :lang(zh) #about-title { font-size: clamp(2rem, 4.1vw, 3.6rem); } }
.section-title[data-num]::before {
  content: "//"; font-family: var(--font-mono); font-size: .38em; font-weight: 500;
  color: var(--pulse); letter-spacing: .08em; margin-right: .7em; vertical-align: .55em;
}
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 500; letter-spacing: -0.025em; }
p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--pulse); color: var(--ink);
  border: 0; border-radius: var(--radius);
  font-weight: 600; letter-spacing: .01em; text-decoration: none;
  cursor: pointer; transition: background-color .2s;
}
.btn:hover { background: var(--pulse-deep); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(242,239,234,.5); }
.btn-ghost:hover { background: rgba(242,239,234,.08); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-wide { width: 100%; }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--pulse); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.link:hover { color: var(--paper); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
  background: rgba(31,32,32,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Fixed size + no shrinking: in-app browsers (Instagram, Facebook) can collapse an auto-width image inside a flex item to 0 */
.brand { display: block; flex-shrink: 0; line-height: 0; }
.brand img { height: 52px; width: 106px; max-width: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--paper); }
.lang-toggle {
  font: inherit; font-weight: 500; font-size: .95rem; cursor: pointer;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: none; color: var(--paper); border: 1px solid var(--line);
}
.lang-toggle:hover { border-color: var(--pulse); color: var(--pulse); }

/* Chinese: CJK text needs no negative tracking, a bit more line height,
   and the headline breaks where the translation says (data-zh newlines). */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) .client-name { letter-spacing: 0; }
:lang(zh) h1, :lang(zh) .hero-copy h1 { line-height: 1.2; max-width: none; white-space: pre-line; }
:lang(zh) .section-title { line-height: 1.2; white-space: pre-line; }
/* These Chinese headings stay on one line, shrinking on narrow screens to
   fit. --ems is the heading's width in em: its characters plus the number
   offset and the // marker. 近期作品 uses the process heading's size. */
:lang(zh) #process-title, :lang(zh) #services-title, :lang(zh) #work-title {
  --ems: 15; max-width: none; white-space: nowrap;
  font-size: min(4.5rem, calc((100vw - 2 * var(--gutter)) / var(--ems)));
}
:lang(zh) #services-title { --ems: 16.6; }
:lang(zh) body, :lang(zh) p { line-height: 1.8; }

/* Hero viewfinder */
.hero { padding: clamp(12px, 2vw, 24px) var(--gutter) 0; }
.viewfinder {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 96px);
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: flex-end;
  border-radius: var(--radius);
  background: #191a1a;
  isolation: isolate;
}
.vf-media, .vf-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.vf-media { z-index: -1; }
.vf-media video { object-fit: cover; }
.vf-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(25,26,26,.35) 0%, rgba(25,26,26,0) 30%, rgba(25,26,26,.85) 100%);
}
/* Hero photo: shown while there's no showreel. On desktop it sits on the right and fades into the background. */
.vf-photo {
  display: none; position: absolute; top: 0; right: 0; width: 60%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  mask-image: linear-gradient(to right, transparent 0%, #000 40%);
}
.viewfinder.no-video .vf-photo { display: block; }

/* The logo's pulse, radiating over the hero */
.vf-pulse { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.vf-pulse > * { position: absolute; left: 47%; top: 24%; margin: -24px 0 0 -24px; width: 48px; height: 48px; border-radius: 50%; }
.vf-pulse .dot { background: var(--pulse); box-shadow: 0 0 60px 8px rgba(255,145,77,.35); }
.vf-pulse .ring { border: 2px solid var(--pulse); animation: pulse-ring 3.6s cubic-bezier(.2,.6,.3,1) infinite; }
.vf-pulse .ring:nth-child(2) { animation-delay: 1.2s; }
.vf-pulse .ring:nth-child(3) { animation-delay: 2.4s; }
@keyframes pulse-ring {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(9); opacity: 0; }
}
.viewfinder.no-video video { display: none; }
}

.corner { position: absolute; width: clamp(28px, 4vw, 48px); aspect-ratio: 1; border: 0 solid rgba(242,239,234,.85); }
.corner.tl { top: 20px; left: 20px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 20px; right: 20px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 20px; left: 20px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 20px; right: 20px; border-bottom-width: 2px; border-right-width: 2px; }

.vf-hud {
  font-family: var(--font-mono); letter-spacing: .04em;
  position: absolute; top: 30px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 clamp(56px, 7vw, 88px);
  font-variant-numeric: tabular-nums; font-weight: 500; font-size: .9rem;
}
.rec { display: inline-flex; align-items: center; gap: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pulse); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-copy {
  padding: clamp(80px, 12vw, 120px) clamp(36px, 7vw, 88px) clamp(56px, 7vw, 88px);
  display: grid; gap: 30px;
}
.hero-copy h1 { font-size: clamp(2.6rem, 5.6vw, 5.25rem); line-height: 1; }
/* Headline fades slightly toward the bottom, like light falling off */
.hero-copy h1 {
  background: linear-gradient(180deg, #fff 0%, #fff 45%, rgba(242,239,234,.55) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 22px rgba(20,21,21,.55));
}
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; max-width: 48ch; color: rgba(242,239,234,.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Services */
.services { padding: clamp(80px, 11vw, 140px) 0 clamp(40px, 6vw, 80px); }
.service-list { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 16px 40px; align-items: start;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service p { color: var(--muted); max-width: 44ch; }
.deliverables { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .95rem; }
.deliverables li { padding-left: 18px; position: relative; }
.deliverables li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--pulse); }
.service .link { grid-column: 2; justify-self: start; }

/* Work */
.work { padding: clamp(60px, 8vw, 100px) 0; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
  min-height: 48px; padding: 0 22px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 1rem; font-weight: 600;
}
.filter:hover { color: var(--paper); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(170px, 20vw, 290px);
  grid-auto-flow: dense; gap: 10px;
}
.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.full { grid-column: 1 / -1; grid-row: span 2; }
.tile button { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; }
.tile button:focus-visible { outline: 2px solid var(--pulse); outline-offset: -2px; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile button:hover img, .tile button:hover video { transform: scale(1.03); }
.tile .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(25,26,26,.85));
  font-size: .9rem; font-weight: 500;
}
.client-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.client-tabs[hidden] { display: none; }
.client-tab {
  display: grid; gap: 2px; text-align: left; cursor: pointer;
  min-width: 200px; padding: 14px 20px;
  background: var(--ink-2); border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.client-tab:hover { border-color: var(--muted); }
.client-tab[aria-selected="true"] { border-color: var(--pulse); background: rgba(255,145,77,.08); }
.client-name { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.client-panel[hidden] { display: none; }
.tile .play {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pulse); color: var(--ink);
}
.tile.missing { display: grid; place-items: center; text-align: center; padding: 16px; border: 1.5px dashed var(--line); background: transparent; }
.tile.missing p { color: var(--muted); font-size: .85rem; }
.tile.missing code { display: block; color: var(--paper); font-family: inherit; font-weight: 600; margin-top: 4px; word-break: break-all; }
.tile[hidden] { display: none; }
/* Instagram posts, shown in full side by side */
.gallery-ig { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.5vw, 32px); align-items: flex-start; }
.tile-ig { flex: 1 1 340px; max-width: 540px; min-width: 0; overflow: hidden; border-radius: 10px; }
/* Instagram's player can't be styled from here, so the like, comment and
   share bar at the bottom is cropped off by pulling the frame up under the
   edge. If Instagram changes their layout, adjust this number. */
.tile-ig iframe.instagram-media { margin-bottom: calc(-1 * var(--ig-crop, 108px)) !important; }
.tile-ig .instagram-media, .tile-ig iframe { margin: 0 !important; min-width: 0 !important; width: 100% !important; max-width: 540px !important; border-radius: 10px !important; }
/* Before Instagram's script turns it into the post */
.tile-ig blockquote.instagram-media:not(iframe) {
  display: grid; place-items: center; min-height: 320px; padding: 24px;
  background: var(--ink-2); border: 1px solid var(--line);
}
.tile-ig blockquote a { color: var(--pulse); font-weight: 600; }

/* Process: a real sequence, so it's numbered */
.process { padding: clamp(60px, 8vw, 100px) 0; background: var(--ink-2); }
.steps { list-style: none; counter-reset: step; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: step; padding-top: 28px; border-top: 2px solid var(--line); position: relative; }
.steps li::before {
  content: counter(step); position: absolute; top: -15px; left: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pulse); color: var(--ink); font-weight: 600; font-size: .85rem;
  z-index: 1; /* stays above the orange line that draws across */
}
.step-icon {
  width: 52px; height: 52px; padding: 11px; margin-bottom: 20px;
  border: 1px solid rgba(255,145,77,.4); border-radius: 14px;
  background: rgba(255,145,77,.08); color: var(--pulse);
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* About */
.about { padding: clamp(120px, 15vw, 220px) 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; align-items: start; }
.about-copy { display: grid; gap: 18px; font-size: 1.125rem; max-width: 56ch; text-shadow: 0 1px 12px rgba(20,21,21,.6); }
.about-copy p:last-child { color: rgba(242,239,234,.72); }
/* Behind-the-scenes photos sit behind the About text, tinted and fading into the page */
.about { position: relative; overflow: hidden; isolation: isolate; }
.bts { position: absolute; inset: 0; z-index: -1; display: grid; grid-template-columns: repeat(3, 1fr); }
.bts img { width: 100%; height: 100%; object-fit: cover; }
.about::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(31,32,32,.84) 22%, rgba(31,32,32,.78) 50%, rgba(31,32,32,.84) 78%, var(--ink) 100%);
}

/* Contact */
.contact { padding: clamp(60px, 8vw, 100px) 0 clamp(80px, 11vw, 140px); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 40px 64px; }
.contact-lede { margin-top: 20px; color: var(--muted); max-width: 40ch; font-size: 1.1rem; }
.contact-email { margin-top: 16px; color: var(--muted); }
.contact-email a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--pulse); text-underline-offset: 4px; word-break: break-all; }
.contact-email a:hover { color: var(--pulse); }
.enquiry { display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend, .field > span { font-weight: 600; margin-bottom: 10px; display: block; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip span:hover { color: var(--paper); border-color: var(--muted); }
.chip input:checked + span { background: var(--pulse); border-color: var(--pulse); color: var(--ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--pulse); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--ink-2); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pulse); }
/* iPhone Safari gives date fields a built-in minimum width that pushes
   them past the screen edge; let them shrink to the column instead */
.field { min-width: 0; }
.field input[type="date"] {
  display: block; min-width: 0; max-width: 100%; height: 52px; /* same as the name field */
  -webkit-appearance: none; appearance: none;
  text-align: left; color-scheme: dark;
}
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field textarea::placeholder { color: #7d807d; }
.form-error { color: var(--pulse); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: grid; gap: 8px; justify-items: start; }
.footer-row img { height: 44px; width: auto; }
.registration { color: var(--muted); font-size: .8rem; }
.footer-email { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); text-decoration: none; font-size: .95rem; }
.footer-email svg { color: var(--pulse); flex: none; }
.footer-email:hover { color: var(--pulse); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--paper); }
.icon-link {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  transition: color .15s, border-color .15s;
}
.icon-link:hover { border-color: var(--pulse); color: var(--pulse); }
.copyright { color: var(--muted); font-size: .9rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pulse); color: var(--ink);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20,21,21,.96); color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lb-stage { margin: 0; display: grid; gap: 12px; justify-items: center; padding: 56px 0 24px; }
.lb-media img, .lb-media video { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--radius); }
.lb-stage figcaption { color: var(--muted); }
.lb-close, .lb-nav { background: none; border: 0; cursor: pointer; color: var(--paper); font-size: 2.2rem; line-height: 1; width: 48px; height: 48px; justify-self: center; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-close:hover, .lb-nav:hover { color: var(--pulse); }

/* ============================================================
   Motion. Everything here only applies once the script adds
   .motion to <html>, so the page is fully visible without it
   and for visitors who ask for reduced motion.
   ============================================================ */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40;
  background: linear-gradient(90deg, var(--pulse-deep), var(--pulse));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* Scroll reveal: fade up, staggered by --d */
.motion .reveal {
  opacity: 0; translate: 0 36px;
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), translate .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.motion .reveal.in { opacity: 1; translate: 0 0; }
/* Section titles rise out of a mask */
.motion .section-title.reveal {
  opacity: 1; translate: 0 0;
  clip-path: inset(0 0 100% 0); transform: translateY(40px);
  transition: clip-path 1.1s cubic-bezier(.7,0,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.motion .section-title.reveal.in { clip-path: inset(-60% -10% -40% -10%); transform: none; } /* room for the big number */
/* Gallery tiles also grow slightly into place */
.motion .tile.reveal { scale: .94; transition-property: opacity, translate, scale; }
.motion .tile.reveal.in { scale: 1; }

/* Hero intro, played when the loading screen lifts */
.motion .hero-copy > * { opacity: 0; translate: 0 40px; }
.motion .vf-hud, .motion .corner { opacity: 0; }
.motion .corner.tl { translate: -14px -14px; } .motion .corner.tr { translate: 14px -14px; }
.motion .corner.bl { translate: -14px 14px; } .motion .corner.br { translate: 14px 14px; }
.motion .vf-photo { scale: 1.12; }
.motion.loaded .hero-copy > * {
  opacity: 1; translate: 0 0;
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), translate 1s cubic-bezier(.2,.7,.2,1);
}
.motion.loaded .hero-copy > :nth-child(1) { transition-delay: .25s; }
.motion.loaded .hero-copy > :nth-child(2) { transition-delay: .4s; }
.motion.loaded .hero-copy > :nth-child(3) { transition-delay: .55s; }
.motion.loaded .vf-hud, .motion.loaded .corner { opacity: 1; translate: 0 0; transition: opacity .8s .1s, translate .8s .1s cubic-bezier(.2,.7,.2,1); }
.motion.loaded .vf-photo { scale: 1; transition: scale 2.2s cubic-bezier(.2,.7,.2,1); }
/* Parallax offsets, set by the script while scrolling */
.motion .vf-photo { translate: 0 var(--hero-shift, 0px); }

/* Services: an orange bar and a nudge on hover */
.service { position: relative; transition: background-color .35s; }
.service::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--pulse); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .6s cubic-bezier(.7,0,.2,1);
}
.service h3 { transition: translate .4s cubic-bezier(.2,.7,.2,1), color .3s; }
.service:hover::before { transform: scaleX(1); }
.service:hover h3 { translate: 12px 0; color: var(--pulse); }

/* Gallery: photos zoom and darken slightly on hover */
.tile button::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(20,21,21,.2);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.tile img, .tile video { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.tile button:hover img, .tile button:hover video { transform: scale(1.08); }
.tile button:hover::before { opacity: 1; }
@media (hover: none) { .tile button::before { display: none; } }

/* Process: the orange line draws across and the number pops in */
.steps li::after {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
  background: var(--pulse); transform: scaleX(0); transform-origin: 0 50%;
}
.motion .steps li.reveal::after { transition: transform 1.2s cubic-bezier(.7,0,.2,1) calc(var(--d, 0s) + .2s); }
.motion .steps li.reveal.in::after { transform: scaleX(1); }
.motion .steps li.reveal::before { scale: 0; transition: scale .6s cubic-bezier(.3,1.6,.5,1) calc(var(--d, 0s) + .3s); }
.motion .steps li.reveal.in::before { scale: 1; }
.step-icon { transition: background-color .3s, color .3s, rotate .5s cubic-bezier(.3,1.6,.5,1); }
.steps li:hover .step-icon { background: var(--pulse); color: var(--ink); rotate: -8deg; }

/* Buttons: a light sweep on hover; the script adds a magnetic pull */
.btn { position: relative; overflow: hidden; transition: background-color .2s, translate .35s cubic-bezier(.2,.7,.2,1); }
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  translate: -110% 0; transition: translate .7s ease;
}
.btn:hover::after { translate: 110% 0; }
.btn-ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.12) 50%, transparent 70%); }

/* Floating WhatsApp: the logo's pulse */
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--pulse); animation: wa-ring 2.4s cubic-bezier(.2,.6,.3,1) infinite;
}
@keyframes wa-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }

/* Behind-the-scenes photos drift slower than the page */
.motion .bts { inset: -12% 0; translate: 0 var(--bts-shift, 0px); }

/* Lightbox opens with a soft zoom */
.lightbox[open] .lb-media { animation: lb-in .45s cubic-bezier(.2,.7,.2,1); }
@keyframes lb-in { from { opacity: 0; scale: .96; } }

/* ============================================================
   Black-on-black decoration, like a matte card with glossy
   embossing: strips a shade lighter than the page, with a raised
   edge, and a soft highlight fixed to the screen so it slides
   across them as you scroll.
   ============================================================ */
:root {
  --deco-tone: #252727;
  --deco-sheen: linear-gradient(165deg, transparent 0%, transparent 32%, rgba(255,255,255,.07) 45%, rgba(255,255,255,.015) 52%, transparent 64%, transparent 100%);
}
/* Matte grain over the whole page background */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.services, .work, .process, .contact { position: relative; overflow: hidden; isolation: isolate; }
.deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* The raised edge: lit from above, shadowed below */
.d-item { position: absolute; display: block; filter: drop-shadow(0 -1px 0 rgba(255,255,255,.045)) drop-shadow(0 2px 1px rgba(0,0,0,.55)); }
.d-item i { display: block; background: var(--deco-sheen) fixed, var(--deco-tone); }
/* Embossed strips: glossy bars set at an angle */
.d-strips { display: grid; gap: 14px; rotate: -18deg; }
.d-strips i { height: 12px; border-radius: 2px; }
.d-strips i:nth-child(2) { height: 34px; margin-left: 12%; }
.d-strips i:nth-child(3) { height: 6px; margin-left: 30%; }

.d-strips-c { width: 44%; right: -10%; top: -3%; }
/* Fine detailing: hairlines, tiny glossy dots, dotted grids and thin
   shapes, each a few percent lighter than the page. Positions are set
   per piece in index.html; .g-wide pieces are left out on phones. */
.g { position: absolute; display: block; }
.g-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.075) 25%, rgba(255,255,255,.075) 75%, transparent); }
.g-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), #2c2e2e 60%);
}
.g-cross {
  width: 13px; height: 13px;
  background:
    linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)) center / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)) center / 100% 1px no-repeat;
}
.g-ring { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,255,255,.055); }
.g-ring-dotted { aspect-ratio: 1; border-radius: 50%; border: 1.5px dotted rgba(255,255,255,.09); }
.g-square { aspect-ratio: 1; border: 1px solid rgba(255,255,255,.07); rotate: 45deg; }
/* Dotted grid: glossy dots (the same sweeping highlight as the strips),
   fading out toward the edges of the patch */
.g-dots {
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
}
.g-dots i {
  display: block; width: 100%; height: 100%;
  background: var(--deco-sheen) fixed, #313333;
  -webkit-mask: radial-gradient(circle, #000 1.1px, transparent 1.7px) 0 0 / 14px 14px;
  mask: radial-gradient(circle, #000 1.1px, transparent 1.7px) 0 0 / 14px 14px;
}
@media (max-width: 640px) {
  .g-wide { display: none; }
  .g-dots { scale: .75; }
}

/* Camera silhouette under the form's Send on WhatsApp button, lined up
   with the right edge of the content */
.d-camera {
  width: 96px; aspect-ratio: 120 / 86; rotate: -8deg;
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  bottom: clamp(16px, 3vw, 36px);
}
.d-camera i {
  width: 100%; height: 100%;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 86'><path fill='black' fill-rule='evenodd' d='M8 22h22l8-12h44l8 12h22a6 6 0 0 1 6 6v48a6 6 0 0 1-6 6H8a6 6 0 0 1-6-6V28a6 6 0 0 1 6-6ZM60 26a24 24 0 1 0 0 48a24 24 0 1 0 0-48ZM60 33a17 17 0 1 1 0 34a17 17 0 1 1 0-34ZM90 30h12v6H90ZM14 15h10v5H14Z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 86'><path fill='black' fill-rule='evenodd' d='M8 22h22l8-12h44l8 12h22a6 6 0 0 1 6 6v48a6 6 0 0 1-6 6H8a6 6 0 0 1-6-6V28a6 6 0 0 1 6-6ZM60 26a24 24 0 1 0 0 48a24 24 0 1 0 0-48ZM60 33a17 17 0 1 1 0 34a17 17 0 1 1 0-34ZM90 30h12v6H90ZM14 15h10v5H14Z'/></svg>") center / contain no-repeat;
}
@media (max-width: 640px) {
  /* Small screens sit closer to the eye, so the shapes go a shade quieter */
  .deco { --deco-tone: #232525; }
  .d-strips-c { width: 70%; right: -24%; top: 2%; }
  .d-camera { width: 66px; bottom: 12px; }
}

/* Responsive */
@media (max-width: 960px) {
  .service { grid-template-columns: 1fr 1fr; }
  .service h3 { grid-column: 1 / -1; }
  .service .link { grid-column: 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .tile.big { grid-row: span 1; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .brand img { height: 42px; width: 86px; }
  /* Phone hero: the photo sits on top in the normal flow, and the headline
     follows below it in the grey area, so the two can never overlap. */
  .viewfinder { min-height: 0; display: block; }
  .vf-media { position: relative; height: 58vh; height: 58svh; min-height: 340px; }
  .corner.tl, .corner.tr { top: 12px; } .corner.bl, .corner.br { bottom: 12px; }
  .corner.tl, .corner.bl { left: 12px; } .corner.tr, .corner.br { right: 12px; }
  .vf-hud { top: 20px; padding: 0 48px; font-size: .85rem; }
  .vf-photo {
    width: 100%; height: 100%; object-position: 50% 64%;
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  }
  .vf-pulse > * { left: 20%; top: 34%; margin: -14px 0 0 -14px; width: 28px; height: 28px; }
  .hero-copy { padding: 36px 24px 64px; gap: 28px; }
  .hero-copy h1 { font-size: clamp(2.2rem, 10vw, 2.6rem); line-height: 1.04; }
  :lang(zh) .hero-copy h1 { font-size: clamp(2rem, 9vw, 2.4rem); line-height: 1.25; }
  .lang-toggle { min-height: 44px; padding: 0 12px; }
  .hero-copy .lede { font-size: 1rem; line-height: 1.7; }
  .hero-actions { gap: 14px; margin-top: 8px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .section-title[data-num] { padding-left: 0; padding-top: .95em; max-width: 18ch; }
  .section-title[data-num]::after { top: -.06em; font-size: 2em; }
  :lang(zh) #process-title, :lang(zh) #work-title { --ems: 13.6; }
  :lang(zh) #services-title { --ems: 15.2; }
  .service { grid-template-columns: 1fr; }
  .service .link { grid-column: 1; }
  .gallery { grid-auto-rows: 46vw; gap: 8px; }
  .tile.wide, .tile.big { grid-column: span 2; }
  .tile.tall, .tile.full { grid-row: span 1; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: 16px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
  .lb-stage { padding: 56px 12px 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
