/* =========================================================
   story.css — Hill Country Estate
   ADDITIVE. Load AFTER styles.css. Nothing here overrides
   layout; it only changes the RHYTHM of motion that already
   exists, plus the age-gate handoff.

   <link rel="stylesheet" href="styles.css">
   <link rel="stylesheet" href="story.css">   <- add this line
   ========================================================= */

:root{
  /* var(--ease) is cubic-bezier(.16,1,.3,1) — a hard expo-out.
     Two more so every entrance is not the same shape. */
  --ease-quiet:  cubic-bezier(.22,.61,.36,1);   /* soft, unremarkable */
  --ease-moment: cubic-bezier(.16,1,.3,1);      /* same expo, used sparingly */
}

/* ---------------------------------------------------------
   1. THREE TIERS OF ENTRANCE
   Every .rv on the site currently moves 30px over .9s with
   one easing. When everything enters identically the eye
   stops registering entrances at all. These give the page a
   loud / normal / quiet register.

   Specificity note: .rv.rv--quiet (0,2,0) ties with
   .rv[data-d="2"] (0,2,0) and wins on file order, so it also
   cancels the stock delays. Load this file second.
--------------------------------------------------------- */

/* QUIET — supporting copy, ledes, button rows, captions.
   Barely a move. Its job is to not compete. */
.rv.rv--quiet{
  transform:translateY(12px);
  transition-duration:.5s,.5s,.5s;
  transition-delay:0s;
  transition-timing-function:var(--ease-quiet);
}

/* MOMENT — the one or two beats per page that carry the
   story. Further, slower, later. Use no more than twice. */
.rv.rv--moment{
  transform:translateY(64px);
  transition-duration:1.2s,1.2s,1.2s;
  transition-timing-function:var(--ease-moment);
}
.rv.rv--moment[data-d="2"]{transition-delay:.28s}
.rv.rv--moment[data-d="3"]{transition-delay:.44s}

/* .in is only (0,1,0) — it cannot beat the two tiers above on its own.
   Without these two lines nothing ever settles. */
.rv.rv--quiet.in,
.rv.rv--moment.in{transform:none}

/* A stagger that is not another translateY — scale + fade.
   Used on the wine grid so the product row reads as a
   different kind of event from the prose above it. */
.stag--scale > *{transform:scale(.965) translateY(10px)}
.stag--scale.in > *{transform:none}

/* ---------------------------------------------------------
   2. THE AGE GATE HANDOFF
   The gate is an opaque full-bleed panel. Everything behind
   it — hero headline mask, video, first reveals — used to
   play out while the visitor was still reading a yes/no
   question, so the page they finally saw had already
   finished arriving. site.js now holds the reveals; this
   makes the gate itself leave like a curtain rather than a
   dialog blinking out.
--------------------------------------------------------- */
#gate{
  transition:opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease);
}
#gate.is-out{
  opacity:0;
  transform:scale(1.06);
  filter:blur(6px);
  pointer-events:none;
}
/* ---------------------------------------------------------
   3. MICRO-INTERACTION — the real gaps
   Most of this layer is already done well (button sheen,
   .wcard lift, .pair image scale, nav underline wipe,
   .tlink arrow nudge, magnetic buttons, :focus-visible).
   Only these were missing.
--------------------------------------------------------- */

/* The marquee runs forever and cannot be read. Let a reader
   stop it. Also honours reduced motion, which the original
   infinite slide did not. */
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track{animation-play-state:paused}
.marquee-track span{transition:opacity .4s var(--ease)}
.marquee:hover .marquee-track span{opacity:.9}

/* Pinned-stage dots are pure decoration right now. Giving
   them a hover target makes the pin feel navigable even
   though it is scroll-driven. */
.stage-dots i{transition:opacity .5s var(--ease),height .5s var(--ease),transform .4s var(--ease)}
.stage-dots:hover i{opacity:.5}
.stage-dots i.on{transform:scaleX(1.6)}

/* The scroll cue should retire once you have scrolled —
   an invitation that never leaves stops meaning anything. */
