/* ═══════════════════════════════════════════════════════════
   TUCKED
   One day, morning to night. Tokens below are rewritten every
   frame by tucked.js — never put a transition on them.
   ═══════════════════════════════════════════════════════════ */

:root{
  --bg:#F2F0EC;
  --ink:#26221E;
  --veil:#EFE9DF;

  --serif:"Bodoni Moda","Didot","Bodoni 72","Times New Roman",serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;

  --gutter:clamp(1.25rem,5vw,5.5rem);
  --max:1600px;
  --ease:cubic-bezier(.16,1,.3,1);

  --rule:color-mix(in srgb, var(--ink) 16%, transparent);
  --soft:color-mix(in srgb, var(--ink) 62%, transparent);
}

*,*::before,*::after{box-sizing:border-box;border-radius:0}

html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-weight:300;
  font-size:clamp(.95rem,.9rem + .2vw,1.0625rem);
  line-height:1.75;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none;margin:0;padding:0}
h1,h2,h3,h4,p{margin:0}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}


/* ─── woven ground ─────────────────────────────────────────
   Real linen, high-passed to pure weave and healed to tile.
   Overlay keeps mid-grey neutral, so it adds structure to
   both the white morning and the near-black night.          */
.grain{
  position:fixed;inset:0;z-index:60;pointer-events:none;
  background-image:url(../img/linen-grain.png);
  background-size:220px 220px;
  mix-blend-mode:overlay;
  opacity:.15;
}


/* ─── navigation ──────────────────────────────────────────── */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:100;
  display:flex;align-items:baseline;justify-content:space-between;
  gap:2rem;
  padding:clamp(1.1rem,2.4vw,1.9rem) var(--gutter);
  color:var(--ink);
  /* opacity and translate only — `color` carries the day and must never
     transition, or the ink lags a frame behind the ground it sits on. */
  transition:opacity .45s var(--ease),translate .45s var(--ease);
}
.nav.is-away{opacity:0;translate:0 -100%;pointer-events:none}
/* the nav carries the day with everything else — espresso on
   white at 7am, ivory on near-black by midnight. No bar, ever. */
.nav__mark{
  font-family:var(--serif);
  font-size:clamp(1.15rem,1.9vw,1.5rem);
  letter-spacing:-.01em;
}
.nav__links{display:flex;gap:clamp(1.1rem,2.6vw,2.6rem);align-items:baseline}
.nav__links a{
  font-size:.64rem;text-transform:uppercase;letter-spacing:.26em;
  font-weight:400;padding-bottom:.2rem;
  border-bottom:1px solid transparent;transition:border-color .5s var(--ease);
}
.nav__links a:hover{border-bottom-color:currentColor}
/* The page is one scroll, so on a phone the wordmark is the whole nav. Three
   tracked-out uppercase links across a 375px screen is where a site starts
   looking like a template. */
@media(max-width:700px){
  .nav__links{display:none}
}


/* ─── the running clock ───────────────────────────────────── */
.clock{
  position:fixed;left:var(--gutter);bottom:clamp(1.1rem,2.4vw,1.9rem);z-index:100;
  display:flex;flex-direction:column;gap:.15rem;
  color:var(--ink);
  transition:opacity .5s var(--ease);
}
.clock.is-away{opacity:0;pointer-events:none}
.clock__time{
  font-size:.64rem;letter-spacing:.24em;font-variant-numeric:tabular-nums;
}
.clock__time i{font-style:normal;opacity:.5}
.clock__moment{
  font-size:.58rem;text-transform:uppercase;letter-spacing:.3em;opacity:.5;
}
@media(max-width:700px){.clock{display:none}}


/* ─── shared type ─────────────────────────────────────────── */
.display{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(2.6rem,8.4vw,8.5rem);
  line-height:.98;letter-spacing:-.018em;
}
.display em{font-style:italic}
.display--mid{font-size:clamp(2.1rem,5.6vw,5.4rem)}

.heading{
  font-family:var(--sans);font-weight:300;
  font-size:clamp(1.6rem,3vw,2.7rem);
  line-height:1.18;letter-spacing:-.015em;
}
.heading--serif{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(2rem,4.2vw,4rem);line-height:1.04;
}

