/* ============================================
   Harvester — Polaroid landing
   ============================================ */

:root {
  --ink: #fbf3e3;
  --ink-2: #e9dfcc;
  --ink-3: #d6c7a6;
  --accent: #d9b164;
  --accent-2: #efc983;

  --paper: #fbf8f0;          /* polaroid white (slight cream) */
  --paper-edge: #e8e1cf;     /* edge of paper, very subtle */
  --paper-ink: #2a2723;      /* caption color */

  --pad: clamp(20px, 4vw, 56px);
  --maxw: 1240px;
  --t: 0.55s cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ---- Wood surface fills the entire body, scrolls naturally ----
     Layers (top to bottom):
       1. fine pore grain — small detail
       2. cathedral / ray fleck — medium wavy variation typical of plain-sawn boards
       3. long vertical streaks — wider, fewer than before so grain reads larger
       4. warm amber wash
       5. deep shadow corner
       6. base oak gradient
  */
  background-color: #5e4128;
  background-image:
    /* 1. fine pore grain */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>"),
    /* 2. cathedral / ray fleck — medium wavy variation */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1100' height='1500'><filter id='c'><feTurbulence type='turbulence' baseFrequency='0.06 0.018' numOctaves='3' seed='9'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.09  0 0 0 0 0.04  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23c)'/></svg>"),
    /* 3. long vertical streaks — wider grain lines */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1300' height='1900'><filter id='s'><feTurbulence type='turbulence' baseFrequency='0.22 0.009' numOctaves='3' seed='5'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.10  0 0 0 0 0.04  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23s)'/></svg>"),
    /* 4. warm amber wash */
    radial-gradient(ellipse at 25% 0%, rgba(255, 210, 150, 0.18), transparent 55%),
    /* 5. deep shadow corner */
    radial-gradient(ellipse at 90% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
    /* 6. base oak */
    linear-gradient(180deg, #6e4a2b 0%, #543722 50%, #694327 100%);
  background-size:
    400px 400px,
    1100px 1500px,
    1300px 1900px,
    auto, auto, auto;
  background-blend-mode: multiply, multiply, multiply, normal, normal, normal;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
}

/* Vertical plank seams — wider boards (~480px), fixed in viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 478px,
    rgba(0, 0, 0, 0.5) 479px,
    rgba(255, 215, 165, 0.07) 480px,
    transparent 481px,
    transparent 960px
  );
}

/* Vignette overlay — locked to viewport */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0,0,0,0.55) 100%);
}

::selection { background: var(--accent); color: #1a1208; }

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--accent-2); }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

/* ============================================
   NAV — minimal brand mark, fixed
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  pointer-events: none;
}
/* Subtle dark gradient that fades in once the page starts scrolling, so
   the logo always has a soft backdrop separating it from the polaroids. */
.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg,
    rgba(8, 6, 4, 0.55) 0%,
    rgba(8, 6, 4, 0.30) 45%,
    rgba(8, 6, 4, 0.00) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: -1;
}
.nav.is-stuck::before { opacity: 1; }
.nav__brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav__mark {
  width: 40px;
  height: 40px;
  /* Mark sized vertically to ~88% of the square — leaves a small top/bottom
     margin while preserving the comfortable side margins of the previous mark. */
  background: var(--accent) url('assets/mark.png') center/auto 78% no-repeat;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  /* Any legacy text content (e.g. the old "H") is hidden — the image is the brand */
  font-size: 0;
  color: transparent;
  overflow: hidden;
}
.nav__name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ============================================
   LANDING
   ============================================ */
.landing {
  position: relative;
  z-index: 2;
  min-height: 100vh;          /* will be expanded by JS to fit polaroids */
}

.landing__intro {
  position: relative;
  z-index: 4;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 160px var(--pad) 60px;
  pointer-events: none;       /* let underlying polaroids catch hover */
}
.landing__intro > * { pointer-events: auto; }

