/* LUISA — Monterosso al Mare
   Minimal vitrine. Engraved gold frame as a closed glass case,
   one editorial left-spine, the scrubbed film as the page.
   Only warm, sensual, jewel colours. Gold is rationed. */

:root {
  --ink:      #130b0c;   /* deep bordeaux-black */
  --ink-2:    #1c1011;
  --mat:      #0d0708;   /* matting: a hair darker than --ink — the vitrine interior reads faintly lifted */
  --ivory:    #efe7d7;   /* text */
  --ivory-read:  rgba(239,231,215,.72); /* ALL reading copy — passes AA over scrim+film */
  --ivory-dim:   rgba(239,231,215,.64); /* meta ONLY: side-label, .rit .meta, footer small, timecode — AA over the brighter film frames */
  --ivory-faint: rgba(239,231,215,.14);
  --wine:     #8a1c28;   /* rosso ancora */
  --green:    #1f4436;   /* Gucci green — stripe only */
  --gold:     #c8a24a;   /* metallic gold */
  --gold-soft:  rgba(200,162,74,.34);   /* hairlines / borders */
  --wax:      #e8c874;   /* a lit gold — ONLY the progress hairline's leading edge */
  --gold-ember: rgba(200,162,74,.06);   /* corner wax-glow inside the frame */
  --skin:     #cf9a80;   /* nude — italic emphasis */

  --frame-inset: clamp(12px, 1.8vw, 24px); /* drives .frame inset AND .mat width — they can never drift */
  --spine:        clamp(2.4rem, 6vw, 5rem);
  --measure-right: clamp(2.4rem, 6vw, 5rem);
  --h2: clamp(2.6rem, 5.4vw, 4.6rem);
  --s1: .5rem; --s2: .75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.5rem; --s6: 4rem;

  --display: "Cormorant Garamond", "Georgia", serif;
  --sans:    "Jost", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* candle-in-the-corner bloom + fine grain — light clings to the brass, the centre stays inky */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 88% -8%, var(--gold-ember), transparent 52%),
    radial-gradient(80% 70% at 4% 108%, rgba(138,28,40,.10), transparent 58%),
    radial-gradient(60% 55% at 96% 72%, rgba(31,68,54,.10), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- THE VITRINE ---------- */
/* The mat: one fixed element; the border IS the mat, filling the exact margin ring
   from screen edge to the gold line, four sides, driven by the shared --frame-inset.
   Content at z2 entering the ring is cleanly occluded — it disappears AT the glass. */
.mat {
  position: fixed; inset: 0; z-index: 10; pointer-events: none;
  border-style: solid; border-color: var(--mat);
  border-width: var(--frame-inset);
  box-sizing: border-box;
}
/* Inner breath: type dissolves into ink ~42px before it reaches the top/bottom gold line.
   Left/right need none — the spine and --measure-right keep text far from the vertical glass. */
.mat-fade {
  position: fixed; inset: var(--frame-inset); z-index: 11; pointer-events: none;
  background:
    linear-gradient(180deg, var(--ink) 0, transparent 42px),
    linear-gradient(0deg,   var(--ink) 0, transparent 42px);
}

/* engraved gold frame — the only ornament, and it earns it */
.frame {
  position: fixed; inset: var(--frame-inset); z-index: 15; pointer-events: none;
  border: 1px solid var(--gold-soft);
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px rgba(200,162,74,.12);
  background:
    radial-gradient(28% 22% at 100% 0, var(--gold-ember), transparent 70%),
    radial-gradient(28% 22% at 0 0,   var(--gold-ember), transparent 70%);
}
.frame i.c { position: absolute; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.frame i.tl { top: -4px; left: -4px; } .frame i.tr { top: -4px; right: -4px; }
.frame i.bl { bottom: -4px; left: -4px; } .frame i.br { bottom: -4px; right: -4px; }

/* the film's playhead — a taut 1px thread on the frame's left inner rail */
.progress {
  position: fixed; left: var(--frame-inset); top: var(--frame-inset);
  width: 1px; height: 0; z-index: 16; transform-origin: top; pointer-events: none;
  background: linear-gradient(var(--wax), var(--gold));
}

/* vertical editorial label */
.side-label {
  position: fixed; left: clamp(20px, 2.2vw, 34px); top: 50%;
  transform: translateY(-50%); writing-mode: vertical-rl; text-orientation: mixed;
  z-index: 16; font-size: .58rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--ivory-dim); rotate: 180deg;
}

.wrap {
  position: relative; z-index: 2;
  margin-left: var(--spine);
  margin-right: var(--measure-right);
  max-width: min(1140px, 100% - var(--spine) - var(--measure-right));
}

/* ---------- scroll-scrub video (the page IS the film) ---------- */
.scrollvid {
  position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none;
}
.scrollvid.on { opacity: .8; }  /* reduce/fallback resting value; JS drives the beat otherwise */
.scrim {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(19,11,12,.62), rgba(19,11,12,.42) 40%, rgba(19,11,12,.82)),
    radial-gradient(80% 60% at 50% 40%, transparent, rgba(19,11,12,.35));
}
/* lower sections float over the SAME video — no opaque panel, so the film runs top → bottom.
   The fixed .scrim keeps the ivory text legible over it. */
