/* Green Island — v2 "The Crossing"
   A cinematic page: five dated chapter films and a finale, each scrubbed by scroll,
   framed in widescreen with letterbox bars and film grain. Dark throughout; brass for
   dates and actions. Same type as v1: IM Fell English for display, Schibsted Grotesk for text. */
:root {
  --black: #070b09;
  --ink: #0d1612;
  --bottle: #12261d;
  --bone: #ece6d8;
  --mist: #9aa9a1;
  --brass: #b9985c;
  --brass-hi: #d4b57a;

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --text: "Schibsted Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --bar: clamp(28px, 7vh, 72px);           /* letterbox bar height */
  /* Letterbox vignette: solid only at the very edge, then a long eased fall-off into the picture */
  --vignette-top: linear-gradient(to bottom,
    rgb(7 11 9) 0, rgb(7 11 9) calc(var(--bar) * .55),
    rgb(7 11 9 / .9) var(--bar), rgb(7 11 9 / .74) calc(var(--bar) + 4vh),
    rgb(7 11 9 / .54) calc(var(--bar) + 9vh), rgb(7 11 9 / .34) calc(var(--bar) + 15vh),
    rgb(7 11 9 / .18) calc(var(--bar) + 22vh), rgb(7 11 9 / .07) calc(var(--bar) + 29vh),
    rgb(7 11 9 / 0) calc(var(--bar) + 36vh));
  --vignette-bottom: linear-gradient(to top,
    rgb(7 11 9) 0, rgb(7 11 9) calc(var(--bar) * .55),
    rgb(7 11 9 / .9) var(--bar), rgb(7 11 9 / .76) calc(var(--bar) + 4vh),
    rgb(7 11 9 / .57) calc(var(--bar) + 10vh), rgb(7 11 9 / .37) calc(var(--bar) + 17vh),
    rgb(7 11 9 / .2) calc(var(--bar) + 25vh), rgb(7 11 9 / .08) calc(var(--bar) + 33vh),
    rgb(7 11 9 / 0) calc(var(--bar) + 40vh));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--bone);
  font-family: var(--text); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* Film grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.6rem;
  font: 500 .95rem/1 var(--text); letter-spacing: .02em; border-radius: 2px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--brass { background: var(--brass); color: var(--black); }
.btn--brass:hover { background: var(--brass-hi); }
.btn--line { border-color: rgba(236,230,216,.4); color: var(--bone); background: transparent; }
.btn--line:hover { border-color: var(--bone); }

/* Age gate */
.gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--gutter); background: var(--black); }
.gate[hidden] { display: none; }
.gate__inner { max-width: 30rem; text-align: center; }
.gate__brand { font-family: var(--display); font-size: 1.5rem; color: var(--brass); margin: 0 0 1.5rem; }
.gate h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.1; }
.gate__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 1.5rem; }
.gate__fine { color: var(--mist); font-size: .875rem; margin: 0; }

/* Nav: sits inside the top letterbox bar */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter);
}
.nav__mark { font-family: var(--display); font-size: 1.3rem; text-decoration: none; }
.nav nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); font-size: .875rem; color: var(--mist); }
.nav nav a { text-decoration: none; }
.nav nav a:hover { color: var(--bone); }

/* Timeline: centred on the film itself, just above the lower bar. The current date sits
   over a hairline that fills as you move through the story; ticks mark each chapter. */
.timeline {
  position: fixed; left: 50%; bottom: calc(var(--bar) + clamp(1rem, 3.5vh, 2.25rem)); z-index: 30;
  width: min(30rem, 72vw); transform: translateX(-50%);
  display: grid; justify-items: center; gap: .6rem; pointer-events: none;
  opacity: 0; transition: opacity .6s ease;
}
.timeline.is-visible { opacity: 1; }
.timeline__label {
  font-family: var(--text); font-size: .75rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: rgba(236,230,216,.85); text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.timeline__track { position: relative; width: 100%; height: 1px; background: rgba(236,230,216,.28); }
.timeline__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--brass-hi); transform-origin: left; transform: scaleX(0); }
.timeline__tick { position: absolute; top: -3px; width: 1px; height: 7px; background: rgba(236,230,216,.55); }
/* On phones the section links go, but the Meta Mind credit stays in the bar */
@media (max-width: 640px) {
  .nav nav { gap: 0; }
  .nav nav a:not(.mm-credit) { display: none; }
  .nav nav a.mm-credit--nav { margin-left: 0; padding-left: 0; border-left: 0; gap: .45rem; font-size: .75rem; }
  .nav nav a.mm-credit--nav img { height: 15px; }
}