.label{
  font-size:.62rem;text-transform:uppercase;letter-spacing:.3em;
  font-weight:400;color:var(--soft);
}

.prose{max-width:38ch;color:var(--soft);margin-top:1.4rem}
.prose--wide{max-width:52ch}

.notes{
  margin-top:1rem;font-size:.78rem;letter-spacing:.12em;
  text-transform:lowercase;color:var(--soft);
}

.rule{height:1px;background:var(--rule);width:100%;margin:0}

.link{
  display:inline-block;margin-top:2rem;
  font-size:.66rem;text-transform:uppercase;letter-spacing:.26em;
  border-bottom:1px solid var(--rule);padding-bottom:.45rem;
  transition:border-color .5s var(--ease);
}
.link span{display:inline-block;transition:transform .5s var(--ease)}
.link:hover{border-bottom-color:currentColor}
.link:hover span{transform:translateX(.35rem)}


/* ─── reveals ─────────────────────────────────────────────── */
.reveal{
  opacity:0;transform:translateY(16px);
  transition:opacity 1.5s var(--ease),transform 1.5s var(--ease);
}
.reveal.is-in{opacity:1;transform:none}


/* ─── pinned photographic plates ──────────────────────────── */
.scene{position:relative}

.plate{
  position:sticky;top:0;height:100vh;height:100svh;
  margin:0;overflow:hidden;z-index:0;
}
/* `scale` breathes here, `translate` is driven by tucked.js —
   separate transform properties, so they compose without fighting */
.plate img{
  width:100%;height:100%;object-fit:cover;
  scale:1.09;will-change:translate,scale;
  animation:fabric 26s ease-in-out infinite alternate;
}
@keyframes fabric{from{scale:1.075}to{scale:1.115}}
.plate__veil{
  position:absolute;inset:0;z-index:2;background:var(--veil);
  opacity:0;will-change:opacity;
}
/* The same linen, re-lit. Grading lives here rather than in the JPEG so one
   sharp file can hold two hours of the day without being encoded twice.
   The source is flat-lit, so a filter alone only makes it muddy — the lamp
   has to be added as an actual pool of light falling from one corner. */
.plate--lamplight img{
  filter:brightness(.6) contrast(1.24) saturate(1.9) sepia(.42) hue-rotate(-14deg);
}
/* The lamp sits upper right, opposite the headline. Put it anywhere near the
   type and the brightest part of the frame lands under the lightest ink. */
.plate--lamplight::after{
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(58% 46% at 80% 20%,
      rgba(255,183,101,.40), rgba(255,146,62,.13) 44%, transparent 70%),
    radial-gradient(118% 104% at 80% 18%,
      transparent 10%, rgba(20,12,6,.52) 48%, rgba(9,5,3,.88));
}
/* the same linen, sixteen hours later */
.plate--moonlight img{
  filter:brightness(.3) contrast(1.16) saturate(.55) hue-rotate(188deg);
}


/* ─── 01 · opening ────────────────────────────────────────── */
/* The cover photograph is portrait and is shown whole, so on a landscape screen
   it can never fill the width without cropping. Rather than letterbox it by
   accident, the opening is built as a mounted print: the picture is centred on
   the ivory ground and the wordmark sits beneath it. That also keeps the type
   off the photograph, which is bright sea on one half and dark curtain on the
   other — there is no region where overlaid ink stays legible at every width. */
.scene--open{height:215vh}
/* The cover fills the screen like every other plate, but it is the one image
   held at 1:1 — no breathing scale, no parallax. The source is portrait, so a
   wide screen already crops it hard to a band; zooming on top of that is what
   makes it read soft. 2400px wide covers a 2x display without upscaling. */
.plate--cover img{
  scale:1;animation:none;
  translate:none!important;          /* tucked.js skips it; this guards a reorder */
  object-position:50% 42%;           /* holds the horizon just above centre */
}
/* The photograph is bright sea on the left and a dark door and curtain on the
   right, and the nav, clock and enter cue all cross that dark half. Since the
   ink is dark, the wash here is IVORY, not black — it lifts the two corners
   where chrome sits instead of dimming the picture. Both stops fade to
   transparent well before the middle, so the frame itself is untouched. */
