/* ===========================================================================
   Adiel Temer — portfolio
   Rebuild of adiel2304.wixsite.com/portfolio in static HTML/CSS/JS
   =========================================================================== */

/* Satoshi — self-hosted (assets/fonts/), from Fontshare. The whole site is set
   in Regular (400); 900 is kept available should a heavier weight be wanted. */
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-400.woff2") format("woff2"),
       url("../fonts/satoshi-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-900.woff2") format("woff2"),
       url("../fonts/satoshi-900.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
/* Postcards page only — the fonts from the Figma design. */
@font-face {
  font-family: "Hadassah Friedlaender";
  src: url("../fonts/hadassah-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hadassah Friedlaender";
  src: url("../fonts/hadassah-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "ArbelHagilda";
  src: url("../fonts/arbel-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Monochrome: the former red accent is now black. */
  --red: #000;
  --ink: #000;
  --paper: #fff;
  --muted: #000;
  --line: #e9e9e9;

  --font-display: "Satoshi", "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --font-body: "Satoshi", "Jost", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --wrap: 1320px;
  --pad: clamp(20px, 5vw, 64px);
  --edge-pad: clamp(14px, 2vw, 28px);
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;   /* contain full-bleed sections (scrollbar-width sliver) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Every text element renders in Satoshi Regular. */
body,
h1, h2, h3, h4, h5, h6,
p, a, span, b, strong, em, i,
li, button, input, figcaption, blockquote, small {
  font-weight: 400;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

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

.display { font-family: var(--font-display); font-weight: 400; }

/* ---------------------------------------------------------------- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  max-width: none;
  padding-inline: var(--edge-pad);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--red);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a {
  font-size: 14px;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--red); }

.nav-toggle { display: none; }

/* ------------------------------------------------------------------ hero --- */
.hero {
  padding: clamp(56px, 13vh, 132px) 0 clamp(48px, 10vh, 104px);
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.08;
  letter-spacing: 0.005em;
}
.hero h1 span { display: block; }

/* --------------------------------------------------------------- gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.2vw, 30px);
  padding-bottom: clamp(60px, 12vh, 120px);
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f2f2f2;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tile:hover img { transform: scale(1.045); }
.tile:hover .tile__label,
.tile:focus-visible .tile__label { opacity: 1; }

/* ----------------------------------------------------------------- home --- */
/* Recreates the GRNDWRK homepage: giant wordmark + statement top-left, a
   vertical filmstrip of covers on the right, and the active project's block on
   the left (labelled headline lines, counter, description, view, next/prev).
   The page does not scroll — the wheel / arrow keys / a swipe slide the strip
   so the active cover sits at the anchor line (see main.js). */
.home {
  --strip-w: clamp(300px, 33vw, 480px);
  --card-gap: clamp(24px, 4vw, 72px);
  --stmt-indent: clamp(52px, 9vw, 190px);
  --lbl-col: clamp(56px, 6vw, 108px);
  position: relative;
  height: calc(100dvh - var(--header-h));
  min-height: 560px;
  overflow: hidden;
  padding: 0 var(--edge-pad);
}
html.is-home,
html.is-home body { overflow: hidden; }

/* Wordmark + statement, top-left. The wordmark's cap-line sits level with the
   nav ("Portfolio") on the right — same top offset as the header. */
.home__head { position: absolute; inset: var(--home-top) var(--edge-pad) auto var(--edge-pad); }
.home { --home-top: clamp(18px, 3vh, 30px); }
.home__wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(40px, 8.4vw, 132px);
  line-height: 0.78;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.home__statement {
  margin: clamp(8px, 1.4vw, 22px) 0 0 var(--stmt-indent);
  max-width: min(58%, 40em);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(14px, 2.05vw, 29px);
  line-height: 1.12;
  text-transform: uppercase;
}

/* Right-hand filmstrip. */
.home__strip {
  position: absolute;
  right: var(--edge-pad);
  top: clamp(52px, 8vh, 92px);
  width: var(--strip-w);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 16px);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.15, 1);
  will-change: transform;
}
.home__item { position: relative; width: 100%; }
.home__shot {
  display: block;
  width: 100%;
  aspect-ratio: 1280 / 720;
  overflow: hidden;
  background: #f2f2f2;
}
.home__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  transition: opacity 0.5s ease;
}
.home__item.is-active .home__shot img { opacity: 1; }

/* Active project's block: to the LEFT of its cover, its title top-aligned with
   the top edge of the cover. */
.home__card {
  position: absolute;
  right: calc(100% + var(--card-gap));
  width: calc(100vw - 2 * var(--edge-pad) - var(--strip-w) - var(--card-gap));
  top: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
.home__item.is-active .home__card {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease;
}

.home__tc {
  position: absolute;
  left: var(--lbl-col);
  bottom: calc(100% + clamp(16px, 6vh, 64px));
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.home__tc:empty { display: none; }

.home__line {
  display: block;
  margin: 0 0 0 var(--lbl-col);
}
.home__big {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(20px, 2.7vw, 42px);
  line-height: 1.02;
}
/* Trim the leading above the cap height so the title + counter sit flush with
   the top edge of the cover image. */
.home__line--a .home__big,
.home__count {
  text-box-trim: trim-start;
  text-box-edge: cap alphabetic;
}
@supports not (text-box-trim: trim-start) {
  .home__line--a .home__big { margin-top: -0.17em; }
}

.home__count {
  position: absolute;
  right: 0;
  top: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.home__count b { font-weight: 400; }

.home__desc {
  margin: clamp(20px, 4vh, 52px) 0 0 var(--lbl-col);
  max-width: 44em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(11px, 0.95vw, 14px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home__view {
  display: inline-block;
  margin: clamp(16px, 3vh, 38px) 0 0 var(--lbl-col);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(12px, 0.95vw, 14px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Next / prev, bottom-left. */
.home__hud {
  position: absolute;
  left: var(--edge-pad);
  bottom: clamp(16px, 4vh, 40px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.home__hud span { cursor: pointer; }
.home__hud b { color: var(--red); font-weight: 400; margin-left: 8px; }

/* Immersive header — home, about and project pages: transparent bar, nav
   stacked & uppercase top-right. Home & about also drop the small wordmark
   (the giant one / the page carries the name); project pages keep it. */
body:is(:has(.home), :has(.about)) .site-header .brand { display: none; }
body:is(:has(.home), :has(.about)) .site-header__inner { justify-content: flex-end; }

@media (min-width: 901px) {
  body:is(:has(.home), :has(.about), :has(.page), :has(.postcards)) .site-header {
    position: absolute;
    inset: 0 0 auto 0;
    background: transparent;
    backdrop-filter: none;
    border: 0;
  }
  body:is(:has(.home), :has(.about), :has(.page), :has(.postcards)) .site-header__inner {
    align-items: flex-start;
    min-height: 0;
    padding-top: clamp(18px, 3vh, 30px);
  }
  body:is(:has(.home), :has(.about), :has(.page), :has(.postcards)) .nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  body:is(:has(.home), :has(.about), :has(.page), :has(.postcards)) .nav a {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 0;
  }
  body:is(:has(.home), :has(.about), :has(.page), :has(.postcards)) .nav a::after { display: none; }
  body:has(.home) .home { height: 100dvh; }
}

/* Postcards is a dark page — flip the chrome to white. */
body:has(.postcards) { background: #000; }
body:has(.postcards) main { background: #000; }
body:has(.postcards) .brand,
body:has(.postcards) .nav a,
body:has(.postcards) .nav a[aria-current="page"],
body:has(.postcards) .nav-toggle { color: #fff; }
body:has(.postcards) .nav-toggle span,
body:has(.postcards) .nav-toggle span::before,
body:has(.postcards) .nav-toggle span::after { background: #fff; }
@media (max-width: 900px) {
  body:has(.postcards) .site-header { background: #000; border-bottom-color: transparent; }
  body:has(.postcards) .nav { background: #000; border-bottom-color: #222; }
}

@media (max-width: 900px) {
  html.is-home,
  html.is-home body { overflow: auto; }
  .home {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: clamp(14px, 4vw, 22px) var(--edge-pad) clamp(48px, 10vw, 72px);
  }
  .home__head { position: static; }
  .home__wordmark { font-size: clamp(42px, 13vw, 92px); white-space: normal; line-height: 0.9; }
  .home__statement { margin-left: 0; max-width: none; font-size: clamp(16px, 4.6vw, 22px); }
  .home__strip {
    position: static;
    width: 100%;
    transform: none !important;
    gap: clamp(30px, 7vw, 48px);
    margin-top: clamp(24px, 6vw, 40px);
  }
  .home__shot img { opacity: 1 !important; }
  .home__card {
    position: static;
    width: auto;
    transform: none;
    margin-top: 14px;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .home__tc { position: static; margin-bottom: 8px; }
  .home__count { position: static; display: block; margin-top: 8px; }
  .home__line--b { margin-left: 0; }
  .home__desc { margin-left: 0; -webkit-line-clamp: unset; }
  .home__view { margin-left: 0; }
  .home__hud { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home__strip,
  .home__shot img,
  .home__card { transition-duration: 0.001s; }
}

/* -------------------------------------------------------------- project --- */
/* Text aligns to the far-left edge (same gutter as the "ADIEL TEMER" brand). */
.wrap.page {
  max-width: none;
  padding-inline: var(--edge-pad);
}
.page { padding-top: clamp(40px, 8vh, 88px); padding-bottom: clamp(64px, 12vh, 128px); }
@media (min-width: 901px) {
  .page { padding-top: clamp(92px, 14vh, 150px); }   /* clear the floating nav */
}

.project__head { max-width: 900px; margin-bottom: clamp(28px, 5vw, 56px); }
.project__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.06;
}
.project__subtitle {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  margin-top: 10px;
}
.project__meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.project__meta span { display: block; }
.project__intro {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
}
.project__note {
  margin-top: 14px;
  font-size: clamp(12px, 1.1vw, 14px);
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
}

/* Media runs full-bleed, edge to edge, with no gaps — it breaks out of the
   centered .wrap.page it lives in. Every item is a full-width 16:9 band
   (the 1280×720 format everything was made in); object-fit: cover kills any
   letterboxing on media that isn't exactly 16:9. */
.project__media {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: clamp(32px, 6vw, 64px);
}
.project__media figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f2f2;
}
.project__media img,
.project__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(56px, 10vw, 104px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 18px);
}
.project__nav a { color: var(--red); }
.project__nav a:only-child:last-child { margin-left: auto; }
.project__nav span { color: var(--line); }

/* ---------------------------------------------------------------- about --- */
/* Full-bleed like the home page — override the narrow .wrap gutter/width. */
.wrap.about {
  max-width: none;
  padding-inline: var(--edge-pad);
}
.about {
  padding-top: clamp(30px, 7vh, 80px);
  padding-bottom: clamp(60px, 12vh, 120px);
  overflow-x: clip;
}
/* Clear the floating nav on desktop. */
@media (min-width: 901px) {
  .about { padding-top: clamp(96px, 15vh, 168px); }
}
/* Left column: intro + caption, then the photo wall flowing straight on into
   the empty space beside the portrait. Portrait spans both rows on the right. */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.about__intro { grid-column: 1; grid-row: 1; max-width: 42ch; }
.about__portrait {
  grid-column: 2;
  grid-row: 1 / 4;
  justify-self: end;
  max-width: clamp(300px, 34vw, 480px);
}
.about__caption { grid-column: 1; grid-row: 2; }
.about__wall { grid-column: 1; grid-row: 3; }

.about__heading {
  margin: 0 0 clamp(16px, 3vh, 30px);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.08;
  /* Trim the leading so the cap sits flush with the top of the portrait. */
  text-box-trim: trim-start;
  text-box-edge: cap alphabetic;
}
@supports not (text-box-trim: trim-start) {
  .about__heading { margin-top: -0.16em; }
}
.about__body { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; }
.about__caption {
  margin: clamp(24px, 5vh, 48px) 0 0;
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.6;
  color: var(--muted);
}
.about__portrait img { width: 100%; object-fit: cover; }

/* Photo wall — scattered, overlapping; drag a photo to move it, click it to
   bring it forward (see main.js). It starts right under the caption and spills
   down and a little past the column, toward the portrait. */
.about__wall {
  position: relative;
  width: calc(100% + clamp(40px, 12vw, 200px));
  height: var(--wall-h, 1800px);
  margin-top: clamp(14px, 3vh, 30px);
}
.wall__pic {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  margin: 0;
  transform: rotate(var(--r));
  cursor: grab;
  touch-action: none;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}
.wall__pic img { display: block; width: 100%; height: auto; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.wall__pic:hover { transform: rotate(var(--r)) translateY(-6px); }
.wall__pic.is-dragging { cursor: grabbing; transition: box-shadow 0.4s ease; }
.wall__pic.is-front {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}
.wall__pic.is-front:hover { transform: rotate(0deg) scale(1.06) translateY(-6px); }

@media (max-width: 760px) {
  .about__grid { display: block; }
  .about__intro,
  .about__portrait,
  .about__wall { grid-column: auto; grid-row: auto; }
  .about__portrait { max-width: 420px; margin-top: clamp(24px, 7vw, 40px); }
  .about__caption { margin-top: clamp(28px, 8vw, 48px); }
  .about__wall {
    width: 100% !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 4vw, 22px);
    margin-top: clamp(20px, 6vw, 32px);
  }
  .wall__pic {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none;
    touch-action: auto;
  }
  .wall__pic:hover,
  .wall__pic.is-front { transform: none; }
}

/* ------------------------------------------------------------ postcards --- */
/* Rosh Hashanah capsule: 2×2 grid, hover a card to flip it 180° to its
   message side, click it for the detail page. Pure CSS — see build_postcards. */
.postcards {
  --pc-serif: "Hadassah Friedlaender", Georgia, "Times New Roman", serif;
  --pc-sans: "ArbelHagilda", "Satoshi", -apple-system, "Helvetica Neue", sans-serif;
  min-height: 100dvh;
  background: #000;
  color: #fff;
  padding: clamp(96px, 15vh, 168px) var(--edge-pad) clamp(40px, 8vh, 80px);
}
body:has(.postcards) .site-footer { display: none; }   /* no footer / no hairline — pure black */

.postcards:not(.pc-detail) {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.pc-title {
  margin: 0;
  font-family: var(--pc-serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.18;
}
.pc-title span { display: block; }
.pc-subtitle {
  margin: clamp(16px, 2.2vw, 28px) 0 clamp(14px, 2vw, 22px);
  font-family: var(--pc-sans);
  font-size: clamp(14px, 1.4vw, 19px);
}
.pc-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--pc-sans);
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.9;
  color: #d0d0d0;
}
.pc-specs li::before { content: "\2022\00a0\00a0"; }
.pc-specs li:empty { height: 0.6em; }
.pc-specs li:empty::before { content: none; }

.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.4vw, 34px);
}
.pc-card {
  display: block;
  perspective: 1600px;
  cursor: pointer;
  outline-offset: 6px;
}
.pc-card__flip {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 15 / 10;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.15, 0.15, 1);
}
.pc-card:hover .pc-card__flip,
.pc-card:focus-visible .pc-card__flip { transform: rotateY(180deg); }
.pc-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pc-card__face img { width: 100%; height: 100%; object-fit: contain; }
.pc-card__face--back { transform: rotateY(180deg); }

/* Detail page — angled mock-up + "back" + caption on black. The site nav is
   hidden here; "back" (top-right) is the only way out. */
body:has(.pc-detail) .nav,
body:has(.pc-detail) .nav-toggle { display: none; }

.pc-detail {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: clamp(64px, 10vh, 108px) var(--edge-pad) clamp(88px, 16vh, 160px);
}
.pc-detail__back {
  position: fixed;
  top: clamp(20px, 3.5vh, 34px);
  right: var(--edge-pad);
  font-family: var(--pc-sans);
  font-size: 14px;
  color: #fff;
  z-index: 200;
}
.pc-detail__back:hover { opacity: 0.65; }
.pc-detail__stage {
  width: min(860px, 90vw);
  max-height: 60vh;
  display: flex;
}
.pc-detail__stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pc-detail__caption {
  position: absolute;
  left: var(--edge-pad);
  right: var(--edge-pad);
  bottom: clamp(28px, 5.5vh, 56px);
  margin: 0;
  font-family: var(--pc-serif);
  font-size: clamp(19px, 2.3vw, 30px);
}

@media (max-width: 900px) {
  .postcards:not(.pc-detail) {
    display: block;
    padding-top: clamp(84px, 12vh, 110px);
  }
  .pc-grid {
    margin-top: clamp(28px, 7vw, 48px);
    gap: clamp(12px, 4vw, 20px);
  }
}
@media (max-width: 520px) {
  .pc-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-card__flip { transition-duration: 0.2s; }
}

/* -------------------------------------------------------------- contact --- */
.contact { padding-top: clamp(40px, 9vh, 110px); padding-bottom: clamp(70px, 14vh, 150px); }
.contact__heading {
  margin: 0 0 clamp(28px, 5vw, 52px);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(32px, 6vw, 60px);
}
.contact__list { font-size: clamp(17px, 2vw, 22px); line-height: 2; }
.contact__list a { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.contact__list a:hover { border-bottom-color: currentColor; }
.contact__signoff {
  margin-top: clamp(30px, 6vw, 60px);
  font-family: var(--font-display);
  color: var(--red);
  font-size: clamp(20px, 3vw, 30px);
}

/* --------------------------------------------------------------- footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 26px;
  color: var(--muted);
  font-size: 13px;
}
/* Footer runs edge-to-edge, matching the full-bleed pages. */
.wrap.site-footer__inner { max-width: none; padding-inline: var(--edge-pad); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--ink); }

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .tile__label { opacity: 1; background: transparent; color: transparent; }
  .tile { background: #efefef; }
}

@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .gallery { grid-template-columns: 1fr; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    margin-right: -9px;
    border: 0; background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: "";
    display: block;
    width: 22px; height: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-toggle span::before { transform: translateY(-7px); }
  .nav-toggle span::after { transform: translateY(5px); }
  .nav[data-open="true"] ~ .nav-toggle span { background: transparent; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px var(--pad) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { font-size: 18px; padding: 10px 0; }
  .nav a::after { display: none; }

  .hero { padding-top: 44px; }
  .project__media { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .tile img { transition: none; }
}
