/* ==========================================================================
   Sferra Studio — design tokens + styles
   Colors come from the Sferra logo: navy night, ember glow, white.
   ========================================================================== */

:root {
  /* Color */
  --night: #081628;
  --deep: #0e2038;
  --deep-2: #132a47;
  --ember: #a44423;          /* glow + large shapes only (2.97:1 on night) */
  --ember-light: #e0875c;    /* links, highlights, small text (6.7:1) */
  --paper: #eef0f3;          /* body text (15.9:1) */
  --mist: #9aa8bc;           /* secondary text (7.5:1) */
  --line: rgba(238, 240, 243, 0.14);
  --line-strong: rgba(238, 240, 243, 0.32);

  /* Type */
  --font-display: "Jura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --step-5: clamp(3rem, 1.4rem + 7vw, 7.5rem);

  /* Space (8pt rhythm) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: clamp(5rem, 3rem + 8vw, 10rem);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1320px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 900ms;

  /* Layers */
  --z-header: 40;
  --z-menu: 50;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--night);
  color-scheme: dark;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; }
p { margin: 0 0 var(--s-2); }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ember); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--ember-light);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--night);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.04;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--mist);
  max-width: 38ch;
}

.text-link {
  color: var(--ember-light);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size var(--dur) var(--ease-out);
  padding-bottom: 2px;
}
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  transition: background-color var(--dur) ease, border-color var(--dur) ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(8, 22, 40, 0.94);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  height: 76px;
}
.brand { display: inline-flex; align-items: center; color: var(--paper); padding-block: 8px; }
.brand svg { height: 38px; width: auto; }

.nav-list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav-list a {
  position: relative;
  display: inline-block;
  padding-block: 10px;
  color: var(--mist);
  font-size: 0.975rem;
  transition: color var(--dur-fast) ease;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--paper); }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: var(--ember-light);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.875rem;
  color: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a, .lang-switch span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  border-radius: 999px;
  padding-inline: 8px;
}
.lang-switch [aria-current="true"] { background: var(--paper); color: var(--night); font-weight: 600; }
.lang-switch a:hover { color: var(--paper); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--paper);
  font-size: 0.975rem;
}
.menu-toggle .bars { position: relative; width: 22px; height: 10px; }
.menu-toggle .bars::before, .menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), top var(--dur) var(--ease-out);
}
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 96px var(--gutter) var(--s-5);
    background:
      radial-gradient(60% 50% at 80% 30%, rgba(164, 68, 35, 0.35), transparent 70%),
      var(--night);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) ease, visibility 0s linear var(--dur);
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur) ease;
  }
  .nav-list { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
  .nav-list a {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 10vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--paper);
  }
  .nav-list a[aria-current="page"] { color: var(--ember-light); }
  .nav-list a[aria-current="page"]::after { display: none; }
  .site-nav .lang-switch { margin-top: var(--s-5); align-self: flex-start; }
  /* logo + close button stay above the open menu */
  .brand, .menu-toggle { position: relative; z-index: calc(var(--z-menu) + 1); }
  body.menu-open { overflow: hidden; }
}
@media (min-width: 861px) {
  .site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-block: 110px var(--s-5);
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  left: var(--glow-x, 28%);
  top: 52%;
  width: min(120vw, 1400px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(circle closest-side,
    rgba(196, 84, 40, 0.95) 0%,
    rgba(164, 68, 35, 0.6) 18%,
    rgba(110, 46, 40, 0.32) 40%,
    rgba(40, 30, 45, 0.14) 65%,
    rgba(8, 22, 40, 0) 100%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s-5);
}
.hero-sphere { color: var(--paper); }
.hero-sphere .sphere { width: min(100%, 620px); margin-inline: auto; overflow: visible; }

.hero-copy { text-align: right; }
.hero-services {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 1rem + 3.9vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero-services a {
  display: inline-block;
  transition: color var(--dur-fast) ease, transform var(--dur) var(--ease-out);
}
.hero-services a:hover { color: var(--ember-light); transform: translateX(-0.12em); }
.hero-title {
  margin-top: var(--s-4);
  margin-left: auto;
  max-width: 34ch;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--mist);
  font-weight: 400;
}

@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: 104px; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .hero-sphere .sphere { width: min(78vw, 420px); }
  .hero-glow { left: 50%; top: 32%; width: 170vw; }
  .hero-copy { text-align: left; }
  .hero-title { margin-left: 0; }
  .hero-services a:hover { transform: none; }
}

/* ---------- Intro animation (plays once per visit) ---------- */
@keyframes glow-in { from { opacity: 0; scale: 0.7; } to { opacity: 1; scale: 1; } }
@keyframes stripe-in {
  from { opacity: 0; transform: translateX(calc(var(--dir) * 90px)); }
  to { opacity: 1; transform: none; }
}
@keyframes s-in {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.45em); }
  to { opacity: 1; transform: none; }
}

