/* =========================================================
   Mary & Jacob — THINGS TO DO variant: IMMERSIVE PHOTO-FORWARD
   Each category is an atmospheric editorial spread: the mood
   photo goes big and stays present (sticky) while a calm,
   hairline-set place list reads beside it. Sides alternate for
   rhythm. Embraces the site design system (palette, Lora /
   Work Sans, framed photos with white border + soft shadow +
   faint grain, postmark seal, JM monogram footer). Self-
   contained; touches nothing shared.
   ========================================================= */

:root {
  --ink:        #1e1e1d;   /* place names, nav */
  --ink-soft:   #4d4c49;   /* blurbs / body */
  --stone:      #878576;   /* headings, rules, eyebrow, footer */
  --page-bg:    #f3f2ee;   /* paper */
  --oat:        #e9e6db;   /* oat band */
  --sand:       #ebe6dd;   /* sand band */
  --white:      #ffffff;

  --font-body:   'Work Sans', sans-serif;
  --font-serif:  'Lora', serif;
  --font-script: 'La Belle Aurore', cursive;

  --nav-h: 84px;
  --grain-opacity: 0.07;

  /* Offset "floating frame" keyline (matches the homepage frames: Figma 398:45
     is a 1px stroke set ~16px off the photo. White reads as invisible on the
     warm bands, so a thin stone hairline is used at the same weight + offset). */
  --frame-gap:    clamp(10px, 1.4vw, 16px);
  --frame-line:   rgba(135, 133, 118, 0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
body.subpage { padding-top: var(--nav-h); }

/* ---------- Thin ornamental rule ---------- */
.rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--stone);
  opacity: 0.7;
  margin: clamp(18px, 2vw, 26px) auto 0;
}
.rule--left { margin-left: 0; margin-right: 0; }

/* ---------- Reveal (added by JS only when motion allowed) ---------- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   NAV — solid translucent cream bar
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-h);
  padding: 20px clamp(20px, 4vw, 40px);
  z-index: 30;
}
.nav--solid {
  background: rgba(243, 242, 238, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 14px rgba(30, 28, 20, 0.08);
}
.nav__toggle, .nav__burger { display: none; }
.nav__menu { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; }
.nav__link {
  padding: 8px clamp(12px, 1.4vw, 20px);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(12.5px, 1vw, 14.5px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.nav__link:hover { opacity: 0.6; }
.nav__link--active { position: relative; }
.nav__link--active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 18px;
  height: 1px;
  background: var(--stone);
  transform: translateX(-50%);
}

/* =========================================================
   PAGE HEADER (hero) — typographic, postmark seal
   ========================================================= */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(52px, 8vw, 104px) clamp(24px, 5vw, 48px) clamp(40px, 5vw, 66px);
  overflow: hidden;
}
/* postmark used as an ink seal (source SVG is white — invert + warm it) */
.hero__stamp {
  width: clamp(96px, 11vw, 150px);
  height: auto;
  margin: 0 auto clamp(16px, 2.4vw, 30px);
  transform: rotate(-6deg);
  filter: invert(0.82) sepia(0.14) opacity(0.85);
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: clamp(11.5px, 1vw, 13px);
  color: var(--stone);
  margin: 0 0 clamp(10px, 1.4vw, 16px);
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--stone);
  letter-spacing: -1px;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02;
  margin: 0;
}

/* =========================================================
   CATEGORY SPREAD — sticky big photo + editorial list
   ========================================================= */
.cat {
  position: relative;
  overflow: hidden;
}
.cat--paper { background: var(--page-bg); }
.cat--oat   { background: var(--oat); }
.cat--sand  { background: var(--sand); }
/* faint paper grain for warmth (matches the site's grain motif) */
.cat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/grain.png') center / cover;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.cat__inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 104px) clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(36px, 5vw, 84px);
  align-items: start;
}
/* Alternate the photo to the right on flipped sections */
.cat--flip .cat__media { order: 2; }

/* --- Sticky mood photo --- */
.cat__media {
  position: sticky;
  top: calc(var(--nav-h) + 26px);
}
.frame {
  position: relative;
  margin: 0;
  padding: var(--frame-gap);          /* offset gap between keyline and photo */
  border: 1px solid var(--frame-line);
  background: transparent;
  box-shadow: 0 26px 56px -18px rgba(30, 28, 20, 0.24);
}
.frame img {
  display: block;
  width: 100%;
  height: clamp(440px, 72vh, 760px);
  object-fit: cover;
  object-position: center;
}
.cat:first-of-type .frame img { object-position: center 58%; } /* keep the vineyard table foreground */
/* Inner fillet: a hairline right at the photo edge so the offset gap stays
   legible on light-edged photos too (matches the homepage frames exactly). */
