/* ==========================================================================
   Platinum House Development — 2026
   Palette and type follow the brand: the platinum gradient of the mark and
   the geometric, widely spaced capitals of the wordmark.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable weight) ---------- */

/* Hanken Grotesk — latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/webfonts/hanken-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Hanken Grotesk — latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/webfonts/hanken-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Urbanist — latin-ext */
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/webfonts/urbanist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Urbanist — latin */
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/webfonts/urbanist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Palette taken from the brand mark: platinum gradient #A6CBD8 → #5F7C88 */
  --paper: #f4f6f7;
  --paper-2: #e7ecee;
  --ink: #1c2327;
  --ink-soft: #4a555b;
  --steel: #4d6773;
  --platinum: #8fb0be;
  --platinum-light: #a6cbd8;
  --concrete: #5a666c;
  --brand-gradient: linear-gradient(90deg, #a6cbd8, #5f7c88);
  --line: rgba(28, 35, 39, 0.14);
  --line-inverse: rgba(244, 246, 247, 0.16);

  --font-display: "Urbanist", "Montserrat", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-display: clamp(2.6rem, 1.2rem + 5vw, 6.25rem);
  --step-h1: clamp(2.3rem, 1.4rem + 3.5vw, 4.6rem);
  --step-h2: clamp(1.9rem, 1.3rem + 2.4vw, 3.3rem);
  --step-h3: clamp(1.3rem, 1.15rem + 0.6vw, 1.65rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.9vw, 1.85rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --section: clamp(4.5rem, 3rem + 7vw, 10rem);
  --header-h: 76px;

  --ease: cubic-bezier(0.7, 0, 0.2, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--platinum);
  outline-offset: 3px;
}

::selection {
  background: var(--platinum);
  color: var(--paper);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
}

.label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--concrete);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4.5rem);
}

.section-head h2 {
  font-size: var(--step-h2);
  max-width: 16ch;
}

.section-head .label {
  display: block;
  margin-bottom: 1.25rem;
}

/* Text link with a drawn underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 0.2em;
  transition: background-size 0.4s var(--ease);
}

.link:hover {
  background-size: 0% 1px;
  background-position: 100% 100%;
}

.link .arrow {
  transition: transform 0.4s var(--ease);
}

.link:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: grid;
  text-decoration: none;
}

/* Dark and white versions of the logo stacked; the header state picks one */
.brand img {
  grid-area: 1 / 1;
  width: auto;
  height: 42px;
  transition: opacity 0.4s;
}

.brand__light {
  opacity: 0;
}

/* Header over a hero image: transparent until scrolled */
[data-header="overlay"] .site-header:not(.is-scrolled) {
  color: var(--paper);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
}

[data-header="overlay"] .site-header:not(.is-scrolled) .brand__dark {
  opacity: 0;
}

[data-header="overlay"] .site-header:not(.is-scrolled) .brand__light {
  opacity: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
}

.nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .brand img {
    height: 34px;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0 9px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.35s var(--ease), opacity 0.2s;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2rem var(--gutter);
    background: var(--paper);
    color: var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0s 0.3s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
  }

  .nav a {
    width: 100%;
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
  }

  .nav a::after {
    display: none;
  }

  /* When the menu is open the header must be solid */
  body.menu-open .site-header {
    color: var(--ink) !important;
    background: var(--paper) !important;
    border-color: var(--line) !important;
  }

  body.menu-open .site-header .brand__dark {
    opacity: 1 !important;
  }

  body.menu-open .site-header .brand__light {
    opacity: 0 !important;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* ---------- Hero (home) — the louvre reveal ---------- */

.hero {
  position: relative;
  min-height: clamp(560px, 100svh, 1100px);
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  animation: hero-settle 2.6s var(--ease) both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 22, 26, 0.55) 0%, rgba(16, 22, 26, 0) 22%),
    linear-gradient(0deg, rgba(16, 22, 26, 0.82) 0%, rgba(16, 22, 26, 0.25) 45%, rgba(16, 22, 26, 0) 70%);
}

/* Vertical fins — the slats from the PHD mark, left behind after the reveal */
.hero__fins {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(var(--fins), 1fr);
  pointer-events: none;
  /* hairline joints between fins, revealed once the fins open */
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(100% / var(--fins) - 1px),
    rgba(244, 246, 247, 0.13) calc(100% / var(--fins) - 1px) calc(100% / var(--fins))
  );
}

.hero__fins span {
  background: var(--ink);
  transform-origin: 100% 50%;
  animation: louvre-open 1.15s var(--ease) both;
  animation-delay: calc(250ms + var(--i) * 75ms);
}

