/* Section-by-section navigation across the public site. */
html.rv-section-scroll{
  --rv-scroll-offset:calc(var(--hdrh,72px) + var(--rv-scroll-subnav,0px));
  --rv-panel-height:calc(100svh - var(--rv-scroll-offset));
  scroll-padding-block-start:var(--rv-scroll-offset);
  scroll-snap-type:y proximity;
}
html.rv-section-scroll .rv-scroll-panel{
  scroll-snap-align:start;
  scroll-snap-stop:always;
  box-sizing:border-box;
}
html.rv-section-scroll :is(body[data-page="home"],body[data-page="sound"],body[data-page="spirits"],body[data-page="story"]) main>.rv-scroll-panel:not(:first-child){
  min-block-size:var(--rv-panel-height);
}
html.rv-section-scroll .rv-scroll-footer{scroll-snap-align:end}
/* Reading and checkout-free contact pages participate at their chapter
   boundaries, without stretching a short form or trapping a long article. */
html.rv-section-scroll main.rv-scroll-panel,
html.rv-section-scroll main>article.rv-scroll-panel{
  scroll-snap-stop:normal;
}
/* Align the shorter editorial sections within a full-height frame.
   Content-heavy panels are still free to grow instead of cropping or
   creating a nested scrolling area. */
@media (min-width:981px){
  html.rv-section-scroll body[data-page="sound"] main>.rv-scroll-panel:not(.sh),
  html.rv-section-scroll body[data-page="home"] main>.rv-scroll-panel:not(.hero-home):not(.austin){
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding-block:clamp(40px,6vh,84px);
  }
  html.rv-section-scroll :is(body[data-page="home"],body[data-page="sound"]) .rv-scroll-panel>.wrap{width:100%}
  html.rv-section-scroll body[data-page="home"] .austin-grid{min-height:var(--rv-panel-height)}
  /* Headline and explanation sit above one generous three-photo row.
     Preserve the portrait crops; enlarge the images rather than zooming in. */
  html.rv-section-scroll body[data-page="sound"] #how>.wrap{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"label" "title" "prose" "photos";
    row-gap:clamp(8px,1.3vh,15px);
    align-content:center;
    align-items:center;
  }
  html.rv-section-scroll body[data-page="sound"] main>#how.rv-scroll-panel:not(.sh){
    padding-block:clamp(10px,1.2vh,26px);
  }
  html.rv-section-scroll body[data-page="sound"] #how .two{display:contents}
  html.rv-section-scroll body[data-page="sound"] #how .part-hd{grid-area:label;margin:0;align-self:center}
  html.rv-section-scroll body[data-page="sound"] #how .part-hd .n{font-size:40px}
  html.rv-section-scroll body[data-page="sound"] #how .two h2{
    grid-area:title;font-size:clamp(50px,4.6vw,72px);line-height:1;align-self:center;
  }
  html.rv-section-scroll body[data-page="sound"] #how .prose{
    grid-area:prose;align-self:center;display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:clamp(28px,5vw,80px);align-items:start;
  }
  html.rv-section-scroll body[data-page="sound"] #how .prose p{
    font-size:clamp(17px,1.25vw,19px);line-height:1.48;margin:0 0 10px;max-width:none;
  }
  html.rv-section-scroll body[data-page="sound"] #how .prose h3{
    font-size:clamp(24px,2vw,29px);line-height:1.1;margin:0 0 10px;padding:0;border:0;
  }
  html.rv-section-scroll body[data-page="sound"] #how .realrow{
    --photo-h:clamp(240px,48svh,450px);
    grid-area:photos;
    width:min(100%,calc(var(--photo-h)*2.25 + 28px));
    margin:8px auto 0;gap:14px;align-self:start;
  }
  /* Retain the bottle photography and existing typography, but use the
     available frame more economically on the home page. */
  html.rv-section-scroll body[data-page="home"] main>.rv-scroll-panel.hc-spirits:not(.hero-home){
    padding-block:clamp(26px,4vh,45px);
  }
  html.rv-section-scroll body[data-page="home"] .hc-spirits .hc-kicker{margin-bottom:11px}
  html.rv-section-scroll body[data-page="home"] .hc-section-head{margin-bottom:28px;gap:28px}
  html.rv-section-scroll body[data-page="home"] .hc-section-head h2{font-size:clamp(48px,5.2vw,84px)}
  html.rv-section-scroll body[data-page="home"] .hc-bottle-name{padding:14px 18px 16px}
  html.rv-section-scroll body[data-page="home"] .hc-spirits .hc-centered{margin-top:22px}
  html.rv-section-scroll body[data-page="home"] .sound-pic{
    min-height:clamp(480px,calc(var(--rv-panel-height) - 108px),740px);
  }
  html.rv-section-scroll body[data-page="home"] main>.rv-scroll-panel.sound:not(.hero-home){
    padding-block:clamp(30px,4.5vh,54px);
  }
}
/* Touch scrolling remains natural: longer mobile panels can be read
   freely, with a magnetic finish when a section boundary is close. */
