/* ==========================================================================
   MAWSEM — DAZZLE LAYER v2
   Scroll choreography · theme signatures · cinematic hero · micro-interactions
   Additive: overrides only where noted. Respects prefers-reduced-motion.
   ========================================================================== */

:root{
  --e-out:cubic-bezier(.22,1,.36,1);
  --e-in-out:cubic-bezier(.65,0,.35,1);
  --e-soft:cubic-bezier(.33,1,.68,1);
  --t-fast:240ms;
  --t-med:520ms;
  --t-slow:900ms;
  --d:1;                      /* motion intensity per direction */
  --sp:0;                     /* scroll progress 0..1 (JS) */
  --mx:50%; --my:50%;         /* pointer position (JS) */
}

html[data-direction="quiet-luxury"]{ --d:.55; --t-slow:1100ms; }
html[data-direction="grand-salon"]{ --d:1; --t-slow:1000ms; }
html[data-direction="mediterranean-estate"]{ --d:.8; --t-slow:950ms; }
html[data-direction="nocturne"]{ --d:.9; --t-slow:1000ms; }

/* --------------------------------------------------------------------------
   0 · smooth in-page scrolling + scroll-driven progress
   -------------------------------------------------------------------------- */
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

.scroll-progress{
  position:fixed; inset-block-start:0; inset-inline:0; height:2px;
  z-index:90; pointer-events:none; background:transparent;
}
.scroll-progress i{
  display:block; height:100%; width:100%;
  transform:scaleX(var(--sp)); transform-origin:0 50%;
  background:linear-gradient(90deg,var(--brand-accent),var(--brand-secondary));
  opacity:.85;
}
[dir="rtl"] .scroll-progress i{ transform-origin:100% 50%; }

/* --------------------------------------------------------------------------
   1 · opening veil (preloader) — theme-specific exits
   -------------------------------------------------------------------------- */
.veil{
  position:fixed; inset:0; z-index:300;
  display:grid; place-content:center; justify-items:center; gap:20px;
  background:var(--brand-bg); color:var(--brand-primary);
  transition:opacity 620ms var(--e-out), visibility 620ms;
}
.veil__mark{
  font-family:var(--font-display); font-size:clamp(1.5rem,3.2vw,2.6rem);
  letter-spacing:.42em; text-indent:.42em; margin:0;
  opacity:0; transform:translateY(8px);
  animation:veilMark 720ms 60ms var(--e-out) forwards;
}
.veil__line{
  display:block; width:clamp(120px,18vw,220px); height:1px;
  background:linear-gradient(90deg,transparent,var(--brand-accent),transparent);
  transform:scaleX(0);
  animation:veilLine 1000ms 120ms var(--e-out) forwards;
}
.veil__sub{
  font-size:.6rem; letter-spacing:.3em; text-transform:uppercase;
  color:var(--brand-muted); opacity:0;
  animation:veilMark 700ms 320ms var(--e-out) forwards;
}
@keyframes veilMark{ to{ opacity:1; transform:none; } }
@keyframes veilLine{ to{ transform:scaleX(1); } }

.veil{
  /* safety net: never trap the page behind the veil if the motion layer fails */
  animation:veilSafety 0ms 3000ms forwards;
}
@keyframes veilSafety{ to{ opacity:0; visibility:hidden; pointer-events:none; } }

.veil.is-done{ opacity:0; visibility:hidden; }
/* Grand Salon: curtain splits */
html[data-direction="grand-salon"] .veil.is-done{
  opacity:1;
  clip-path:inset(0 0 0 0);
  animation:veilCurtain 900ms var(--e-in-out) forwards;
}
@keyframes veilCurtain{
  0%{ clip-path:inset(0 0 0 0); }
  100%{ clip-path:inset(0 0 100% 0); opacity:1; }
}
/* Mediterranean: iris through an arch */
html[data-direction="mediterranean-estate"] .veil.is-done{
  opacity:1; animation:veilArch 1000ms var(--e-out) forwards;
}
@keyframes veilArch{
  0%{ clip-path:inset(0 0 0 0 round 0); }
  100%{ clip-path:inset(0 0 100% 0 round 0 0 48% 48%); opacity:0; }
}

/* --------------------------------------------------------------------------
   2 · hero — cinematic film, entrance choreography, depth
   -------------------------------------------------------------------------- */
/* The hero image is scaled 1.04 so parallax never reveals an edge; the plate has
   to clip it, otherwise the scaled bitmap bleeds past the viewport and creates a
   horizontal scrollbar (worst on Grand Salon, which also pulls -5vw). */
