/* ==========================================================================
   Jim Dean's Off Road Center, Elma NY

   Design rules (kept in writing so they don't drift):
   - Light page, real photos of the shop, short honest captions.
   - One family: Archivo. Condensed width for headings, normal width for
     text. Sentence case throughout. No eyebrow labels or badges.
   - One accent, caution yellow, only on buttons. No gradients or glows.
   - Hairline rules instead of cards. No scroll animations.
   ========================================================================== */

:root{
  --paper:  #f2f0ea;
  --sheet:  #fbfaf6;
  --ink:    #191a17;
  --text:   #3a3c37;
  --muted:  #6a6c66;
  --rule:   #d5d1c6;
  --rule-dk:#b4afa2;
  --yellow: #f2b632;
  --yellow-dk:#d99a12;
  --night:  #191a17;

  --font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --wrap: 1160px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:76px; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } *{ transition:none !important; } }

body{
  margin:0; background:var(--paper); color:var(--text);
  font-family:var(--font); font-stretch:100%; font-size:1.0625rem; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{ display:block; max-width:100%; height:auto; }
svg{ display:block; }
a{ color:inherit; }
p{ margin:0 0 1rem; text-wrap:pretty; }
p:last-child{ margin-bottom:0; }

.wrap{ width:min(100% - 3rem, var(--wrap)); margin-inline:auto; }
@media (max-width:640px){ .wrap{ width:min(100% - 2rem, var(--wrap)); } }

.skip{ position:absolute; left:-999px; top:0; background:var(--ink); color:#fff; padding:.75rem 1rem; z-index:200; }
.skip:focus{ left:0; }
:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }

h1,h2,h3{ font-family:var(--font); color:var(--ink); margin:0; text-wrap:balance; }
h1,h2{ font-stretch:72%; font-weight:800; letter-spacing:-.01em; }
h1{ font-size:clamp(2.8rem, 6vw, 4.6rem); line-height:.98; }
h2{ font-size:clamp(2.1rem, 4vw, 3rem); line-height:1.02; margin-bottom:1rem; }
h3{ font-size:1.15rem; font-weight:700; line-height:1.3; }

/* ---------- buttons + links ---------- */
.btn{
  display:inline-flex; align-items:center; gap:.6rem;
  min-height:52px; padding:.85rem 1.35rem;
  font:700 1.02rem/1 var(--font); color:var(--ink);
  background:var(--yellow); border:0; border-radius:4px;
  text-decoration:none; cursor:pointer; transition:background-color .15s;
}
.btn:hover{ background:var(--yellow-dk); }
.btn:active{ transform:translateY(1px); }
.btn svg{ width:18px; height:18px; flex:none; }
.btn--block{ width:100%; justify-content:center; }

.textlink{ font-weight:600; color:var(--ink); text-decoration:underline; text-decoration-color:var(--rule-dk); text-underline-offset:.25em; text-decoration-thickness:1.5px; transition:text-decoration-color .15s; }
.textlink:hover{ text-decoration-color:var(--ink); }

/* ---------- header ---------- */
.nav{ position:sticky; top:0; z-index:100; background:var(--paper); border-bottom:1px solid var(--rule); }
.nav .wrap{ display:flex; align-items:center; gap:2rem; min-height:68px; }
.nav{ box-shadow:none; }
.nav::before{ content:""; display:block; height:6px; background:repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--yellow) 10px 20px); }
.wordmark{ margin-right:auto; text-decoration:none; color:var(--ink); display:flex; flex-direction:column; line-height:.9; }
.wordmark b{ font-stretch:68%; font-weight:900; font-size:1.75rem; letter-spacing:.01em; text-transform:uppercase; }
.wordmark span{ font-stretch:125%; font-weight:700; font-size:.6rem; letter-spacing:.14em; text-transform:uppercase; color:var(--ink); margin-top:.28rem; }
.nav__links{ display:flex; gap:1.6rem; list-style:none; margin:0; padding:0; }
.nav__links a{ text-decoration:none; font-weight:500; font-size:.97rem; padding:.4rem 0; border-bottom:1.5px solid transparent; transition:border-color .15s; }
.nav__links a:hover{ border-color:var(--ink); }
.nav__phone{ font-weight:700; text-decoration:none; color:var(--ink); white-space:nowrap; }
.nav__phone:hover{ text-decoration:underline; text-underline-offset:.25em; }
@media (max-width:800px){ .nav__links{ display:none; } }