.solid { position: relative; z-index: 2; }

/* ---------- house stripe + monogram + fleuron ---------- */
.stripe {
  height: 3px; width: 62px;
  background: linear-gradient(90deg, var(--green) 0 38%, var(--wine) 38% 62%, var(--green) 62% 100%);
}
.monogram {
  position: relative; width: 44px; height: 34px; display: inline-block;
  font-family: var(--display); color: var(--gold); font-size: 2.1rem; line-height: 1;
}
.monogram span { position: absolute; top: 0; }
.monogram span:first-child { left: 6px; }
.monogram span:last-child { left: 20px; transform: scaleX(-1); opacity: .82; }

/* fleuron → a breath: two hairlines meeting a single 3px gold square */
.fleuron {
  display: flex; align-items: center; justify-content: center; gap: 1.3rem;
  color: var(--gold); margin: 0 auto;
}
.fleuron::before, .fleuron::after {
  content: ""; height: 1px; width: clamp(40px, 8vw, 90px); background: var(--gold-soft);
}
.fleuron b {
  display: inline-block; width: 3px; height: 3px; font-size: 0;
  background: var(--gold); transform: rotate(45deg);
}

/* ---------- type ---------- */
.eyebrow {
  font-size: .68rem; letter-spacing: .44em; text-transform: uppercase;
  color: var(--gold); font-weight: 400;
}
.display { font-family: var(--display); font-weight: 300; line-height: .98; letter-spacing: -.01em; }
em { font-style: italic; color: var(--skin); }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1.6rem, 3vw, 2.4rem) var(--measure-right) clamp(1.6rem, 3vw, 2.4rem) var(--spine);
}
nav::before {
  /* Clipped to start BELOW the frame's top rail + corner diamonds and inset off the
     side rails, so the ink veil never paints over the gold vitrine edge (frame z15). */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: calc(var(--frame-inset) + 6px); left: var(--frame-inset); right: var(--frame-inset); bottom: 0;
  background: linear-gradient(180deg, var(--ink) 30%, rgba(19,11,12,0));
}
.brand {
  display: flex; align-items: center; gap: 1.1rem; text-decoration: none;
}
.brand .name {
  font-family: var(--display); font-size: 1.4rem; letter-spacing: .42em;
  text-transform: uppercase; color: var(--ivory);
}
.nav-cta {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .34em;
  text-transform: uppercase; color: var(--ivory); text-decoration: none; position: relative;
}
.nav-cta::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width .6s var(--ease);
}
.nav-cta:hover::after { width: 100%; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  position: relative; padding: 0 var(--measure-right) 0 var(--spine);
}
.hero .eyebrow { margin-bottom: var(--s4); }
.hero .stripe { margin: 0 0 var(--s5); }
.hero h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(3.2rem, 11vw, 9.4rem); line-height: .9;
  letter-spacing: clamp(-.005em, -.4vw, -.022em); max-width: 14ch;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero-sub { margin-top: var(--s5); max-width: 36ch; color: var(--ivory-read); font-size: 1.05rem; }

/* timecode scroll-cue — the page is a film */
.scroll-hint {
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  font-size: .62rem; letter-spacing: .4em; text-transform: uppercase; color: var(--ivory-dim);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.scroll-hint .tc { font-feature-settings: "onum" 1, "tnum" 1; letter-spacing: .28em; }
.scroll-hint .drop { width: 1px; height: 44px; background: var(--ivory-faint); overflow: hidden; position: relative; display: block; }
.scroll-hint .drop::after {
  content: ""; position: absolute; top: -44px; left: 0; width: 1px; height: 44px;
  background: var(--gold); animation: drop 3.6s var(--ease) infinite;
}
@keyframes drop { 0% { top: -44px; } 60%, 100% { top: 44px; } }

/* ---------- sections ---------- */
section { position: relative; padding: clamp(6rem, 16vh, 13rem) 0; }
.divider { padding: 0; }

.method { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 8vw, 7rem); align-items: end; }
.method h2 { font-family: var(--display); font-weight: 300; font-size: var(--h2); line-height: 1; }
.method .eyebrow { margin-bottom: var(--s4); display: block; }
.method .lead { color: var(--ivory); font-size: 1.4rem; font-family: var(--display); font-style: italic; }
.method p.body { color: var(--ivory-read); font-size: 1.1rem; max-width: 46ch; margin-top: var(--s4); }
.method p.body.first::first-letter {
  font-family: var(--display); font-style: italic; font-size: 3.6em; line-height: .72;
  float: left; padding: .08em .14em 0 0; color: var(--ivory);
}
.hero h1 .p, .method h2 .p { color: var(--wine); }

/* the word resolves into focus — a beat after the setup */
.method .seduco { display: inline-block; }
.js .method .seduco.reveal    { letter-spacing: .06em; filter: blur(3px); }
.js .method .seduco.reveal.in {
  letter-spacing: -.01em; filter: blur(0);
  transition: opacity 1.1s var(--ease), letter-spacing 1.2s var(--ease), filter 1.2s var(--ease);
}