.hero-visual{ overflow:clip; }
.hero-image, .hero-film{
  will-change:transform;
  transform:translate3d(0, calc(var(--py,0) * 1px), 0) scale(1.03);
  transition:filter var(--t-slow) var(--e-out);
}
.hero-film{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }

/* film grain + light bloom overlays */
.hero-grain{
  position:absolute; inset:0; z-index:-1; pointer-events:none; opacity:.05;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-bloom{
  position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(60% 55% at var(--mx,50%) var(--my,40%), rgba(255,246,230,.16), transparent 70%);
  mix-blend-mode:screen; transition:opacity var(--t-med) linear;
}

/* entrance: copy children rise in sequence, visual wipes open */
body[data-ready] .hero [data-hero]{
  animation:heroIn 900ms var(--e-out) both;
  animation-delay:calc(var(--i,0) * 90ms + 120ms);
}
@keyframes heroIn{
  from{ opacity:0; transform:translate3d(0, calc(26px * var(--d)), 0); filter:blur(6px); }
  to{ opacity:1; transform:none; filter:none; }
}
body[data-ready] .hero-visual{
  animation:heroWipe 1200ms 180ms var(--e-out) both;
}
@keyframes heroWipe{
  from{ clip-path:inset(0 0 0 100%); transform:scale(1.02); }
  to{ clip-path:inset(0 0 0 0); transform:none; }
}
[dir="rtl"] body[data-ready] .hero-visual{
  animation-name:heroWipeRtl;
}
@keyframes heroWipeRtl{
  from{ clip-path:inset(0 100% 0 0); transform:scale(1.02); }
  to{ clip-path:inset(0 0 0 0); transform:none; }
}

/* envelope: corrected scale, gentle levitation */
.hero-envelope{
  width:min(40%,230px) !important;
  right:4% !important;
  bottom:3% !important;
  padding:7px !important;
  border:1px solid var(--brand-border);
  transform-origin:50% 80%;
  will-change:transform;
  animation:envelopeFloat calc(9s / var(--d)) ease-in-out infinite alternate;
  transition:box-shadow var(--t-med) var(--e-out), rotate var(--t-med) var(--e-out);
}
.hero-envelope:hover{
  box-shadow:0 26px 60px rgba(0,0,0,.28);
  rotate:-1.2deg;
}
.hero-envelope img{ transition:transform 900ms var(--e-out); }
.hero-envelope:hover img{ transform:scale(1.02); }
@keyframes envelopeFloat{
  from{ translate:0 0; rotate:1.2deg; }
  to{ translate:0 -10px; rotate:-.4deg; }
}

/* hero index hairline draw */
body[data-ready] .hero-index i{
  animation:lineDraw 900ms 900ms var(--e-out) both;
  transform-origin:0 50%;
}
@keyframes lineDraw{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }

/* scroll cue */
.scroll-note{
  display:inline-flex; align-items:center; gap:10px;
}
.scroll-note::after{
  content:""; width:1px; height:26px; background:currentColor;
  transform-origin:50% 0; animation:scrollCue 2400ms ease-in-out infinite;
  opacity:.6;
}
@keyframes scrollCue{
  0%,100%{ transform:scaleY(.25); opacity:.25; }
  50%{ transform:scaleY(1); opacity:.7; }
}

/* --------------------------------------------------------------------------
   3 · scroll reveal system (JS adds .is-in)
   -------------------------------------------------------------------------- */
.js [data-reveal]{
  opacity:0; transform:translate3d(0, calc(28px * var(--d)), 0);
  transition:
    opacity var(--t-slow) var(--e-out),
    transform var(--t-slow) var(--e-out),
    clip-path var(--t-slow) var(--e-out);
  transition-delay:calc(var(--i,0) * 70ms);
}
.js [data-reveal="mask"]{
  opacity:1; transform:none;
  clip-path:inset(0 0 104% 0);
}
.js [data-reveal="mask"].is-in{ clip-path:inset(0 0 0 0); }
.js [data-reveal="line"]{
  opacity:1; transform:none;
  clip-path:inset(0 100% 0 0);
}
[dir="rtl"] .js [data-reveal="line"]{ clip-path:inset(0 0 0 100%); }
.js [data-reveal="line"].is-in{ clip-path:inset(0 0 0 0); }
.js [data-reveal="scale"]{
  opacity:0; transform:scale(1.06);
}
.js [data-reveal="scale"].is-in{ opacity:1; transform:none; }
.js [data-reveal].is-in{ opacity:1; transform:none; }

/* keep legacy .reveal working if any markup still uses it */
.js .reveal{ opacity:0; transform:translate3d(0,24px,0); transition:opacity var(--t-slow) var(--e-out),transform var(--t-slow) var(--e-out); }
.js .reveal.is-visible{ opacity:1; transform:none; }

/* --------------------------------------------------------------------------
   4 · sections — depth, parallax plates, rule draws
   -------------------------------------------------------------------------- */
.section-heading h2, .philosophy h2, .venues h2, .studio h2{
  position:relative;
}
.section-heading .eyebrow::after{
  content:""; display:block; width:38px; height:1px; margin-top:10px;
  background:var(--brand-accent); transform-origin:0 50%;
}
.js .section-heading .eyebrow::after,
.js .philosophy .eyebrow::after,
.js .venues .eyebrow::after{ transform:scaleX(0); transition:transform 900ms var(--e-out) 220ms; }
.js .section-heading.is-in .eyebrow::after,
.js .philosophy.is-in .eyebrow::after,
.js .venues.is-in .eyebrow::after{ transform:scaleX(1); }

/* philosophy plate: inner image parallax + soft frame */
.philosophy-image{ overflow:hidden; }
.philosophy-image img{
  height:118%; width:100%; object-fit:cover;
  will-change:transform;
  transform:translate3d(0, calc(var(--py,0) * 1px), 0) scale(1.03);
}
.philosophy blockquote{
  background-image:linear-gradient(90deg,var(--brand-accent),var(--brand-accent));
  background-size:0 1px; background-repeat:no-repeat; background-position:0 100%;
}

/* --------------------------------------------------------------------------
   5 · collection rail — drag, progress, tilt
   -------------------------------------------------------------------------- */
.collection-rail{
  cursor:grab;
  scroll-behavior:smooth;
  padding-block-end:34px;
}
.collection-rail.is-dragging{ cursor:grabbing; scroll-behavior:auto; }
.collection-rail.is-dragging .invite-card{ pointer-events:none; }

/* rail controls: visible track + explicit prev/next */
.rail-controls{
  display:flex; align-items:center; gap:clamp(16px,3vw,34px);
  margin-top:10px;
}
.rail-progress{
  position:relative; flex:1 1 auto; height:2px;
  background:color-mix(in srgb, var(--brand-text), transparent 84%);
  overflow:hidden;
}
.rail-progress i{
  position:absolute; inset-block:0; inset-inline-start:0;
  width:22%; background:var(--brand-accent);
  transition:transform 160ms linear, width 320ms var(--e-out);
  will-change:transform;
}
[dir="rtl"] .rail-progress i{ inset-inline-start:auto; inset-inline-end:0; }

.rail-nav{ display:flex; gap:8px; flex:0 0 auto; }
.rail-btn{
  width:44px; height:44px; display:grid; place-items:center; padding:0;
  border:1px solid var(--brand-border); background:transparent;
  color:var(--brand-primary); cursor:pointer;
  transition:border-color var(--t-fast) linear, color var(--t-fast) linear,
             background-color var(--t-fast) linear, transform 320ms var(--e-out);
}
.rail-btn svg{ width:17px; height:17px; }
.rail-btn:hover{ border-color:var(--brand-accent); color:var(--brand-accent); }
.rail-btn:active{ transform:scale(.94); }
.rail-btn:disabled{ opacity:.32; cursor:default; }
.rail-btn:disabled:hover{ border-color:var(--brand-border); color:var(--brand-primary); }
[dir="rtl"] .rail-nav{ flex-direction:row-reverse; }

.invite-card{
  transform-style:preserve-3d;
  will-change:transform;
  transition:transform 520ms var(--e-out), box-shadow 520ms var(--e-out), translate 520ms var(--e-out);
}
.invite-card:hover{
  translate:0 -8px;
  box-shadow:0 32px 70px rgba(30,22,14,.22);
}
.invite-card .envelope-preview{ overflow:hidden; }
.invite-card .envelope-preview img{
  transition:transform 900ms var(--e-out), filter 900ms var(--e-out);
}
.invite-card:hover .envelope-preview img{
  transform:scale(1.06);
  filter:saturate(1.05);
}
.cover-action{
  transform:translateY(calc(100% - 0px));
  transition:transform 520ms var(--e-out), background-color var(--t-fast) linear;
}
.invite-card:hover .cover-action,
.invite-card:focus-within .cover-action{ transform:none; }
.text-link{ position:relative; }
.text-link::after{
  content:""; position:absolute; inset-inline-start:0; bottom:-4px; height:1px; width:100%;
  background:currentColor; transform:scaleX(0); transform-origin:0 50%;
  transition:transform 480ms var(--e-out);
}
.text-link:hover::after{ transform:scaleX(1); }

/* --------------------------------------------------------------------------
   6 · navigation + buttons — sweep, magnet, press
   -------------------------------------------------------------------------- */
.main-nav a{ position:relative; }
.main-nav a::after{
  content:""; position:absolute; inset-inline:0; bottom:8px; height:1px;
  background:currentColor; transform:scaleX(0); transform-origin:0 50%;
  transition:transform 420ms var(--e-out);
}
.main-nav a:hover::after, .main-nav a[aria-current]::after{ transform:scaleX(1); }

.direction-link{ position:relative; }
.direction-link.is-current::after{
  content:""; position:absolute; inset-inline:12px; bottom:-1px; height:1px;
  background:var(--brand-accent);
  animation:lineDraw 600ms var(--e-out) both; transform-origin:0 50%;
}

.button{
  position:relative; overflow:hidden; isolation:isolate;
  transition:transform 300ms var(--e-out), box-shadow 300ms var(--e-out),
             background-color var(--t-fast) linear, color var(--t-fast) linear;
}
.button::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(115deg,transparent 20%, rgba(255,255,255,.22) 48%, transparent 72%);
  transform:translateX(-120%);
  transition:transform 900ms var(--e-out);
}
.button:hover::before{ transform:translateX(120%); }
.button:hover{ transform:translateY(-2px); box-shadow:0 18px 36px rgba(0,0,0,.16); }
.button:active{ transform:translateY(0) scale(.985); }

