/* ───────────────────────────────────────────────────────────
   Fenlow Estate — five flat inks, taken off the film's frames.
   The film is a 1930s poster with a hard horizon and the
   subject low-centre, so the interface is a single bottle-label
   card that changes position beat to beat, plus a margin.
   ─────────────────────────────────────────────────────────── */

:root {
  --ochre:  #d9a441;
  --ochre-d:#b8862c;
  --vine:   #4e6b3a;
  --wine:   #5b1224;
  --wine-d: #3a0e18;
  --cream:  #efe4cb;
  --indigo: #2c3550;
  --cellar: #1a1018;

  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans:  "Jost", -apple-system, BlinkMacSystemFont, sans-serif;

  --gut:  clamp(18px, 4.2vw, 84px);
  --ease: cubic-bezier(.22,1,.36,1);
  --max:  1260px;
  --scroll-length: 1150vh;

  /* the label card flips ink depending on what is behind it */
  --ink: var(--cellar);
  --pap: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cellar); color: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; }

.skip { position: fixed; top: -100px; left: 12px; z-index: 200; background: var(--cream); color: var(--cellar); padding: 10px 16px; text-decoration: none; font-size: 13px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

/* ── loader ─────────────────────────────────────────────── */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 20px; background: var(--cream); color: var(--wine); transition: opacity .7s var(--ease), visibility .7s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: .04em; }
.loader__bar { width: 170px; height: 1px; background: rgba(91,18,36,.24); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--wine); transition: width .25s linear; }

/* ── film ───────────────────────────────────────────────── */
.film { position: fixed; inset: 0; z-index: 0; background: var(--ochre); }
.film canvas, .film__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film__fallback { display: none; }
/* the poster is already flat and high-contrast — do not muddy it */
.film__grade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(26,16,24,.16) 0%, rgba(26,16,24,0) 18%,
                                          rgba(26,16,24,0) 86%, rgba(26,16,24,.20) 100%); }

/* ── chrome ─────────────────────────────────────────────── */
.chrome { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 28px; padding: 18px var(--gut); }
.mark { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .02em; color: var(--cream); text-decoration: none; }
.mark em { font-style: italic; font-weight: 400; }
.mark--lg { font-size: 30px; }
.chrome__nav { margin-left: auto; display: flex; gap: 24px; }
.chrome__nav a { font-size: 13px; font-weight: 400; letter-spacing: .04em; color: rgba(239,228,203,.8); text-decoration: none; position: relative; padding-bottom: 3px; }
.chrome__nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: currentColor; transition: width .35s var(--ease); }
.chrome__nav a:hover::after { width: 100%; }

/* over the ochre poster and the cream studio the chrome must be ink */
html.is-light .mark,
html.is-light .chrome__nav a { color: var(--cellar); }
html.is-light .burger span { background: var(--cellar); }
html.is-light .btn--fill { background: var(--wine); color: var(--cream); border-color: var(--wine); }
.mark, .chrome__nav a, .burger span { transition: color .45s var(--ease), background .45s var(--ease); }