.plate--cover::after{
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    linear-gradient(to bottom,
      rgba(239,233,223,.66) 0, rgba(239,233,223,.40) 40%, transparent 100%) top/100% 16rem no-repeat,
    linear-gradient(to top,
      rgba(239,233,223,.72) 0, rgba(239,233,223,.42) 42%, transparent 100%) bottom/100% 11rem no-repeat;
}
/* On a phone the frame is cropped much harder: the lit sea only reaches about
   x=180 of 375, and even there it is a mid-tone that gives small type roughly
   4:1 — short of AA. Past the doorframe it falls off a cliff to 1.1:1. No
   object-position fixes it (every value was measured). So the left column,
   where all the type lives, gets a soft ivory scrim: it lifts the type zone
   instead of dimming the picture, and fades out well before the doorframe so
   it never reads as a panel. */
@media(max-width:700px){
  .plate--cover::after{
    background:
      linear-gradient(to bottom,
        rgba(239,233,223,.66) 0, rgba(239,233,223,.40) 40%, transparent 100%) top/100% 16rem no-repeat,
      linear-gradient(to top,
        rgba(239,233,223,.80) 0, rgba(239,233,223,.52) 42%, transparent 100%) bottom/100% 13rem no-repeat,
      linear-gradient(to right,
        rgba(239,233,223,.62) 0, rgba(239,233,223,.44) 46%, transparent 88%) left/70% 100% no-repeat;
  }
}

/* Ranged left, not centred. The cover is bright sea on the left and a dark
   door and curtain on the right, so centred type always has half a word on
   each — the fix is to sit the type on the light side rather than to darken
   the photograph. This also matches the display headlines further down. */
.open__type{
  position:absolute;top:0;left:0;right:0;height:100vh;height:100svh;z-index:3;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  padding:0 var(--gutter);text-align:left;
}
/* Capped so the word stays inside the lit half at every width. */
.open__mark{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(3.4rem,11vw,9.5rem);
  line-height:.85;letter-spacing:-.035em;
}
.open__sub{
  margin-top:clamp(1.2rem,2.5vw,2rem);
  font-size:clamp(.8rem,1.15vw,1rem);
  letter-spacing:.2em;color:var(--soft);
  /* Held to the lit half of the cover; left to run full width it crosses the
     dark doorframe on a narrow screen and the tail of the line disappears. */
  max-width:min(28rem,62%);
}
/* Sits just above the fold of the first screen. `bottom` would have put it at
   the foot of the whole 215vh opening scene — a scroll cue you can only see
   once you have already scrolled. Anchoring to the fold line and lifting it by
   its own height keeps it independent of however tall the scene is. */
.enter{
  position:absolute;left:var(--gutter);z-index:3;
  top:100vh;top:100svh;
  translate:0 -100%;
  margin-top:calc(-1 * clamp(2.2rem,5vw,3.4rem));
  font-size:.62rem;text-transform:uppercase;letter-spacing:.3em;
}
.enter span{display:block;margin-top:.7rem;font-size:.85rem;animation:breathe 3.4s var(--ease) infinite}
@keyframes breathe{0%,100%{transform:translateY(0);opacity:.45}50%{transform:translateY(5px);opacity:1}}

/* Must come after the base rule above, or the wider cap wins on specificity.
   On a phone the sub-line has to stop short of the doorframe at x≈180 of 375
   — past it the photograph drops to 1.1:1 and the tail of the line vanishes. */
@media(max-width:700px){
  .open__sub{max-width:44%}
}


/* ─── 02 · statement ──────────────────────────────────────── */
/* This was bare ground, which read as a dead screen between the cover and the
   morning editorial. It is a full-bleed plate now, so the cover flows straight
   on into fabric. The linen stand-in is only 1200px wide, so the breathing
   scale and the parallax are both off here — at full bleed any extra zoom is
   exactly what turns a weave into a blur. */