/* --------------------------------------------------------------------------
   7 · THEME SIGNATURE — Quiet Luxury: paper, hairlines, restraint
   -------------------------------------------------------------------------- */
html[data-direction="quiet-luxury"] .hero-visual{
  border:1px solid var(--brand-border);
  padding:12px;
  background:var(--brand-surface);
}
html[data-direction="quiet-luxury"] .philosophy blockquote{
  animation:quoteRule 1400ms var(--e-out) forwards;
}
@keyframes quoteRule{ from{ background-size:0 1px; } to{ background-size:100% 1px; } }
html[data-direction="quiet-luxury"] .invite-card:hover{ translate:0 -6px; }

/* --------------------------------------------------------------------------
   8 · THEME SIGNATURE — Grand Salon: gold foil, vignette, curtain
   -------------------------------------------------------------------------- */
/* Solid ink under a travelling sheen: the glyphs can never blank out, because
   background-color is clipped to the text too and always fills behind the
   moving highlight band. */
/* foil only where the heading sits on the deep burgundy ground. Headings on
   the cream sections must stay dark ink or they vanish into the paper. */
html[data-direction="grand-salon"] .hero h1,
html[data-direction="grand-salon"] .philosophy h2,
html[data-direction="grand-salon"] .studio h2,
html[data-direction="grand-salon"] .site-footer h2{
  background-color:#f2e8d6;
  background-image:linear-gradient(100deg,
    rgba(255,255,255,0) 34%,
    rgba(255,252,242,.92) 46%,
    rgba(228,192,132,.85) 52%,
    rgba(255,252,242,.9) 58%,
    rgba(255,255,255,0) 70%);
  background-size:240% 100%;
  background-repeat:no-repeat;
  background-position:150% 0;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  animation:foilSweep 13s ease-in-out infinite;
}
@keyframes foilSweep{
  0%{ background-position:150% 0; }
  55%,100%{ background-position:-150% 0; }
}