/* ---------- hero: photo runs to the right edge ---------- */
.hero{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); min-height:min(640px, calc(100vh - 74px)); }
.hero__text{ align-self:center; padding:clamp(2.5rem,5vw,4rem) clamp(1.5rem,4vw,3.5rem) clamp(2.5rem,5vw,4rem) max(1.5rem, calc((100vw - var(--wrap)) / 2)); }
.hero h1{ margin-bottom:1.3rem; font-size:clamp(2.9rem, 5.2vw, 4.7rem); }
.hero__lede{ font-size:clamp(1.08rem,1.5vw,1.2rem); max-width:42ch; margin-bottom:1.9rem; }
.hero__actions{ display:flex; flex-wrap:wrap; align-items:center; gap:.9rem 1.6rem; }
.status{ display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .9rem; margin-top:1.8rem; padding-top:1.1rem; border-top:1px solid var(--rule); font-size:.97rem; color:var(--muted); }
.status__now{ display:inline-flex; align-items:center; gap:.5rem; font-weight:700; color:var(--ink); }
.status__now::before{ content:""; width:10px; height:10px; border-radius:50%; background:#9a9890; }
.status.is-open .status__now::before{ background:#2f8a3b; box-shadow:0 0 0 3px rgba(47,138,59,.18); }
.hero__photo{ position:relative; margin:0; min-height:420px; }
.hero__photo img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:40% 55%; }
.hero__photo figcaption{ position:absolute; left:1rem; bottom:1rem; padding:.35rem .65rem; background:var(--paper); color:var(--text); font-size:.82rem; border-radius:2px; }
@media (max-width:900px){
  .hero{ grid-template-columns:1fr; min-height:0; }
  .hero__text{ padding:2.5rem 1.5rem 2.5rem; }
  .hero__photo{ min-height:0; aspect-ratio:4/3; }
}
@media (max-width:640px){ .hero__text{ padding:2rem 1rem; } }

figure{ margin:0; }
.photo img{ width:100%; border-radius:3px; background:#ddd8cc; }
.photo figcaption{ margin-top:.6rem; font-size:.88rem; color:var(--muted); }

/* ---------- yellow inspection band ---------- */
.band{ position:relative; background:var(--yellow); color:var(--ink); padding:clamp(2.5rem,5vw,3.5rem) 0; }
.band::before, .band::after{ content:""; position:absolute; left:0; right:0; height:8px; background:repeating-linear-gradient(-45deg, var(--ink) 0 12px, var(--yellow) 12px 24px); }
.band::before{ top:0; } .band::after{ bottom:0; }
.band .wrap{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr) auto; gap:1.2rem 3rem; align-items:center; }
@media (max-width:900px){ .band .wrap{ grid-template-columns:1fr; } }
.band h2{ font-size:clamp(2.2rem,4.6vw,3.6rem); margin:0; }
.band p{ margin:0; font-size:1.08rem; color:var(--ink); max-width:40ch; }
.btn--ink{ background:var(--ink); color:#fff; }
.btn--ink:hover{ background:#000; }

/* ---------- the two sides of the shop ---------- */
.work{ padding:clamp(3.5rem,7vw,5.5rem) 0; border-top:1px solid var(--rule); }
.work__head{ max-width:640px; margin-bottom:clamp(2rem,4vw,3rem); }
.work__grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:3rem 4.5rem; }
@media (max-width:860px){ .work__grid{ grid-template-columns:1fr; } }
.work__col h3{ font-stretch:72%; font-size:1.7rem; font-weight:800; padding-bottom:.7rem; border-bottom:2px solid var(--ink); margin-bottom:.2rem; }
.work__col > p{ margin:1rem 0 0; }
.list{ list-style:none; margin:0; padding:0; }
.list li{ padding:.7rem 0; border-bottom:1px solid var(--rule); }
.list li span{ display:block; color:var(--muted); font-size:.95rem; }
.list--cols{ columns:2; column-gap:2rem; }
.list--cols li{ break-inside:avoid; }
@media (max-width:480px){ .list--cols{ columns:1; } }
.work__photo{ margin-top:1.6rem; }
.work__photo img{ aspect-ratio:4/5; object-fit:cover; object-position:center 35%; }
.note{ margin-top:1.4rem; padding:1rem 1.2rem; background:var(--sheet); border:1px solid var(--rule); border-radius:3px; }
.note b{ color:var(--ink); }

/* ---------- story (the one dark section) ---------- */
.story{ background:var(--night); color:#c9c7c0; padding:0 0 clamp(3.5rem,7vw,5.5rem); }
.story h2{ color:#f4f2ec; }
.story__photo{ margin:0 0 clamp(2.5rem,5vw,3.5rem); }
.story__photo img{ width:100%; aspect-ratio:21/8; object-fit:cover; object-position:center 62%; }
.story__photo figcaption{ width:min(100% - 3rem, var(--wrap)); margin:.7rem auto 0; font-size:.88rem; color:#8f8d86; }
@media (max-width:640px){ .story__photo img{ aspect-ratio:4/3; } .story__photo figcaption{ width:min(100% - 2rem, var(--wrap)); } }
.story__grid{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:2.5rem 4.5rem; align-items:start; }
@media (max-width:900px){ .story__grid{ grid-template-columns:1fr; } }
.story__text p{ font-size:1.08rem; max-width:56ch; }
.story__text p strong{ color:#f4f2ec; font-weight:600; }
.timeline{ margin:0; border-top:2px solid var(--yellow); }
.timeline div{ display:grid; grid-template-columns:7rem 1fr; gap:1rem; padding:.9rem 0; border-bottom:1px solid rgba(255,255,255,.12); }
.timeline dt{ font-stretch:68%; font-weight:900; font-size:1.7rem; line-height:1.05; color:var(--yellow); }
.timeline dd{ margin:0; color:#dedcd5; }
.timeline__src{ font-size:.85rem; color:#8f8d86; margin-top:.9rem; }

/* ---------- reviews ---------- */
.reviews{ padding:clamp(3rem,6vw,4.5rem) 0; border-top:1px solid var(--rule); }
.reviews__grid{ display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:2rem 4.5rem; align-items:start; }
@media (max-width:860px){ .reviews__grid{ grid-template-columns:1fr; } }
.rating{ font-stretch:68%; font-weight:900; font-size:clamp(4rem,9vw,6.5rem); line-height:1; color:var(--ink); margin:0 0 .4rem; }
.rating small{ font-size:.3em; font-weight:700; color:var(--muted); }
blockquote{ margin:0 0 1.8rem; padding:0 0 1.8rem; border-bottom:1px solid var(--rule); }
blockquote:last-child{ border-bottom:0; margin-bottom:0; padding-bottom:0; }
blockquote{ position:relative; padding-left:3.2rem !important; }
blockquote::before{ content:"“"; position:absolute; left:0; top:-.35rem; font-weight:900; font-size:4.6rem; line-height:1; color:var(--yellow); }
blockquote p{ font-size:clamp(1.15rem,1.9vw,1.45rem); line-height:1.45; color:var(--ink); font-weight:500; }
blockquote footer{ margin-top:.7rem; font-size:.93rem; color:var(--muted); }

/* ---------- visit + request ---------- */
.visit{ padding:clamp(3.5rem,7vw,5.5rem) 0 clamp(4rem,8vw,6rem); border-top:1px solid var(--rule); }
.visit__grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:2.5rem 4rem; align-items:start; }
@media (max-width:860px){ .visit__grid{ grid-template-columns:1fr; } }
.map{ position:relative; aspect-ratio:4/3; border:1px solid var(--rule); background:#e6e2d8; }
.map iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.addr{ font-stretch:72%; font-size:clamp(1.7rem,3vw,2.2rem); font-weight:800; line-height:1.1; color:var(--ink); margin:0 0 .5rem; }
.phone{ display:inline-block; font-stretch:72%; font-size:clamp(1.7rem,3vw,2.2rem); font-weight:800; color:var(--ink); text-decoration:none; margin:1.2rem 0 1rem; border-bottom:3px solid var(--yellow); line-height:1.1; }
.phone:hover{ border-color:var(--ink); }
.hours{ margin:0; border-top:1px solid var(--rule); }
.hours div{ display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; border-bottom:1px solid var(--rule); font-size:.98rem; }
.hours dt{ color:var(--text); }
.hours dd{ margin:0; color:var(--ink); font-weight:600; }

.byphone{ margin-top:1.2rem; font-size:1rem; color:var(--ink); }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- footer ---------- */
.footer{ background:var(--night); color:#a8aaa4; padding:3rem 0 2.5rem; font-size:.95rem; }
.footer .wrap{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:2rem; }
@media (max-width:760px){ .footer .wrap{ grid-template-columns:1fr; } .footer{ padding-bottom:6rem; } }
.footer b{ display:block; color:#fff; font-stretch:72%; font-size:1.45rem; font-weight:800; margin-bottom:.5rem; }
.footer a{ color:#e6e4de; text-decoration:none; }
.footer a:hover{ text-decoration:underline; text-underline-offset:.2em; }
.footer p{ margin:0 0 .35rem; }
.footer__mark{ grid-column:1 / -1; margin:1rem 0 .5rem; font-stretch:62%; font-weight:900; text-transform:uppercase; line-height:.8; font-size:clamp(4rem,17.5vw,17.2rem); letter-spacing:-.005em; color:#2b2c28; user-select:none; white-space:nowrap; overflow:hidden; }
.footer__fine{ grid-column:1 / -1; border-top:1px solid rgba(255,255,255,.12); padding-top:1.4rem; font-size:.84rem; color:#8a8c86; }

/* ---------- phone bar on small screens ---------- */
.callbar{ position:fixed; left:0; right:0; bottom:0; z-index:90; display:none; padding:.6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background:var(--paper); border-top:1px solid var(--rule); transform:translateY(100%); transition:transform .25s ease-out; }
.callbar.is-shown{ transform:none; }
@media (max-width:760px){ .callbar{ display:block; } }

/* ==========================================================================
   Motion. Each animation is tied to the shop: a garage door rolls up on the
   hero, caution stripes crawl, the open dot pulses, photos lower in like a
   door. All of it is off for people who ask for reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none !important; }
  .js [data-reveal], .js .reveal-photo img, .js .footer__mark{ opacity:1 !important; transform:none !important; clip-path:none !important; }
}

@media (prefers-reduced-motion: no-preference){
  /* hero: the garage door */
  .hero__photo{ overflow:hidden; }
  .hero__photo img{ animation:settle 2s cubic-bezier(.2,.8,.2,1) .35s both; }
  .hero__photo::after{
    content:""; position:absolute; inset:0; z-index:2; pointer-events:none;
    background:
      linear-gradient(to bottom, transparent calc(100% - 38px), #8f8a7e calc(100% - 38px), #8f8a7e calc(100% - 30px), transparent calc(100% - 30px)),
      repeating-linear-gradient(to bottom, #e3dfd4 0 30px, #cfcabd 30px 32px, #eeebe3 32px 34px);
    box-shadow:inset 0 -6px 0 #6d695f;
    animation:door 1.25s cubic-bezier(.65,0,.25,1) .35s both;
  }
  .hero__photo figcaption{ animation:fadeUp .6s ease-out 1.5s both; }
  @keyframes door{ from{ transform:translateY(0); } to{ transform:translateY(-101%); } }
  @keyframes settle{ from{ transform:scale(1.1); } to{ transform:scale(1); } }

  /* hero text settles in */
  .hero__text > *{ animation:fadeUp .8s cubic-bezier(.2,.8,.2,1) both; }
  .hero__text > :nth-child(1){ animation-delay:.1s; }
  .hero__text > :nth-child(2){ animation-delay:.22s; }
  .hero__text > :nth-child(3){ animation-delay:.34s; }
  .hero__text > :nth-child(4){ animation-delay:.46s; }
  @keyframes fadeUp{ from{ opacity:0; transform:translateY(18px); } to{ opacity:1; transform:none; } }

  /* the open dot pulses */
  .status.is-open .status__now::before{ animation:pulse 2s ease-out infinite; }
  @keyframes pulse{ 0%{ box-shadow:0 0 0 0 rgba(47,138,59,.45); } 70%{ box-shadow:0 0 0 9px rgba(47,138,59,0); } 100%{ box-shadow:0 0 0 0 rgba(47,138,59,0); } }

  /* caution stripes crawl on the inspection band */
  .band::before{ animation:crawl 1.4s linear infinite; }
  .band::after{ animation:crawl 1.4s linear infinite reverse; }
  @keyframes crawl{ to{ background-position:33.94px 0; } }

  /* the phone icon rings on hover */
  .btn:hover svg{ animation:ring .5s ease-in-out 2; transform-origin:50% 60%; }
  @keyframes ring{ 0%,100%{ transform:rotate(0); } 20%{ transform:rotate(-16deg); } 40%{ transform:rotate(14deg); } 60%{ transform:rotate(-10deg); } 80%{ transform:rotate(6deg); } }

  /* scroll reveals (only when JS is running, so nothing stays hidden without it) */
  .js [data-reveal]{ opacity:0; transform:translateY(26px); transition:opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay:var(--d, 0ms); }
  .js [data-reveal].in{ opacity:1; transform:none; }
  .js [data-reveal="left"]{ transform:translateX(-28px); }
  .js [data-reveal="left"].in{ transform:none; }

  /* photos lower in like a door */
  .reveal-photo{ overflow:hidden; }
  .js .reveal-photo img{ clip-path:inset(0 0 100% 0); transition:clip-path 1.1s cubic-bezier(.65,0,.25,1); }
  .js .reveal-photo.in img{ clip-path:inset(0 0 0 0); }

  /* list rows nudge on hover */
  .list li{ transition:padding-left .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
  .list li:hover{ padding-left:.6rem; box-shadow:inset 3px 0 0 var(--yellow); }

  /* footer wordmark rises */
  .js .footer__mark{ transform:translateY(55%); opacity:0; transition:transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .8s ease-out; }
  .js .footer__mark.in{ transform:none; opacity:1; }
}

/* parallax image in the story photo (JS sets --py) */
.story__photo{ overflow:hidden; }
.story__photo img{ transform:translateY(var(--py, 0px)) scale(1.12); will-change:transform; }
@media (prefers-reduced-motion: reduce){ .story__photo img{ transform:none; } }

/* ---------- footer wordmark fills with caution yellow ---------- */
.footer__mark{
  color:transparent; -webkit-background-clip:text; background-clip:text;
  background-image:
    linear-gradient(100deg, transparent 46%, rgba(255,255,255,.7) 50%, transparent 54%),
    linear-gradient(var(--yellow), var(--yellow)),
    linear-gradient(#2b2c28, #2b2c28);
  background-repeat:no-repeat;
  background-size:250% 100%, 100% 100%, 100% 100%;
  background-position:160% 0, 0 0, 0 0;
}
@media (prefers-reduced-motion: no-preference){
  .js .footer__mark{
    background-size:250% 100%, 0% 100%, 100% 100%;
    transition:transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .8s ease-out, background-size 1.7s cubic-bezier(.65,0,.25,1) .45s;
  }
  .js .footer__mark.in{ background-size:250% 100%, 100% 100%, 100% 100%; animation:glint 1.3s ease-in-out 2.2s both; }
  .js .footer__mark.in:hover{ animation:glint 1.1s ease-in-out both; }
  @keyframes glint{ from{ background-position:160% 0, 0 0, 0 0; } to{ background-position:-60% 0, 0 0, 0 0; } }
}


/* ---------- v3: real logo, past builds, Schaeffer's, memberships ---------- */
.logo{ margin-right:auto; display:block; line-height:0; color:var(--ink); }
.logo img{ height:54px; width:auto; }
@media (max-width:640px){ .logo img{ height:40px; } }

.builds{ display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin-top:1.6rem; }
.builds img{ width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:3px; background:#ddd8cc; }
.builds__cap{ margin-top:.6rem; font-size:.88rem; color:var(--muted); }
@media (prefers-reduced-motion: no-preference){
  .js .builds.reveal-photo img{ clip-path:inset(0 0 100% 0); transition:clip-path 1.1s cubic-bezier(.65,0,.25,1); }
  .js .builds.reveal-photo img + img{ transition-delay:.15s; }
  .js .builds.reveal-photo.in img{ clip-path:inset(0 0 0 0); }
}

.dealer{ padding:clamp(3rem,6vw,4.5rem) 0; border-top:1px solid var(--rule); }
.dealer__inner{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,.6fr); gap:1rem 3rem; align-items:end; }
@media (max-width:860px){ .dealer__inner{ grid-template-columns:1fr; } }
.dealer__big{ margin:0; font-stretch:68%; font-weight:900; font-size:clamp(2.6rem,6.4vw,5.2rem); line-height:.95; color:var(--ink); text-wrap:balance; }
.dealer__big mark{ background:linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); color:inherit; padding:0 .06em; }
.dealer__small{ margin:0; font-size:1.05rem; max-width:34ch; }

.members{ padding:clamp(2.5rem,5vw,3.5rem) 0; border-top:1px solid var(--rule); }
.members h2{ font-size:1.25rem; font-stretch:100%; font-weight:700; margin-bottom:1.2rem; }
.members__list{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,1fr); border-top:2px solid var(--ink); }
.members__list li{ padding:1.3rem 1.5rem 1.4rem; border-left:1px solid var(--rule); display:flex; flex-direction:column; gap:.3rem; }
.members__list li:first-child{ border-left:0; padding-left:0; }
.members__list b{ font-stretch:68%; font-weight:900; font-size:clamp(1.9rem,3.4vw,2.6rem); line-height:1; color:var(--ink); }
.members__list span{ color:var(--muted); font-size:.95rem; }
@media (max-width:760px){
  .members__list{ grid-template-columns:1fr; }
  .members__list li, .members__list li:first-child{ border-left:0; padding:1rem 0; border-bottom:1px solid var(--rule); }
}

.footer__logo{
  display:block; width:220px; aspect-ratio:1723/593; margin-bottom:.9rem;
  background:#f2f0ea;
  -webkit-mask:url(img/logo.svg) left center/contain no-repeat; mask:url(img/logo.svg) left center/contain no-repeat;
}


/* ---------- v4: photo strip, build book, viewer, socials ---------- */
.strip{ display:grid; grid-template-columns:repeat(4,1fr); gap:.45rem; margin-top:.45rem; }
.strip__tile, .book__tile{ display:block; width:100%; padding:0; border:0; background:#ddd8cc; cursor:zoom-in; border-radius:3px; overflow:hidden; }
.strip__tile img{ width:100%; aspect-ratio:1; object-fit:cover; transition:transform .5s cubic-bezier(.2,.8,.2,1), filter .3s; }
.strip__tile:hover img{ transform:scale(1.06); }
.strip__tile:focus-visible, .book__tile:focus-visible{ outline:3px solid var(--ink); outline-offset:2px; }

.book{ padding:clamp(3.5rem,7vw,5.5rem) 0; border-top:1px solid var(--rule); }
.book__grid{ display:grid; grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); gap:2.5rem 4rem; align-items:center; }
@media (max-width:860px){ .book__grid{ grid-template-columns:1fr; } }
.book__head h2{ margin-bottom:.8rem; }
.book__head p{ max-width:38ch; }
.book__more{ margin-top:1rem; }

/* stacked card deck, like a photo stack in Messages */
.deck{ display:flex; flex-direction:column; align-items:center; }
.deck__stage{ position:relative; isolation:isolate; width:100%; height:clamp(250px, 38vw, 430px); touch-action:pan-y; }
.deck__card{
  --t: translate(0,0) rotate(0) scale(1);
  position:absolute; left:50%; top:50%; padding:0; border:0; cursor:pointer;
  border-radius:16px; overflow:hidden; background:#ddd8cc;
  box-shadow:0 1px 2px rgba(25,20,10,.14), 0 18px 34px -16px rgba(25,20,10,.5);
  transform:translate(-50%,-50%) var(--t);
  transition:transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s ease, box-shadow .3s;
  opacity:0; z-index:0; pointer-events:none;
}
.deck__card img{ display:block; width:100%; height:100%; object-fit:cover; -webkit-user-drag:none; user-select:none; }
.deck__card:first-child{ opacity:1; } /* before the script runs */
.deck__card[data-pos]{ opacity:0; }
.deck__card[data-pos="0"]{ opacity:1; z-index:3; pointer-events:auto; }
.deck__card[data-pos="1"]{ --t: translate(26px,-10px) rotate(5deg) scale(.94); opacity:1; z-index:2; filter:brightness(.92); }
.deck__card[data-pos="2"]{ --t: translate(-28px,-14px) rotate(-6deg) scale(.89); opacity:1; z-index:1; filter:brightness(.84); }
.deck__card[data-pos="out"]{ --t: translate(-58%,12px) rotate(-12deg) scale(.94); opacity:0; z-index:4; transition:transform .45s cubic-bezier(.2,.8,.2,1), opacity .22s ease; }
.deck__card[data-pos="next"]{ --t: translate(-28px,-18px) rotate(-8deg) scale(.84); opacity:0; z-index:0; }
.deck__card[data-pos="0"]:hover{ box-shadow:0 1px 2px rgba(25,20,10,.14), 0 26px 44px -16px rgba(25,20,10,.6); --t: translate(0,-4px) rotate(0) scale(1.01); }
.deck__card:focus-visible{ outline:3px solid var(--ink); outline-offset:4px; }

.deck__controls{ display:flex; align-items:center; gap:1.1rem; margin-top:.5rem; }
.deck__btn{ width:46px; height:46px; border-radius:50%; border:0; cursor:pointer; background:var(--yellow); color:var(--ink); font:700 1.25rem/1 var(--font); display:grid; place-items:center; transition:background-color .15s, transform .15s; }
.deck__btn:hover{ background:var(--yellow-dk); }
.deck__btn:active{ transform:scale(.93); }
.deck__count{ margin:0; min-width:4.5ch; text-align:center; font-weight:700; font-size:1.05rem; color:var(--ink); font-variant-numeric:tabular-nums; }
.deck__cap{ margin:.5rem 0 0; font-size:.93rem; color:var(--muted); text-align:center; min-height:1.5em; }
@media (prefers-reduced-motion: reduce){ .deck__card{ transition:none; } }

/* full-screen viewer, styled like turning pages */
.viewer{ width:100vw; height:100vh; max-width:none; max-height:none; margin:0; padding:0; border:0; background:rgba(17,17,15,.96); color:#f2f0ea; overflow:hidden; }
.viewer::backdrop{ background:rgba(17,17,15,.8); }
.viewer[open]{ display:grid; grid-template-rows:1fr auto; }
.viewer__page{ display:grid; place-items:center; padding:3.5rem 4.5rem 0; min-height:0; perspective:1600px; }
.viewer__img{ max-width:100%; max-height:calc(100vh - 7.5rem); width:auto; height:auto; border:6px solid #f2f0ea; border-radius:2px; box-shadow:0 30px 60px -20px rgba(0,0,0,.8); background:#2b2c28; }
.viewer__bar{ display:flex; justify-content:space-between; gap:1rem; padding:.9rem 4.5rem 1.2rem; font-size:.97rem; }
.viewer__cap{ margin:0; }
.viewer__count{ margin:0; color:var(--yellow); font-weight:700; font-variant-numeric:tabular-nums; }
.viewer__btn, .viewer__close{ position:absolute; border:0; cursor:pointer; color:var(--ink); background:var(--yellow); font:700 1.4rem/1 var(--font); width:52px; height:52px; border-radius:50%; display:grid; place-items:center; transition:transform .15s, background-color .15s; }
.viewer__btn:hover, .viewer__close:hover{ background:#fff; }
.viewer__btn:active{ transform:scale(.94); }
.viewer__prev{ left:1rem; top:50%; translate:0 -50%; }
.viewer__next{ right:1rem; top:50%; translate:0 -50%; }
.viewer__close{ top:1rem; right:1rem; width:44px; height:44px; font-size:1.1rem; background:#f2f0ea; }
@media (max-width:640px){
  .viewer__page{ padding:4rem .6rem 0; }
  .viewer__bar{ padding:.8rem 1rem 1rem; }
  .viewer__btn{ top:auto; bottom:4.2rem; translate:none; width:46px; height:46px; }
  .viewer__img{ max-height:calc(100vh - 11rem); border-width:4px; }
}
@media (prefers-reduced-motion: no-preference){
  .viewer__img.turn-next{ animation:turnNext .45s cubic-bezier(.2,.8,.2,1); transform-origin:left center; }
  .viewer__img.turn-prev{ animation:turnPrev .45s cubic-bezier(.2,.8,.2,1); transform-origin:right center; }
  @keyframes turnNext{ from{ opacity:0; transform:rotateY(-28deg) translateX(40px); } to{ opacity:1; transform:none; } }
  @keyframes turnPrev{ from{ opacity:0; transform:rotateY(28deg) translateX(-40px); } to{ opacity:1; transform:none; } }
  .viewer[open]{ animation:fadeUp .3s ease-out; }
}

/* socials in the footer */
.footer__label{ color:#fff; font-weight:700; margin-bottom:.6rem !important; }
.social{ display:flex; flex-direction:column; gap:.5rem; }
.social a{ display:inline-flex; align-items:center; gap:.55rem; }
.social svg{ width:20px; height:20px; flex:none; color:var(--yellow); }