.plate--linen img{
  scale:1;animation:none;
  translate:none!important;            /* no data-drift; this guards a reorder */
  object-position:50% 38%;             /* keeps the fold below the headline */
}


/* ─── editorial splits ────────────────────────────────────── */
.scene--editorial{
  display:grid;gap:clamp(2.5rem,6vw,6rem);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center;
  padding:clamp(4rem,11vw,10rem) var(--gutter);
  max-width:var(--max);margin-inline:auto;
}
.scene--flip .frame{order:2}
.frame{margin:0;overflow:hidden}
.frame img{width:100%;height:100%;object-fit:cover}
.frame--tall{aspect-ratio:4/5}
/* Both room photographs were shot under cool daylight against a blue-grey wall,
   which reads cold beside an ivory ground. Warming happens here, not in the
   JPEG, so the source files stay neutral if the palette ever moves. */
.frame--warm img,
.plate--warm img{
  filter:sepia(.2) saturate(.78) hue-rotate(-8deg) brightness(1.03) contrast(1.03);
}
.editorial__body .heading{margin-top:1.6rem}
@media(max-width:860px){
  .scene--editorial{grid-template-columns:1fr}
  .scene--flip .frame{order:0}
}


/* Empty ground carrying the last wind-down tone stop. The light→dark ink flip
   happens between here and turn down, and it needs to cross nothing: no copy
   is legible mid-flip, so the day dims over bare colour and the lamp-lit plate
   arrives already dark. This used to be the tail of a scent index; with that
   gone the hold has to be the whole runway itself. */
.hold{height:100vh}


/* ─── full-bleed moments ──────────────────────────────────── */
.scene--full{height:215vh}
.full__type{
  position:sticky;top:0;margin-top:-100vh;height:100vh;height:100svh;z-index:3;
  display:flex;align-items:center;
  padding:0 var(--gutter);
  max-width:var(--max);margin-inline:auto;
}

/* ─── 07 · the rooms ──────────────────────────────────────── */
.scene--rooms{padding:clamp(5rem,12vw,10rem) 0}
.rooms__head{padding:0 var(--gutter);max-width:var(--max);margin:0 auto clamp(2.5rem,5vw,4rem)}
.rooms__head .prose{margin-top:1.2rem}
/* Four rooms, four columns, aligned to the same max-width and gutter as every
   other scene. As a fixed-width flex strip the fourth room was sliced in half
   by the right edge at every desktop size — which reads as a broken layout
   rather than as something that scrolls. */
.rooms__strip{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(1rem,2.2vw,2.5rem);
  padding:0 var(--gutter) 1.5rem;
  max-width:var(--max);margin-inline:auto;
}
/* A hairline between rooms, not a card around each — it should read as one
   continuous directory board. */
.room{
  display:flex;flex-direction:column;
  padding:1.6rem 0 0;border-top:1px solid var(--rule);
  min-height:clamp(11rem,18vw,14rem);
}
/* Below four-up it becomes a snapping strip, where being cut off is the point. */
@media(max-width:900px){
  .rooms__strip{
    display:flex;overflow-x:auto;scroll-snap-type:x mandatory;
    /* Snapping aligns to the scrollport edge, not the padding edge, so without
       this the first room snaps flush left and loses the gutter. */
    scroll-padding-left:var(--gutter);
    scrollbar-width:none;
  }
  .rooms__strip::-webkit-scrollbar{display:none}
  .room{flex:0 0 clamp(13rem,58vw,17rem);scroll-snap-align:start}
}
/* The season name carries the card now that the oversized numeral is gone, so
   it takes the weight the numeral was holding. */
.room__name{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(1.6rem,2.8vw,2.4rem);line-height:1.05;letter-spacing:-.015em;
}
.room__notes{margin-top:.55rem;font-size:.74rem;letter-spacing:.1em;color:var(--soft)}
.room__state{
  margin-top:auto;padding-top:1.6rem;
  font-size:.58rem;text-transform:uppercase;letter-spacing:.26em;color:var(--soft);
}
.room.is-now .room__state{color:var(--ink)}
.room.is-now{border-top-color:var(--ink)}