.landing__eyebrow {
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #f0d9a8;
  margin: 0 0 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  /* Wrap before colliding with the hero polaroid at tablet widths */
  max-width: clamp(260px, 42vw, 520px);
}

.landing__title {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(46px, 8vw, 116px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
  color: var(--ink);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(0, 0, 0, 0.5);
  max-width: 14ch;
}
.landing__title em {
  font-style: normal;
  color: var(--accent-2);
}
/* Stay in the Bebas family so the voice doesn't shift — just shrink and
   soften so the "(er)" reads as a parenthetical whisper, not a different font. */
.landing__title-er {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 0.90em;
  letter-spacing: 0.02em;
  vertical-align: 0.05em;     /* lift to align toward the cap-top of BIKE */
  opacity: 0.20;
}

.landing__sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-2);
  /* A bit wider than the original narrow cap but well shy of the title —
     keeps a healthy gap from the bike-01 polaroid at all desktop widths. */
  max-width: clamp(280px, 38vw, 520px);
  margin: 0 0 40px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.landing__hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.landing__line {
  width: 60px;
  height: 1px;
  background: var(--ink-3);
  position: relative;
  overflow: hidden;
}
.landing__line::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent-2);
  animation: slide 2.4s infinite;
}
@keyframes slide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================
   POLAROID STAGE
   ============================================ */
.landing__stage {
  /* Overlay the entire landing so polaroids can sit next to (or behind)
     the headline. Headline keeps the upper z-index; polaroids underneath
     stay hoverable because the intro container has pointer-events:none. */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  /* height set by JS to STAGE_HEIGHT */
}

.polaroid-pos {
  position: absolute;
  pointer-events: auto;
  will-change: transform;
  z-index: 2;            /* sit above the background logo */
  /* JS sets translate3d for parallax */
}

/* ============================================
   Background logo — fixed full-viewport wrap with
   a flex-centered SVG, locked to the viewport so it
   stays in place while polaroids scroll past it.
   Opacity is driven by JS (scroll position). The SVG
   uses mix-blend-mode:multiply so it reads as a wood
   stain rather than an overlay — "one with the
   background".
   ============================================ */
.harvesters-logo-bg {
  position: fixed;
  inset: 0;                /* fill the viewport */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;              /* below .landing__stage (z:3) — polaroids float over it */
  will-change: opacity;
  opacity: 0;              /* JS ramps this up via applyLogoOpacity */
}
.harvesters-logo-bg img {
  display: block;
  width: clamp(440px, 56vw, 780px);
  height: auto;
  /* Multiply blend deepens the wood under the logo paths — like a stain
     burned into the grain — rather than dropping a flat overlay on top. */
  mix-blend-mode: multiply;
  /* The SVG ships as solid black paths. Dial toward a warm sepia so the
     mark reads as faded wood-stain rather than a hard black silhouette. */
  filter: sepia(1) saturate(0.7) brightness(0.45) contrast(1.1);
}

/* ===== The polaroid frame =====
   Matches the reference: clean white card with a slight cream tint,
   subtle paper grain, refined shadows, generous bottom margin.
*/
.polaroid {
  --rot: 0deg;
  --w: 260px;
  display: block;
  position: relative;
  width: var(--w);
  padding: 12px 12px 50px;
  background: var(--paper);
  border-radius: 1px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;

  transform: rotate(var(--rot));
  transform-origin: 50% 50%;
  transition:
    transform var(--t),
    box-shadow var(--t),
    filter var(--t);

  filter: grayscale(0.92) contrast(0.96) brightness(0.96);

  box-shadow:
    /* hairline edge */
    0 0 0 1px rgba(0, 0, 0, 0.05),
    /* close contact shadow */
    0 1px 1px rgba(0, 0, 0, 0.18),
    /* mid drop */
    0 6px 10px -2px rgba(0, 0, 0, 0.18),
    /* far drop */
    0 18px 30px -8px rgba(0, 0, 0, 0.28);
}

