:root {
  --ink: #050203;
  --muted: #6b6b6b;
  --line: rgba(5, 2, 3, 0.1);
  --max: 1080px;
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --shadow: 0 8px 40px rgba(5, 2, 3, 0.07), 0 2px 12px rgba(5, 2, 3, 0.04);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: #ebeae6;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { opacity: 0.65; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 1px 0 var(--glass-highlight) inset;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

header.glass {
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

footer.glass.site-footer {
  padding: 0.85rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: auto;
}
html.viewport-lock footer.glass.site-footer {
  padding-top: calc(0.65rem + clamp(0.2rem, 0.8dvh, 0.45rem));
  padding-bottom: 0.75rem;
}

/* Animated neural graphic (hero + reusable) */
.neural-gfx {
  flex-shrink: 0;
  color: var(--ink);
  opacity: 0.4;
}
.neural-svg {
  display: block;
  width: 100%;
  height: auto;
}
.neural-path {
  stroke-dasharray: 48 24;
  animation: neural-flow 3.2s linear infinite;
}
.neural-path--2 {
  animation-duration: 4.1s;
  animation-direction: reverse;
}
.neural-node {
  animation: neural-node 2.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.neural-node--delay {
  animation-delay: 0.45s;
}
.neural-node--pulse {
  animation: neural-pulse 1.8s ease-in-out infinite;
}
@keyframes neural-flow {
  to { stroke-dashoffset: -72; }
}
@keyframes neural-node {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes neural-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .neural-path,
  .neural-node,
  .neural-node--pulse {
    animation: none;
  }
  .neural-node,
  .neural-node--delay,
  .neural-node--pulse {
    opacity: 0.75;
    transform: none;
  }
}
footer.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
footer.site-footer a:hover {
  color: var(--ink);
  opacity: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
}
.brand:hover { opacity: 1; }
.brand img {
  width: 34px;
  height: 34px;
  display: block;
}
.brand span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-header-end {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(5, 2, 3, 0.06);
}
.nav-toggle-bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* Every page: lock to one viewport height, no document scroll */
html.viewport-lock {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
html.viewport-lock body {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  margin: 0;
  min-height: 0;
}
html.viewport-lock .shell {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  gap: 0.5rem;
  padding: 0.6rem clamp(0.65rem, 2vw, 1.1rem);
}
html.viewport-lock main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(0.75rem, 2dvh, 1.35rem) 0 0.1rem;
}
html.viewport-lock .page-title {
  flex-shrink: 0;
  margin: 0 0 0.45rem;
  font-size: clamp(1.1rem, 2.6dvh + 0.45vw, 1.5rem);
  line-height: 1.15;
}

/* Big page titles (match Our Work header) */
html.viewport-lock .page-title.page-title--big {
  font-size: clamp(1.35rem, 3.2dvh + 1vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Home layout inside locked viewport */
html.viewport-lock body.page-home .shell {
  gap: clamp(0.45rem, 1dvh, 0.65rem);
}

/* About: document scroll; photo stacked above story */
html.viewport-lock:has(body.page-about) {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: auto;
}
html.viewport-lock:has(body.page-about) body {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
}
html.viewport-lock:has(body.page-about) .shell {
  flex: 1 0 auto;
  max-height: none;
  overflow: visible;
}
html.viewport-lock:has(body.page-about) main.page-main.page-about {
  flex: none;
  min-height: auto;
  overflow: visible;
  padding-bottom: clamp(1.5rem, 4dvh, 2.75rem);
}
html.viewport-lock:has(body.page-about) .page-about,
html.viewport-lock:has(body.page-about) .about-page {
  min-height: auto;
  overflow: visible;
}
html.viewport-lock:has(body.page-about) .about-grid {
  flex: none;
  min-height: auto;
}

body.page-home main.home-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
body.page-home .home-hero-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding-top: clamp(0.35rem, 1.2dvh, 0.85rem);
  padding-bottom: clamp(1.1rem, 4dvh, 2.75rem);
}
body.page-home .home-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.25rem, 4.5vw, 4rem);
  width: 100%;
  max-width: 100%;
}
body.page-home .home-hero-gfx {
  opacity: 0.38;
  width: clamp(14rem, 34vw, 22rem);
  min-width: 0;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  transform: translateX(clamp(-2.4rem, -3vw, -1.1rem));
}
body.page-home .home-hero-gfx .neural-svg {
  filter: drop-shadow(0 10px 30px rgba(5, 2, 3, 0.08));
}
.neural-glow {
  opacity: 0.18;
  animation: neural-glow 2.8s ease-in-out infinite;
}
@keyframes neural-glow {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.22; }
}
body.page-home .home-hero-gfx .neural-gfx {
  opacity: 1;
  width: 100%;
}
body.page-home .home-hero {
  max-width: min(30rem, 100%);
  width: 100%;
  min-width: 0;
}
body.page-home .home-hero h1 {
  font-size: clamp(1.85rem, 3.8dvh + 1.8vw, 2.85rem);
  margin-bottom: clamp(0.4rem, 1dvh, 0.65rem);
}
body.page-home .home-hero .lead {
  font-size: clamp(0.95rem, 1.25dvh + 0.35vw, 1.12rem);
  margin-bottom: clamp(0.65rem, 1.4dvh, 1rem);
  max-width: 34ch;
}
body.page-home .hero-services {
  margin: 0 0 clamp(0.7rem, 1.6dvh, 1.1rem);
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.25dvh + 0.25vw, 1.05rem);
  line-height: 1.45;
}
body.page-home .hero-services li {
  margin: 0 0 0.35rem;
}
body.page-home .hero-services li:last-child {
  margin-bottom: 0;
}
body.page-home .hero-services strong {
  font-weight: 600;
}
body.page-home .trust {
  margin-top: 0;
  margin-bottom: clamp(2.6rem, 6.4dvh, 4.15rem);
  padding-top: clamp(1.05rem, 2.6dvh, 1.75rem);
  padding-bottom: clamp(0.55rem, 1.8dvh, 1.25rem);
  flex-shrink: 0;
}
body.page-home .trust-label {
  margin-bottom: clamp(0.5rem, 1.25dvh, 0.85rem);
}