/* Title card */
.titlecard {
  min-height: 100vh; min-height: 100svh; display: grid; place-content: center; text-align: center;
  padding: calc(var(--bar) + 2rem) var(--gutter); background: radial-gradient(70% 60% at 50% 50%, var(--bottle), var(--black) 75%);
}
.titlecard__kicker { margin: 0 0 1.5rem; color: var(--brass); font-size: .9375rem; letter-spacing: .04em; }
.titlecard h1 { font-size: clamp(3.2rem, 9vw, 8.5rem); line-height: .92; letter-spacing: -.01em; }
.titlecard__sub { margin: 1.75rem 0 0; color: var(--mist); }
.titlecard__hint { margin: 4rem 0 0; font-size: .8125rem; color: rgba(236,230,216,.45); }
.titlecard > * { opacity: 0; transform: translateY(14px); animation: rise 1.4s cubic-bezier(.16,1,.3,1) forwards; }
.titlecard h1 { animation-delay: .25s; }
.titlecard__sub { animation-delay: .6s; }
.titlecard__hint { animation-delay: 1.1s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Films */
.film { position: relative; height: 420vh; background: var(--black); }
.film--finale { height: 560vh; }
.film--long { height: 620vh; }  /* the still plus the drop: 13 seconds of film */
.film__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film.is-fallback .film__video { display: none; }
/* Readability + letterbox bars that soften into the picture (top and bottom vignette) + fades to black at each chapter's start and end (main.js sets --fade) */
.film__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    var(--vignette-top), var(--vignette-bottom),
    radial-gradient(55% 45% at 50% 52%, rgba(7,11,9,.6), rgba(7,11,9,0) 72%);
}
.film--finale .film__shade {
  background:
    var(--vignette-top), var(--vignette-bottom),
    linear-gradient(to right, rgba(7,11,9,.7), rgba(7,11,9,.35) 32%, rgba(7,11,9,0) 46%);
}
.film__stage::after {
  content: ""; position: absolute; inset: 0; background: var(--black); pointer-events: none;
  opacity: var(--fade, 0);
}

/* Film effects only run while the reader scrolls: when the picture stops, so do the
   grain, flicker, scratches, wobble and light leaks, like a paused projector. */
html:not(.is-scrolling) body::after,
html:not(.is-scrolling) .film[data-era] .film__video,
html:not(.is-scrolling) .film__fx::before,
html:not(.is-scrolling) .film__fx::after { animation-play-state: paused !important; }

/* Soft-focus fade without a filter: while text fades, it is drawn as a blurred glow of
   itself (transparent letters, blurred text-shadow). Same look as blur(), and it avoids the
   stray seam Safari draws on filtered text. main.js sets --soft and toggles .is-soft. */
.is-soft, .is-soft * {
  color: transparent !important;
  text-shadow: 0 0 var(--soft, 4px) rgba(236, 230, 216, .95) !important;
}

/* Intertitles: one line on black between chapters, like a trailer's title cards */
.intertitles { position: fixed; inset: 0; z-index: 25; pointer-events: none; display: grid; place-items: center; }
.intertitle {
  grid-area: 1 / 1; margin: 0; padding: 0 var(--gutter); max-width: 40rem; text-align: center;
  font-family: var(--display); font-style: italic; font-size: clamp(1.9rem, 4vw, 3.6rem); line-height: 1.12;
  color: var(--bone); text-wrap: balance;
  opacity: 0; visibility: hidden;
  transform: translateY(calc((1 - var(--a, 0)) * 10px)) scale(calc(1.03 - .03 * var(--a, 0)));
}