html[data-direction="grand-salon"] .hero::after{
  content:""; position:absolute; inset:0; pointer-events:none; z-index:1;
  background:radial-gradient(120% 90% at 50% 8%, transparent 42%, rgba(18,5,9,.55) 100%);
}
html[data-direction="grand-salon"] .hero-copy{ z-index:2; }
html[data-direction="grand-salon"] .hero-envelope{
  box-shadow:0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(230,199,142,.35);
}
/* curtain reveal on section entry */
.js html[data-direction="grand-salon"] [data-reveal]{
  clip-path:inset(0 0 0 0);
}
html[data-direction="grand-salon"] .collection::before,
html[data-direction="grand-salon"] .venues::before{
  content:""; position:absolute; inset-block:0; inset-inline:0;
  background:linear-gradient(180deg,rgba(230,199,142,.06),transparent 30%);
  pointer-events:none;
}
html[data-direction="grand-salon"] .collection,
html[data-direction="grand-salon"] .venues{ position:relative; }

/* --------------------------------------------------------------------------
   9 · THEME SIGNATURE — Mediterranean: sunlit arch, warm flare, leaves
   -------------------------------------------------------------------------- */
html[data-direction="mediterranean-estate"] .hero-visual{
  border-radius:48% 48% 0 0;
  overflow:hidden;
}
html[data-direction="mediterranean-estate"] .hero-visual::after{
  content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(52% 40% at 72% 12%, rgba(255,236,193,.55), transparent 66%),
    linear-gradient(180deg, rgba(255,247,226,.18), transparent 42%);
  mix-blend-mode:screen;
  animation:sunDrift calc(14s / var(--d)) ease-in-out infinite alternate;
}
@keyframes sunDrift{
  from{ opacity:.55; transform:translate3d(-2%, -1%, 0) scale(1.02); }
  to{ opacity:.9; transform:translate3d(3%, 2%, 0) scale(1.06); }
}
html[data-direction="mediterranean-estate"] .hero-envelope{
  border-radius:.7rem;
  rotate:-3deg;
}
html[data-direction="mediterranean-estate"] .invite-card{ border-radius:1rem; }
html[data-direction="mediterranean-estate"] .philosophy-image{ border-radius:48% 48% 0 0; }

