/* ==========================================================================
   Adrian Vale — Portfolio
   1. Tokens    2. Base      3. Shared      4. Header     5. Mobile menu
   6. Hero      7. About     8. Services    9. Work      10. Statement
   11. Contact 12. Footer   13. Dialog     14. Motion    15. Responsive
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces: one warm-neutral ramp */
  --bg: #0b0b0c;
  --bg-elev: #101012;
  --surface: #151517;
  --surface-hi: #1c1c1f;

  /* Lines */
  --line: rgba(242, 239, 233, 0.08);
  --line-2: rgba(242, 239, 233, 0.14);
  --line-3: rgba(242, 239, 233, 0.3);

  /* Text */
  --text: #f2efe9;
  --text-2: #bbb6ac;
  --text-3: #8b867d;

  /* Accent: a single amber → coral family */
  --accent: #f4b26f;
  --accent-2: #ec7c56;
  --accent-ink: #1c1108;
  --accent-soft: rgba(244, 178, 111, 0.12);
  --accent-line: rgba(244, 178, 111, 0.32);
  --gradient: linear-gradient(115deg, #ffd7a3 0%, #f4b26f 45%, #ec7c56 100%);

  --success: #8fd9a8;
  --danger: #ff8f7e;

  /* Type */
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-hero: clamp(3rem, 1rem + 7vw, 8.25rem);
  --fs-h2: clamp(2.25rem, 1.35rem + 3.2vw, 4.25rem);
  --fs-h3: clamp(1.6rem, 1.35rem + 0.7vw, 1.9rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.6875rem;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --section: clamp(96px, 11vw, 160px);
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
html.menu-open,
html.dialog-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. Shared ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
}

.hide-sm { display: inline; }

/* Labels */
.label,
.sub-label,
.pill {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-2);
}
.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.label-num { color: var(--accent); }
.sub-label { color: var(--text-3); margin-bottom: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px 8px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(242, 239, 233, 0.03);
  color: var(--text-2);
  letter-spacing: 0.1em;
}

.status-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(143, 217, 168, 0.14);
}
.pill .status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: ping 3.2s var(--ease-soft) infinite;
}

/* Sections */
.section { position: relative; padding-block: var(--section); }
.section-head { margin-bottom: clamp(44px, 6vw, 80px); }
.section-head .label + .head-split { margin-top: clamp(28px, 4vw, 48px); }
.head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 64px;
}

.section-title,
.contact-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.section-title em,
.contact-title em,
.hero-title em {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em; /* keeps the italic overhang from clipping */
}

.section-lede {
  max-width: 42ch;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 0.9625rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.45s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.45s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 36px -14px rgba(244, 178, 111, 0.6);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--line-2);
  background: rgba(242, 239, 233, 0.02);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--line-3);
  background: rgba(242, 239, 233, 0.06);
  transform: translateY(-1px);
}
.btn-small { min-height: 42px; padding: 0 18px; font-size: 0.875rem; }
.btn-arrow { width: 16px; height: 16px; flex: none; transition: transform 0.45s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-2);
}
.tags-lg li { padding: 7px 14px; font-size: var(--fs-xs); transition: border-color 0.3s, color 0.3s; }
.tags-lg li:hover { border-color: var(--accent-line); color: var(--text); }

/* Pointer spotlight (position set in script.js) */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 178, 111, 0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s;
}
.spot:hover::before { opacity: 1; }

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s, border-color 0.4s;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
}
html.menu-open .site-header {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  color: var(--accent-ink);
  transition: transform 0.6s var(--ease);
}
.logo-mark svg { width: 24px; height: 24px; }
.logo:hover .logo-mark { transform: rotate(-6deg); }