.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--cream); }
.burger span + span { margin-top: 6px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.navPanel { position: fixed; inset: 0; z-index: 39; background: var(--wine-d); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 var(--gut); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.navPanel.is-open { opacity: 1; visibility: visible; }
.navPanel a { font-family: var(--serif); font-size: clamp(34px,9vw,58px); color: var(--cream); text-decoration: none; padding: 6px 0; }

/* ── buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; padding: 11px 19px; border: 1px solid currentColor; transform: var(--mag, translate(0,0)); transition: background .3s var(--ease), color .3s var(--ease); }
.btn--fill { background: var(--wine); color: var(--cream); border-color: var(--wine); }
.btn--fill:hover { background: var(--cellar); border-color: var(--cellar); }
.btn--line { background: transparent; color: inherit; }
.btn--line:hover { background: rgba(26,16,24,.1); }
.btn--lg { padding: 13px 24px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── stage: one label card ──────────────────────────────── */
.stage { position: relative; z-index: 10; }
.stage__spacer { height: var(--scroll-length); }
.overlays { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.beat { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.lay { position: absolute; inset: 0; padding: 92px calc(var(--gut) + 34px) 92px var(--gut); }

/* the label: a bottle label, not a UI card — paper, double rule, small caps */
.label {
  position: absolute; width: min(38ch, 42vw);
  background: var(--pap); color: var(--ink);
  padding: 26px 28px;
  border: 1px solid rgba(26,16,24,.32);
  box-shadow: 0 1px 0 rgba(26,16,24,.14), 0 18px 40px rgba(26,16,24,.14);
  pointer-events: auto;
}
.label::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(26,16,24,.16); pointer-events: none;
}
.label--tl  { top: 104px; left: var(--gut); }
.label--tr  { top: 104px; right: calc(var(--gut) + 34px); }
.label--bl  { bottom: 96px; left: var(--gut); }
.label--mid { top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.label__rule { display: block; height: 1px; background: rgba(26,16,24,.28); margin: 0 0 16px; }
.label__rule + .eyebrow { margin-top: 0; }
.label > .label__rule:last-child { margin: 18px 0 0; }

/* ── type ───────────────────────────────────────────────── */
.display { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 52px); font-weight: 500; line-height: 1.02; letter-spacing: -.005em; margin: 0 0 12px; }
.h1 { font-family: var(--serif); font-size: clamp(30px, 4.2vw, 58px); font-weight: 500; line-height: 1.04; margin: 0 0 12px; }
.h2 { font-family: var(--serif); font-size: clamp(26px, 2.7vw, 40px); font-weight: 500; line-height: 1.04; margin: 0 0 10px; }

.eyebrow { display: block; font-size: 10px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: rgba(26,16,24,.55); margin-bottom: 10px; }
.lede { font-size: 14px; line-height: 1.62; color: rgba(26,16,24,.78); margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.label--mid .row { justify-content: center; }
.row--split { justify-content: space-between; align-items: center; }

.meta { margin: 16px 0 0; display: flex; gap: 22px; }
.meta div { display: flex; flex-direction: column; gap: 2px; }
.meta dt { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(26,16,24,.5); }
.meta dd { margin: 0; font-family: var(--serif); font-size: 19px; }

/* ── the pour beat: a vintage list beside the glass ─────── */
.beat--pour .vintages {
  position: absolute; right: calc(var(--gut) + 34px); top: 50%; transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0; width: min(34ch, 36vw);
  background: var(--cream); border: 1px solid rgba(26,16,24,.32);
  box-shadow: 0 18px 40px rgba(26,16,24,.14); pointer-events: auto;
}
.beat--pour .vintages li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline;
  padding: 11px 18px; border-bottom: 1px solid rgba(26,16,24,.14);
  color: var(--cellar); opacity: 0; transform: translateX(14px);
  transition: opacity .55s var(--ease), transform .65s var(--ease);
  transition-delay: calc(var(--i,0) * 65ms);
}
.beat--pour.is-live .vintages li { opacity: 1; transform: none; }
.beat--pour .vintages li:last-child { border-bottom: 0; }
.beat--pour .vintages b { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.beat--pour .vintages i { font-style: normal; font-size: 11px; letter-spacing: .1em; color: rgba(26,16,24,.5); }
.beat--pour .vintages span { font-family: var(--serif); font-size: 15px; color: var(--wine); }

/* ── margin furniture ───────────────────────────────────── */
.margin { position: fixed; right: 0; top: 0; bottom: 0; width: 34px; z-index: 25; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.margin__y { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; justify-items: center; }
.margin__y li { font-family: var(--serif); font-size: 11px; color: rgba(239,228,203,.34); transition: all .4s var(--ease); }
.margin__y li.is-on { color: var(--cream); transform: scale(1.5); }
.margin__y li.is-past { color: rgba(239,228,203,.6); }
html.is-light .margin__y li { color: rgba(26,16,24,.34); }
html.is-light .margin__y li.is-on { color: var(--wine); }
html.is-light .margin__y li.is-past { color: rgba(26,16,24,.6); }
.margin__bar { position: absolute; right: 13px; top: 92px; bottom: 92px; width: 1px; background: rgba(239,228,203,.2); }
.margin__bar i { position: absolute; inset: 0; width: 100%; background: var(--wine); transform: scaleY(0); transform-origin: 50% 0; }
html.is-light .margin__bar { background: rgba(26,16,24,.2); }

/* ── page below the film ────────────────────────────────── */
.page { position: relative; z-index: 30; background: var(--cellar); }
.sec { padding: clamp(64px, 9vw, 138px) var(--gut); max-width: var(--max); margin: 0 auto; }
.sec--tint { max-width: none; background: var(--wine-d); }
.sec--tint > * { max-width: var(--max); margin-inline: auto; }
.sec__head { margin-bottom: clamp(30px,4.4vw,56px); }
.sec__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.page .h1, .page .h2 { color: var(--cream); }
.page .eyebrow { color: rgba(239,228,203,.55); }
.page .lede { color: rgba(239,228,203,.78); max-width: 56ch; }
.note { font-size: 12.5px; color: rgba(239,228,203,.5); margin-top: 20px; }

.r { opacity: 0; transform: translateY(20px); }
.r--in { opacity: 1; transform: none; transition: opacity .8s var(--ease) var(--d,0ms), transform .8s var(--ease) var(--d,0ms); }

.filters { display: flex; gap: 6px; }
.chip { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 15px; cursor: pointer; background: transparent; color: rgba(239,228,203,.7); border: 1px solid rgba(239,228,203,.24); transition: all .3s var(--ease); }
.chip:hover { color: var(--cream); border-color: var(--cream); }
.chip.is-on { background: var(--cream); color: var(--cellar); border-color: var(--cream); }

/* ── wine list ──────────────────────────────────────────── */
.wines { list-style: none; margin: 0; padding: 0; }
.wines li { display: grid; grid-template-columns: minmax(0,1.1fr) 86px minmax(0,1.3fr) auto; gap: 22px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid rgba(239,228,203,.14); }
.wines li:first-child { border-top: 1px solid rgba(239,228,203,.14); }
.wines li[hidden] { display: none; }
.wines b { font-family: var(--serif); font-size: clamp(20px,2.1vw,28px); font-weight: 500; color: var(--cream); display: block; }
.wines .cepage { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(239,228,203,.46); margin-top: 4px; display: block; }
.wines .yr { font-family: var(--serif); font-size: 19px; color: var(--ochre); }
.wines p { margin: 0; font-size: 13.5px; line-height: 1.55; color: rgba(239,228,203,.68); }
.wines .pr { font-family: var(--serif); font-size: clamp(18px,1.9vw,24px); color: var(--cream); font-variant-numeric: tabular-nums; }

/* ── parcels ────────────────────────────────────────────── */
.parcels { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: rgba(239,228,203,.14); border: 1px solid rgba(239,228,203,.14); }
.parcels article { background: var(--wine-d); padding: 24px 20px; }
.parcels b { display: block; font-family: var(--serif); font-size: 22px; color: var(--cream); }
.parcels span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ochre); margin: 5px 0 12px; }
.parcels p { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: rgba(239,228,203,.7); }
.bar { display: block; height: 2px; background: rgba(239,228,203,.16); position: relative; }
.bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ochre); transition: width 1.2s var(--ease) .2s; }
.is-live .bar::after, .r--in .bar::after { width: var(--w); }

/* ── do / do not ────────────────────────────────────────── */
.doing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,4vw,60px); margin-bottom: clamp(40px,5vw,70px); }
.do, .dont { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.do li, .dont li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.5; color: rgba(239,228,203,.84); }
.do li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 9px; height: 5px; border-left: 1.5px solid var(--vine); border-bottom: 1.5px solid var(--vine); transform: rotate(-45deg); }
.dont li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 11px; height: 1.5px; background: var(--wine); }
.dont li { color: rgba(239,228,203,.62); }