.scroll-cue{transition:opacity .6s var(--ease),transform .6s var(--ease)}
body.scrolled .scroll-cue{opacity:0;transform:translateY(14px)}

/* Footer links currently only change colour. Same wipe as
   the nav, for consistency of vocabulary. */
footer .fgrid a:not(.ig){position:relative;display:block;width:max-content;max-width:100%}
footer .fgrid a:not(.ig)::after{
  content:"";position:absolute;left:0;right:0;bottom:-2px;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:right;
  transition:transform .38s var(--ease);
}
footer .fgrid a:not(.ig):hover::after{transform:scaleX(1);transform-origin:left}

/* Copy-the-code chip: confirm with a beat, not just a label
   swap. .copied is already toggled by site.js. */
[data-code]{transition:transform .3s var(--ease),color .3s var(--ease);cursor:pointer}
[data-code]:hover{transform:translateY(-1px)}
[data-code].copied{transform:scale(1.06)}

/* ---------------------------------------------------------
   4. REDUCED MOTION
   styles.css already neutralises .rv/.words/.stage-panel.
   These are the additions above that also need muting.
--------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .rv.rv--quiet,.rv.rv--moment,.stag--scale > *{transform:none;transition-delay:0s}
  .marquee-track{animation:none}
  #gate.is-out{transform:none;filter:none}
  .scroll-cue{transition:none}
  .stage-dots i.on{transform:none}
}

/* ---------------------------------------------------------
   5. SHOP — case picks, coming-soon panel
   Added when the build-your-own six was put behind a
   "coming soon" and cases of one wine went live.
--------------------------------------------------------- */
.case-grid{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:clamp(14px,1.8vw,22px);margin-top:clamp(26px,3vw,40px);
}
.case-pick{
  display:flex;flex-direction:column;gap:7px;
  padding:clamp(20px,2.2vw,28px);
  border:1px solid var(--line);border-radius:12px;
  background:var(--card);color:inherit;text-decoration:none;
  transition:transform .5s var(--ease),box-shadow .5s var(--ease),border-color .4s var(--ease);
}
.case-pick:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-lift);
  border-color:color-mix(in oklab,var(--accent) 60%,transparent);
}
.cp-vint{font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.cp-name{font-size:clamp(20px,2vw,26px);font-weight:300;line-height:1.15}
.cp-meta{font-size:13px;color:var(--fg-soft);flex:1}
.cp-buy{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  margin-top:14px;padding-top:14px;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:11.5px;
}
.cp-buy b{font-size:18px;font-weight:500}
.cp-go{color:var(--accent);transition:transform .4s var(--ease)}
.case-pick:hover .cp-go{transform:translateX(4px)}

/* site.js flattens a data-buy link to plain text when its
   Stripe URL is empty. Keep that state legible rather than
   letting it look like a broken tile. */
.case-pick.is-off{
  opacity:.55;pointer-events:none;
  display:grid;place-items:center;min-height:150px;
  font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;
}

.soon{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:20px 30px;margin-top:clamp(22px,2.6vw,32px);
  padding:clamp(22px,2.4vw,30px);
  border:1px dashed var(--line);border-radius:12px;
}
.soon h3{font-size:clamp(19px,1.9vw,24px);font-weight:300;margin-bottom:8px}
.soon p{font-size:14px;line-height:1.6;color:var(--fg-soft);max-width:58ch}

@media(max-width:980px){ .case-grid{grid-template-columns:repeat(2,1fr)} }
@media(max-width:560px){ .case-grid{grid-template-columns:1fr} }

/* ---------------------------------------------------------
   6. ARCHIVE GRID — estate.html #archive
   Five records in a three-column grid left a ragged 3 + 2.
   Six columns lets the two documents take half a row each
   and the three photo sets take a third each, which also
   matches how the records actually group.
--------------------------------------------------------- */
.archive{grid-template-columns:repeat(6,1fr)}
.archive > .arc{grid-column:span 2}
.archive > .arc--text{grid-column:span 3}

/* Belt and braces: if the old duplicate .arc block ever comes
   back, these keep the image flush to the card edge. */
.archive .arc{align-items:stretch;gap:0;padding:0}

@media(max-width:900px){
  .archive{grid-template-columns:1fr}
  .archive > .arc,.archive > .arc--text{grid-column:auto}
}
@media (min-width:901px) and (max-width:1180px){
  .archive{grid-template-columns:repeat(2,1fr)}
  .archive > .arc,.archive > .arc--text{grid-column:auto}
}

/* ---------------------------------------------------------
   7. SHOP — the "custom cases are not on the checkout" notice
--------------------------------------------------------- */
.notice{
  margin-top:clamp(26px,3vw,40px);
  padding:clamp(22px,2.6vw,34px);
  border:1px solid color-mix(in oklab,var(--accent) 38%,var(--line));
  border-radius:14px;
  background:color-mix(in oklab,var(--accent) 7%,transparent);
}
.notice-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px 16px;margin-bottom:12px}
.notice-tag{
  font-family:var(--mono);font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--accent-fg);background:var(--accent);
  padding:5px 11px;border-radius:980px;
}
.notice h3{font-size:clamp(19px,2vw,25px);font-weight:300;line-height:1.2}
.notice > p{font-size:14.5px;line-height:1.65;color:var(--fg-soft);max-width:70ch}
.notice .case-grid{margin-top:clamp(20px,2.4vw,28px)}