/* Paper texture: subtle grain, plus slightly darker edge for worn-paper feel */
.polaroid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    /* darker around edges to suggest soft worn paper */
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.07) 100%),
    /* fine paper grain */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  background-blend-mode: multiply, multiply;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

/* The photo well */
.polaroid__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1a1a1a;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.polaroid__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t);
}

.polaroid__caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 14px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--paper-ink);
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Hover: straighten + bring back to life ===== */
.polaroid-pos:hover { z-index: 50; }

.polaroid-pos:hover .polaroid {
  transform: rotate(0deg) translateY(-6px) scale(1.05);
  filter: grayscale(0) contrast(1.05) brightness(1.02) saturate(1.05);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 2px 2px rgba(0, 0, 0, 0.22),
    0 18px 36px -8px rgba(0, 0, 0, 0.45),
    0 50px 80px -20px rgba(0, 0, 0, 0.6);
}

.polaroid-pos:hover .polaroid__photo img {
  transform: scale(1.02);
}

/* Focus state for keyboard users */
.polaroid:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 4px;
}

/* ============================================
   RETURN-FROM-DETAIL highlight pulse
   ============================================ */
@keyframes returnPulse {
  0% {
    transform: rotate(0deg) scale(1);
    box-shadow:
      0 0 0 0 rgba(217, 177, 100, 0.0),
      0 0 0 1px rgba(0,0,0,0.05),
      0 1px 1px rgba(0,0,0,0.18),
      0 6px 10px -2px rgba(0,0,0,0.18),
      0 18px 30px -8px rgba(0,0,0,0.28);
  }
  40% {
    transform: rotate(0deg) scale(1.08);
    box-shadow:
      0 0 0 8px rgba(217, 177, 100, 0.45),
      0 0 0 1px rgba(0,0,0,0.06),
      0 4px 6px rgba(0,0,0,0.25),
      0 24px 40px -8px rgba(0,0,0,0.45),
      0 60px 90px -20px rgba(0,0,0,0.6);
  }
  100% {
    transform: rotate(0deg) scale(1);
    box-shadow:
      0 0 0 0 rgba(217, 177, 100, 0.0),
      0 0 0 1px rgba(0,0,0,0.05),
      0 1px 1px rgba(0,0,0,0.18),
      0 6px 10px -2px rgba(0,0,0,0.18),
      0 18px 30px -8px rgba(0,0,0,0.28);
  }
}

.polaroid.is-returning {
  --rot: 0deg;
  filter: grayscale(0) contrast(1.05) brightness(1.02) saturate(1.05);
  animation: returnPulse 2.2s cubic-bezier(.2,.7,.2,1);
  z-index: 100;
}

/* ============================================
   DETAIL PAGE
   ============================================ */
body.detail-body {
  background-attachment: scroll, scroll, scroll, scroll, scroll, scroll;
}
body.detail-body::before {
  position: absolute;        /* seams scroll with content on detail pages */
}
.detail-body .vignette {
  z-index: 1;
}