/* ── accordion ──────────────────────────────────────────── */
.acc { border-top: 1px solid rgba(239,228,203,.16); }
.acc__i { border-bottom: 1px solid rgba(239,228,203,.16); }
.acc__b { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: none; border: 0; color: var(--cream); cursor: pointer; text-align: left; padding: 20px 0; font-family: var(--serif); font-size: clamp(18px,2vw,25px); }
.acc__b i { position: relative; width: 13px; height: 13px; flex: none; }
.acc__b i::before, .acc__b i::after { content: ""; position: absolute; background: var(--ochre); transition: transform .35s var(--ease); }
.acc__b i::before { left: 0; top: 6px; width: 13px; height: 1.5px; }
.acc__b i::after { top: 0; left: 6px; width: 1.5px; height: 13px; }
.acc__i.is-open .acc__b i::after { transform: scaleY(0); }
.acc__p { overflow: hidden; height: 0; transition: height .4s var(--ease); }
.acc__p p { margin: 0; padding-bottom: 20px; font-size: 14px; line-height: 1.66; color: rgba(239,228,203,.72); max-width: 68ch; }

/* ── visit ──────────────────────────────────────────────── */
.sec--visit { max-width: none; background: var(--wine-d); }
.visit { max-width: var(--max); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,70px); align-items: start; }
.visit__meta { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 11px; }
.visit__meta li { display: grid; grid-template-columns: 90px 1fr; font-size: 14px; color: rgba(239,228,203,.84); }
.visit__meta span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(239,228,203,.5); padding-top: 3px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(239,228,203,.5); }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: var(--cream); background: rgba(26,16,24,.4); border: 1px solid rgba(239,228,203,.22); padding: 12px 14px; width: 100%; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ochre); outline: none; }
.field.is-bad input, .field.is-bad select { border-color: #d8664a; }
.formstatus { font-size: 12.5px; margin: 0; color: rgba(239,228,203,.6); }
.formstatus[data-tone="bad"] { color: #e8917a; }
.formstatus[data-tone="good"] { color: #a8c48e; }
.form.is-sent .field { opacity: .5; pointer-events: none; }

/* ── footer ─────────────────────────────────────────────── */
.foot { background: #120a10; padding: clamp(40px,6vw,64px) var(--gut) 28px; }
.foot__top, .foot__bot { max-width: var(--max); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.foot__top { padding-bottom: 26px; border-bottom: 1px solid rgba(239,228,203,.14); }
.foot nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { font-size: 12.5px; color: rgba(239,228,203,.66); text-decoration: none; }
.foot a:hover { color: var(--ochre); }
.foot__bot { padding-top: 20px; justify-content: space-between; }
.foot__bot span { font-size: 11.5px; color: rgba(239,228,203,.4); }

/* ═══ MOTION ══════════════════════════════════════════════ */

.label { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .85s var(--ease); }
.label--mid { transform: translate(-50%,-50%) translateY(16px); }
.beat.is-live .label { opacity: 1; transform: translateY(calc(var(--t,0) * -12px)); }
.beat.is-live .label--mid { transform: translate(-50%,-50%) translateY(calc(var(--t,0) * -12px)); }

.is-split { display: block; }
.ln { display: block; overflow: hidden; padding-bottom: .08em; }
.ln i { display: block; font-style: inherit; transform: translateY(110%); opacity: 0;
  transition: transform 1s var(--ease), opacity .75s var(--ease); transition-delay: calc(var(--li) * 95ms); }
.beat.is-live .ln i, .wipe.is-live .ln i, .sec__head.is-live .ln i { transform: none; opacity: 1; }

.label > *:not(.ln):not(.display):not(.h2) { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.beat.is-live .label > *:not(.ln):not(.display):not(.h2) { opacity: 1; transform: none; }
.beat.is-live .label > *:nth-child(3) { transition-delay: .1s; }
.beat.is-live .label > *:nth-child(4) { transition-delay: .17s; }
.beat.is-live .label > *:nth-child(5) { transition-delay: .24s; }

.wipe > *:not(.ln) { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.wipe.is-live > *:not(.ln) { opacity: 1; transform: none; }
.wipe.is-live > *:nth-child(2) { transition-delay: .1s; }
.wipe.is-live > *:nth-child(3) { transition-delay: .18s; }

.has-cursor, .has-cursor * { cursor: none !important; }
.cur { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%; }
.cur--dot { width: 5px; height: 5px; background: var(--wine); }
.cur--ring { width: 30px; height: 30px; border: 1px solid rgba(239,228,203,.5);
  transition: width .32s var(--ease), height .32s var(--ease), background .32s var(--ease), opacity .3s; }
.cur--ring.is-on { width: 50px; height: 50px; background: rgba(239,228,203,.12); }
.cur--ring.is-out { opacity: 0; }
html.is-light .cur--ring { border-color: rgba(26,16,24,.45); }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .parcels { grid-template-columns: 1fr 1fr; }
  .visit, .form, .doing { grid-template-columns: 1fr; }
  .label { width: min(38ch, 52vw); }
  .beat--pour .vintages { width: min(30ch, 44vw); }
}
@media (max-width: 760px) {
  :root { --scroll-length: 1000vh; }
  .chrome__nav, .chrome .btn { display: none; }
  .burger { display: block; margin-left: auto; }
  .lay { padding: 88px var(--gut) 88px; }
  /* one position on a phone: the label sits low, full width */
  .label, .label--tl, .label--tr, .label--bl, .label--mid {
    position: absolute; top: auto; bottom: 84px; left: var(--gut); right: var(--gut);
    width: auto; transform: none; text-align: left;
  }
  .label--mid .row { justify-content: flex-start; }
  .beat.is-live .label, .beat.is-live .label--mid { transform: none; }
  .beat--pour .vintages { position: static; width: auto; margin-top: 10px; }
  .beat--pour .label { bottom: auto; top: 88px; }
  .beat--pour .lay { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
  .beat--pour .label { position: static; }
  .margin { width: 22px; }
  .margin__y li { font-size: 9.5px; }
  .margin__bar { right: 9px; }
  .parcels { grid-template-columns: 1fr; }
  .wines li { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .wines p { grid-column: 1 / -1; }
  .wines .yr { justify-self: end; }
  .visit__meta li { grid-template-columns: 1fr; gap: 2px; }
  .foot nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .film canvas { display: none; }
  .film__fallback { display: block; }
  .stage__spacer { height: 640vh; }
  .ln i, .label, .label > *, .wipe > *:not(.ln), .r, .beat--pour .vintages li {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .cur { display: none; }
}
