@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jost-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  --plaster: #f4f4f1;
  --white: #fbfbf9;
  --concrete: #dfddd6;
  --ink: #1d1d1b;
  --ink-soft: #4a4944;
  --rule: rgba(29, 29, 27, 0.16);
  --door: #8a1c2b;
  --door-deep: #6e1522;
  --door-ink: #fff6f6;
  --door-soft: #f1cdd2;
  --garden: #4f5e43;
  --garden-ink: #f3f5ee;
  --garden-soft: #d3dcc8;
  --beam-soft: #b9b8b0;
  --brass: #c8b48a;

  --font-display: "Jost", "Futura", "Century Gothic", sans-serif;
  --font-text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --frame: 1280px;
  --pad: clamp(1.25rem, 3.4vw, 3rem);
  --space: clamp(4rem, 9vw, 7.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-soft) var(--plaster);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--door);
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--door);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.9rem);
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Beam (header) ---------- */

.beam {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(29, 29, 27, 0.16);
  background: var(--ink);
  color: var(--white);
}

.beam-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--frame);
  min-height: 4.75rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-plaque {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  background: var(--white);
}

.brand-plaque img {
  width: 2.5rem;
  height: auto;
}

.brand-name {
  display: grid;
  line-height: 1.1;
}

.brand-name strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand-name span {
  color: var(--beam-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}

.site-nav a:hover {
  color: var(--beam-soft);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

.site-nav .nav-door {
  margin-left: 0.6rem;
  padding-inline: 1.1rem;
  background: var(--door);
  color: var(--door-ink);
}

.site-nav .nav-door:hover {
  background: var(--door-deep);
  color: var(--door-ink);
}

.beam :focus-visible {
  outline-color: var(--white);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border: 0;
  background: none;
  color: var(--white);
  font: 500 1rem var(--font-text);
  cursor: pointer;
}

.menu-toggle-bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  height: 2px;
  background: currentColor;
  transition: transform 250ms var(--ease-out);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- House frame: posts and bays ---------- */

.house {
  max-width: var(--frame);
  margin: 0 auto;
  border-inline: 1px solid var(--ink);
  background: var(--plaster);
}

.bays {
  display: grid;
  border-bottom: 1px solid var(--ink);
}

.bays > * + * {
  border-left: 1px solid var(--ink);
}

.bay {
  padding: var(--space) var(--pad);
}

.bay-tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.prose {
  max-width: 38rem;
}

.prose p + p {
  margin-top: 1rem;
}

.prose h2 + p,
.prose h2 + .lede {
  margin-top: 1.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
}

.text-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 300ms var(--ease-out);
}

.text-link:hover svg {
  transform: translateX(4px);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
}

/* ---------- Hero ---------- */

.hero {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(15rem, 0.72fr);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4rem);
}

.hero-copy h1 {
  max-width: 13ch;
}

.page-head {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.page-head h1 {
  max-width: 14ch;
}

.page-head-door {
  grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 0.5fr);
}

.page-head-solo {
  grid-template-columns: minmax(0, 1fr);
}

.page-head-solo h1 {
  max-width: 18ch;
}

/* Glass pane: a photo framed like a floor-to-ceiling window */

.pane {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  background: var(--concrete);
}

.pane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pane-wall::after,
.pane-standing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--white), var(--white)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--white), var(--white)) 0 64% / 100% 1px no-repeat;
  opacity: 0.55;
}

.pane img.focus-face {
  object-position: 50% 30%;
}

.pane img.focus-family {
  object-position: 50% 72%;
}

.pane-standing {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pane-standing::after {
  background:
    linear-gradient(var(--ink), var(--ink)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 30% / 100% 1px no-repeat;
  opacity: 0.18;
}

.pane-standing img {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 112%;
  max-width: none;
  height: auto;
  margin-inline: -6%;
  object-fit: contain;
}

.pane-wall {
  min-height: clamp(18rem, 42vw, 34rem);
  border-bottom: 1px solid var(--ink);
}

.pane-wall::after {
  background:
    linear-gradient(var(--white), var(--white)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(var(--white), var(--white)) 66.66% 0 / 1px 100% no-repeat;
  opacity: 0.6;
}

/* Sliding glass entrance (only when JS is running) */

.js .slide img {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1100ms var(--ease-out);
}

.js .slide.is-visible img {
  clip-path: inset(0 0 0 0);
}

/* ---------- Front door ---------- */

.door-frame {
  position: relative;
  background: var(--ink);
  perspective: 1400px;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  gap: 2.5rem;
  min-height: 26rem;
  padding: 2rem 1.75rem 2rem 2.5rem;
  background: var(--door);
  color: var(--door-ink);
  transform-origin: right center;
  transition: transform 700ms var(--ease-out), box-shadow 700ms var(--ease-out);
}

.door::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 4px;
  height: 5.5rem;
  margin-top: -2.75rem;
  background: var(--brass);
}

.door-frame:hover .door,
.door-frame:focus-within .door {
  transform: rotateY(9deg);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.28);
}

.door-actions {
  display: grid;
  gap: 1.5rem;
}

.door-action {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
}

.door-action span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--door-soft);
  font-size: 0.9rem;
}