@media (max-width:980px){
  html.rv-section-scroll{scroll-snap-type:y proximity}
  html.rv-section-scroll .rv-scroll-panel{scroll-snap-stop:normal}
  html.rv-section-scroll body[data-page="sound"] main>.ch{
    min-block-size:var(--rv-panel-height);
    padding-block:clamp(42px,7vh,78px);
  }
  html.rv-section-scroll body[data-page="sound"] #how .realrow{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;margin-top:24px;
  }
  html.rv-section-scroll body[data-page="home"] main>.rv-scroll-panel:not(.hero-home):not(.austin){
    padding-block:clamp(54px,8vh,96px);
  }
}
/* An embedded desktop/tablet preview is often only about 700px wide. Keep
   its editorial chapters centered and short enough to demonstrate snapping,
   rather than stacking three very tall photographs into one chapter. */
@media (min-width:641px) and (max-width:980px){
  html.rv-section-scroll body[data-page="sound"] main>.rv-scroll-panel:not(.sh){
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding-block:clamp(30px,4vh,56px);
  }
  html.rv-section-scroll body[data-page="sound"] .rv-scroll-panel>.wrap{width:100%}
  html.rv-section-scroll body[data-page="sound"] .sh{min-block-size:100svh}
  html.rv-section-scroll body[data-page="sound"] .sh .copy{padding:26px var(--pad) 20px}
  html.rv-section-scroll body[data-page="sound"] .sh .copy .h1{font-size:clamp(48px,7vw,62px)}
  html.rv-section-scroll body[data-page="sound"] .sh .photo{
    aspect-ratio:16/8;
    max-height:clamp(225px,30vh,330px);
  }
  html.rv-section-scroll body[data-page="sound"] #how .part-hd{margin-bottom:9px}
  html.rv-section-scroll body[data-page="sound"] #how .part-hd .n{font-size:44px}
  html.rv-section-scroll body[data-page="sound"] #how .two{gap:16px}
  html.rv-section-scroll body[data-page="sound"] #how .two h2{font-size:clamp(42px,6.6vw,60px)}
  html.rv-section-scroll body[data-page="sound"] #how .prose p{font-size:17px;line-height:1.48;margin-bottom:12px;max-width:none}
  html.rv-section-scroll body[data-page="sound"] #how .prose h3{font-size:24px;line-height:1.12;margin:16px 0 9px;padding-top:14px}
  html.rv-section-scroll body[data-page="sound"] #how .realrow{margin-top:14px;max-width:none;margin-inline:auto}
  html.rv-section-scroll body[data-page="sound"] main>#how.rv-scroll-panel:not(.sh){
    padding-block:clamp(22px,3vh,42px);
  }
  html.rv-section-scroll body[data-page="sound"] #lab-wrap .hear{gap:22px}
  html.rv-section-scroll body[data-page="sound"] #lab-wrap .viz{max-width:520px;margin-inline:auto}
  html.rv-section-scroll body[data-page="sound"] #lab-wrap .vsteps>div{min-height:76px;padding:10px 0}
}
/* Avoid grabbing the viewport when an age gate, menu or buy panel is open. */
html.rv-section-scroll:has(body.locked){scroll-snap-type:none}
/* Let a quick upward wheel gesture pass every section without resistance.
   Restore proximity snapping only when the wheel is idle. */
html.rv-section-scroll.rv-scroll-fast{scroll-snap-type:none;scroll-behavior:auto}
html.rv-section-scroll.rv-scroll-fast .rv-scroll-panel{scroll-snap-stop:normal}
/* A visitor can disable chapter scrolling without changing the layout. */
html.rv-section-scroll.rv-scroll-opt-out{scroll-snap-type:none;scroll-behavior:auto}
html.rv-section-scroll.rv-scroll-opt-out .rv-scroll-panel,
html.rv-section-scroll.rv-scroll-opt-out .rv-scroll-footer{scroll-snap-align:none;scroll-snap-stop:normal}
/* Keep section alignment available to reduced-motion visitors, but omit
   animated chapter transitions and never require a mandatory stop. */
@media (prefers-reduced-motion:reduce){
  html.rv-section-scroll:not(.rv-scroll-opt-in){scroll-behavior:auto}
  html.rv-section-scroll:not(.rv-scroll-opt-in) .rv-scroll-panel{scroll-snap-stop:normal}
}