.nav-list {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 239, 233, 0.025);
}
.nav-link {
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.3s, background-color 0.3s;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--text); background: rgba(242, 239, 233, 0.08); }

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

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.4);
  font-size: 0.875rem;
  transition: border-color 0.3s;
}
.menu-toggle:hover { border-color: var(--line-3); }
.menu-icon {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(242, 239, 233, 0.08);
}
.menu-icon span {
  position: absolute;
  left: 8px; right: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.menu-icon span:first-child { top: 11px; }
.menu-icon span:last-child { top: 16px; }
.menu-toggle[aria-expanded="true"] .menu-icon span:first-child { top: 13.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:last-child { top: 13.25px; transform: rotate(-45deg); }

/* ---------- 5. Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 20px) var(--gutter) max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(236, 124, 86, 0.14), transparent 70%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-soft), visibility 0s linear 0.4s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease-soft), visibility 0s;
}
.mm-list { border-top: 1px solid var(--line); }
.mm-list li { border-bottom: 1px solid var(--line); }
.mm-link {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  padding: 16px 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 10vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-soft), transform 0.6s var(--ease), color 0.3s;
}
.mm-num {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  color: var(--text-3);
  transition: color 0.3s;
}
.mm-arrow { width: 20px; height: 20px; color: var(--text-3); transition: color 0.3s, transform 0.45s var(--ease); }
.mm-link:hover .mm-arrow,
.mm-link.is-active .mm-arrow { color: var(--accent); transform: translate(2px, -2px); }
.mm-link.is-active .mm-num { color: var(--accent); }
.mobile-menu.is-open .mm-link { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(1) .mm-link { transition-delay: 0.05s; }
.mobile-menu.is-open li:nth-child(2) .mm-link { transition-delay: 0.1s; }
.mobile-menu.is-open li:nth-child(3) .mm-link { transition-delay: 0.15s; }
.mobile-menu.is-open li:nth-child(4) .mm-link { transition-delay: 0.2s; }

.mm-foot {
  display: grid;
  gap: 24px;
  margin-top: auto;
  padding-top: 40px;
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
}
.mobile-menu.is-open .mm-foot { opacity: 1; transition-delay: 0.25s; }
.mm-foot .btn { width: 100%; }
.mm-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.mm-social { display: flex; gap: 18px; }
.mm-contact a { transition: color 0.3s; }
.mm-contact a:hover { color: var(--accent); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(40px, 8vh, 96px));
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-orbs {
  position: absolute;
  inset: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.orb-1 {
  top: -24%; right: -10%;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(236, 124, 86, 0.3), rgba(236, 124, 86, 0) 68%);
  animation: drift 26s ease-in-out infinite alternate;
}
.orb-2 {
  bottom: -18%; left: -18%;
  width: min(54vw, 620px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(244, 178, 111, 0.12), rgba(244, 178, 111, 0) 68%);
  animation: drift 32s ease-in-out infinite alternate-reverse;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: center top;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 5%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 5%, transparent 75%);
}

.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: end;
  align-content: center;
  gap: 48px clamp(40px, 6vw, 96px);
}

.hero-pill { animation: fade-up 0.9s var(--ease) 0.05s both; }

.hero-title {
  margin-top: clamp(24px, 3.4vw, 40px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: -0.024em;
}
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.hero-title .line > span { display: block; animation: line-up 1.15s var(--ease) both; }
.hero-title .line:nth-child(1) > span { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.18s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.26s; color: var(--text-2); }

.hero-lead {
  max-width: 44ch;
  margin-top: clamp(28px, 3.4vw, 40px);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-2);
  animation: fade-up 1s var(--ease) 0.45s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: fade-up 1s var(--ease) 0.55s both;
}

/* Hero work index */
.hero-panel {
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(25, 24, 23, 0.88), rgba(15, 15, 16, 0.9)) padding-box,
    linear-gradient(150deg, rgba(244, 178, 111, 0.45), rgba(242, 239, 233, 0.1) 35%, rgba(242, 239, 233, 0.06) 70%, rgba(236, 124, 86, 0.22)) border-box;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(242, 239, 233, 0.06);
  animation: panel-in 1.2s var(--ease) 0.4s both;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.panel-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transform: translateZ(0);
}
.panel-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(242, 239, 233, 0.08);
  pointer-events: none;
}
.panel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 48px 16px 14px;
  background: linear-gradient(to top, rgba(8, 8, 9, 0.85), rgba(8, 8, 9, 0));
  pointer-events: none;
}
.pc-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.1;
  color: #fff;
}
.pc-desc {
  overflow: hidden;
  font-size: var(--fs-xs);
  color: rgba(242, 239, 233, 0.72);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.panel-preview.is-changing .panel-caption { animation: caption-in 0.6s var(--ease) both; }
.panel-preview svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s var(--ease-soft), transform 1.1s var(--ease);
}
.panel-preview svg.is-active { opacity: 1; transform: none; }
html:not(.js) .panel-preview { display: none; }