.door-action svg {
  width: 1rem;
  height: 1rem;
}

.door-action strong {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.door-action-email strong {
  overflow-wrap: normal;
  font-size: 1.05rem;
  font-family: var(--font-text);
  font-weight: 600;
}

.door-action:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.door :focus-visible {
  outline-color: var(--door-ink);
}

.door-note {
  color: var(--door-soft);
  font-size: 0.9rem;
}

/* ---------- Facts: ruled table ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--ink);
}

.facts > div {
  padding: 1.4rem var(--pad);
}

.facts > div + div {
  border-left: 1px solid var(--ink);
}

.facts dt {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- Services: two sides ---------- */

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

.ruled {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.ruled li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.ruled-rows {
  margin-top: 0;
}

.ruled-rows li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  padding: 1.6rem 0;
}

.ruled-rows h3 {
  font-size: 1.3rem;
}

.ruled-rows p {
  color: var(--ink-soft);
}

.ruled-rows .text-link {
  margin-top: 1rem;
}

.statement > .bay:first-child h2 {
  position: sticky;
  top: 7rem;
}

.statement {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.statement > .bay {
  padding-block: clamp(3rem, 6vw, 5rem);
}

/* ---------- About ---------- */

.about {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.about .pane {
  min-height: 30rem;
}

.signature {
  width: 11rem;
  margin-top: 2rem;
}

/* ---------- Atrium (reviews) ---------- */

.atrium {
  background: var(--garden);
  color: var(--garden-ink);
  border-bottom: 1px solid var(--ink);
}

.atrium-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: var(--space) var(--pad) clamp(2.5rem, 5vw, 3.5rem);
}

.atrium-head h2 {
  max-width: 16ch;
}

.atrium-head .text-link {
  margin-top: 0;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(243, 245, 238, 0.35);
}

.quotes-wide {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
}

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

.quotes-grid .quote:nth-child(odd) {
  border-left: 0;
}

.quotes-grid .quote:nth-child(n + 3) {
  border-top: 1px solid rgba(243, 245, 238, 0.35);
}

.atrium-foot {
  padding: clamp(1.5rem, 3vw, 2rem) var(--pad);
  border-top: 1px solid rgba(243, 245, 238, 0.35);
  color: var(--garden-soft);
}

.atrium-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  color: var(--garden-ink);
  font-weight: 600;
}

.atrium-foot svg {
  width: 1rem;
  height: 1rem;
}

.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
  padding: clamp(2rem, 4vw, 3rem) var(--pad) var(--space);
}

.quote + .quote {
  border-left: 1px solid rgba(243, 245, 238, 0.35);
}

.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  line-height: 1.4;
}

.quote footer {
  color: var(--garden-soft);
  font-weight: 600;
}

.atrium a:focus-visible {
  outline-color: var(--garden-ink);
}

/* ---------- Link rows (resources, review platforms) ---------- */

.rooms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.room {
  display: flex;
  flex-direction: column;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad);
}

.room h2 {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
}

.room p {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.room .text-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 2rem;
  border-bottom: 0;
  text-decoration: underline;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink);
}

.platforms-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platforms a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1.25rem 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color 200ms var(--ease-out);
}

.platforms a + a {
  padding-left: 1.25rem;
  border-left: 1px solid var(--ink);
}

.platforms a:hover {
  color: var(--door);
}

.platforms svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---------- Door band (closing call to action) ---------- */

.door-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem var(--pad);
  align-items: end;
  padding: var(--space) var(--pad);
  background: var(--door);
  color: var(--door-ink);
  border-bottom: 1px solid var(--ink);
}

.door-band h2 {
  max-width: 14ch;
}

.door-band p {
  max-width: 30rem;
  margin-top: 1.25rem;
  color: var(--door-soft);
  font-size: 1.15rem;
}

.door-band .door-actions {
  padding-left: 2rem;
  border-left: 1px solid rgba(255, 246, 246, 0.4);
}

.door-band :focus-visible {
  outline-color: var(--door-ink);
}

/* ---------- Footer beam ---------- */

.footer-beam {
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem var(--pad);
  max-width: var(--frame);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) var(--pad);
}

.footer-label {
  font-size: 1.05rem;
  font-family: var(--font-text);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--beam-soft);
  margin-bottom: 0.9rem;
}