/* ─── 08 · do not disturb ─────────────────────────────────── */
/* The only scene with no photograph. It is also the deepest point of the
   night ground, so the type sits on bare colour and the extra height buys
   the darkness time to actually register before Room 001 arrives. */
.scene--dnd{
  min-height:160vh;                    /* the night needs room on the timeline:
                                          tone stops are measured from element
                                          centres, so a short scene would rush
                                          straight from turn down into Tucked */
  padding:clamp(9rem,22vw,20rem) var(--gutter);
  max-width:var(--max);margin-inline:auto;
}
.scene--dnd .display{margin-top:clamp(2.5rem,6vw,5rem)}


/* ─── 09 · room 001 ───────────────────────────────────────── */
.scene--room001{padding:clamp(4rem,10vw,8rem) var(--gutter) clamp(6rem,14vw,12rem);max-width:var(--max);margin-inline:auto}
.room001{
  display:grid;gap:clamp(2rem,6vw,6rem);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-top:clamp(2.5rem,6vw,5rem);
}
.room001 .heading--serif{margin-top:1.4rem}
@media(max-width:860px){.room001{grid-template-columns:1fr}}


/* ─── 10 · goodnight ──────────────────────────────────────── */
.scene--goodnight{height:260vh}
.goodnight__type{
  position:absolute;top:0;left:0;right:0;height:100vh;height:100svh;z-index:3;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:0 var(--gutter);
}
.goodnight__sub{
  margin-top:1.4rem;font-size:clamp(.82rem,1.15vw,1rem);
  letter-spacing:.2em;color:var(--soft);
}
.guestlist{
  position:relative;z-index:3;
  max-width:30rem;margin:34vh auto 0;padding:0 var(--gutter);text-align:center;
}
.guestlist__form{
  display:flex;align-items:center;gap:1rem;
  margin-top:1.4rem;border-bottom:1px solid color-mix(in srgb,var(--ink) 34%,transparent);
}
.guestlist__form input{
  flex:1;background:none;border:0;outline:0;color:var(--ink);
  font-family:var(--sans);font-size:1rem;font-weight:300;
  padding:.85rem 0;letter-spacing:.04em;
}
.guestlist__form input::placeholder{color:color-mix(in srgb,var(--ink) 40%,transparent)}
.guestlist__form button{
  background:none;border:0;color:var(--ink);cursor:pointer;
  font-size:1rem;padding:.5rem;
}
.guestlist__form button span{display:inline-block;transition:transform .5s var(--ease)}
.guestlist__form button:hover span{transform:translateX(.3rem)}
.guestlist__note{margin-top:1.1rem;font-size:.66rem;letter-spacing:.2em;color:var(--soft)}


/* ─── footer ──────────────────────────────────────────────── */
.foot{padding:0 var(--gutter) clamp(2rem,4vw,3rem);max-width:var(--max);margin-inline:auto}
.foot__grid{
  display:grid;gap:clamp(2rem,5vw,4rem);
  grid-template-columns:2fr repeat(2,1fr);
  padding:clamp(3rem,7vw,6rem) 0;
}
.foot__mark{font-family:var(--serif);font-size:clamp(1.5rem,2.6vw,2.2rem)}
.foot__line{margin-top:.8rem;font-size:.78rem;letter-spacing:.1em;color:var(--soft);max-width:24ch}
.foot__grid a{
  display:block;margin-top:.7rem;font-size:.78rem;color:var(--soft);
  transition:color .4s var(--ease);
}
.foot__grid a:first-of-type{margin-top:1.3rem}
.foot__grid a:hover{color:var(--ink)}
.foot__base{
  display:flex;justify-content:space-between;gap:1rem;
  padding-top:1.6rem;border-top:1px solid var(--rule);
  font-size:.62rem;text-transform:uppercase;letter-spacing:.24em;color:var(--soft);
}
@media(max-width:860px){
  .foot__grid{grid-template-columns:1fr 1fr}
  .foot__brand{grid-column:1/-1}
}


/* ─── reduced motion ──────────────────────────────────────── */
@media(prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none}
  .enter span,.plate img{animation:none}
  .nav,.clock{transition:none}
  *{scroll-behavior:auto!important}
}
