/* ==========================================================================
   AC — Personal Portfolio
   Dark minimal editorial system
   1. Reset            5. Hero            9. Services
   2. Tokens           6. Works          10. Footer
   3. Primitives       7. About / stats  11. Inner pages
   4. Header / nav     8. Reveal fx      12. Responsive / a11y
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 2. Tokens ---------- */
:root {
  /* surfaces */
  --bg: #0d0d0d;
  --bg-elev: #121212;
  --bg-panel: #171717;
  --bg-panel-hi: #1d1d1d;

  /* ink */
  --fg: #f4f4f4;
  --fg-soft: #b9b9b9;
  --fg-muted: #828282;
  --fg-dim: #5a5a5a;

  /* strokes */
  --line: rgba(255, 255, 255, 0.09);
  --line-mid: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.32);

  /* type */
  --font-sans: "Helvetica Neue", Helvetica, Inter, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;

  --track-label: 0.26em;
  --track-title: 0.06em;

  /* rhythm */
  --shell: 1240px;
  --gutter: 40px;
  --section-y: 130px;
  --header-h: 92px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.55s;
}

/* ---------- 3. Primitives ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

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

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: 90px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* eyebrow / label */
.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-muted);
}

.label--light {
  color: var(--fg);
}

/* section heading row */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 54px;
}

.sec-head__title {
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg);
  position: relative;
  padding-bottom: 14px;
}

.sec-head__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 1px;
  background: var(--line-strong);
}

/* text link with arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}

.arrow-link .arrow-link__line {
  display: block;
  width: 44px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width var(--dur) var(--ease);
}

.arrow-link .arrow-link__line::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-link:hover,
.arrow-link:focus-visible {
  color: var(--fg);
}

.arrow-link:hover .arrow-link__line {
  width: 62px;
}

/* ghost button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 20px 30px;
  border: 1px solid var(--line-mid);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg);
  background-image: linear-gradient(var(--fg), var(--fg));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: left center;
  transition: background-size var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn__arrow {
  display: block;
  width: 34px;
  height: 1px;
  background: currentColor;
  position: relative;
  flex: none;
  transition: width var(--dur) var(--ease);
}

.btn__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.btn:hover,
.btn:focus-visible {
  color: var(--bg);
  border-color: var(--fg);
  background-size: 100% 100%;
}

.btn:hover .btn__arrow {
  width: 44px;
}

.btn--solid {
  background-size: 100% 100%;
  color: var(--bg);
  border-color: var(--fg);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background-size: 0% 100%;
  color: var(--fg);
  border-color: var(--line-mid);
}

/* skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 14px 20px;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  transition: top 0.25s var(--ease);
}

.skip:focus {
  top: 16px;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

/* ---------- 4. Header / nav ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.4s var(--ease), height 0.4s var(--ease),
    border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  height: 72px;
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.logo {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1;
  position: relative;
  padding-top: 10px;
}

.logo::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0;
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.nav {
  display: flex;
  gap: 46px;
}

.nav__link {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-block: 8px;
  transition: color 0.4s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--fg);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--fg);
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

/* hamburger */
.burger {
  width: 30px;
  height: 18px;
  position: relative;
  flex: none;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.burger span:nth-child(1) {
  top: 2px;
}
.burger span:nth-child(2) {
  top: 9px;
}
.burger span:nth-child(3) {
  top: 16px;
}

.burger:hover span:nth-child(1) {
  transform: translateY(-1px);
}
.burger:hover span:nth-child(3) {
  transform: translateY(1px);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
}
.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* overlay menu */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    visibility 0.45s;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
  width: 100%;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer__link {
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 700;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  line-height: 1.16;
  color: var(--fg-dim);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}

.drawer__link:hover,
.drawer__link:focus-visible {
  color: var(--fg);
  transform: translateX(14px);
}

.drawer__aside {
  display: grid;
  gap: 26px;
  padding-bottom: 10px;
}

.drawer__meta {
  display: grid;
  gap: 6px;
}

.drawer__meta a,
.drawer__meta span {
  font-size: 14px;
  color: var(--fg-soft);
}

.drawer__meta a:hover {
  color: var(--fg);
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 760px;
  height: 100vh;
  max-height: 940px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% center;
  filter: grayscale(1) contrast(1.06);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to right,
      var(--bg) 0%,
      rgba(13, 13, 13, 0.72) 22%,
      rgba(13, 13, 13, 0) 62%
    ),
    linear-gradient(to bottom, var(--bg) 0%, rgba(13, 13, 13, 0) 22%),
    linear-gradient(to top, var(--bg) 0%, rgba(13, 13, 13, 0) 20%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__copy {
  max-width: 620px;
}

.hero__hello {
  margin-bottom: 26px;
}

.hero__name {
  font-size: clamp(44px, 8.4vw, 104px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero__role {
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.hero__rule {
  width: 54px;
  height: 1px;
  background: var(--line-strong);
  margin-block: 40px;
}

.hero__tagline {
  font-size: 15px;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
  margin-bottom: 52px;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-dim);
}

.hero__scroll i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--line-strong), transparent);
  animation: drop 2.4s var(--ease) infinite;
}

@keyframes drop {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  46% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* page hero (inner pages) */
.page-hero {
  padding-top: calc(var(--header-h) + 96px);
  padding-bottom: 76px;
  position: relative;
  overflow: hidden;
}

.page-hero__title {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 22px;
}

.page-hero__sub {
  max-width: 480px;
  margin-top: 28px;
  color: var(--fg-muted);
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
}

.page-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 0.9) 0%,
    rgba(13, 13, 13, 0.6) 45%,
    var(--bg) 100%
  );
}