.js .hero-glow { animation: glow-in 2.6s var(--ease-out) 0.1s both; }
.js .sphere .stripe {
  --dir: 1;
  animation: stripe-in 1.25s var(--ease-out) both;
  animation-delay: calc(0.2s + var(--i) * 32ms);
}
.js .sphere .stripe:nth-child(odd) { --dir: -1; }
.js .sphere .s-mark { animation: s-in 1.3s var(--ease-out) 1.35s both; }
.js .hero-services li {
  animation: rise 1s var(--ease-out) both;
  animation-delay: calc(0.9s + var(--i, 0) * 90ms);
}
.js .hero-title { animation: rise 1s var(--ease-out) 1.7s both; }

.intro-seen .hero-glow,
.intro-seen .sphere .stripe,
.intro-seen .sphere .s-mark,
.intro-seen .hero-services li,
.intro-seen .hero-title { animation: none !important; }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-7); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
.section-title { font-size: var(--step-4); }
.page-head { padding-top: calc(76px + var(--s-7)); padding-bottom: var(--s-6); }
.page-title { font-size: var(--step-5); max-width: 14ch; }
.page-head .lede { margin-top: var(--s-4); }

/* ---------- Featured work (home) ---------- */
.feature-list { display: grid; gap: var(--s-7); }
.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: var(--s-4);
}
.feature-media { grid-column: 1 / span 8; }
.feature-text { grid-column: 9 / span 4; padding-bottom: var(--s-2); }
.feature:nth-child(even) .feature-media { grid-column: 5 / span 8; grid-row: 1; }
.feature:nth-child(even) .feature-text { grid-column: 1 / span 4; grid-row: 1; }
.feature-title { font-size: var(--step-3); margin-bottom: var(--s-2); }
.meta { color: var(--mist); font-size: var(--step--1); line-height: 1.6; }
.meta span + span::before { content: "/"; margin-inline: 0.6em; color: var(--line-strong); }
@media (max-width: 760px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: var(--s-3); }
  .feature-media, .feature-text,
  .feature:nth-child(even) .feature-media,
  .feature:nth-child(even) .feature-text { grid-column: 1; grid-row: auto; }
}

/* Media frame + placeholder art (until real images arrive) */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--deep);
  border-radius: 2px;
}
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media img, .media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
a.media:hover img, a.media:focus-visible img,
a:hover > .media img, a:focus-visible > .media img { transform: scale(1.035); }

.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end start;
  padding: var(--s-3);
  background:
    radial-gradient(70% 80% at var(--gx, 30%) var(--gy, 40%), rgba(164, 68, 35, 0.55), transparent 70%),
    repeating-linear-gradient(var(--ga, -8deg), rgba(238, 240, 243, 0.07) 0 2px, transparent 2px 14px),
    var(--deep);
  transition: transform 1.2s var(--ease-out);
}
a:hover > .media .ph, a.media:hover .ph { transform: scale(1.035); }
.ph span {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: rgba(238, 240, 243, 0.7);
}

/* Scroll reveal: curtain wipe (only when JS is on, never under reduced motion) */
/* clip the child, not the observed element (a clipped target never "intersects") */
.js .reveal > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease-in-out); }
.js .reveal.is-in > * { clip-path: inset(0 0 0 0); }
.js .fade { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .fade.is-in { opacity: 1; transform: none; }

/* ---------- Statement ---------- */
.statement {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.statement::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -20%;
  top: 50%;
  width: 900px;
  aspect-ratio: 1;
  translate: 0 -50%;
  background: radial-gradient(circle closest-side, rgba(164, 68, 35, 0.32), transparent);
}
.statement-quote { font-size: var(--step-5); max-width: 13ch; }
.statement-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-6);
}
.statement-body p { color: var(--mist); max-width: 46ch; }
@media (max-width: 760px) { .statement-body { grid-template-columns: 1fr; gap: var(--s-2); } }