/* Home: headline line break (mobile only) */
body.page-home .home-hero h1 .hero-br {
  display: none;
}

@media (max-width: 720px) {
  html.nav-open.viewport-lock .shell {
    overflow: visible;
  }

  /* Work: unlock one-screen lock so the grid can scroll; cards use natural height */
  html.viewport-lock:has(body.page-work) {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: auto;
  }
  html.viewport-lock:has(body.page-work) body {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }
  html.viewport-lock:has(body.page-work) .shell {
    flex: 1 0 auto;
    max-height: none;
    overflow: visible;
  }
  html.viewport-lock:has(body.page-work) main.page-main.page-work {
    flex: none;
    min-height: auto;
    overflow: visible;
    padding-bottom: clamp(1.25rem, 3.5dvh, 2.25rem);
  }
  html.viewport-lock:has(body.page-work) .page-work {
    min-height: auto;
    overflow: visible;
  }
  html.viewport-lock:has(body.page-work) .work-grid {
    flex: none;
    min-height: auto;
  }
  html.viewport-lock:has(body.page-work) .job-trigger {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 7.25rem;
    grid-template-rows: unset;
    align-items: stretch;
  }
  html.viewport-lock:has(body.page-work) .job-logo {
    height: auto;
    min-height: 6.25rem;
    max-height: 9rem;
    flex: 0 0 auto;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 3;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0.45rem 0.55rem;
    min-width: 11.75rem;
    font-size: 0.92rem;
    background: #f6f5f2;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(5, 2, 3, 0.12);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 2;
  }
  html.nav-open .site-nav {
    display: flex;
  }
  .site-nav a {
    padding: 0.45rem 0.4rem;
    border-radius: 8px;
  }

  header.glass.site-header {
    position: relative;
    z-index: 10000;
    padding: 0.65rem 0.95rem;
  }
  .site-header-end {
    z-index: 1;
  }

  body.page-home main.home-main {
    gap: 0;
  }
  body.page-home .home-hero-stage {
    flex: 1 1 0;
    min-height: 0;
    padding-top: clamp(0.35rem, 3.5dvh, 2rem);
    padding-bottom: clamp(0.2rem, 1.5dvh, 0.75rem);
    justify-content: center;
  }
  body.page-home .home-hero-row {
    grid-template-columns: 1fr;
    gap: clamp(1.1rem, 5dvh, 3rem);
    align-content: center;
    min-height: 0;
  }
  body.page-home .trust {
    display: none;
  }

  body.page-home .home-hero h1 .hero-br {
    display: inline;
  }
  body.page-home .home-hero {
    text-align: center;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 2.8dvh, 1.35rem);
  }
  body.page-home .home-hero h1 {
    font-size: clamp(1.75rem, 5.2dvh + 1.8vw, 2.55rem);
    line-height: 1.12;
    margin-bottom: 0;
  }
  body.page-home .home-hero .lead {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    font-size: clamp(0.95rem, 2.1dvh + 0.45vw, 1.15rem);
    max-width: 36ch;
  }
  body.page-home .home-hero .btn {
    margin-top: clamp(0.35rem, 1.2dvh, 0.85rem);
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  body.page-home .home-hero-gfx {
    width: min(16.5rem, 82vw);
    justify-self: center;
    transform: none;
    opacity: 0.34;
  }

  html.viewport-lock footer.glass.site-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 1rem;
  }
  html.viewport-lock footer.glass.site-footer a[href^="tel:"] {
    margin-left: auto;
  }

  html.viewport-lock .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    row-gap: clamp(2rem, 6.5dvh, 3.75rem);
    column-gap: clamp(1.05rem, 3.2vw, 1.75rem);
    align-items: start;
    padding-bottom: clamp(1.5rem, 4dvh, 2.75rem);
  }
  html.viewport-lock .job {
    max-width: min(13.5rem, 46vw);
  }
  html.viewport-lock .job-trigger {
    gap: 0.55rem;
  }
  html.viewport-lock .work-head .page-title {
    margin-bottom: clamp(0.45rem, 1.4dvh, 0.85rem);
  }
  html.viewport-lock .work-intro {
    margin-bottom: clamp(1.15rem, 3.2dvh, 1.85rem);
  }

  body.page-contact .contact-services {
    display: none;
  }
}