/* ---------- 6. Works ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px 26px;
}

.work {
  display: block;
  position: relative;
}

.work__frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  aspect-ratio: 4 / 3;
}

.work__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
}

.work__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.16);
  opacity: 1;
  transition: opacity 0.7s var(--ease);
}

.work:hover .work__frame img,
.work:focus-visible .work__frame img {
  transform: scale(1.055);
}

.work:hover .work__frame::after {
  opacity: 0;
}

.work__view {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg);
  background: linear-gradient(to top, rgba(13, 13, 13, 0.86), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.work:hover .work__view,
.work:focus-visible .work__view {
  opacity: 1;
  transform: none;
}

.work__title {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease);
}

.work__meta {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.work:hover .work__title {
  color: var(--fg);
}

/* filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-bottom: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.filter {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-block: 6px;
  transition: color 0.4s var(--ease);
}

.filter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.filter:hover,
.filter[aria-pressed="true"] {
  color: var(--fg);
}

.filter[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.work.is-hidden {
  display: none;
}

/* ---------- 7. About / stats ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 80px;
  align-items: start;
}

.about-copy p {
  color: var(--fg-soft);
  letter-spacing: 0.03em;
  max-width: 46ch;
}

.about-copy p + p {
  margin-top: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 20px;
}

.stat {
  text-align: center;
}

.stat__num {
  display: block;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__en {
  display: block;
  margin-top: 18px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.5;
  /* 3em = 2 lines at the line-height above. "Client satisfaction" wraps while
     the other three labels don't, so reserving the taller box keeps every CN
     label on one baseline instead of letting the wrap push its own label down. */
  min-height: 3em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.stat__cn {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
}

/* ---------- 8. Reveal fx ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .reveal--fade {
  transform: none;
}

/* ---------- 9. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: stretch;
}

.services-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  min-height: 460px;
}

.services-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.services-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.55), transparent 60%);
}

.service {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 26px;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
}

.service:first-child {
  padding-top: 0;
}

.service:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.service__no {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  padding-top: 5px;
}

.service__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.service__cn {
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.service__desc {
  font-size: 14px;
  color: var(--fg-soft);
  max-width: 52ch;
}

/* ---------- 10. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding-top: 96px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-bottom: 88px;
}

.contact-list {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  margin-bottom: 48px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--fg-soft);
  letter-spacing: 0.03em;
}

.contact-list svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: var(--fg-muted);
  fill: none;
  stroke-width: 1.4;
}

.contact-list a {
  transition: color 0.35s var(--ease);
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--fg);
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 34px;
}

.social {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-mid);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-soft);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.social svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.social:hover,
.social:focus-visible {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  transform: translateY(-3px);
}

.footer__bar {
  border-top: 1px solid var(--line);
  padding-block: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__bar p {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-align: center;
}

/* ---------- 11. Inner pages ---------- */

/* case: meta strip */
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-meta dt {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 12px;
}

.case-meta dd {
  margin: 0;
  font-size: 14px;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
}

.case-figure {
  margin-block: 0;
  background: var(--bg-panel);
  overflow: hidden;
}

.case-figure img {
  width: 100%;
  height: auto;
}

.case-figure--wide img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.case-figure figcaption {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-top: 16px;
}

.prose-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px 60px;
}

