/* ============================================================
   Alexandra Neville — deep page styles (APPARATUS palette)
   Orange paper · concrete · bold display · mono stamps · script.
   ============================================================ */

/* Shared grain overlay (must come first — @import only valid at top). */
@import url("/css/_grain.css");

:root {
  /* Palette — keep in sync with css/style.css */
  --bg:        #e21500;   /* Bright red — page background */
  --bg-deep:   #a00b00;   /* Darker red — image placeholders, code blocks */
  --ink:       #0A0A0A;
  --ink-mute:  #1A1A1A;
  --paper:     #F1ECE0;
  --concrete:  #C8C0B0;
  --script:    #FFFFFF;
  --accent:    #FFFFFF;
  --rule:      rgba(10, 10, 10, 0.35);

  /* Type */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-sans:    "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "Space Mono", "Courier New", monospace;

  /* Grain control — keep in sync with css/style.css */
  --grain-fine:   0.08;   /* fine paper noise opacity */
  --grain-coarse: 0.14;   /* coarse stain/blotch opacity */
}

/* Grain overlay lives in /css/_grain.css (imported above). */

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* V5.17 — disable text selection globally so accidental drags
   while interacting with the 3D objects / particle trail don't
   trigger native text-highlight (which was interfering with the
   warp interaction). Inputs keep selection so forms still work. */
body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
}

a { color: inherit; text-decoration: none; transition: opacity 180ms ease; }
a:hover { opacity: 0.55; }

/* Centred container. Max-width capped at 80rem (1280px) so on a 1440
   or 1920 monitor there's always a visible centring margin — content
   reads as a deliberate block in the middle, not pinned to one edge.
   On smaller laptops (≤1280) the container fills the viewport with
   just the horizontal padding holding it off the edges. */
.page {
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(2rem, 5vw, 4.5rem) 6rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Top menu — sits between the Back link and the wordmark in .page__top.
   Mirrors the .page__nav at the bottom of the page but lives in the
   header so visitors can navigate without scrolling first. */
.page__menu {
  flex: 1;
  display: flex;
  justify-content: center;
}
.page__menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
}
.page__menu a[aria-current="page"] {
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.1rem;
}

/* Hamburger toggle — only ever visible on narrow viewports. */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.4rem 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 28px;
  height: 28px;
  margin: 0;
}
.menu-toggle__bar {
  display: block;
  width: 100%;
  height: 1.6px;
  background: var(--ink);
  transition: transform 200ms ease, opacity 150ms ease;
  transform-origin: center;
}
/* X out when the menu is open. */
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(5.6px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-5.6px) rotate(-45deg);
}

@media (max-width: 720px) {
  .page__top { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; }
  /* Hide the inline menu on mobile; the hamburger reveals it as a
     full-width second row. */
  .page__menu {
    display: none;
    order: 99;
    flex-basis: 100%;
    padding-top: 1rem;
  }
  .page__menu.is-open { display: flex; }
  .page__menu ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.85rem;
  }
}

.back {
  display: inline-flex;
  align-items: center;
}
.back:hover { opacity: 1; color: var(--ink); }

/* Top-right wordmark on subpages. Matches the body-copy hierarchy of
   the rest of .page__top — tracked mono caps, no leading dot. */
.wordmark {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
}

.page__hero {
  padding: 0 0 clamp(2rem, 5vw, 3.5rem);
  position: relative;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.eyebrow::before { content: "●"; font-size: 0.55rem; }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink);
  text-transform: uppercase;
  font-variation-settings: "opsz" 96, "wght" 800;
}

.lede {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 1.5rem 0 0;
  max-width: 36ch;
  letter-spacing: -0.01em;
}

.rule { border: 0; height: 1px; background: var(--rule); margin: 0; }

.page__body {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  flex: 1;
  max-width: 60ch;
  position: relative;
  z-index: 1;
}
.page__body p { margin: 0 0 1em; }
.page__body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-deep);
  padding: 0.1em 0.4em;
  color: var(--ink);
}
.page__body strong { font-weight: 600; }

.page__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.page__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
}
.page__nav a[aria-current="page"] {
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.1rem;
}

.muted { opacity: 0.65; }

.placeholder-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-deep);
  border-left: 3px solid var(--ink);
  font-size: 0.9375rem;
}
.placeholder-note strong { color: var(--ink); }

/* Wide variant for project pages — bigger images, more breathing room */
.page--wide {
  max-width: 84rem;
}

/* ============================================================
   PROJECTS — editorial feature list (alternating sides)
   ============================================================ */

.projects-list {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 9vw, 8rem);
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.project-feature {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-areas:
    "index   index"
    "media   body";
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
}
.project-feature:nth-child(even) {
  grid-template-areas:
    "index   index"
    "body    media";
  grid-template-columns: 1fr 1.6fr;
}

.project-feature__index {
  grid-area: index;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  opacity: 0.85;
}