/* Nav variant for the detail page — adds the close button */
.nav--detail {
  justify-content: space-between;
  pointer-events: none;
}
.nav--detail .nav__brand,
.nav--detail .nav__close {
  pointer-events: auto;
}
/* "Sticking" effect: small backdrop pill that fades in as you scroll */
.nav--detail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,8,4,0.65) 0%, rgba(11,8,4,0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.nav--detail.is-stuck::before { opacity: 1; }
.nav--detail.is-stuck .nav__brand,
.nav--detail.is-stuck .nav__close {
  transform: scale(0.92);
}
.nav--detail .nav__brand,
.nav--detail .nav__close {
  transition: transform 0.3s ease;
  transform-origin: left center;
}
.nav--detail .nav__close { transform-origin: right center; }

/* Floating × close button */
.nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(28, 20, 12, 0.55);
  border: 1px solid rgba(243, 239, 231, 0.18);
  color: var(--ink);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.nav__close:hover {
  background: rgba(217, 177, 100, 0.95);
  border-color: var(--accent);
  color: #1a1208;
}
.nav__close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

/* ----- Detail container ----- */
.detail {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ----- Hero ----- */
.detail__hero {
  position: relative;
  margin: 110px 0 64px;
  padding: 16px;
  background: var(--paper);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.05),
    0 4px 8px rgba(0,0,0,0.25),
    0 24px 50px -8px rgba(0,0,0,0.5),
    0 60px 100px -20px rgba(0,0,0,0.6);
}
.detail__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at center, transparent 65%, rgba(0,0,0,0.06) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  background-blend-mode: multiply, multiply;
  mix-blend-mode: multiply;
}
.detail__hero-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.detail__hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.04) saturate(1.02);
}
.detail__hero-text {
  position: relative;
  padding: 26px 14px 18px;
  text-align: center;
}
.detail__eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8a6a3c;
  margin: 0 0 10px;
  font-weight: 600;
}
.detail__title {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: var(--paper-ink);
}
.detail__sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(20px, 2vw, 28px);
  color: #5a4f3a;
  margin: 0;
  line-height: 1.2;
}

/* ----- Specs grid (on wood) ----- */
.detail__specs {
  margin: 0 0 80px;
  padding: 36px 8px;
}
.detail__specs dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 36px;
  margin: 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(243, 239, 231, 0.14);
}
.detail__specs dl > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail__specs dt {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-weight: 600;
}
.detail__specs dd {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin: 0;
}

/* ----- Section heading ----- */
.detail__h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 4px 18px rgba(0,0,0,0.6);
  margin: 0 0 24px;
}
.detail__h2-tag {
  display: block;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ----- Story (paper card) ----- */
.detail__story {
  margin: 0 auto 80px;
  max-width: 760px;
  padding: 48px 56px 44px;
  background: var(--paper);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.05),
    0 2px 4px rgba(0,0,0,0.18),
    0 18px 40px -10px rgba(0,0,0,0.45),
    0 50px 80px -20px rgba(0,0,0,0.55);
  color: var(--paper-ink);
}
.detail__story .detail__h2 {
  color: var(--paper-ink);
  text-shadow: none;
  margin-bottom: 20px;
}
.detail__story .detail__h2-tag {
  color: #8a6a3c;
  text-shadow: none;
}
.detail__story p {
  font-size: 17px;
  line-height: 1.75;
  color: #3a342b;
  margin: 0 0 18px;
}
.detail__story p:last-child { margin-bottom: 0; }
/* Drop-cap removed — first letter now matches body text size, so the
   headline above aligns flush-left with the prose below it. */

/* ----- Sub-gallery (vertical full-width stack) ----- */
.detail__gallery { margin: 0 0 80px; }
.detail__gallery-head {
  text-align: center;
  margin-bottom: 48px;
}

/* "Detail Shots" heading flanked by a small line on each side
   (the same line treatment as next to "Scroll" on the home page). */
.detail__h2--lined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  white-space: nowrap;
}
.detail__h2--lined::before,
.detail__h2--lined::after {
  content: "";
  display: inline-block;
  width: 56px;
  height: 1px;
  background: var(--ink-3);
  flex: 0 0 auto;
  /* Tiny upward nudge — flex centers to the line box; this brings the
     line up to the actual cap-center of the all-caps Bebas type
     (ascent runs taller than descent, so geometric center is slightly low). */
  transform: translateY(-0.08em);
}

.detail__stack {
  display: flex;
  flex-direction: column;
  gap: 64px;            /* widened to give the framed shots room to breathe */
}

/* Each photo gets a clean white frame, 16px on every side — matching
   the hero card's frame width, applied evenly. */
.detail__stack figure {
  margin: 0;
  position: relative;
  background: var(--paper);
  padding: 16px;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.22),
    0 18px 40px -10px rgba(0, 0, 0, 0.45),
    0 50px 90px -20px rgba(0, 0, 0, 0.55);
}