.footer-inner ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a {
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 1.25rem;
  color: var(--beam-soft);
}

.footer-legal {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 1.25rem var(--pad) 1.5rem;
  border-top: 1px solid rgba(251, 251, 249, 0.18);
  color: var(--beam-soft);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.footer-beam :focus-visible {
  outline-color: var(--white);
}

/* ---------- Mobile call bar ---------- */

.call-bar {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }

  .hero .hero-copy {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--ink);
  }

  .hero .pane {
    border-left: 0;
  }

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

  .facts > div:nth-child(3) {
    border-left: 0;
  }

  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--ink);
  }

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

  .quotes-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--pad) 1.25rem;
    background: var(--ink);
    border-top: 1px solid rgba(251, 251, 249, 0.18);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(251, 251, 249, 0.12);
  }

  .site-nav .nav-door {
    margin: 1rem 0 0;
    padding: 0.9rem 1rem;
    border-bottom: 0;
  }

  .house {
    border-inline: 0;
  }

  .bays,
  .split,
  .statement,
  .about,
  .page-head,
  .rooms,
  .quotes,
  .quotes-wide,
  .quotes-grid,
  .door-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .bays > * + * {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

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

  .door-frame {
    perspective: none;
  }

  .door {
    min-height: 0;
    padding: 2rem var(--pad) 2.25rem calc(var(--pad) + 1.25rem);
  }

  .door::before {
    left: var(--pad);
  }

  .statement > .bay:first-child {
    padding-bottom: 0;
  }

  .statement > .bay:first-child + .bay {
    border-top: 0;
  }

  .statement > .bay:first-child h2 {
    position: static;
  }

  .pane {
    min-height: 20rem;
  }

  .pane-standing {
    min-height: 0;
    padding-top: 2rem;
  }

  .pane-standing img {
    width: min(100%, 26rem);
    margin-inline: auto;
  }

  .about .pane {
    min-height: 24rem;
  }

  .ruled-rows li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .quote {
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }

  .quote + .quote {
    border-left: 0;
    border-top: 1px solid rgba(243, 245, 238, 0.35);
  }

  .quotes .quote:last-child {
    padding-bottom: var(--space);
  }

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

  .platforms a:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .door-band .door-actions {
    padding-left: 0;
    padding-top: 2rem;
    border-left: 0;
    border-top: 1px solid rgba(255, 246, 246, 0.4);
  }

  .call-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--door);
    border-top: 1px solid var(--door-deep);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .call-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3.5rem;
    color: var(--door-ink);
    font-weight: 600;
    text-decoration: none;
  }

  .call-bar a + a {
    border-left: 1px solid rgba(255, 246, 246, 0.35);
  }

  .call-bar svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .call-bar :focus-visible {
    outline-color: var(--door-ink);
    outline-offset: -4px;
  }

  body {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .brand-name span {
    display: none;
  }

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

  .facts > div + div {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .facts > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-block: 1rem;
  }

  .facts dd {
    margin: 0;
    text-align: right;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .platforms,
  .platforms-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .platforms a + a {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Listing pages ---------- */

.listing-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.listing-head h1 {
  max-width: 9ch;
}

button.pane,
.photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--concrete);
  cursor: zoom-in;
}

.listing-cover {
  min-height: clamp(20rem, 38vw, 33rem);
}

.listing-cover img,
.photo img {
  transition: transform 900ms var(--ease-out), filter 300ms var(--ease-out);
}

.listing-cover:hover img,
.photo:hover img {
  transform: scale(1.03);
}

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

.listing-intro {
  grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.6fr);
}

.listing-intro .door {
  min-height: 0;
}

.listing-intro .door .door-note {
  color: var(--door-ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.35;
}

.gallery {
  border-bottom: 1px solid var(--ink);
}

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: clamp(3rem, 6vw, 5rem) var(--pad) clamp(1.75rem, 3vw, 2.5rem);
}

.gallery-head p {
  color: var(--ink-soft);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-auto-flow: dense;
  background: var(--ink);
  border-top: 1px solid var(--ink);
}

.photo-grid li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* 24 photos fill every row: a 2x2 lead plus one wide tile at 4 columns.
   The wide tile takes its height from the row rather than its own ratio. */
.photo-grid li:nth-child(13) {
  grid-column: span 2;
}

.photo-grid li:nth-child(13) .photo {
  height: 100%;
  aspect-ratio: auto;
}

.photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo:focus-visible {
  outline-offset: -4px;
  outline-color: var(--white);
}

.fine-print {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* Photo viewer */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 20, 18, 0.96);
  color: var(--white);
}

.viewer::backdrop {
  background: rgba(20, 20, 18, 0.6);
}

.viewer[open] {
  display: grid;
  place-items: center;
}