.project-feature__media {
  grid-area: media;
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.project-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
              filter    500ms ease;
}
.project-feature__media:hover img {
  transform: scale(1.04);
  filter: grayscale(0);
}
/* Override the global a:hover{opacity:0.55} so the project hero image
   doesn't dim on hover — that fade was reading like a red overlay
   because the .project-feature__media background (--bg-deep) showed
   through. Inner img stays at full opacity; the zoom is the only cue. */
.project-feature__media:hover { opacity: 1; }

.project-feature__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 0.5rem;
}

.project-feature__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.85;
}

.project-feature__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0;
}

.project-feature__desc {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  max-width: 38ch;
}

.project-feature__more {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
  align-self: flex-start;
  margin-top: 0.5rem;
}
.project-feature__more span { transition: transform 200ms ease; }
.project-feature__more:hover span { transform: translateX(4px); }

@media (max-width: 820px) {
  .project-feature,
  .project-feature:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "index"
      "media"
      "body";
    gap: 1.25rem;
  }
  .projects-list { gap: clamp(3rem, 8vw, 5rem); }
}

/* ============================================================
   ABOUT — portrait + bio + inline CV
   ============================================================ */

.bio {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.bio__portrait {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-deep);
}
.bio__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter 500ms ease;
}
.bio__portrait:hover img { filter: grayscale(0); }
.bio__body p {
  font-size: 1.0625rem;
  line-height: 1.55;
  margin: 0 0 1em;
  max-width: 52ch;
}
.bio__body p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .bio { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* CV section */

.cv {
  padding: clamp(2rem, 6vw, 4rem) 0 0;
  border-top: 1px solid var(--rule);
}
.cv__head { padding: 0 0 clamp(1.5rem, 4vw, 2.5rem); }
.cv__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.cv__intro {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 56ch;
  margin: 0 0 1.5rem;
}
.cv-download {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  transition: background 180ms ease, color 180ms ease;
}
.cv-download:hover {
  background: transparent;
  color: var(--ink);
  opacity: 1;
}

.cv-block {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--rule);
}
.cv-block__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  padding-top: 0.3rem;
  opacity: 0.85;
}

.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cv-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.cv-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.cv-entry__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}
.cv-entry__sub {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  margin: 0;
  opacity: 0.85;
}
.cv-entry__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: right;
  opacity: 0.85;
}

@media (max-width: 720px) {
  .cv-block { grid-template-columns: 1fr; gap: 0.5rem; }
  .cv-entry { grid-template-columns: 1fr; gap: 0.15rem; }
  .cv-entry__date { text-align: left; }
}

/* ============================================================
   SHOP — product grid
   ============================================================ */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  max-width: none;
}

.product {
  display: flex;
  flex-direction: column;
  position: relative;
}

.product__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-deep);
  margin-bottom: 1rem;
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
              filter    500ms ease;
}
.product:hover .product__media img { transform: scale(1.03); filter: grayscale(0); }

.product__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-transform: uppercase;
}

.product__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
  opacity: 0.85;
}

.product__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.product__price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.product__buy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  transition: background 180ms ease, color 180ms ease;
  white-space: nowrap;
}
.product__buy:hover {
  background: transparent;
  color: var(--ink);
  opacity: 1;
}
.product__buy--enquire {
  background: transparent;
  color: var(--ink);
}
.product__buy--enquire:hover {
  background: var(--ink);
  color: var(--bg);
}
.product__buy--sold {
  background: transparent;
  color: var(--ink);
  opacity: 0.4;
  cursor: default;
  border-color: rgba(10, 10, 10, 0.25);
}

/* Sold state: dim the whole card slightly */
.product--sold .product__media img { filter: grayscale(0.4); opacity: 0.7; }
.product--sold .product__title { opacity: 0.55; }

.shop-note {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 60ch;
}
.shop-note p { margin: 0 0 0.85em; }
.shop-note p:last-child { margin-bottom: 0; }
.shop-note strong {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  margin-right: 0.4rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .page__top { font-size: 0.65rem; }
  .page__nav { font-size: 0.65rem; }
  .display { font-size: clamp(2.5rem, 12vw, 5rem); }
  .shop-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .product__title { font-size: 1.125rem; }
}
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   Project detail page (e.g. /projects/be-right-back/)
   Hero block + metadata strip + asymmetric gallery
   ---------------------------------------------------------------- */

.project-hero {
  max-width: 60ch;
}
.project-hero .lede em { font-style: italic; }

/* Two-column metadata strip below the hero. Mono labels on top, value
   below. Collapses to single column on narrow screens. */
.project-meta {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.project-meta__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
}
.project-meta__grid > div { display: block; }
.project-meta dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.4rem;
}
.project-meta dd {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
}