.panel-list { margin-top: 8px; }
.panel-list li + li { border-top: 1px solid var(--line); }
.panel-list a {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: color 0.3s, background-color 0.3s;
}
.panel-list a:hover,
.panel-list a.is-active { color: var(--text); background: rgba(242, 239, 233, 0.04); }
.pl-num { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-3); }
.pl-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-cat { font-size: 0.75rem; color: var(--text-3); }
.pl-arrow {
  width: 14px; height: 14px;
  color: var(--accent);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.3s, transform 0.45s var(--ease);
}
.panel-list a:hover .pl-arrow,
.panel-list a.is-active .pl-arrow { opacity: 1; transform: none; }
.pl-progress {
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 1px;
  background: var(--gradient);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.hero-panel.is-autoplay .panel-list a.is-active .pl-progress {
  opacity: 1;
  animation: progress 6s linear forwards;
}
.hero-panel.is-autoplay.is-paused .panel-list a.is-active .pl-progress { animation-play-state: paused; }

/* Hero facts */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: clamp(56px, 8vw, 96px);
  animation: fade-up 1s var(--ease) 0.7s both;
}
.hero-facts div { padding-top: 16px; border-top: 1px solid var(--line-2); }
.hero-facts dt {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hero-facts dd { margin-top: 6px; font-size: var(--fs-sm); color: var(--text); }

.marquee {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 20px;
  border-block: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee ul { display: flex; flex: none; }
.marquee li {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  color: var(--text-3);
  white-space: nowrap;
}
.marquee li::after {
  content: "✦";
  margin-inline: clamp(22px, 3.5vw, 44px);
  font-style: normal;
  font-size: 0.55em;
  color: var(--accent);
  opacity: 0.8;
}

/* ---------- 7. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.about-visual { position: sticky; top: calc(var(--header-h) + 32px); }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(242, 239, 233, 0.08);
  pointer-events: none;
}
.portrait svg,
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.portrait:hover svg,
.portrait:hover img { transform: scale(1.03); }
.portrait-tag {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid rgba(242, 239, 233, 0.12);
  border-radius: 12px;
  background: rgba(11, 11, 12, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.portrait-tag span:last-child { color: var(--text-2); }

.about-badge {
  position: absolute;
  top: -28px; right: -28px;
  display: grid;
  place-items: center;
  width: 104px; height: 104px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
}
.about-badge svg { position: absolute; inset: 0; animation: spin 40s linear infinite; }
.about-badge text {
  font-family: var(--font-mono);
  font-size: 9.6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--text-2);
}
.about-badge span { font-size: 1.25rem; }

.about-text {
  display: grid;
  gap: 1.1em;
  max-width: 56ch;
  margin-top: clamp(28px, 3.5vw, 40px);
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-2);
}
.about-block { margin-top: clamp(40px, 5vw, 56px); }

.timeline { border-top: 1px solid var(--line); }
.timeline li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-year { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--text-3); }
.timeline-role { font-weight: 500; }
.timeline-place { font-size: var(--fs-sm); color: var(--text-2); text-align: right; }

/* ---------- 8. Services ---------- */
.services {
  background: linear-gradient(180deg, transparent, rgba(242, 239, 233, 0.015) 30%, transparent);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.service-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.service-card:hover { border-color: var(--accent-line); transform: translateY(-4px); }
.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.service-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(242, 239, 233, 0.03);
  color: var(--accent);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card:hover .service-icon { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.service-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }
.service-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.service-card > p {
  margin-top: 12px;
  margin-bottom: 28px;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-2);
}
.service-card ul {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.service-card ul li { display: flex; align-items: center; gap: 10px; }
.service-card ul li::before {
  content: "";
  flex: none;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.process-wrap { margin-top: clamp(64px, 8vw, 112px); }
.process-wrap .sub-label { margin-bottom: 28px; }
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.process::before {
  content: "";
  position: absolute;
  top: 5px; left: 0; right: 0;
  height: 1px;
  background: var(--line-2);
}
.process li { position: relative; padding: 32px 28px 0 0; }
.process li::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 11px; height: 11px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 6px var(--accent);
}
.process-step { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--text-3); }
.process strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1.15;
}
.process p { max-width: 28ch; margin-top: 6px; font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- 9. Work ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.filter {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.3s, background-color 0.3s;
}
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(56px, 6vw, 88px) clamp(20px, 3vw, 40px);
}
.projects-grid:not(.is-filtered) .project:nth-child(even) { margin-top: clamp(0px, 9vw, 128px); }
.project { position: relative; }
.project.is-hidden { display: none; }

.project-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  transform: translateZ(0); /* keeps rounded corners crisp while scaling */
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(8, 8, 9, 0.42), rgba(8, 8, 9, 0) 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
  pointer-events: none;
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(242, 239, 233, 0.08);
  pointer-events: none;
  transition: box-shadow 0.5s var(--ease-soft);
}
.project-cover svg { width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.project:hover .project-cover svg { transform: scale(1.04); }
.project:hover .project-cover::before,
.project:focus-within .project-cover::before { opacity: 1; }
@media (hover: hover) {
  .project:hover .project-cover {
    transform: translateY(-4px);
    box-shadow: 0 32px 64px -32px rgba(0, 0, 0, 0.9);
  }
  .project:hover .project-cover::after { box-shadow: inset 0 0 0 1px var(--accent-line); }
}

.project-num {
  position: absolute;
  z-index: 2;
  top: 14px; left: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(242, 239, 233, 0.16);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.project-view {
  position: absolute;
  z-index: 2;
  right: 14px; bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-xs);
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-soft), transform 0.5s var(--ease);
}
.project-view svg { width: 14px; height: 14px; }
.project:hover .project-view,
.project:focus-within .project-view { opacity: 1; transform: none; }
@media (hover: none) {
  .project-view { opacity: 1; transform: none; }
  .project-cover::before { opacity: 1; }
}

