  :root {
    --photo: url("godin.jpg");
    --couch: #241a17;
    --couch-soft: #3a2c27;
    --coat-deep: #6f8197;
    --mist: #e3e8ee;
    --blush: #c4a484;
    --iris-deep: #5fb0ba;
    --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--couch);
    background: var(--mist);
  }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--iris-deep); outline-offset: 4px; }

  .wrap { width: min(1000px, 100% - 3rem); margin-inline: auto; }

  h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.005em; }
  h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); line-height: 1.1; }
  .lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; margin: .6rem 0 0; font-style: italic; }

  /* ---------- Hero ---------- */
  .hero { background: var(--couch); color: #f6f1ea; }
  .topbar {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-wrap: wrap; gap: 1rem; padding-block: 1.25rem;
    font-size: .9rem; letter-spacing: .02em;
  }
  .topbar .mark { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; }
  .topbar nav { display: flex; gap: 1.75rem; }
  .topbar nav a { text-decoration: none; opacity: .85; }
  .topbar nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

  .hero-body {
    display: grid;
    grid-template-columns: 1fr minmax(0, 400px);
    gap: clamp(2rem, 6vw, 4.5rem);
    align-items: center;
    padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 5.5rem);
  }
  .hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    font-weight: 300;
    line-height: 1.05;
    text-wrap: balance;
  }
  .hero .rule { width: 3.5rem; height: 1px; background: var(--blush); margin: 1.4rem 0 1rem; }
  .hero .sub { margin: 0; font-size: .98rem; color: #e0d8ce; }
  .hero-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-image: var(--img, none);
    background-size: cover;
    background-position: var(--pos, 50% 50%);
    position: relative; z-index: 1;
    box-shadow: inset 0 0 10px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.4), 0 0 0 var(--mat-in) #f8f6f1;
  }

  /* ---------- Wooden frame ---------- */
  .frame {
    --fw: clamp(11px, 2.2vw, 17px);
    --mat-out: clamp(14px, 4vw, 24px);
    --mat-in: clamp(7px, 1.8vw, 11px);
    position: relative;
    width: 100%;
    padding: calc(var(--mat-out) + var(--mat-in));
    border: var(--fw) solid;
    /* different tone per side makes the mitered corners */
    border-color: #9c6c47 #5b361f #3d2415 #7a4d2e;
    background: #121010;
    box-shadow:
      inset 0 0 14px rgba(40,28,20,.35),
      0 22px 40px -12px rgba(0,0,0,.65),
      0 6px 12px rgba(0,0,0,.35);
  }
  .frame::after {
    content: "";
    position: absolute;
    inset: calc(var(--fw) * -1);
    padding: var(--fw);
    pointer-events: none;
    background:
      linear-gradient(135deg, rgba(255,235,205,.28) 0%, rgba(255,235,205,0) 38%, rgba(0,0,0,0) 62%, rgba(0,0,0,.28) 100%),
      repeating-linear-gradient(93deg, rgba(0,0,0,.09) 0 1px, rgba(255,235,205,.05) 1px 3px, rgba(0,0,0,0) 3px 7px),
      repeating-linear-gradient(88deg, rgba(0,0,0,.06) 0 2px, rgba(0,0,0,0) 2px 11px);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    mask-composite: exclude;
  }
  .frame.small { --fw: clamp(8px, 1.6vw, 11px); --mat-out: clamp(9px, 2.6vw, 14px); --mat-in: clamp(5px, 1.2vw, 7px); }
  .frame.small .crop { position: relative; z-index: 1; box-shadow: inset 0 0 8px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.4), 0 0 0 var(--mat-in) #f8f6f1; }

  @media (prefers-reduced-motion: no-preference) {
    .hero-body { animation: rise 900ms .15s ease-out both; }
    @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  }

  /* ---------- Family timeline ---------- */
  .family { padding-block: clamp(3.5rem, 8vw, 6rem); }
  .chart { margin-top: 2.25rem; }
  .axis, .row { display: grid; grid-template-columns: 10.5rem 1fr; gap: 1.5rem; align-items: center; }
  .axis { font-size: .8rem; color: #52443c; letter-spacing: .03em; }
  .axis .years { position: relative; height: 1.4rem; }
  .axis .years span { position: absolute; transform: translateX(-50%); }
  .axis .years span:first-child { transform: none; }
  .axis .years span:last-child { transform: translateX(-100%); }
  .row { padding: .8rem 0; border-top: 1px solid rgba(36,26,23,.22); }
  .row .who b { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.1; display: block; }
  .row .who small { font-size: .85rem; color: #52443c; }
  .track {
    position: relative; height: 1.4rem;
    background-image: linear-gradient(to right, rgba(36,26,23,.16) 1px, transparent 1px);
    background-size: 20% 100%;
  }
  .bar { position: absolute; top: .5rem; height: .4rem; background: var(--coat-deep); }
  .bar.star { background: var(--iris-deep); height: .5rem; top: .45rem; }
  .bar.ongoing { background: linear-gradient(to right, var(--coat-deep) 65%, rgba(111,129,151,0)); }

  /* ---------- Godin ---------- */
  .godin { background: var(--couch); color: #f6f1ea; padding-block: clamp(3.5rem, 8vw, 6rem); }
  .godin h2 { font-weight: 300; }
  .godin .lede { color: #d9d0c6; }
  .shots { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.25rem; }
  .shot { margin: 0; width: min(240px, 100%); }
  .crop {
    aspect-ratio: 4 / 5;
    background-image: var(--photo);
    background-repeat: no-repeat;
    background-color: var(--couch-soft);
  }
  .shot.portrait .crop { background-size: 200% auto; background-position: 58% 0%; }
  .shot.detail .crop   { background-size: 300% auto; background-position: 3% 100%; }
  .shot figcaption { margin-top: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--blush); }

  /* ---------- Closing ---------- */
  .closing { background: var(--couch); color: #f6f1ea; padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid rgba(196,164,132,.3); }
  .closing p.big { font-family: var(--serif); font-weight: 300; font-size: clamp(1.35rem, 2.8vw, 1.9rem); line-height: 1.2; margin: 0; max-width: 24em; }
  .closing p.small { margin: 1.25rem 0 0; color: #cfc6bc; font-size: .85rem; letter-spacing: .03em; }

  @media (max-width: 760px) {
    .hero-body { grid-template-columns: 1fr; }
    .hero .frame { order: -1; max-width: 380px; }
    .axis, .row { grid-template-columns: 1fr; gap: .3rem; }
    .axis .label-spacer { display: none; }
    .row .who b { display: inline; margin-right: .5rem; font-size: 1.3rem; }
  }

/* ---------- Added for multi-page ---------- */
.topbar nav { flex-wrap: wrap; gap: .4rem 1.5rem; }
.topbar nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-color: var(--blush); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.row .who b a { text-decoration: none; }
.row .who b a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.hero-photo.empty {
  display: flex; align-items: center; justify-content: center;
  background-color: #2b211d;
  background-image: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.07), rgba(255,255,255,0) 70%);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #cfc6bc;
}
.pet-hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.5rem); }
.pet-hero .lede { color: #e0d8ce; margin-top: .75rem; }

.gallery { padding-block: clamp(3.5rem, 8vw, 6rem); }
.gallery .shot figcaption { color: #52443c; }


/* ---------- Video and added portraits ---------- */
.shot.looking .crop { background-image: url("godin-looking-up.jpg"); background-size: cover; background-position: center; }
.video { padding-block: clamp(3.5rem, 8vw, 6rem); }
.gallery + .video { padding-top: 0; }
.video-shot { margin: 2.25rem 0 0; width: min(300px, 100%); }
.video-shot .frame { --fw: clamp(8px, 1.6vw, 11px); --mat-out: clamp(9px, 2.6vw, 14px); --mat-in: clamp(5px, 1.2vw, 7px); }
.clip {
  display: block; width: 100%; aspect-ratio: 9 / 16; background: #121010; object-fit: contain;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 0 0 var(--mat-in) #f8f6f1;
}
.video-shot figcaption { margin-top: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: #52443c; }


/* ---------- Index: meet the family ---------- */
.meet { padding-block: clamp(3.5rem, 8vw, 6rem); }
.family { background: #d9e0e8; }
.pets { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2.75rem 2rem; }
.pet a { display: block; text-decoration: none; }
.pet .frame { --fw: clamp(8px, 1.6vw, 11px); --mat-out: clamp(9px, 2.6vw, 14px); --mat-in: clamp(5px, 1.2vw, 7px); }
.thumb {
  aspect-ratio: 4 / 3; position: relative; z-index: 1;
  background-image: var(--img); background-size: cover; background-position: var(--pos, 50% 50%);
  background-color: var(--couch-soft);
  box-shadow: inset 0 0 8px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.4), 0 0 0 var(--mat-in) #f8f6f1;
}
.pet b { display: block; margin-top: 1.1rem; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.pet small { display: block; font-size: .9rem; color: #52443c; }
.pet a:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- Pet pages: text and gallery sections ---------- */
.gallery, .video { background: #d9e0e8; }
.video + .gallery { padding-top: 0; }
.story { padding-block: clamp(3rem, 7vw, 5rem); }
.story .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.25rem, 5vw, 4rem); align-items: start; }
.story .text { font-family: var(--serif); font-size: 1.25rem; line-height: 1.65; max-width: 36em; }
.story .text p { margin: 0 0 1em; }
.story .text .placeholder { font-style: italic; color: #6a5a51; }
.crop.photo { background-image: var(--img); background-size: cover; background-position: center; }
.crop.empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background-image: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.08), rgba(255,255,255,0) 70%);
  background-color: #2b211d;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: #cfc6bc;
}
.shot.wide { width: min(360px, 100%); }
.shot.wide .crop { aspect-ratio: 4 / 3; }
@media (max-width: 760px) { .story .wrap { grid-template-columns: 1fr; } }

/* ---------- Home button ---------- */
.topbar nav { align-items: center; }
.topbar nav a.home { opacity: 1; border: 1px solid rgba(196,164,132,.65); padding: .1rem .9rem; text-decoration: none; }
.topbar nav a.home:hover { background: rgba(196,164,132,.18); text-decoration: none; }
.topbar nav a.home[aria-current="page"] { background: rgba(196,164,132,.22); text-decoration: none; }