/* ---------- rituals ---------- */
.rituals .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3.4rem; flex-wrap: wrap; gap: 1rem; }
.rituals .head h2 { font-family: var(--display); font-weight: 300; font-size: var(--h2); line-height: 1; }
.rit-list { border-top: 1px solid var(--gold-soft); }
.rit {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline; padding: 2.3rem 0; border-bottom: 1px solid var(--ivory-faint);
  transition: border-color .6s var(--ease);
}
.rit:hover { border-bottom-color: var(--gold-soft); }
.rit .no { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.5rem; transition: color .6s var(--ease); }
.rit:hover .no { color: var(--ivory); }
.rit .name { font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 300; }
.rit .desc { display: block; font-family: var(--sans); font-size: .93rem; color: var(--ivory-read); margin-top: .5rem; max-width: 42ch; }
.rit .meta { text-align: right; color: var(--ivory-dim); font-size: .78rem; letter-spacing: .18em; white-space: nowrap; font-feature-settings: "onum" 1, "tnum" 1; }

.secret-line { margin-top: 4rem; text-align: center; }
.secret-line a {
  font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--ivory-dim);
  text-decoration: none; transition: color .8s var(--ease);
}
.secret-line a:hover { color: var(--wine); }
.secret-line a em { color: inherit; }

/* ---------- form ---------- */
.book { display: grid; grid-template-columns: 1fr 1.618fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.book h2 { font-family: var(--display); font-weight: 300; font-size: var(--h2); line-height: 1; }
.book .lead { color: var(--ivory-read); margin-top: var(--s4); max-width: 32ch; }
.book .stripe { margin-top: 2rem; }
form { display: grid; gap: 1.7rem; }
.field label { font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: .7rem; font-feature-settings: "onum" 1, "tnum" 1; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--gold-soft);
  color: var(--ivory); font-family: var(--sans); font-size: 1.02rem; font-weight: 300; padding: .5rem 0;
  transition: border-color .5s var(--ease);
}
.field textarea { resize: vertical; min-height: 3rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
button.submit:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.field select { -webkit-appearance: none; appearance: none; cursor: pointer; }
.field select option { background: var(--ink-2); color: var(--ivory); }
::placeholder { color: rgba(239,231,215,.28); }

button.submit {
  justify-self: start; margin-top: .4rem; background: transparent; border: 1px solid var(--gold);
  color: var(--ivory); font-family: var(--sans); font-size: .7rem; letter-spacing: .32em;
  text-transform: uppercase; padding: 1.1rem 2.6rem; cursor: pointer; position: relative; overflow: hidden;
}
button.submit span { position: relative; z-index: 2; }
button.submit::before {
  content: ""; position: absolute; inset: 0; background: var(--wine); z-index: 1;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
button.submit:hover::before { transform: translateY(0); }
.form-done {
  color: var(--gold); font-family: var(--display); font-style: italic; font-size: 1.3rem;
  display: none; opacity: 0; transition: opacity 1.1s var(--ease);
}
.form-done.in { opacity: 1; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--gold-soft); margin-top: 2rem;
  padding: 2.6rem var(--measure-right) 2.6rem var(--spine); display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem; position: relative; z-index: 2;
}
footer .f-brand { font-family: var(--display); letter-spacing: .3em; }
footer small { color: var(--ivory-dim); font-size: .7rem; letter-spacing: .12em; }
.dot { color: var(--ivory-faint); text-decoration: none; padding: 0 .4rem; transition: color .8s var(--ease); }
.dot:hover { color: var(--wine); }

/* ---------- reveal (progressive enhancement) ----------
   Content is visible by DEFAULT. Only when JS is present (<html class="js">)
   is it hidden, then revealed on scroll — so it can never get stuck invisible. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .12s; }
.reveal[data-d="2"] { transition-delay: .24s; }
.reveal[data-d="3"] { transition-delay: .36s; }
.reveal[data-d="4"] { transition-delay: .48s; }

/* masked hero line-rise — control (the crop) releasing into surrender (the phrase) */
.js .hero h1 .in { display: block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.js .hero h1 .in.rise { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero h1 .in { transform: none; transition: none; }
  .js .method .seduco.reveal { letter-spacing: -.01em; filter: none; }
  .scroll-hint .drop::after { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) { .side-label { display: none; } }
@media (max-width: 820px) {
  .method, .book { grid-template-columns: 1fr; gap: 2.2rem; }
  .rit { grid-template-columns: 2.4rem 1fr; }
  .rit .meta { grid-column: 2; text-align: left; }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 5rem); }
}

/* ---------- secret page ---------- */
.oltre .hero h1 { max-width: 16ch; }
.oltre-note {
  margin-top: var(--s6); padding: 1.7rem 1.9rem; border: 1px solid var(--gold-soft);
  color: var(--ivory-read); font-size: .9rem; max-width: 52ch;
}
.back { display: inline-block; margin-top: 2rem; font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.back:hover { color: var(--ivory); }