.frame::before {
  content: '';
  position: absolute;
  inset: var(--frame-gap);
  border: 1px solid rgba(135, 133, 118, 0.34);
  pointer-events: none;
  z-index: 2;
}
/* subtle film grain over the photo only, inside the offset gap */
.frame::after {
  content: '';
  position: absolute;
  inset: var(--frame-gap);
  background: url('assets/grain.png') center / cover;
  opacity: 0.1;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* --- Text column --- */
.cat__body { position: relative; min-width: 0; padding-top: clamp(4px, 1vw, 14px); }
.cat__title {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--stone);
  letter-spacing: -0.5px;
  font-size: clamp(31px, 3.7vw, 52px);
  line-height: 1.08;
  margin: 0;
}
.cat__body .rule { margin-top: clamp(16px, 1.8vw, 22px); }
.cat__intro {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  margin: clamp(20px, 2.4vw, 30px) 0 0;
  max-width: 52ch;
}

/* --- Editorial place list (no cards; hairline-separated) --- */
.places {
  list-style: none;
  margin: clamp(24px, 3vw, 40px) 0 0;
  padding: 0;
  counter-reset: place;
}
.place {
  position: relative;
  padding: clamp(22px, 2.6vw, 32px) 0;
  border-top: 1px solid rgba(135, 133, 118, 0.4);
}
.place:first-child { border-top: none; padding-top: 0; }
.place__name {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.2px;
  font-size: clamp(20px, 1.8vw, 25px);
  line-height: 1.22;
  margin: 0 0 9px;
}
/* small serif index numeral — quiet editorial guide cue */
.place__name::before {
  counter-increment: place;
  content: counter(place, decimal-leading-zero);
  font-size: 0.56em;
  color: var(--stone);
  letter-spacing: 1px;
  margin-right: 12px;
  vertical-align: 2px;
}
.place__blurb {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16px);
  line-height: 1.7;
  margin: 0;
  max-width: 62ch;
}

/* =========================================================
   FOOTER
   ========================================================= */
/* Monogram-only footer — matches the other pages' footer (styles.css) exactly. */
.footer {
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 40px) 24px;
}
.footer__monogram { width: clamp(96px, 8vw, 125px); height: auto; }

/* =========================================================
   TABLET  (≤ 1024px) — narrow the gap, shrink photo height
   ========================================================= */
@media (max-width: 1024px) {
  .cat__inner { gap: clamp(28px, 4vw, 48px); grid-template-columns: 1fr 1fr; }
  .frame img { height: clamp(400px, 62vh, 620px); }
}

/* =========================================================
   MOBILE / SMALL TABLET  (≤ 768px) — stack: big photo on top,
   list below. Photo no longer sticky.
   ========================================================= */
@media (max-width: 768px) {
  :root { --nav-h: 66px; }

  /* Nav collapses to a centered cream hamburger menu */
  .nav { justify-content: space-between; min-height: 66px; padding: 14px 20px; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 44px; height: 44px; margin-left: auto; cursor: pointer;
  }
  .nav__burger span { display: block; height: 2px; width: 26px; background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: var(--page-bg); max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease; box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06);
  }
  .nav__toggle:checked ~ .nav__menu { max-height: 70vh; }
  .nav__link { width: 100%; text-align: center; padding: 16px; font-size: 14px; border-top: 1px solid rgba(30, 30, 29, 0.08); }
  .nav__link--active::after { display: none; }
  .nav__toggle:checked ~ .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle:checked ~ .nav__burger span:nth-child(2) { opacity: 0; }
  .nav__toggle:checked ~ .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Category: single column, photo big on top */
  .cat__inner {
    grid-template-columns: 1fr;
    gap: clamp(26px, 6vw, 38px);
    padding: clamp(44px, 10vw, 66px) clamp(22px, 6vw, 40px);
  }
  .cat--flip .cat__media { order: 0; }   /* keep photo-first on mobile */
  .cat__media { position: static; top: auto; }
  .frame img { height: auto; aspect-ratio: 4 / 3; }
  .cat:first-of-type .frame img { object-position: center 60%; }
}

/* =========================================================
   SMALL PHONES  (≤ 420px)
   ========================================================= */
@media (max-width: 420px) {
  .frame img { aspect-ratio: 5 / 4; }
  .place__blurb { font-size: 15px; }
}

/* =========================================================
   Reduced motion — no reveal offset
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}