@media (min-width: 721px) {
  .site-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Contact: form + services */
html.viewport-lock body.page-contact .shell {
  gap: clamp(0.55rem, 1.4dvh, 0.85rem);
}
html.viewport-lock main.page-contact-main {
  gap: clamp(1rem, 2.6dvh, 1.5rem);
  padding-bottom: clamp(1.35rem, 3.8dvh, 2.35rem);
}
body.page-contact .page-contact-main {
  align-items: stretch;
  width: 100%;
  max-width: none;
}
body.page-contact .page-title {
  margin-bottom: 0;
  text-align: left;
  width: 100%;
}
body.page-contact .contact-tagline {
  margin: 0 0 clamp(0.85rem, 2.2dvh, 1.25rem);
  font-size: clamp(0.95rem, 1.55dvh, 1.15rem);
  line-height: 1.4;
  color: var(--muted);
  max-width: none;
  text-align: left;
}

body.page-contact .page-title.page-title--big {
  margin-top: clamp(0.35rem, 1.2dvh, 0.65rem);
  margin-bottom: clamp(0.15rem, 0.6dvh, 0.35rem);
}
body.page-contact .contact-split {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0;
  align-items: start;
  width: 100%;
  max-width: none;
  overflow: visible;
}
body.page-contact .contact-form--simple {
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.8dvh, 1.45rem);
  max-width: none;
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow: visible;
}
body.page-contact .contact-services {
  min-width: 0;
  padding-top: 0.15rem;
  border-left: 1px solid var(--line);
  padding-left: clamp(0.85rem, 2.5vw, 1.35rem);
  overflow: hidden;
}
body.page-contact .contact-service-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(1.55rem, 3.4dvh, 2.6rem);
}
body.page-contact .contact-service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 0.95rem;
  align-items: start;
  min-height: 0;
  margin: 0;
  padding: 0;
}
body.page-contact .contact-service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.25rem;
  height: 7.25rem;
  flex-shrink: 0;
  color: var(--ink);
  opacity: 0.92;
}
body.page-contact .contact-service-icon svg {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
}
body.page-contact .contact-service-copy h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 2.6dvh, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--ink);
}
body.page-contact .contact-service-copy p {
  margin: 0;
  font-size: clamp(1.12rem, 1.85dvh, 1.35rem);
  line-height: 1.35;
  color: var(--muted);
}
body.page-contact .contact-form--simple label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  width: 100%;
}
body.page-contact .contact-form--simple input,
body.page-contact .contact-form--simple textarea {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.55rem 0 0.5rem;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  width: 100%;
}
body.page-contact .contact-form--simple input:focus,
body.page-contact .contact-form--simple textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
body.page-contact .contact-form-message {
  flex: none;
  display: flex;
  flex-direction: column;
}
body.page-contact .contact-form--simple textarea {
  flex: none;
  min-height: 10rem;
  max-height: 14rem;
  resize: none;
  line-height: 1.45;
}
body.page-contact .contact-submit {
  align-self: flex-start;
  margin-top: clamp(0.5rem, 1.5dvh, 0.85rem);
}
body.page-contact .contact-status {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
  min-height: 1.35em;
}
body.page-contact .contact-status.is-success {
  color: rgba(10, 82, 44, 0.92);
}
body.page-contact .contact-status.is-error {
  color: rgba(150, 22, 22, 0.92);
}