.hero__content {
  position: relative;
  width: 100%;
  padding-bottom: clamp(2.5rem, 2rem + 4vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}

.hero h1 {
  font-size: var(--step-display);
  max-width: 13ch;
  animation: rise 1.2s var(--ease) both;
  animation-delay: 1s;
}

.hero h1 em {
  font-style: normal;
  font-weight: 300;
  color: var(--platinum-light);
}

.hero__aside {
  max-width: 30ch;
  animation: rise 1.2s var(--ease) both;
  animation-delay: 1.2s;
}

.hero__aside p {
  font-size: 1rem;
  color: rgba(244, 246, 247, 0.82);
  margin-bottom: 1.5rem;
}

.hero__caption {
  display: block;
  margin-top: 2.5rem;
  color: rgba(244, 246, 247, 0.6);
}

@keyframes louvre-open {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@keyframes hero-settle {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Intro ---------- */

.intro__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem var(--gutter);
}

.intro__grid > .label {
  grid-column: 1 / span 3;
  padding-top: 0.7rem;
}

.intro__statement {
  grid-column: 4 / -1;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--steel);
}

.facts {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem var(--gutter);
  margin-top: clamp(2rem, 1rem + 3vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 0.5rem;
}

.facts dd {
  font-size: 1rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .intro__grid > .label,
  .intro__statement,
  .facts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .facts {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project cards ---------- */

.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card__media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: var(--ratio, 4 / 3);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.card:hover .card__media img,
.card:focus-visible .card__media img {
  transform: scale(1.035);
}

/* A platinum slat that slides in on hover */
.card__media::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: linear-gradient(180deg, #a6cbd8, #5f7c88);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}

.card:hover .card__media::after,
.card:focus-visible .card__media::after {
  transform: scaleY(1);
}

.card__body {
  display: grid;
  gap: 0.35rem;
  padding-top: 1.1rem;
}

.card__title {
  font-size: var(--step-h3);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card__title .arrow {
  font-family: var(--font-body);
  font-size: 1.1rem;
  transition: transform 0.4s var(--ease);
}

.card:hover .card__title .arrow {
  transform: translateX(4px);
}

.card__summary {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 52ch;
  margin-top: 0.25rem;
}

/* Home: asymmetric selected-work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.5rem, 2rem + 3vw, 5rem) var(--gutter);
}

.work-grid > :nth-child(4n + 1) { grid-column: 1 / span 7; --ratio: 4 / 3; }
.work-grid > :nth-child(4n + 2) { grid-column: 9 / span 4; --ratio: 4 / 5; margin-top: clamp(0rem, 8vw, 8rem); }
.work-grid > :nth-child(4n + 3) { grid-column: 2 / span 4; --ratio: 4 / 5; }
.work-grid > :nth-child(4n + 4) { grid-column: 7 / span 6; --ratio: 3 / 2; margin-top: clamp(0rem, 6vw, 6rem); }

@media (max-width: 760px) {
  .work-grid > * {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
    --ratio: 4 / 3 !important;
  }
}

/* Projects page: even two-column grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(3rem, 2rem + 3vw, 5.5rem) var(--gutter);
  padding: 0;
  list-style: none;
}

@media (max-width: 760px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Services band ---------- */

.band {
  background: var(--ink);
  color: var(--paper);
}

.band .label {
  color: var(--platinum-light);
}

.band .section-head h2 {
  max-width: 18ch;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem var(--gutter);
}

.service {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-inverse);
}

.service h3 {
  font-size: var(--step-h3);
  margin-bottom: 1rem;
}

.service p {
  color: rgba(244, 246, 247, 0.72);
  font-size: 1rem;
}

@media (max-width: 900px) {
  .services {
    grid-template-columns: 1fr;
  }
}

/* ---------- Split (image + text) ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem var(--gutter);
  align-items: center;
}

.split__media {
  grid-column: 1 / span 6;
}

.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.split__text {
  grid-column: 8 / -1;
}

.split--reverse .split__media { grid-column: 7 / -1; grid-row: 1; }
.split--reverse .split__text { grid-column: 1 / span 5; grid-row: 1; }

.split--offer { align-items: start; }
.split--offer .split__text { grid-column: 1 / span 4; }
.split--offer .accordion { grid-column: 6 / -1; }

.split__text .label {
  display: block;
  margin-bottom: 1.5rem;
}

.split__text h2 {
  font-size: var(--step-h2);
  margin-bottom: 1.5rem;
}

.split__text p + p {
  margin-top: 1rem;
}

.split__text p {
  color: var(--ink-soft);
}

.quote {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.35;
  color: var(--steel) !important;
}

@media (max-width: 860px) {
  .split__media,
  .split__text,
  .split--reverse .split__media,
  .split--reverse .split__text,
  .split--offer .split__text,
  .split--offer .accordion {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* ---------- Contact CTA ---------- */

.cta {
  border-top: 1px solid var(--line);
}

.cta h2 {
  font-size: var(--step-h1);
  max-width: 15ch;
  margin-block: 1.5rem 2.5rem;
}

.cta__contacts {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.cta__mail {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 1.6vw, 2.2rem);
  font-weight: 600;
  color: var(--steel);
  overflow-wrap: anywhere;
}

/* ---------- Page head (inner pages) ---------- */

.page-head {
  padding-top: calc(var(--header-h) + clamp(3.5rem, 2rem + 6vw, 8rem));
  padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
}

.page-head h1 {
  font-size: var(--step-h1);
  max-width: 14ch;
  margin-top: 1.25rem;
}

.page-head p {
  max-width: 56ch;
  margin-top: 1.75rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- About ---------- */

.partners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 2rem + 4vw, 7rem) var(--gutter);
}

.partner img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 2rem;
}

.partner:nth-child(2) {
  margin-top: clamp(0rem, 10vw, 9rem);
}

.partner h2 {
  font-size: var(--step-h3);
  margin: 0.75rem 0 1.25rem;
}

.partner p {
  color: var(--ink-soft);
}

.partner p + p {
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .partners {
    grid-template-columns: 1fr;
  }
  .partner:nth-child(2) {
    margin-top: 0;
  }
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion details {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.6rem;
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform 0.35s var(--ease);
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion details p {
  max-width: 62ch;
  padding-bottom: 1.75rem;
  color: var(--ink-soft);
}

.warranty {
  background: var(--paper-2);
}

.warranty .split__media img {
  aspect-ratio: auto;
  max-width: 420px;
  margin-inline: auto;
  box-shadow: 0 30px 60px -30px rgba(28, 35, 39, 0.35);
  background: #fff;
}

/* ---------- Project viewer (dialog) ---------- */

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.viewer::backdrop {
  background: rgba(16, 22, 26, 0.6);
}

.viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  animation: viewer-in 0.45s var(--ease);
}

@keyframes viewer-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.viewer__gallery {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  background: var(--ink);
  color: var(--paper);
}

.viewer__stage {
  --pad: clamp(1rem, 3vw, 2.5rem);
  position: relative;
  min-height: 0;
  min-width: 0;
}

.viewer__stage img {
  position: absolute;
  top: var(--pad);
  left: var(--pad);
  width: calc(100% - var(--pad) * 2);
  height: calc(100% - var(--pad) * 2);
  object-fit: contain;
  transition: opacity 0.25s;
}

.viewer__stage img.is-loading {
  opacity: 0.3;
}

.viewer__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-inverse);
  border-radius: 50%;
  background: rgba(28, 35, 39, 0.55);
  color: var(--paper);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.viewer__nav:hover {
  background: var(--platinum);
}

.viewer__nav--prev { left: 1rem; }
.viewer__nav--next { right: 1rem; }

.viewer__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem) 1.1rem;
  border-top: 1px solid var(--line-inverse);
}

.viewer__count {
  flex: none;
  color: rgba(244, 246, 247, 0.65);
}

.viewer__thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-block: 4px;
}