/* Period looks for the past chapters. The video is graded with CSS filters; .film__fx
   adds the artefacts of the film stock of the day. The finale (today) stays clean. */
.film[data-era] .film__video { transform: scale(1.03); animation: weave .2s steps(2) infinite; }
@keyframes weave { 0% { transform: scale(1.03) translate(0, 0); } 50% { transform: scale(1.03) translate(.5px, -.7px); } }
.film__fx { position: absolute; inset: 0; pointer-events: none; }
.film__fx::before, .film__fx::after { content: ""; position: absolute; inset: -6%; }

/* 1890s: albumen-print sepia, flicker, scratches, heavy vignette */
/* Surviving photographs of 1890s Mauritius are albumen prints: monochrome with a warm
   brown tone. So the 1896 chapters are made fully monochrome first, then sepia-toned. */
.film[data-era="1890s"] .film__video { filter: grayscale(1) sepia(.92) saturate(1.15) contrast(1.16) brightness(.9); }
.film[data-era="1890s"] .film__fx::before {
  opacity: .5; mix-blend-mode: screen;
  background-image:
    linear-gradient(90deg, transparent 49.85%, rgba(255,246,225,.55) 50%, transparent 50.15%),
    linear-gradient(90deg, transparent 49.9%, rgba(255,246,225,.35) 50%, transparent 50.1%),
    radial-gradient(circle, rgba(255,246,225,.6) 0 1px, transparent 2px);
  background-size: 41% 100%, 67% 100%, 23% 31%;
  animation: scratches .5s steps(1) infinite;
}
@keyframes scratches {
  0%   { background-position: 12% 0, 70% 0, 10% 20%; opacity: .5; }
  25%  { background-position: 63% 0, 18% 0, 55% 70%; opacity: .25; }
  50%  { background-position: 31% 0, 88% 0, 80% 10%; opacity: .55; }
  75%  { background-position: 84% 0, 40% 0, 30% 90%; opacity: .2; }
}
.film[data-era="1890s"] .film__fx::after {
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(20,12,4,.72));
  animation: flicker .14s steps(2) infinite;
}
@keyframes flicker { 0% { opacity: 1; } 50% { opacity: .82; } }

/* 1960s: saturated Kodachrome warmth, light dust, soft vignette */
.film[data-era="1960s"] .film__video { filter: sepia(.18) saturate(.92) contrast(1.05) hue-rotate(-6deg); }
.film[data-era="1960s"] .film__fx::before {
  opacity: .35; mix-blend-mode: screen;
  background-image: radial-gradient(circle, rgba(255,250,235,.7) 0 1px, transparent 1.6px);
  background-size: 19% 27%; animation: dust .4s steps(1) infinite;
}
@keyframes dust { 0% { background-position: 10% 30%; } 33% { background-position: 60% 80%; } 66% { background-position: 35% 5%; } }
.film[data-era="1960s"] .film__fx::after { background: radial-gradient(ellipse 80% 75% at 50% 50%, transparent 55%, rgba(30,18,6,.5)); }

/* 1970s: faded warm 16mm, lifted blacks, a slow drifting light leak */
.film[data-era="1970s"] .film__video { filter: sepia(.3) saturate(.85) contrast(.9) brightness(1.06); }
/* The crate scene is pale to begin with, so it keeps more of its colour than the still */
#ch5 .film__video { filter: sepia(.08) saturate(1.4) contrast(1.04) brightness(1.03); }
#ch5 .film__fx::before { animation: none; opacity: .28; }
#ch5 .film__fx::after { opacity: .6; }
.film[data-era="1970s"] .film__fx::before {
  mix-blend-mode: screen; opacity: .55;
  background: radial-gradient(40% 60% at 0% 30%, rgba(255,120,40,.55), transparent 70%),
              radial-gradient(30% 50% at 100% 80%, rgba(255,170,90,.35), transparent 70%);
  animation: leak 9s ease-in-out infinite alternate;
}
@keyframes leak { from { opacity: .25; } to { opacity: .6; } }
.film[data-era="1970s"] .film__fx::after { background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 60%, rgba(25,14,6,.45)); }