/* floating olive leaves (JS spawns spans) */
.leaf{
  position:absolute; z-index:0; pointer-events:none;
  width:12px; height:20px; border-radius:60% 0 60% 0;
  background:linear-gradient(140deg,#8d9b6a,#5f6b45);
  opacity:.0;
  animation:leafFall linear infinite;
}
@keyframes leafFall{
  0%{ opacity:0; transform:translate3d(0,0,0) rotate(0deg); }
  10%{ opacity:.62; }
  85%{ opacity:.5; }
  100%{ opacity:0; transform:translate3d(34px,560px,0) rotate(240deg); }
}

/* --------------------------------------------------------------------------
   10 · THEME SIGNATURE — Nocturne: stars, spotlight, glow
   -------------------------------------------------------------------------- */
html[data-direction="nocturne"] .hero h1{
  text-shadow:0 0 60px rgba(167,181,196,.30), 0 0 18px rgba(167,181,196,.14);
}
html[data-direction="nocturne"] .hero-visual::after{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(60% 50% at 70% 20%, rgba(120,150,180,.20), transparent 70%);
  animation:nightPulse 8s ease-in-out infinite alternate;
}
@keyframes nightPulse{ from{ opacity:.5; } to{ opacity:1; } }
.fx-stars{ position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; opacity:1; }
.fx-spot{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(220px 220px at var(--mx,50%) var(--my,50%),
    rgba(190,214,240,.10), transparent 72%);
  mix-blend-mode:screen; opacity:0; transition:opacity 600ms linear;
}
html[data-direction="nocturne"] .fx-spot{ opacity:1; }
html[data-direction="nocturne"] .invite-card:hover{
  box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(167,181,196,.35);
}
html[data-direction="nocturne"] .section-heading h2{ text-shadow:0 0 40px rgba(167,181,196,.22); }

/* --------------------------------------------------------------------------
   11 · dialog — cinematic open
   -------------------------------------------------------------------------- */
.preview-dialog{
  transition:opacity 400ms var(--e-out), transform 520ms var(--e-out);
}
@starting-style{
  .preview-dialog[open]{
    opacity:0; transform:translateY(18px) scale(.985);
  }
}
.preview-dialog[open]{ opacity:1; transform:none; }
.preview-dialog::backdrop{
  background:rgba(6,9,12,.72);
  backdrop-filter:blur(8px) saturate(.9);
}

/* --------------------------------------------------------------------------
   12 · ambient sound toggle
   -------------------------------------------------------------------------- */
.sound-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; padding:0;
  border:1px solid var(--brand-border); background:transparent;
  color:var(--brand-primary); cursor:pointer;
  transition:border-color var(--t-fast) linear, color var(--t-fast) linear, background-color var(--t-fast) linear;
}
.sound-toggle:hover{ border-color:var(--brand-accent); color:var(--brand-accent); }
.sound-toggle svg{ width:16px; height:16px; }
.sound-toggle .bars{ display:flex; align-items:flex-end; gap:2px; height:14px; }
.sound-toggle .bars i{
  display:block; width:2px; background:currentColor; height:30%;
  border-radius:1px; transform-origin:50% 100%;
}
.sound-toggle[aria-pressed="true"] .bars i{ animation:soundBar 900ms ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(2){ animation-delay:150ms; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(3){ animation-delay:300ms; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(4){ animation-delay:100ms; }
@keyframes soundBar{
  from{ height:25%; } to{ height:100%; }
}

/* --------------------------------------------------------------------------
   13 · page transitions (Chrome progressive enhancement)
   -------------------------------------------------------------------------- */
@view-transition{ navigation:auto; }
::view-transition-old(root){ animation:vtOut 260ms var(--e-out) both; }
::view-transition-new(root){ animation:vtIn 420ms var(--e-out) both; }
@keyframes vtOut{ to{ opacity:0; transform:scale(.995); } }
@keyframes vtIn{ from{ opacity:0; transform:scale(1.005); } }

/* film plate: video sits above the still; still covers load failure */
.hero-plate{ z-index:-3; }
.hero-film{ z-index:-2; }
@media (prefers-reduced-motion:reduce){
  .hero-film{ display:none !important; }
}

/* --------------------------------------------------------------------------
   14 · reduced motion — everything collapses to instant, no hidden content
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .js [data-reveal], .js [data-reveal="mask"], .js [data-reveal="line"], .js [data-reveal="scale"]{
    opacity:1 !important; transform:none !important; clip-path:none !important;
    transition:none !important;
  }
  body[data-ready] .hero [data-hero],
  body[data-ready] .hero-visual{ animation:none !important; }
  .hero-envelope{ animation:none !important; }
  .veil{ display:none !important; }
  .fx-spot, .leaf, .hero-bloom{ display:none !important; }
  .scroll-note::after{ animation:none; }
  .sound-toggle[aria-pressed="true"] .bars i{ animation:none; }
  .scroll-progress i{ transition:none; }
}

/* --------------------------------------------------------------------------
   15 · mobile corrections
   -------------------------------------------------------------------------- */
@media (max-width:760px){
  /* direction overrides set align-items:end which collapses the hero plate */
  html:root[data-direction] .hero{ align-items:stretch; }

  /* width:auto + those asymmetric margins = exactly container minus 32px.
     Using width:100% here overflowed the page by 32px on a 320px screen. */
  .hero-visual{ width:auto !important; }

  .hero-envelope{
    width:min(46%,190px) !important;
    right:3% !important;
    bottom:2% !important;
  }
  .hero-index{ z-index:3; }
  .rail-progress{ margin-inline:0; min-width:64px; }
  .section-heading .eyebrow::after,
  .philosophy .eyebrow::after,
  .venues .eyebrow::after{ margin-top:8px; }

  /* rail controls must never squeeze the card row */
  .rail-controls{ gap:14px; }
  .rail-nav{ gap:6px; }
}

/* iOS Safari zooms the whole page when a focused control is under 16px.
   Keyed off pointer type so it also applies on wide landscape phones. */
@media (pointer:coarse){
  .enquiry-form input,
  .enquiry-form textarea,
  .enquiry-form select,
  .enquiry-form button{ font-size:16px !important; }
}

/* very narrow phones (320-390): the header tools used to push the page 18px wide */
@media (max-width:390px){
  .site-header{ padding-inline:10px; gap:6px; }
  .brand-lockup{ gap:6px; min-width:0; max-width:none; }
  .brand-lockup img{ width:clamp(74px,26vw,100px); height:auto; }
  .brand-ar{ font-size:.9rem; padding-inline-start:6px; }
  .header-tools{ gap:8px; }
  .sound-toggle{ width:40px; height:40px; }
  .language-toggle{ padding:0 4px; }
  .menu-toggle{ width:42px; height:42px; }

}

/* --------------------------------------------------------------------------
   22 · mobile foundations — touch, notch, tap behaviour
   -------------------------------------------------------------------------- */

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

body{
  -webkit-tap-highlight-color:transparent;
  /* landscape notch: keep content out of the rounded corners / sensor housing */
  padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);
}

/* fixed chrome must clear the notch and the home indicator */
.site-header{ padding-block-start:env(safe-area-inset-top); }
.scroll-progress{ inset-block-start:env(safe-area-inset-top); }
.site-footer{ padding-block-end:calc(20px + env(safe-area-inset-bottom)); }

/* pointer feedback on touch: no hover states firing on tap */
@media (hover:none){
  .invite-card:hover{ translate:0 0; box-shadow:var(--card-shadow); }
  .invite-card:hover .envelope-preview img{ transform:none; }
  .hero-envelope:hover{ box-shadow:var(--card-shadow); rotate:1.2deg; }
  .button:hover{ transform:none; }
  .button:hover::before{ transform:translateX(-120%); }
  .direction-index nav a:hover{ transform:none; }
  .main-nav a:hover::after{ transform:scaleX(0); }
}

/* landscape phones: stop the hero eating the whole screen */
@media (max-height:520px) and (orientation:landscape){
  .hero{ min-height:unset; padding-block:28px 56px; }
  .hero-visual{ height:min(58vh,320px); }
  .hero h1{ font-size:clamp(2rem,6vw,3rem); }
}

/* small screens: skip the 412 KB hero film and keep the still */
html[data-hero-still] .hero-film{ display:none; }


/* --------------------------------------------------------------------------
   16 · momentum scrolling (Lenis) — desktop pointers only, JS-gated
   -------------------------------------------------------------------------- */
html.lenis, html.lenis body{ height:auto; }
.lenis.lenis-smooth{ scroll-behavior:auto !important; }
.lenis.lenis-smooth [data-lenis-prevent]{ overscroll-behavior:contain; }
.lenis.lenis-stopped{ overflow:hidden; }
.lenis.lenis-scrolling iframe{ pointer-events:none; }

/* --------------------------------------------------------------------------
   17 · gold dust (Grand Salon hero)
   -------------------------------------------------------------------------- */
.fx-gold{
  position:absolute; inset:0; width:100%; height:100%;
  z-index:-1; pointer-events:none;
  opacity:1; mix-blend-mode:screen; isolation:auto;
}

/* --------------------------------------------------------------------------
   18 · inlined monogram line-draw
   -------------------------------------------------------------------------- */
.studio-mark .logo-draw{
  /* the inlined SVG has no intrinsic width, so it must be capped explicitly —
     the original .studio-mark img{width:190px} rule no longer matches */
  width:min(100%,190px); max-width:190px; height:auto; max-height:120px;
  overflow:visible; flex:0 1 auto; min-width:0;
}
@media (max-width:760px){
  .studio-mark .logo-draw{ width:min(58%,160px); max-width:160px; }
}
@media (max-width:390px){
  .studio-mark .logo-draw{ width:min(50%,132px); max-width:132px; }
}
.studio-mark .logo-draw path,
.studio-mark .logo-draw line,
.studio-mark .logo-draw circle,
.studio-mark .logo-draw polyline,
.studio-mark .logo-draw rect{
  will-change:stroke-dashoffset;
}

/* --------------------------------------------------------------------------
   19 · layered parallax — envelope + index drift at their own rate
   -------------------------------------------------------------------------- */
.hero-envelope{
  transform:translate3d(0, calc(var(--py,0) * 1px), 0);
}
.hero-index{
  transform:translate3d(0, calc(var(--py,0) * 1px), 0);
  will-change:transform;
}
@media (prefers-reduced-motion:reduce){
  .fx-gold{ display:none !important; }
  .hero-envelope, .hero-index{ transform:none !important; }
}

/* the arch silhouette must actually clip the film + still underneath */
html[data-direction="mediterranean-estate"] > body .hero-visual,
html[data-direction="mediterranean-estate"] .hero-visual{
  overflow:clip !important;
  -webkit-mask-image:-webkit-radial-gradient(white, black);
}

/* --------------------------------------------------------------------------
   20 · editorial polish
   -------------------------------------------------------------------------- */
h1, h2, h3{ text-wrap:balance; }
p, blockquote, li{ text-wrap:pretty; }

/* hairline rule closing each major section — gives the page editorial structure */
.section-pad{ position:relative; }
.section-pad + .section-pad::before{
  content:""; position:absolute; inset-block-start:0;
  inset-inline:clamp(1.4rem,8vw,9.5rem);
  height:1px; background:var(--brand-border); opacity:.75;
}

/* the philosophy plate reads as a mounted print rather than a bare crop */
.philosophy-image{
  box-shadow:0 30px 70px rgba(28,20,12,.16);
}
.philosophy-image img{
  transform:translate3d(0, calc(var(--py,0) * 1px), 0) scale(1.06);
  transition:transform 1600ms var(--e-out);
}

/* section kickers get a quiet numeric index, magazine style */
body{ counter-reset:msect; }
.section-pad{ counter-increment:msect; }
.section-heading .eyebrow::before,
.philosophy-copy .eyebrow::before,
.venue-intro .eyebrow::before,
.studio .eyebrow::before{
  content:counter(msect, decimal-leading-zero) "  ·  ";
  color:var(--brand-accent); opacity:.9;
  letter-spacing:.18em;
  font-variant-numeric:tabular-nums;
}
@media (max-width:760px){
  .section-pad + .section-pad::before{ inset-inline:20px; }
}

/* Grand Salon · headings on the cream sections stay dark, with a restrained
   warm sheen that darkens rather than lightens, so legibility is never at risk */
html[data-direction="grand-salon"] .collection h2,
html[data-direction="grand-salon"] .venues h2{
  background-color:#27171a;                     /* dark ink base: never invisible */
  background-image:linear-gradient(100deg,
    rgba(246,236,223,0) 36%,
    rgba(246,236,223,.5) 47%,
    rgba(216,178,118,.6) 52%,
    rgba(246,236,223,.45) 58%,
    rgba(246,236,223,0) 70%);
  background-size:240% 100%;
  background-repeat:no-repeat;
  background-position:150% 0;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  animation:foilSweep 13s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   21 · finishing details — quiet, professional, never "effects"
   -------------------------------------------------------------------------- */

/* selection picks up the theme accent */
::selection{ background:var(--brand-accent); color:var(--brand-bg); }

/* slim, brand-tinted scrollbar (Chromium + Firefox) */
html{ scrollbar-color:var(--brand-accent) transparent; scrollbar-width:thin; }
::-webkit-scrollbar{ width:9px; height:9px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{
  background:color-mix(in srgb, var(--brand-accent), transparent 35%);
  border-radius:99px; border:2px solid transparent; background-clip:content-box;
}
::-webkit-scrollbar-thumb:hover{ background:var(--brand-accent); background-clip:content-box; }

/* every invite card reads as a mounted print: hairline + inner gutter */
.invite-card{
  border:1px solid color-mix(in srgb, var(--brand-text), transparent 88%);
}
html[data-direction="nocturne"] .invite-card{
  border-color:rgba(218,225,233,.14);
}

/* hero exit: the copy lifts a touch faster than the plate, so leaving the hero
   feels directed rather than abrupt. Transform only — nothing ever fades out. */
.hero-copy{
  will-change:transform;
  transform:translate3d(0, calc(var(--py,0) * 1px), 0);
}

/* studio mark: the drawn monogram sits on a hairline rule, like a letterpress mark */
.studio-mark{ position:relative; }
.studio-mark::after{
  content:""; position:absolute; inset-block-end:0; inset-inline:24px;
  height:1px; background:var(--brand-border);
  transform-origin:0 50%; transform:scaleX(1);
}

/* long-form measure: keep the venues column comfortable to read */
.venue-intro > p, .philosophy-copy > p{ max-width:56ch; }

/* Grand Salon pulls its hero plate off the edge with -5vw; on phones that
   pokes past the viewport and creates a horizontal scrollbar. */
@media (max-width:760px){
  html:root[data-direction="grand-salon"] .hero-visual{ margin-inline-end:0 !important; }
  html:root[data-direction="mediterranean-estate"] .hero-visual{ margin-inline-end:0 !important; }
}

/* --------------------------------------------------------------------------
   23 · tablet band (761-1100px)
   The per-direction hero grid overrides carry minmax(360px|480px) floors, which
   beat the stylesheet's own max-width:1000px rule and overflowed the page by
   ~197px on a 977px viewport. Relax the floors across the whole band.
   -------------------------------------------------------------------------- */
/* NOTE: showcase.css uses :root[data-direction="x"] .y (specificity 0,3,0).
   A plain html[data-direction="x"] .y is only 0,2,1 and silently loses, so every
   override below is written html:root[data-direction="x"] to win cleanly
   (0,3,1) without reaching for !important. */
@media (max-width:1100px){
  html:root[data-direction="grand-salon"] .hero,
  html:root[data-direction="nocturne"] .hero,
  html:root[data-direction="mediterranean-estate"] .hero{
    grid-template-columns:minmax(260px,.92fr) minmax(280px,1.08fr);
    padding-inline:clamp(1.2rem,4.5vw,4rem);
    gap:clamp(18px,3.5vw,52px);
  }
  html:root[data-direction="grand-salon"] .hero-visual{
    margin-inline-end:0;
    height:min(64vh,620px);
  }
  html:root[data-direction="nocturne"] .hero-visual{ height:min(64vh,620px); }
  html:root[data-direction="mediterranean-estate"] .hero-visual{ height:min(60vh,580px); }
  html:root[data-direction="grand-salon"] .hero h1{ font-size:clamp(2.6rem,5.4vw,5rem); }
}