.detail__stack img {
  width: 100%;
  height: auto;
  display: block;
  background: #1a1a1a;
  filter: contrast(1.03) saturate(1.02);
}

.detail__stack figcaption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-ink);
  text-align: center;
  padding: 0 12px 4px;
}

/* ----- Footer ----- */
.detail__footer {
  padding: 60px 0 80px;
  text-align: center;
}
.detail__back {
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(243, 239, 231, 0.2);
  padding-bottom: 4px;
}
.detail__back:hover {
  color: var(--accent-2);
  border-color: var(--accent);
}

/* Detail-page mobile */
@media (max-width: 720px) {
  .detail__specs dl {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 28px;
  }
  .detail__hero { margin-top: 90px; }
  .detail__story { padding: 36px 24px; }

  /* Detail-shot stack: ditch the white paper frame on mobile and tighten
     the vertical rhythm so photos read more like a scrolling roll than a
     spaced-out gallery. */
  .detail__gallery-head { margin-bottom: 20px; }   /* was 48px — pull title closer to its shots */
  .detail__stack { gap: 22px; }
  .detail__stack figure {
    padding: 0;
    background: transparent;
    border-radius: 0;
    /* Drop the paper shadow stack; keep a soft ambient drop so each shot
       still feels lifted from the wood. */
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.55);
  }
}

/* ============================================
   Mobile — drop parallax, stack polaroids
   ============================================ */
@media (max-width: 720px) {
  body { background-attachment: scroll, scroll, scroll, scroll, scroll, scroll; }
  body::before { position: absolute; }
  /* Vignette stays fixed on mobile so the dark edges follow the viewport
     instead of cutting off mid-page where the body ellipse ends. */

  .landing {
    min-height: auto;
    height: auto !important;     /* override the JS-set absolute layout */
  }
  .landing__intro { padding-top: 110px; padding-bottom: 30px; }
  .landing__title { font-size: clamp(44px, 12vw, 72px); }

  .landing__stage {
    position: relative !important;     /* override the desktop absolute overlay */
    top: auto !important;
    left: auto !important;
    height: auto !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    padding: 30px var(--pad) 80px;
  }

  .polaroid-pos {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
  }

  /* Background logo doesn't fit the mobile single-column flow — hide it.
     The feature polaroid at the top still carries the brand. */
  .harvesters-logo-bg { display: none !important; }

  /* Mobile: single-column stack, bigger polaroids — fill nearly the
     full viewport width. !important is required to defeat the inline
     --w that script.js sets on every card (using the desktop sizes).
     Fluid via clamp so small phones stay safe. */
  .polaroid { --w: clamp(310px, 84vw, 370px) !important; }
  /* Feature polaroid stays the anchor — just a touch larger than the rest. */
  .polaroid--feature { --w: clamp(320px, 86vw, 380px) !important; }

  /* Rotation variety — 5 stops keep the pattern from repeating obviously */
  .polaroid-pos:nth-child(5n+1) .polaroid { --rot:  3deg !important; }
  .polaroid-pos:nth-child(5n+2) .polaroid { --rot: -4deg !important; }
  .polaroid-pos:nth-child(5n+3) .polaroid { --rot:  2deg !important; }
  .polaroid-pos:nth-child(5n+4) .polaroid { --rot: -2deg !important; }
  .polaroid-pos:nth-child(5n+5) .polaroid { --rot:  5deg !important; }
  .polaroid-pos:hover .polaroid {
    transform: rotate(0deg) scale(1.02);
  }

  /* Occasional vertical overlap — coprime periods (7, 11) so the
     overlaps don't repeat in a visible cadence. z-index ensures the
     overlapping polaroid sits ON TOP of the one above it. */
  .polaroid-pos:nth-child(7n+3) {
    margin-top: -42px;
    z-index: 2;
  }
  .polaroid-pos:nth-child(11n+6) {
    margin-top: -56px;
    z-index: 3;
  }
}