/* Chapter cards: centred like trailer titles. main.js sets --a (0 -> 1) as each card arrives:
   it fades up and settles in scale. Only transform and opacity animate: no reflow, and
   no filter on text (Safari draws a stray seam on blurred text). */
.beat { position: absolute; z-index: 2; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.card {
  left: 50%; top: 50%; width: min(52rem, calc(100% - 2 * var(--gutter)));
  transform: translate(-50%, calc(-50% + var(--y, 0px))) scale(calc(1.04 - .04 * var(--a, 1)));
  text-align: center;
}
.card__year {
  margin: 0 0 1.1rem; font-family: var(--text); font-size: clamp(.8rem, 1vw, .95rem); font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase; color: var(--brass-hi);
}
.card h2 {
  font-size: clamp(3rem, 7.4vw, 7.2rem); line-height: .94; text-wrap: balance;
  letter-spacing: -.01em;
}
.card p:not(.card__year) { margin: 1.4rem auto 0; color: rgba(236,230,216,.88); max-width: 30rem; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.card--quote blockquote { margin: 0; }
.card--quote p { font-family: var(--display); font-style: italic; font-size: clamp(1.7rem, 3.4vw, 3.1rem) !important; line-height: 1.14; color: var(--bone) !important; max-width: 46rem !important; }
.card--quote footer { margin-top: 1.25rem; color: var(--mist); font-size: .9375rem; }
.card--end h2 { font-size: clamp(3.4rem, 8.4vw, 8rem); }
.card--side {
  /* Finale: the bottle stands in the centre, so its titles sit to the left of it */
  left: var(--gutter); width: min(30rem, 38vw); text-align: left;
  transform: translate(0, calc(-50% + var(--y, 0px))) scale(calc(1.04 - .04 * var(--a, 1)));
  transform-origin: left center;
}
.card--side p:not(.card__year) { margin-left: 0; }
.card--side h2 { font-size: clamp(2.6rem, 5vw, 5.4rem) !important; }
@media (max-width: 760px) {
  .card--side { left: 50%; width: calc(100% - 2 * var(--gutter)); top: auto; bottom: calc(var(--bar) + 1.5rem); text-align: center;
    transform: translate(-50%, var(--y, 0px)); }
  .card--side p:not(.card__year) { margin-left: auto; }
}
.card--line h2 { font-size: clamp(2.4rem, 5.4vw, 5rem); }

/* Tasting notes */
.kicker { font-family: var(--text); font-size: .9375rem; font-weight: 500; color: var(--brass); margin: 0 0 3rem; letter-spacing: .02em; }
/* Fades in from the black of the film above, so there is no hard edge where the film ends */
.taste { background: linear-gradient(to bottom, var(--black) 0, var(--ink) min(45vh, 420px) calc(100% - min(30vh, 280px)), #080f0c 100%); padding: clamp(6rem, 14vw, 11rem) 0 clamp(4rem, 9vw, 7rem); }
.taste__notes { margin: 0; display: grid; gap: 0; }
.taste__notes div {
  display: grid; grid-template-columns: minmax(8rem, 3fr) 7fr; gap: 2rem; align-items: baseline;
  padding: 2rem 0; border-top: 1px solid rgba(236,230,216,.12);
}
.taste__notes dt { font-family: var(--display); font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1; }
.taste__notes dd { margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: rgba(236,230,216,.8); max-width: 34rem; }
.taste__facts {
  margin: 3.5rem 0 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 1rem 4rem;
  padding-top: 2rem; border-top: 1px solid rgba(236,230,216,.12);
}
.taste__facts dt { font-size: .8125rem; color: var(--mist); }
.taste__facts dd { margin: .3rem 0 0; font-family: var(--display); font-size: 1.5rem; color: var(--brass-hi); }
@media (max-width: 760px) {
  .taste__notes div { grid-template-columns: 1fr; gap: .5rem; }
  .taste__facts { grid-template-columns: repeat(2, auto); gap: 1.5rem 3rem; }
}

/* Range + buy */
/* The bottle photo was lit on the page's own dark green, so the glass reads clear; its
   edges are feathered away so the photo has no visible frame */
.range { background: #080f0c; padding: clamp(6rem, 13vw, 10rem) 0; }
.range__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.range__bottle {
  justify-self: center; height: min(78vh, 900px); aspect-ratio: 9 / 16;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}
.range__spin { width: 100%; height: 100%; object-fit: cover; display: block; background: #080f0c;
  opacity: 0; transition: opacity .7s ease; }   /* hidden until the spin starts, so it never jumps */
.range__spin.is-spinning { opacity: 1; }
.range__list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.range__list a {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1.5rem;
  padding: 1.25rem 0; text-decoration: none; border-top: 1px solid rgba(236,230,216,.12);
}
.range__list li:last-child a { border-bottom: 1px solid rgba(236,230,216,.12); }
.range__name { font-family: var(--display); font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1; transition: color .25s ease; }
.range__note { color: var(--mist); font-size: .9375rem; }
.range__list a:hover .range__name, .range__list .is-current .range__name { color: var(--brass-hi); }
.range__maker { color: var(--mist); margin: 0 0 2rem; max-width: 30rem; }
@media (max-width: 860px) {
  .range__grid { grid-template-columns: 1fr; }
  .range__bottle { height: min(56vh, 560px); }
}

/* Footer */
.foot { background: var(--black); color: var(--mist); padding: 3.5rem 0 calc(3.5rem + var(--bar)); font-size: .9375rem; border-top: 1px solid rgba(236,230,216,.08); }
.foot__grid { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 2rem; align-items: start; }
.foot p { margin: 0; }
.foot__mark { font-family: var(--display); font-size: 1.4rem; color: var(--bone); margin-bottom: .5rem !important; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr; } }

/* Reveal for the closing sections */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.16,1,.3,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .film[data-era] .film__video, .film__fx::before, .film__fx::after { animation: none !important; }
  .titlecard > * { animation: none; opacity: 1; transform: none; }
  .film { height: auto; }
  .film__stage { position: relative; height: auto; min-height: 100svh; display: grid; align-content: end; padding: 6rem 0; }
  .film__stage::after { display: none; }
  .beat { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; filter: none; margin: 1.5rem auto; }
  .timeline { display: none; }
  .intertitles { position: static; display: block; }
  .intertitle { opacity: 1; visibility: visible; transform: none; filter: none; margin: 4rem auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Hosted on meta-mind-lab.com as a portfolio concept */
.foot__note { margin: 2rem 0 0 !important; padding-top: 1.5rem; border-top: 1px solid rgba(236,230,216,.08); font-size: .8125rem; color: rgba(154,169,161,.8); max-width: 52rem; }

/* Meta Mind credit: "A concept by" + the Meta Mind Lab logo */
.mm-credit { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--mist); font-family: var(--text); font-size: .8125rem; letter-spacing: .02em; }
.mm-credit img { height: 18px; width: auto; display: block; opacity: .92; transition: opacity .2s ease; }
.mm-credit:hover img { opacity: 1; }
.mm-credit:hover span { color: var(--bone); }
.nav nav .mm-credit--nav { margin-left: .5rem; padding-left: 1.25rem; border-left: 1px solid rgba(236,230,216,.18); }
.titlecard__credit { margin: 2.25rem 0 0; display: flex; justify-content: center; animation-delay: .85s; }
.titlecard__credit .mm-credit { font-size: .875rem; }
.titlecard__credit .mm-credit img { height: 24px; }
.foot__credit .mm-credit img { height: 22px; }
@media (max-width: 640px) { .titlecard__credit { margin-top: 1.75rem; } }