@media (min-width: 721px) {
  body.page-contact .contact-tagline {
    max-width: 48ch;
  }
  body.page-contact .contact-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.35rem, 3.2vw, 2.35rem);
    overflow: hidden;
  }
  body.page-contact .contact-form--simple {
    overflow: hidden;
  }
}

/* Work: header + 2×3 grid fills main */
html.viewport-lock .work-head {
  flex-shrink: 0;
}
html.viewport-lock .work-head .page-title {
  margin-bottom: 0.25rem;
  font-size: clamp(1.35rem, 3.2dvh + 1vw, 2rem);
  font-weight: 600;
}
html.viewport-lock .page-about > .page-title {
  margin-bottom: 0.25rem;
  font-size: clamp(1.35rem, 3.2dvh + 1vw, 2rem);
  font-weight: 600;
}
/* About redesign */
html.viewport-lock .about-page {
  gap: clamp(0.85rem, 2.2dvh, 1.25rem);
}
html.viewport-lock .about-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: clamp(1.35rem, 4dvh, 2.35rem);
  overflow: visible;
  align-items: stretch;
}
html.viewport-lock .work-intro {
  margin: 0 0 0.55rem;
  font-size: clamp(0.88rem, 1.55dvh + 0.35vw, 1.08rem);
  line-height: 1.4;
  max-width: none;
  color: var(--muted);
}
html.viewport-lock .page-work {
  min-height: 0;
}
html.viewport-lock .work-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  row-gap: clamp(1.35rem, 3.2dvh, 2.35rem);
  column-gap: clamp(1.1rem, 2.8vw, 2.25rem);
  justify-items: center;
  align-items: center;
}
html.viewport-lock .job {
  min-height: 0;
  overflow: visible;
  width: 100%;
  max-width: min(12.25rem, 33vw);
}
html.viewport-lock .job-trigger {
  height: 100%;
  min-height: 0;
  gap: 0.2rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}
html.viewport-lock .job-logo {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: unset;
  object-fit: contain;
  object-position: center;
}
html.viewport-lock .job-copy {
  min-width: 0;
}
html.viewport-lock .job-title {
  font-size: clamp(0.82rem, 1.45dvh + 0.35vw, 1.05rem);
  line-height: 1.25;
  font-weight: 600;
}
html.viewport-lock .job .meta {
  font-size: clamp(0.72rem, 1.2dvh + 0.25vw, 0.88rem);
  margin-top: 0.12rem;
  line-height: 1.3;
}

/* About: title + two columns fill main */
html.viewport-lock main.page-about {
  padding-top: clamp(0.85rem, 2dvh, 1.45rem);
}
html.viewport-lock .page-about {
  min-height: 0;
}
html.viewport-lock .page-about > .page-title {
  margin-bottom: 0;
}
html.viewport-lock .about-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: clamp(0.65rem, 2vw, 1.35rem);
  align-items: start;
}
html.viewport-lock .about-photo-wrap {
  position: relative;
  width: 100%;
  max-width: min(20rem, 86vw);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  max-height: none;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #ddd;
  justify-self: center;
  align-self: start;
}
html.viewport-lock .about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.65);
  transform-origin: 50% 36%;
}
html.viewport-lock .about-body.about-story {
  max-width: none;
  min-height: 0;
  min-width: 0;
  overflow: visible;
  font-size: clamp(0.95rem, 1.75dvh + 0.4vw, 1.12rem);
  line-height: 1.58;
  font-weight: 400;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2dvh, 1.05rem);
}
html.viewport-lock .about-story p {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
}
html.viewport-lock .about-story .about-open {
  font-size: clamp(1.02rem, 1.9dvh + 0.45vw, 1.18rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.015em;
}

main {
  flex: 1;
  min-height: 0;
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(2.5rem, 7vw, 4rem);
}

.page-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

/* Home hero (defaults; .page-home overrides sizes) */
.home-hero {
  max-width: min(48rem, 100%);
}
.home-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
}
.home-hero .lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 40ch;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover {
  opacity: 1;
  background: var(--ink);
  color: #fff;
}
a.btn { text-decoration: none; }