/* ---------- CTA ---------- */
.cta { border-top: 1px solid var(--line); }
.cta-title { font-size: var(--step-5); }
.cta-mail {
  display: inline-block;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  /* shrinks on narrow phones so the whole address stays on one line (text is ~12.3x its font size wide) */
  font-size: min(var(--step-3), calc((100vw - 2 * var(--gutter)) / 12.8));
  white-space: nowrap;
  color: var(--ember-light);
}
.cta-mail:hover { color: var(--paper); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, scale var(--dur-fast) ease;
}
.btn:hover { border-color: var(--paper); }
.btn:active { scale: 0.98; }
.btn--solid { background: var(--paper); color: var(--night); border-color: var(--paper); }
.btn--solid:hover { background: var(--ember-light); border-color: var(--ember-light); color: var(--night); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

/* ---------- Work grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.filter {
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: var(--mist);
  cursor: pointer;
  font-size: 0.95rem;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.filter:hover { color: var(--paper); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { background: var(--paper); color: var(--night); border-color: var(--paper); font-weight: 600; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6) var(--s-4);
}
.work-card { display: block; }
@media (min-width: 761px) {
  .work-grid { padding-bottom: var(--s-6); }
  .work-card:nth-child(even) { transform: translateY(var(--s-6)); }
}
.work-card h3 { font-family: var(--font-display); font-size: var(--step-2); margin-top: var(--s-2); }
.work-card .meta { margin-top: 0.25rem; }
.work-card:hover h3 { color: var(--ember-light); }
.work-card[hidden] { display: none; }
.work-empty { color: var(--mist); }
@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .work-card:nth-child(even) { transform: none; }
}

/* ---------- Case study ---------- */
.case-hero { padding-top: calc(76px + var(--s-6)); }
.case-title { font-size: var(--step-5); max-width: 16ch; }
.case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  margin-block: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.case-facts dt { color: var(--mist); font-size: var(--step--1); }
.case-facts dd { margin: 0.25rem 0 0; }
.case-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s-5);
  padding-block: var(--s-7);
}
.case-brief h2 { font-family: var(--font-display); font-size: var(--step-3); }
.case-brief p { color: var(--mist); max-width: 60ch; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.gallery { align-items: start; }
.gallery > .is-wide { grid-column: 1 / -1; }
.gallery > :nth-child(3n + 1):has(.ph) { grid-column: 1 / -1; }
.gallery > :nth-child(3n + 1) .media:has(.ph) { aspect-ratio: 16 / 9; }
/* logos on white/transparent backgrounds sit on a light panel */
.media--light { background: #f3f2ee; display: grid; place-items: center; padding: clamp(1.5rem, 5vw, 4rem); }
.gallery > :not(.is-wide) .media--light { aspect-ratio: 1; }
.media--light img { object-fit: contain; max-height: 100%; }
/* tall cover on a project page: don't let it fill several screens */
.media--capped { background: transparent; }
.media--capped img { width: auto; max-width: 100%; max-height: 82vh; margin-inline: auto; }
/* portrait cover on the home page: narrower image column */
@media (min-width: 761px) {
  .feature--portrait .feature-media { grid-column: 1 / span 5; }
  .feature--portrait .feature-text { grid-column: 7 / span 5; }
  .feature--portrait:nth-child(even) .feature-media { grid-column: 8 / span 5; }
  .feature--portrait:nth-child(even) .feature-text { grid-column: 1 / span 5; }
}
/* logos: shown smaller and centred, with breathing room */
.gallery .media--logo { padding-block: var(--s-5); }
.gallery .media.media--natural.media--logo img { max-width: min(560px, 70%); max-height: 320px; }
/* real images keep their own proportions */
.gallery .media--natural:not(.media--light) { background: transparent; }
.gallery .media--natural:not(.media--light) img { width: auto; max-width: 100%; max-height: 88vh; margin-inline: auto; }
.media--natural { aspect-ratio: auto; }
.media--natural img { height: auto; }
/* project parts (e.g. Identity / Photography / Social media) */
.case-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin-bottom: var(--s-6);
  padding-block: var(--s-3);
  border-block: 1px solid var(--line);
}
.case-index ul { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.case-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.95rem;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.case-index a:hover { background: var(--paper); color: var(--night); border-color: var(--paper); }
.case-section { padding-top: var(--s-6); scroll-margin-top: 80px; }
.case-section + .case-section { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.case-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s-5);
  align-items: baseline;
  margin-bottom: var(--s-5);
}
.case-section-head h2 { font-family: var(--font-display); font-size: var(--step-4); line-height: 1.05; }
.case-section-head p { color: var(--mist); max-width: 52ch; margin: 0; }
@media (max-width: 760px) {
  .case-section-head { grid-template-columns: 1fr; gap: var(--s-2); }
}
/* photo stack: cards piled like a deck, top one flat, the next two tilted behind */
.stack { --card-h: min(68vh, 640px, 112vw); overflow: clip; margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.stack-deck {
  position: relative;
  height: calc(var(--card-h) + 3rem);
  touch-action: pan-y;
  user-select: none;
  outline-offset: 6px;
}
.stack-card {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  transition: transform 760ms cubic-bezier(0.65, 0, 0.35, 1), opacity 500ms ease, filter 760ms ease;
  cursor: grab;
  will-change: transform;
}
.stack-card:active { cursor: grabbing; }
/* each photo keeps its original format, nothing is cropped */
.stack-card img {
  display: block;
  width: auto;
  height: auto;
  max-height: var(--card-h);
  max-width: min(92vw, 1100px);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 2px 8px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.stack-card:not([data-pos="0"]) { cursor: default; }
.stack-card.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .stack-card { transition: none; } }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.carousel-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.carousel-btn:hover:not([disabled]) { background: var(--paper); color: var(--night); border-color: var(--paper); }
.carousel-btn[disabled] { opacity: 0.3; cursor: default; }
.carousel-count { margin: 0; min-width: 4.5ch; text-align: center; color: var(--mist); font-variant-numeric: tabular-nums; }
.carousel-index { color: var(--paper); }

.case-next {
  display: block;
  margin-top: var(--s-7);
  padding-block: var(--s-6);
  border-top: 1px solid var(--line);
}
.case-next small { display: block; color: var(--mist); margin-bottom: var(--s-1); }
.case-next strong { font-family: var(--font-display); font-weight: 300; font-size: var(--step-4); }
.case-next:hover strong { color: var(--ember-light); }
@media (max-width: 760px) {
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-brief { grid-template-columns: 1fr; gap: var(--s-2); }
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- Services ---------- */
.service-list { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-4);
  cursor: pointer;
  list-style: none;
}
.service summary::-webkit-details-marker { display: none; }
.service-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-4);
  line-height: 1.05;
  transition: color var(--dur-fast) ease;
}
.service summary:hover .service-name, .service[open] .service-name { color: var(--ember-light); }
.service-icon {
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.service-icon::before, .service-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.5px;
  background: currentColor;
  translate: -50% -50%;
  transition: rotate var(--dur) var(--ease-out);
}
.service-icon::after { rotate: 90deg; }
.service[open] .service-icon::after { rotate: 0deg; }
.service-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--s-5);
  padding-bottom: var(--s-5);
}
.service-body p { color: var(--mist); max-width: 52ch; }
.service-body li { padding-block: 0.4rem; border-bottom: 1px solid var(--line); }
.service[open] .service-body { animation: rise 0.6s var(--ease-out) both; }
@media (max-width: 760px) { .service-body { grid-template-columns: 1fr; gap: var(--s-2); } }