/* Asymmetric gallery — alternating full-width and side-by-side pairs.
   Background is the deep orange so empty letterboxing reads
   intentionally as a frame, not white space. */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.gallery-figure {
  margin: 0;
  background: var(--bg-deep);
  overflow: hidden;
}
.gallery-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-figure--full img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.gallery-pair .gallery-figure img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ----------------------------------------------------------------
   Contact-sheet gallery — uniform compact grid. Each cell is a
   clickable thumbnail that opens the .lightbox overlay below.
   ---------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: clamp(0.5rem, 1.25vw, 0.9rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  list-style: none;
  margin: 0;
}
.gallery-grid__item {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg-deep);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  display: block;
  width: 100%;
}
.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1),
              filter    400ms ease,
              opacity   250ms ease;
}
.gallery-grid__item:hover img,
.gallery-grid__item:focus-visible img {
  transform: scale(1.04);
  filter: grayscale(0);
}
.gallery-grid__item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ----------------------------------------------------------------
   Lightbox — fixed overlay that opens on thumbnail click.
   Stays hidden via [hidden] until JS removes it; the .is-open class
   animates the opacity once mounted so the first paint isn't visible.
   ---------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.94);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: stretch;
  padding: clamp(3rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
  opacity: 0;
  transition: opacity 220ms ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: var(--bg-deep);
  display: block;
}

.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding-top: clamp(1rem, 2vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
}
.lightbox__counter {
  opacity: 0.75;
  flex: 1;
  text-align: center;
}

.lightbox__btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(241, 236, 224, 0.4);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}
.lightbox__btn:hover,
.lightbox__btn:focus-visible {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  outline: none;
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: 0;
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 180ms ease;
}
.lightbox__close:hover,
.lightbox__close:focus-visible {
  opacity: 1;
  outline: none;
}

/* Body lock while the lightbox is open — prevents background scroll
   without flashing the scrollbar away. */
body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .lightbox__btn { padding: 0.5rem 0.85rem; font-size: 0.65rem; }
  .lightbox__bar { font-size: 0.65rem; }
}

/* Footer nav specific to project pages — split between "all projects"
   and "return home", echoing the page__top in inverse. */
.project-foot-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
}

@media (max-width: 720px) {
  .project-meta__grid { grid-template-columns: 1fr 1fr; }
  .gallery-pair { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .project-meta__grid { grid-template-columns: 1fr; }
}

/* ================================================================
   Contact form — editorial, no boxes
   ================================================================
   Mono caps labels, thin ink underline inputs, full-width textarea.
   Send button uses the same "line that spans the screen" treatment
   as the home page CTAs so the visual language stays consistent. */
.contact-form {
  /* V5.9 — capped width so the form reads as a focused interactive
     block on desktop rather than a full-page sprawl. Gap tightened a
     notch for a denser editorial feel. Mobile keeps full width via the
     (max-width: 720px) override below. */
  margin: 2rem 0;
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
}
@media (max-width: 720px) {
  .contact-form {
    max-width: none;
    gap: 1.3rem;
  }
}
/* Honeypot — hidden from sighted users + tab order. Bots fill it. */
.contact-form__honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__row--split {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
  .contact-form__row--split { grid-template-columns: 1fr; }
}
.contact-form__field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-form__field label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}
.contact-form__field input,
.contact-form__field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: transparent;
  border: 0;
  /* Thin ink rule sits BELOW the input — editorial-page feel,
     not a boxed form. Focus thickens the rule to 2px so the
     focused field reads clearly without colour change. */
  border-bottom: 1px solid var(--ink);
  padding: 0.55rem 0;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  transition: border-bottom-width 120ms ease;
}
.contact-form__field textarea {
  resize: vertical;
  min-height: 5.5rem;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-bottom-width: 2px;
  padding-bottom: calc(0.55rem - 1px);   /* keep baseline stable */
}
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--ink);
  opacity: 0.35;
}

/* Submit row — separator above, full-width button below. */
.contact-form__submit {
  margin: 1rem 0 0;
}
.contact-form__btn {
  display: block;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.contact-form__btn:hover,
.contact-form__btn:focus-visible {
  background: transparent;
  color: var(--ink);
  outline: none;
}

/* Tagline lines underneath the form. */
.contact-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 1rem 0;
  opacity: 0.85;
}
.contact-meta a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

/* Thanks page — slightly more breathing room above the hero. */
.thanks-hero { padding-top: 1rem; }
.thanks-actions {
  margin: 2rem 0 1.5rem;
}

/* ================================================================
   Landscape lockout overlay
   ================================================================
   Touch-device + landscape only — the 3D scroll layout on the home
   was designed around a portrait canvas, and the deep pages also
   read awkwardly on a phone in landscape. Hide by default; appear
   when (hover: none) AND (orientation: landscape). Tablets with
   touch + landscape will see it too — they generally have enough
   pixels to fall outside this, but rotating to portrait dismisses
   the overlay either way. */
.orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.orientation-lock__inner {
  max-width: 22rem;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}
.orientation-lock__icon {
  font-size: 3rem;
  line-height: 1;
  animation: orientation-spin 2.4s ease-in-out infinite;
}
.orientation-lock__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}
.orientation-lock__body {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.7;
}
@keyframes orientation-spin {
  0%, 100% { transform: rotate(-12deg); }
  50%      { transform: rotate(78deg); }
}
/* V5.15 — landscape lockout restored for subpages to match the home page. */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .orientation-lock { display: flex; }
  body { overflow: hidden; height: 100vh; height: 100svh; }
}