.project-body { padding-top: 22px; }
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.project-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.45rem + 0.9vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.project-open {
  text-align: left;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}
.project-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.project-open:focus-visible { outline: none; }
.project-open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 8px; }
.project:hover .project-open { background-size: 100% 1px; }
.project-year { flex: none; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }
.project-desc { max-width: 46ch; margin-top: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.project .tags { margin-top: 18px; }
.projects-empty { padding: 48px 0; text-align: center; color: var(--text-3); }

/* ---------- 10. Statement ---------- */
.statement {
  padding-block: clamp(80px, 10vw, 140px);
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(244, 178, 111, 0.07), transparent 70%),
    var(--bg-elev);
}
.statement-inner { max-width: 940px; margin-inline: auto; text-align: center; }
.statement-mark {
  display: block;
  height: 0.5em;
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 4vw, 6.5rem);
  line-height: 1;
  color: var(--accent);
}
.statement blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.3vw, 3.125rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.statement figcaption {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  text-align: left;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.statement figcaption strong { display: block; font-weight: 500; color: var(--text); }
.statement-avatar {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--accent-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ---------- 11. Contact ---------- */
.contact { overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -45%;
  z-index: -1;
  width: min(120vw, 1300px);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(236, 124, 86, 0.13), transparent 65%);
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: start;
}
.contact-title { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.25rem); line-height: 1; }
.contact-intro .section-lede { margin-top: 28px; }