.viewer__thumbs button {
  flex: none;
  width: 72px;
  height: 52px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.3s;
}

.viewer__thumbs button[aria-current="true"],
.viewer__thumbs button:hover {
  opacity: 1;
}

.viewer__thumbs button[aria-current="true"] {
  outline: 1.5px solid var(--platinum);
  outline-offset: 2px;
}

.viewer__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer__info {
  position: relative;
  overflow-y: auto;
  padding: clamp(4.5rem, 4rem + 2vw, 6rem) clamp(1.25rem, 3vw, 3rem) 3rem;
}

.viewer__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 500 0.85rem var(--font-body);
  cursor: pointer;
}

.viewer__close:hover {
  border-color: var(--ink);
}

.viewer__info h2 {
  font-size: var(--step-h2);
  margin: 1rem 0 2rem;
}

.prose {
  color: var(--ink-soft);
}

.prose > * + * {
  margin-top: 1rem;
}

.prose .lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--steel);
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: var(--ink);
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.prose li::marker {
  color: var(--platinum);
}

.docs {
  display: grid;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.docs .label {
  margin-bottom: 0.25rem;
}

.docs a {
  justify-self: start;
}

@media (max-width: 900px) {
  .viewer[open] {
    display: block;
    overflow-y: auto;
  }

  .viewer__gallery {
    height: 62svh;
  }

  .viewer__info {
    overflow: visible;
    padding-top: 2.5rem;
  }

  .viewer__close {
    position: fixed;
    z-index: 2;
    top: 0.75rem;
    right: 0.75rem;
  }

  .viewer__nav {
    width: 42px;
    height: 42px;
  }
}

body.viewer-open {
  overflow: hidden;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(244, 246, 247, 0.75);
  padding-block: clamp(4rem, 3rem + 4vw, 7rem) 2rem;
  font-size: 0.98rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem var(--gutter);
}

.footer__brand img {
  width: 220px;
  height: auto;
  margin-bottom: 1.75rem;
}

.footer__brand p {
  max-width: 38ch;
}

.site-footer .label {
  display: block;
  margin-bottom: 1rem;
  color: rgba(244, 246, 247, 0.5);
}

.site-footer ul {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--paper);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--platinum-light);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-inverse);
  font-size: 0.85rem;
  color: rgba(244, 246, 247, 0.5);
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