.viewer-frame {
  display: grid;
  gap: 1rem;
  justify-items: center;
  max-width: min(92vw, 1100px);
  margin: 0;
}

.viewer-img {
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer figcaption {
  color: var(--beam-soft);
  text-align: center;
}

.viewer-caption {
  color: var(--white);
}

.viewer-count {
  margin-left: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.viewer-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(251, 251, 249, 0.3);
  background: rgba(29, 29, 27, 0.6);
  color: var(--white);
  cursor: pointer;
  transition: background 200ms var(--ease-out);
}

.viewer-btn:hover {
  background: var(--door);
}

.viewer-btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

.viewer-btn:focus-visible {
  outline-color: var(--white);
}

.viewer-prev {
  left: clamp(0.75rem, 3vw, 2rem);
  top: 50%;
  margin-top: -1.5rem;
}

.viewer-next {
  right: clamp(0.75rem, 3vw, 2rem);
  top: 50%;
  margin-top: -1.5rem;
}

.viewer-close {
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 2rem);
}

@media (max-width: 1080px) {
  .facts-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facts-6 > div:nth-child(3) {
    border-top: 0;
    border-left: 1px solid var(--ink);
  }

  .facts-6 > div:nth-child(4) {
    border-left: 0;
  }

  .facts-6 > div:nth-child(n + 4) {
    border-top: 1px solid var(--ink);
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-grid li:nth-child(13) {
    grid-column: auto;
  }

  .photo-grid li:nth-child(13) .photo {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 860px) {
  .listing-head,
  .listing-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-cover {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

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

  .photo-grid li:first-child {
    grid-row: auto;
  }

  .photo-grid li:nth-child(13) {
    grid-column: span 2;
  }

  .photo-grid li:nth-child(13) .photo {
    aspect-ratio: 8 / 3;
  }

  .viewer-prev,
  .viewer-next {
    top: auto;
    bottom: 1rem;
    margin-top: 0;
  }

  .viewer-img {
    max-height: calc(100dvh - 11rem);
  }
}

@media (max-width: 560px) {
  .facts-6 {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts-6 > div:nth-child(n) {
    border-left: 0;
  }

  .facts-6 > div + div {
    border-top: 1px solid var(--ink);
  }
}

/* ---------- Tools (calculators) ---------- */

.tool {
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.75fr);
}

.tool-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.tool-form fieldset + fieldset {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--ink);
}

.tool-form legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.field-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.75rem;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.field[hidden] {
  display: none;
}

.field > label {
  font-weight: 600;
  font-size: 0.95rem;
}

.input {
  display: flex;
  align-items: center;
  min-height: 3rem;
  border: 1px solid var(--ink);
  background: var(--white);
  transition: box-shadow 200ms var(--ease-out);
}

.input:focus-within {
  box-shadow: 0 0 0 2px var(--door);
}

.input input,
.input select {
  flex: 1;
  min-width: 0;
  height: 100%;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 1.05rem var(--font-text);
  font-variant-numeric: tabular-nums;
}

.input select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - 0.8rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.input input:focus,
.input select:focus {
  outline: none;
}

.input input::placeholder {
  color: #8a8880;
}

.affix {
  padding: 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  white-space: nowrap;
}

.affix:first-child {
  padding-right: 0;
}

.affix:last-child {
  padding-left: 0;
}

.field-hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.field-check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.field-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--door);
}

.field-check label {
  font-weight: 600;
}

.tool-form .fine-print {
  margin-top: 2.5rem;
}

.tool-result .door {
  position: sticky;
  top: 4.75rem;
  height: auto;
  min-height: 0;
  justify-content: flex-start;
  gap: 0;
  padding-block: 2.5rem;
}

.door-frame.tool-result {
  background: var(--door);
}

.tool-result .door::before {
  display: none;
}

.door-frame.tool-result:hover .door,
.door-frame.tool-result:focus-within .door {
  transform: none;
  box-shadow: none;
}

.result-label {
  color: var(--door-soft);
  font-size: 0.95rem;
}

.result-total {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.result-lines {
  display: grid;
  margin: 2rem 0 0;
  border-top: 1px solid rgba(255, 246, 246, 0.4);
}

.result-lines > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 246, 246, 0.18);
}

.result-lines dt {
  color: var(--door-soft);
  font-size: 0.92rem;
}

.result-lines dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.result-lines-quiet {
  margin-top: 1.5rem;
}

@media (max-width: 860px) {
  .tool {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-result .door {
    position: static;
  }
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .js .slide img {
    clip-path: none;
  }

  .door-frame:hover .door,
  .door-frame:focus-within .door {
    transform: none;
  }

  .listing-cover:hover img,
  .photo:hover img {
    transform: none;
  }
}