.builder-lead{margin-top:clamp(34px,4vw,54px);padding-top:clamp(26px,3vw,36px);border-top:1px solid var(--line)}
.builder-lead h3{font-size:clamp(20px,2.1vw,26px);font-weight:300;margin-bottom:7px}
.builder-lead p{font-size:14.5px;line-height:1.6;color:var(--fg-soft);max-width:62ch}

/* ---------------------------------------------------------
   8. PURPOSE — Cape Sanctuary facts band
--------------------------------------------------------- */
.facts{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:clamp(14px,2vw,26px);margin-top:clamp(28px,3.2vw,44px);
}
.fact{
  padding:clamp(18px,2vw,26px);
  border:1px solid var(--line);border-radius:12px;background:var(--card);
  transition:border-color .4s var(--ease),transform .5s var(--ease);
}
.fact:hover{transform:translateY(-4px);border-color:color-mix(in oklab,var(--accent) 50%,transparent)}
.fact b{
  display:block;font-family:var(--display);font-weight:300;
  font-size:clamp(28px,3.4vw,44px);line-height:1;color:var(--accent);
  margin-bottom:10px;letter-spacing:-.02em;
}
.fact span{display:block;font-size:13.5px;line-height:1.55;color:var(--fg-soft)}
.body-copy{font-size:15.5px;line-height:1.75;color:var(--fg-soft);margin-bottom:16px;max-width:60ch}
@media(max-width:980px){ .facts{grid-template-columns:repeat(2,1fr)} }
@media(max-width:560px){ .facts{grid-template-columns:1fr} }

/* ---------------------------------------------------------
   9. LEGAL PAGES — privacy / cookies / terms
   Long-form prose, narrow measure, nothing decorative.
--------------------------------------------------------- */
.legal-meta{
  font-family:var(--mono);font-size:11px;letter-spacing:.08em;
  color:var(--fg-faint);padding-bottom:26px;border-bottom:1px solid var(--line);
}
.legal-meta a{color:var(--accent)}
.legal-h{
  font-size:clamp(19px,2.2vw,25px);font-weight:300;letter-spacing:-.015em;
  margin:clamp(34px,4vw,52px) 0 14px;
}
.legal-p,.legal-list li{
  font-size:15.5px;line-height:1.75;color:var(--fg-soft);max-width:68ch;
}
.legal-p{margin-bottom:14px}
.legal-p b,.legal-list b{color:var(--fg);font-weight:500}
.legal-p a,.legal-list a{color:var(--accent)}
.legal-list{list-style:none;padding:0;margin:0 0 14px}
.legal-list li{position:relative;padding-left:20px;margin-bottom:10px}
.legal-list li::before{
  content:"";position:absolute;left:0;top:11px;
  width:6px;height:1px;background:var(--accent);
}