/* Trusted by — infinite marquee, ~5 logos visible */
.trust {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.trust-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.trust-marquee {
  container-type: inline-size;
  container-name: trustview;
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.trust-marquee-inner {
  display: flex;
  width: max-content;
  animation: trust-marquee 42s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .trust-marquee-inner {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 1rem;
  }
}

@keyframes trust-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.trust-group {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3cqw, 2.25rem);
}

.trust-logo {
  flex: 0 0 auto;
  width: calc((100cqi - 3 * clamp(1.25rem, 3cqw, 2.25rem)) / 4);
  min-width: 120px;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--muted);
  opacity: 0.9;
}
.trust-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trust-logo-link {
  text-decoration: none;
}
.trust-logo-link:hover {
  opacity: 1;
}
.trust-logo-link:focus-visible {
  outline: 2px solid rgba(5, 2, 3, 0.25);
  outline-offset: 3px;
  border-radius: 10px;
}
.trust-logo img {
  display: block;
  width: 100%;
  max-height: 72px;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
  opacity: 0.8;
}

/* Work grid */
.work-intro {
  color: var(--muted);
  max-width: 48ch;
  margin: 0 0 2.25rem;
  font-size: 1.02rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (max-width: 820px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
}
@media (max-width: 480px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  html.viewport-lock .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.job-trigger {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.job-trigger:hover { opacity: 1; }
.job-trigger:hover .job-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.job-logo {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}
.job-copy {
  width: 100%;
}
.job-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
}
.job .meta {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Project modal */
.project-modal {
  max-width: min(1120px, 100vw - 1.5rem);
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: #f6f5f2;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(5, 2, 3, 0.2);
}
.project-modal::backdrop {
  background: rgba(5, 2, 3, 0.45);
  backdrop-filter: blur(4px);
}
.project-modal-inner {
  padding: 1.25rem 1.25rem 1.5rem;
  position: relative;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.modal-close {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: rgba(5, 2, 3, 0.06);
  color: var(--ink);
}
#work-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  padding-right: 0.5rem;
}
.modal-pair {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 0.85rem;
  align-items: stretch;
  max-height: min(82vh, 860px);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.modal-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.modal-shot figcaption {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.45rem;
}
.modal-img {
  width: 100%;
  height: min(70vh, 720px);
  display: block;
  border-radius: 10px;
  background: #e8e6e1;
  object-fit: contain;
}
.modal-img--mobile {
  clip-path: inset(0 0 0 clamp(2px, 0.45vw, 6px));
}
@media (max-width: 720px) {
  .modal-pair {
    grid-template-columns: 1fr;
  }
  .modal-img {
    height: min(58vh, 640px);
  }
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 700px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}
.about-photo {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #ddd;
  display: block;
}
@media (max-width: 700px) {
  .about-photo {
    max-width: min(100%, 320px);
    margin: 0 auto;
  }
}

.about-body {
  max-width: 60ch;
  min-width: 0;
}

.muted-block {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.about-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.about-note code {
  font-size: 0.88em;
}

html.viewport-lock,
html.viewport-lock body {
  overscroll-behavior: none;
}

/* Shared filler / editorial blocks */
.prose-block {
  padding: 1.25rem 1.35rem 1.45rem;
  margin-top: 0.75rem;
}
.prose-block h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose-block p {
  margin: 0 0 0.6rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--muted);
}
.prose-block p:last-child {
  margin-bottom: 0;
}
.prose-block ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.prose-block li {
  margin-bottom: 0.35rem;
}
.prose-block li:last-child {
  margin-bottom: 0;
}
body.page-home .prose-block {
  margin-top: 0.5rem;
}
