:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --ink: #14151a;
  --muted: #54545b;
  --line: #d9d8d3;
  --blue: #193cdd;
  --blue-dark: #112aaa;
  --pale: #eaeefe;
  --white: #fff;
  --gutter: clamp(1.5rem, 5.35vw, 5.5rem);
  --shell: 96rem;
  --sans: "Helvetica Neue", "PingFang HK", "Microsoft JhengHei", Arial, sans-serif;
  --serif: Georgia, "Songti TC", "Noto Serif CJK TC", "PMingLiU", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2, .project-name { font-family: var(--serif); font-weight: 400; }
[id]:target { scroll-margin-top: 1.75rem; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}

.frame {
  width: min(var(--shell), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: 1rem;
  z-index: 5;
  padding: .65rem 1rem;
  color: white;
  background: var(--blue);
  transform: translateY(-170%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.75rem;
  min-height: 5.125rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  justify-self: start;
  line-height: 1;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
  background: var(--blue);
  clip-path: polygon(0 26%, 27% 2%, 27% 42%, 72% 22%, 72% 0, 100% 0, 100% 74%, 72% 98%, 72% 57%, 27% 78%, 27% 100%, 0 100%);
}

.wordmark-text { display: grid; gap: .375rem; }
.wordmark-name { font-size: 1.55rem; font-weight: 700; letter-spacing: -.066em; }
.wordmark-zh { font-size: .75rem; letter-spacing: .025em; color: var(--muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3.1vw, 3.25rem);
  font-size: .9375rem;
  font-weight: 500;
}

.site-nav a, .site-footer a {
  text-underline-offset: .35em;
  text-decoration-thickness: 1px;
}
.site-nav a:hover, .site-footer a:hover {
  color: var(--blue);
  text-decoration-line: underline;
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: .5rem;
  align-items: center;
}

.language {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: .875rem;
}
.language button {
  padding: .4rem .55rem;
  min-height: 2.75rem;
  min-width: 2.5rem;
  border: 0;
  background: none;
  color: var(--muted);
}
.language button[aria-pressed="true"] { color: var(--blue); font-weight: 700; }
.language > span { color: #77777f; }

.menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  display: none;
  padding: .7rem;
  border: 1px solid var(--line);
  background: transparent;
}
.menu-toggle span { display: block; background: currentColor; height: 1px; }
.menu-toggle span + span { margin-top: .375rem; }

.hero {
  width: min(var(--shell), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 47% 53%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(4rem, 7vw, 7rem) clamp(1.5rem, 3.95vw, 4.25rem) clamp(4rem, 7vw, 7rem) var(--gutter);
}

.eyebrow {
  color: var(--blue);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-eyebrow { display: flex; gap: .65rem; align-items: center; margin-bottom: 1.5rem; }
.hero-eyebrow::before { content: ""; width: 1.625rem; height: 1px; background: currentColor; }

.hero h1, .studio-grid h2, .contact-grid h2 {
  font-size: clamp(4rem, 7.85vw, 8.1rem);
  line-height: .95;
  letter-spacing: -.075em;
}

.hero h1 span, .hero h1 em, .studio-grid h2 span, .studio-grid h2 em, .contact-grid h2 span, .contact-grid h2 em { display: block; }
.hero h1 em, .studio-grid h2 em { color: var(--blue); }

.hero-deck {
  max-width: 24rem;
  margin: 1.875rem 0 1.75rem;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.25rem;
  min-height: 3.125rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.4;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button-primary { background: var(--blue); color: var(--white); }
.button-primary:hover { background: var(--blue-dark); }
.button-light { color: var(--blue-dark); background: var(--white); }
.button-light:hover { background: var(--pale); }
.button-outline { border-color: #aaaab6; color: var(--blue-dark); background: transparent; }
.button-outline:hover { border-color: var(--blue); background: var(--pale); }

.hero-media {
  position: relative;
  min-height: clamp(31rem, 40vw, 39.5rem);
  overflow: hidden;
  background: #1734ab;
}
.hero-media img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 49%; }

.work-section { padding-block: clamp(3.5rem, 5.5vw, 5.25rem) clamp(4rem, 7vw, 6.875rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.8rem;
}
.section-head h2 {
  font-size: clamp(2.875rem, 5.4vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.067em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.25vw, 2rem);
}

.project-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.project-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.13;
}
.project-image-red { background: #a32c27; }
.project-image-ink { background: #222736; }
.project-image-lilac { background: #bfaabf; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms ease; }
.project-button:hover .project-image img { transform: scale(1.045); }
.project-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  min-height: 6.125rem;
  padding-block: .75rem;
}
.project-name { display: block; font-size: clamp(1.5rem, 2.5vw, 2.3rem); line-height: 1.13; letter-spacing: -.045em; }
.project-category { display: block; margin-top: .36rem; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.project-plus {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #888c9d;
  color: var(--blue);
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.project-plus::before, .project-plus::after, .dialog-close::before, .dialog-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .85rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.project-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.project-button:hover .project-plus { background: var(--blue); border-color: var(--blue); color: white; }

.studio-section { background: var(--pale); }
.studio-grid, .contact-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  padding-block: clamp(4rem, 7vw, 7rem);
}

.studio-grid .eyebrow, .contact-grid .eyebrow { margin-bottom: 1.3rem; }
.studio-grid h2, .contact-grid h2 { font-size: clamp(3.35rem, 6.45vw, 6.25rem); }
.studio-deck { max-width: 29rem; font-size: clamp(1.125rem, 1.75vw, 1.5rem); line-height: 1.48; }
.service-list {
  list-style: none;
  margin: 1.625rem 0 0;
  padding: 0;
  border-top: 1px solid #bec6e1;
}
.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .15rem 1rem;
  padding-block: .75rem;
  border-bottom: 1px solid #bec6e1;
}
.service-list li span:first-child { font-weight: 650; }
.service-list li span:last-child { font-size: .875rem; color: #484d65; }

.contact-section { color: white; background: var(--blue); }
.contact-grid { grid-template-columns: 1.32fr 1fr; align-items: end; }
.contact-grid .eyebrow { color: #fff; }
.contact-grid h2 em { color: #d9e2ff; }
.contact-action { padding-bottom: .2rem; }
.contact-action p { max-width: 21rem; margin-bottom: 1.25rem; font-size: clamp(1.05rem, 1.55vw, 1.275rem); }
.contact-action :focus-visible { outline-color: white; }

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem 1.5rem;
  min-height: 6rem;
  padding-block: 1rem;
  font-size: .875rem;
}
.footer-company { display: grid; gap: .12rem; }
.footer-company span:first-child { font-weight: 650; }
.footer-company span:last-child, .footer-place { color: var(--muted); }
.site-footer a { justify-self: end; }

.dialog {
  max-width: min(55rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper);
}
.dialog::backdrop { background: rgb(13 17 36 / .63); }
.dialog-inner { position: relative; }
.project-dialog .dialog-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.project-dialog img { width: 100%; height: 100%; object-fit: cover; }
.dialog-copy { padding: clamp(1.5rem, 4vw, 3rem); }
.project-dialog .dialog-copy { padding-top: 4rem; align-self: center; }
.dialog-copy h2 { font-size: clamp(2.15rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -.055em; }
.dialog-copy h2 + p { margin-top: .875rem; color: var(--muted); }
.dialog-copy .eyebrow { margin-bottom: .75rem; }
.dialog-close {
  position: absolute;
  z-index: 1;
  top: .875rem;
  right: .875rem;
  padding: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}
.dialog-close:hover { color: white; background: var(--blue); border-color: var(--blue); }
.dialog-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.dialog-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.brief-dialog { width: 38rem; }
.brief-dialog .dialog-copy { padding-top: clamp(3.5rem, 5vw, 4.25rem); }
#brief-form, #brief-form label { display: grid; gap: .4rem; }
#brief-form { gap: 1rem; margin-top: 1.25rem; }
#brief-form label { color: var(--ink); font-weight: 550; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid #9e9da5;
  border-radius: 2px;
  padding: .625rem .75rem;
  font-weight: 400;
}
select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 50%, #30313e 50%), linear-gradient(135deg, #30313e 50%, transparent 50%);
  background-size: 5px 5px;
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-repeat: no-repeat;
}
textarea { resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
[data-brief-status] { color: var(--blue-dark); font-size: .9375rem; }
[data-brief-status]:empty { position: absolute; }

html[lang="zh-Hant-HK"] h1,
html[lang="zh-Hant-HK"] h2,
html[lang="zh-Hant-HK"] .project-name { letter-spacing: -.025em; line-height: 1.1; }
html[lang="zh-Hant-HK"] h1 em,
html[lang="zh-Hant-HK"] h2 em { font-style: normal; }
html[lang="zh-Hant-HK"] .eyebrow { letter-spacing: .1em; }

@media (max-width: 60rem) {
  .hero { grid-template-columns: 49% 51%; }
  .hero h1 { font-size: clamp(3.65rem, 8.35vw, 5.8rem); }
  .hero-media { min-height: 31rem; }
  .project-meta { gap: .4rem; }
  .project-plus { width: 2.125rem; height: 2.125rem; }
}

@media (max-width: 43.75rem) {
  .header-inner { display: flex; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    z-index: 2;
    top: 100%;
    left: 0;
    right: 0;
    padding: .45rem var(--gutter) 1.15rem;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: .75rem 0; border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 3.5rem var(--gutter); }
  .hero h1 { font-size: clamp(4.25rem, 12vw, 6.5rem); }
  .hero-media { min-height: 0; aspect-ratio: 1.26; }
  .hero-media img { object-position: center 51%; }
  .hero-deck { margin-block: 1.5rem; }
  .project-grid { grid-template-columns: 1fr; gap: 1.85rem; }
  .project-meta { min-height: 5.25rem; }
  .project-name { font-size: 2rem; }
  .project-plus { width: 2.5rem; height: 2.5rem; }
  .studio-grid, .contact-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .contact-action { padding: 0; }
  .section-head { flex-wrap: wrap; margin-bottom: 1.4rem; }
  .project-dialog .dialog-inner { grid-template-columns: 1fr; }
  .project-dialog .dialog-copy { padding-top: 1.5rem; }
  .project-dialog img { height: auto; max-height: 50vh; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-place { grid-row: 2; }
  .site-footer a { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 23rem) {
  .field-pair { grid-template-columns: 1fr; }
  .hero h1 { font-size: 3.8rem; }
  .brand-mark { width: 1.65rem; height: 1.65rem; }
  .wordmark { gap: .5rem; }
  .wordmark-name { font-size: 1.4rem; }
  .wordmark-zh { letter-spacing: 0; }
  .header-actions { gap: .25rem; }
}

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