.contact-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 40px;
}
.contact-email a {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--accent-line), var(--accent-line)) 0 100% / 100% 1px no-repeat;
  transition: color 0.3s, background-image 0.3s;
}
.contact-email a:hover { color: var(--accent); background-image: linear-gradient(var(--accent), var(--accent)); }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  transition: color 0.3s, border-color 0.3s;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { color: var(--text); border-color: var(--line-3); }
.copy-btn.is-copied { color: var(--success); border-color: var(--success); }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 24px 48px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact-meta dt {
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact-meta dd {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.contact-form {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(242, 239, 233, 0.045), rgba(242, 239, 233, 0.015));
  box-shadow: inset 0 1px 0 rgba(242, 239, 233, 0.05);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field label,
.field legend {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.field legend { margin-bottom: 14px; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  font-size: 1.0625rem;
  transition: border-color 0.3s;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: #67635c; }
.field input:hover,
.field textarea:hover { border-bottom-color: var(--line-3); }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field.has-error input,
.field.has-error textarea { border-bottom-color: var(--danger); }
.field-error { margin-top: 8px; font-size: var(--fs-xs); color: var(--danger); }
.field-error:empty { display: none; }

.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.field .choice {
  position: relative;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.choice span {
  display: block;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.choice:hover span { border-color: var(--line-3); color: var(--text); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form-note { flex: 1 1 180px; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-3); }
.form-status { font-size: var(--fs-sm); color: var(--success); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }

/* ---------- 12. Footer ---------- */
.site-footer { padding-top: clamp(64px, 8vw, 96px); border-top: 1px solid var(--line); overflow: hidden; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
}
.footer-brand p { max-width: 34ch; margin-top: 20px; font-size: var(--fs-sm); color: var(--text-2); }
.footer-email {
  display: inline-block;
  margin-top: 16px;
  font-size: var(--fs-sm);
  color: var(--text);
  background: linear-gradient(var(--accent-line), var(--accent-line)) 0 100% / 100% 1px no-repeat;
  transition: color 0.3s;
}
.footer-email:hover { color: var(--accent); }
.footer-col h2 {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: color 0.3s, transform 0.45s var(--ease);
}
.footer-col a:hover { color: var(--accent); transform: translateX(3px); }
.socials svg { width: 17px; height: 17px; }

.footer-wordmark {
  margin-top: clamp(48px, 7vw, 88px);
  font-family: var(--font-display);
  font-size: clamp(3rem, calc((100vw - 2 * var(--gutter)) / 3.75), 19.5rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
  padding-bottom: 0.06em;
  background: linear-gradient(180deg, rgba(242, 239, 233, 0.14), rgba(242, 239, 233, 0.01) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 24px max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); transition: color 0.3s; }
.to-top svg { width: 14px; height: 14px; transition: transform 0.45s var(--ease); }
.to-top:hover { color: var(--accent); }
.to-top:hover svg { transform: translateY(-2px); }

/* ---------- 13. Dialog ---------- */
.project-dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  color: var(--text);
}
.project-dialog::backdrop {
  background: rgba(5, 5, 6, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.project-dialog[open] { animation: dialog-in 0.5s var(--ease); }
.project-dialog[open]::backdrop { animation: fade-in 0.4s var(--ease-soft); }
.dialog-inner.is-swapping { animation: fade-in 0.45s var(--ease-soft); }

.dialog-close {
  position: sticky;
  top: 16px;
  z-index: 2;
  float: right;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin: 16px 16px -60px 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(16, 16, 18, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.dialog-close svg { width: 16px; height: 16px; }
.dialog-close:hover { transform: rotate(90deg); background: #000; }
.dialog-cover { aspect-ratio: 16 / 8; overflow: hidden; }
.dialog-cover svg { width: 100%; height: 100%; }
.dialog-body { padding: clamp(24px, 4vw, 48px); }
.dialog-kicker {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.dialog-title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.dialog-body > .tags { margin-top: 18px; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding-block: 20px;
  border-block: 1px solid var(--line);
}
.case-meta dt,
.case-section h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.case-meta dd { margin-top: 4px; font-size: var(--fs-sm); }
.case-section { margin-top: 32px; }
.case-section p { max-width: 62ch; margin-top: 12px; color: var(--text-2); }
.case-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  counter-reset: scope;
}
.case-scope li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(242, 239, 233, 0.02);
  font-size: var(--fs-sm);
  line-height: 1.4;
  counter-increment: scope;
}
.case-scope li::before {
  content: "0" counter(scope);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--accent);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.dialog-next {
  display: inline-grid;
  grid-template-columns: auto 16px;
  align-items: center;
  column-gap: 12px;
  text-align: right;
}
.dialog-next-label {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dialog-next-title {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  transition: color 0.3s;
}
.dialog-next svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 16px; height: 16px;
  transition: transform 0.45s var(--ease);
}
.dialog-next:hover .dialog-next-title { color: var(--accent); }
.dialog-next:hover svg { transform: translateX(3px); }

/* ---------- 14. Motion ---------- */
/* Reveal uses the `translate` property so hover `transform`s stay independent */
.js [data-reveal] { opacity: 0; }
[data-delay="1"] { --d: 1; }
[data-delay="2"] { --d: 2; }
[data-delay="3"] { --d: 3; }
.js [data-reveal].is-visible { animation: reveal 0.9s var(--ease) calc(var(--d, 0) * 80ms) both; }
.js [data-reveal].is-visible.is-entering { animation: reveal 0.6s var(--ease) both; }

@keyframes reveal { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes caption-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(20px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 60%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-5%, 6%, 0) scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; }
  .marquee-track { animation: none; }
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1180px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: 8.5rem minmax(0, 1fr); }
  .timeline-place { grid-column: 2; text-align: left; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
}

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 16px;
    max-width: 720px;
  }
  .panel-head { grid-column: 1 / -1; }
  .panel-list { margin-top: 0; align-self: center; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .header-inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }

  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .about-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .about-visual { position: relative; top: 0; max-width: 460px; }
  .about-badge { top: -24px; right: -12px; width: 92px; height: 92px; }

  .process { grid-template-columns: minmax(0, 1fr); }
  .process::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .process li { padding: 0 0 32px 40px; }
  .process li:last-child { padding-bottom: 0; }
  .process li::before { top: 4px; }
  .process p { max-width: 46ch; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 901px) {
  .mobile-menu { display: none; }
}

@media (max-width: 640px) {
  :root {
    --fs-hero: clamp(2.75rem, 12.6vw, 4.5rem);
    --fs-body: 1rem;
  }
  .hide-sm { display: none; }
  .header-cta { display: none; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 36px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-panel { display: block; margin-top: 8px; padding: 10px; }
  .panel-head { padding: 4px 6px 12px; }
  .panel-preview { aspect-ratio: 16 / 10; }
  .panel-list { margin-top: 6px; }
  .panel-list a { padding: 11px 6px; }
  .hero-facts { margin-top: 56px; gap: 20px 20px; }

  .about-visual { max-width: none; }
  .portrait { aspect-ratio: 5 / 4; }
  .about-badge { top: -22px; right: 12px; width: 84px; height: 84px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .timeline-place { grid-column: auto; }

  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .service-top { margin-bottom: 32px; }

  .head-split { align-items: flex-start; }
  .filters { width: 100%; }
  .filter { flex: 1 1 auto; padding: 0 10px; }
  .projects-grid { grid-template-columns: minmax(0, 1fr); }
  .projects-grid:not(.is-filtered) .project:nth-child(even) { margin-top: 0; }

  .statement figcaption { margin-top: 32px; }

  .field-row { grid-template-columns: minmax(0, 1fr); }
  .contact-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-meta div:last-child { grid-column: 1 / -1; }
  .form-foot .btn { width: 100%; }

  .footer-bottom { justify-content: center; text-align: center; }

  .project-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 20px; }
  .dialog-cover { aspect-ratio: 16 / 10; }
  .case-meta { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .case-meta div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .case-meta dd { margin-top: 0; text-align: right; }
  .case-scope { grid-template-columns: minmax(0, 1fr); }
  .dialog-actions { flex-direction: column-reverse; align-items: stretch; }
  .dialog-actions .btn { width: 100%; }
  .dialog-next { justify-content: space-between; grid-template-columns: 1fr 16px; text-align: left; }
}

@media (max-width: 380px) {
  .logo-text { font-size: 0.9375rem; }
  .menu-toggle-label { display: none; }
  .menu-toggle { padding: 0 6px; }
  .hero-facts dd { font-size: var(--fs-xs); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