/* ---------- Studio ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: var(--s-5);
}
.two-col p { color: var(--mist); max-width: 58ch; }
.two-col h2 { font-family: var(--font-display); font-size: var(--step-3); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.step { counter-increment: step; padding-top: var(--s-3); border-top: 1px solid var(--line-strong); }
.step::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--ember-light);
  line-height: 1;
  margin-bottom: var(--s-3);
}
.step h3 { font-family: var(--font-display); font-size: var(--step-2); margin-bottom: var(--s-1); }
.step p { color: var(--mist); font-size: 0.975rem; }
.clients { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-family: var(--font-display); font-size: var(--step-3); }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: var(--s-2); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s-6);
  align-items: start;
}
.contact-direct dt { color: var(--mist); font-size: var(--step--1); margin-top: var(--s-4); }
.contact-direct dt:first-child { margin-top: 0; }
.contact-direct dd { margin: 0.25rem 0 0; font-family: var(--font-display); font-size: min(var(--step-2), calc(100cqi / 12.8)); white-space: nowrap; }
.contact-direct { container-type: inline-size; }
.contact-direct dd a:hover { color: var(--ember-light); }

.form { display: grid; gap: var(--s-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.95rem; color: var(--paper); }
.field .req { color: var(--ember-light); }
.field .hint { font-size: var(--step--1); color: var(--mist); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--deep);
  font-size: 1rem;
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(238, 240, 243, 0.5); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ember-light);
  background-color: var(--deep-2);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(154, 168, 188, 0.7); }
.field [aria-invalid="true"] { border-color: #ff8a7a; }
.field .error { color: #ff9f92; font-size: var(--step--1); }
.field .error:empty { display: none; }
.form-status { min-height: 1.6em; color: var(--mist); }
.form-status.is-ok { color: #9ad8b0; }
.form-status.is-err { color: #ff9f92; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-5); }
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-6) var(--s-4);
  color: var(--mist);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.footer-grid .brand svg { height: 46px; }
.footer-grid h2 { font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; color: var(--paper); margin-bottom: var(--s-2); }
.footer-grid li + li { margin-top: 0.35rem; }
.footer-grid a { display: inline-block; padding-block: 4px; transition: color var(--dur-fast) ease; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: var(--s-6);
  font-size: var(--step--1);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Page transitions (supported browsers only) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms ease both vt-out; }
::view-transition-new(root) { animation: 420ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- Reduced motion: everything in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal > * { clip-path: none; }
  .js .fade { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