.prose-grid + .prose-grid {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.prose h2 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.prose p {
  color: var(--fg-soft);
  max-width: 62ch;
}

.prose p + p {
  margin-top: 18px;
}

.prose ul {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.prose li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-soft);
  font-size: 14px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.metric {
  background: var(--bg);
  padding: 44px 34px;
  text-align: center;
}

.metric__num {
  display: block;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric__cn {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.related__frame {
  aspect-ratio: 398 / 188;
}

.next-case {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 56px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.next-case__title {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease);
}

.next-case:hover .next-case__title {
  color: var(--fg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.35s var(--ease), gap 0.35s var(--ease);
}

.back-link:hover {
  color: var(--fg);
  gap: 20px;
}

.back-link i {
  width: 26px;
  height: 1px;
  background: currentColor;
  position: relative;
}

.back-link i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

.form {
  display: grid;
  gap: 30px;
}

.field {
  display: grid;
  gap: 12px;
}

.field > label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-mid);
  padding: 12px 2px;
  font-size: 15px;
  letter-spacing: 0.03em;
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: right 12px center, right 6px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.field select option {
  background: var(--bg-elev);
  color: var(--fg);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--fg-dim);
}

.field__error {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #d98b8b;
  min-height: 0;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-bottom-color: #d98b8b;
}

.form__foot {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.form__note {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  max-width: 34ch;
  line-height: 1.6;
}

.form__status {
  display: none;
  padding: 18px 22px;
  border: 1px solid var(--line-mid);
  background: var(--bg-panel);
  font-size: 13px;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
}

.form__status.is-shown {
  display: block;
}

.info-block + .info-block {
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.info-block h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 22px;
}

.info-block p {
  color: var(--fg-soft);
  font-size: 14px;
}

.map {
  margin-top: 26px;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
}

.map img {
  width: 100%;
  height: auto;
  filter: grayscale(1) brightness(0.9);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}

.map:hover img {
  filter: grayscale(1) brightness(1.05);
  transform: scale(1.02);
}

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

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

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--fg-soft);
  transition: color 0.35s var(--ease);
}

.faq__q:hover {
  color: var(--fg);
}

.faq__sign {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
}

.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}

.faq__sign::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

.faq__sign::after {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.faq__q[aria-expanded="true"] .faq__sign::after {
  transform: translateX(-50%) scaleY(0);
}

.faq__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s var(--ease);
}

.faq__a p {
  padding-bottom: 28px;
  color: var(--fg-muted);
  font-size: 14px;
  max-width: 68ch;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding-block: 120px;
}

.cta-band__title {
  font-size: clamp(30px, 5.4vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-block: 26px 20px;
}

.cta-band p {
  color: var(--fg-muted);
  margin-bottom: 48px;
}

/* ---------- 12. Responsive ---------- */
@media (max-width: 1080px) {
  :root {
    --section-y: 100px;
    --gutter: 32px;
  }

  .nav {
    display: none;
  }

  .about-grid,
  .services-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .prose-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services-media {
    min-height: 340px;
    order: -1;
  }

  .drawer__grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 44px;
  }

  .hero__media {
    width: 58%;
  }
}

@media (max-width: 860px) {
  .works-grid,
  .related-grid,
  .case-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-top: calc(var(--header-h) + 70px);
    padding-bottom: 110px;
  }

  .hero__media {
    width: 100%;
    height: 100%;
    opacity: 0.34;
  }

  .hero__media img {
    object-position: 60% 18%;
  }

  .hero__media::after {
    background: linear-gradient(
        to right,
        var(--bg) 0%,
        rgba(13, 13, 13, 0.55) 60%,
        rgba(13, 13, 13, 0.3) 100%
      ),
      linear-gradient(to bottom, var(--bg) 0%, rgba(13, 13, 13, 0) 30%),
      linear-gradient(to top, var(--bg) 0%, rgba(13, 13, 13, 0.2) 30%);
  }

  .hero__scroll {
    display: none;
  }

  .hero__rule {
    margin-block: 32px;
  }

  .hero__tagline {
    margin-bottom: 42px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
    --section-y: 76px;
    --header-h: 72px;
  }

  body {
    font-size: 14px;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 16px;
  }

  .case-meta {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 38px;
  }

  .btn {
    width: 100%;
    justify-content: space-between;
    padding: 18px 22px;
  }

  .service {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .service__no {
    padding-top: 0;
  }

  .footer {
    padding-top: 68px;
  }

  .footer__grid {
    padding-bottom: 60px;
  }

  .cta-band {
    padding-block: 84px;
  }

  .drawer {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 40px);
    overflow-y: auto;
  }
}

/* ---------- a11y: motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
