/* ============================================================
   MajeStay Group — shared luxury spine
   Pure navy ground · gold by scarcity · crown spine · 3D overlay
   ============================================================ */
:root{
  /* ground (pure solids — no radial washes) */
  --emerald:#0B1825; --emerald-900:#05090F; --ink-band:#0A1320; --panel:#0D192F; --vignette-top:#0F2032;
  /* gold scale (scarce) */
  --gold:#C59463; --gold-on-dark:#D7B489; --gold-300:#EDD8AA; --gold-600:#A87D4F; --gold-deep:#967D60; --gold-dim:#8A7C66;
  /* text */
  --text:#F1EADB; --muted:#CDC6B8; --subtle:#AEA694;
  /* lines */
  --border:#22364B; --border-gold:rgba(197,148,99,0.28); --hair-gold:rgba(197,148,99,0.5);
  --logo-fill:#C59463; --surface-glass:rgba(11,24,37,0.62);
  /* metallic — crown/seal mark only */
  --metal:linear-gradient(135deg,#EDD8AA 0%,#D7B489 28%,#C59463 52%,#967D60 74%,#EDD8AA 100%);
  --metal-v:linear-gradient(180deg,#EDD8AA 0%,#D7B489 28%,#C59463 60%,#A87D4F 100%);
  /* motion */
  --ease:cubic-bezier(0.22,1,0.36,1); --ease-strike:cubic-bezier(0.34,1.4,0.5,1); --ease-snap:cubic-bezier(0.16,1,0.3,1);
  --nav-h:74px; --r-pill:999px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--emerald)}
html{scroll-behavior:smooth}
body{font-family:"Archivo",system-ui,sans-serif;color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden;position:relative}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
::selection{background:rgba(197,148,99,0.30);color:#fff}
:focus-visible{outline:2px solid var(--gold-300);outline-offset:3px;border-radius:4px}
h1,h2,h3{font-family:"Archivo",sans-serif;font-weight:700;line-height:1.05;letter-spacing:-0.018em;color:var(--text)}
.eyebrow{font-size:0.74rem;letter-spacing:0.32em;text-transform:uppercase;font-weight:600;color:var(--gold-on-dark)}

/* film grain — the cheap "expensive" tell (static, one paint) */
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:1;opacity:.045;mix-blend-mode:overlay;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
/* single faint top vignette (the only gradient touching the ground) */
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.7;
  background:radial-gradient(120% 90% at 50% -8%, var(--vignette-top) 0%, transparent 55%)}

/* crown mark (shared) — copper mask of crown.png */
.crown-mark{display:inline-block;background:var(--logo-fill);
  -webkit-mask:url("logos/crown.png") center/contain no-repeat;mask:url("logos/crown.png") center/contain no-repeat}
.crown-metal{background:var(--metal)}

/* ============================================================
   MENU TRIGGER (one affordance per page, top-right)
   ============================================================ */
.menu-trigger{position:fixed;top:22px;right:clamp(16px,4vw,40px);z-index:120;width:46px;height:46px;border:0;background:transparent;cursor:pointer;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:6px}
.menu-trigger span{display:block;height:1.5px;background:var(--gold);border-radius:2px;transition:width .35s var(--ease),transform .35s var(--ease),opacity .25s}
.menu-trigger span:nth-child(1){width:24px}
.menu-trigger span:nth-child(2){width:16px}
.menu-trigger:hover span:nth-child(2){width:24px}
.menu-trigger.is-open span:nth-child(1){transform:translateY(3.75px) rotate(45deg);width:24px}
.menu-trigger.is-open span:nth-child(2){transform:translateY(-3.75px) rotate(-45deg);width:24px}
.menu-trigger .mt-label{position:absolute;right:54px;top:50%;transform:translateY(-50%);font-size:0.7rem;letter-spacing:0.22em;text-transform:uppercase;color:var(--subtle);white-space:nowrap;opacity:0;transition:opacity .3s}
.menu-trigger:hover .mt-label{opacity:1}
@media(max-width:920px){.menu-trigger .mt-label{display:none}}

/* page shell (recedes when overlay opens) */
#page-shell{position:relative;z-index:2;transform-origin:50% 42%;will-change:transform}
#page-shell.is-blurred{filter:blur(7px)}

/* ============================================================
   3D OVERLAY MENU
   ============================================================ */
#overlay{position:fixed;inset:0;z-index:130;display:none;perspective:1600px;perspective-origin:50% 38%}
#overlay.is-on{display:block}
#overlay .ov-ground{position:absolute;inset:0;background:rgba(11,24,37,0.86)}
#overlay .ov-fill{position:absolute;inset:0;background:#0B1825;opacity:0.7}
#overlay.is-blurred .ov-blur{position:absolute;inset:0;backdrop-filter:blur(18px) saturate(115%);-webkit-backdrop-filter:blur(18px) saturate(115%)}
#overlay .ov-gutter{position:absolute;top:0;bottom:0;left:50%;width:1px;background:rgba(197,148,99,.12)}
.overlay-logo{position:absolute;top:20px;left:clamp(16px,4vw,40px);z-index:6;width:128px;height:46px;background:var(--logo-fill);
  -webkit-mask:url("logos/crown.png") center/contain no-repeat;mask:url("logos/crown.png") center/contain no-repeat;opacity:.9}
#ov-stage{position:absolute;inset:0;transform-style:preserve-3d;display:grid;place-items:center}
#ov-panel{position:relative;transform-style:preserve-3d;transform-origin:50% 0%;width:min(880px,90vw);
  padding:clamp(28px,5vw,60px) clamp(26px,5vw,64px);border:1px solid var(--border-gold);border-radius:18px;
  background:rgba(11,24,37,0.55);box-shadow:inset 0 1px 0 rgba(237,216,170,.06),0 40px 120px -30px rgba(0,0,0,.8)}
#ov-panel::before{content:"";position:absolute;inset:13px;border:1px solid rgba(197,148,99,.20);border-radius:9px;pointer-events:none}
#ov-crown{position:absolute;top:50%;left:50%;width:min(560px,80vw);height:min(420px,60vh);transform:translate(-50%,-50%) translateZ(-220px);
  background:var(--metal);-webkit-mask:url("logos/crown.png") center/contain no-repeat;mask:url("logos/crown.png") center/contain no-repeat;
  opacity:0;filter:drop-shadow(0 0 24px rgba(197,148,99,.18));pointer-events:none;z-index:0}
#ov-nav{position:relative;z-index:3;display:flex;flex-direction:column}
.m-link{position:relative;display:flex;align-items:baseline;gap:clamp(14px,2vw,28px);padding:clamp(10px,1.4vw,18px) 6px;
  border-bottom:1px solid var(--border);transform-style:preserve-3d;cursor:pointer;text-align:left}
.m-link:last-child{border-bottom:0}
.m-num{font-size:0.78rem;letter-spacing:0.18em;font-weight:600;color:var(--gold-dim);font-variant-numeric:tabular-nums;flex:none;width:2.2em}
.m-word{font-size:clamp(2.1rem,6vw,4.6rem);font-weight:500;line-height:1;color:var(--text);letter-spacing:-0.01em;white-space:nowrap}
.m-word .ch{display:inline-block;will-change:transform}
.m-meta{margin-left:auto;align-self:center;font-size:0.7rem;letter-spacing:0.16em;text-transform:uppercase;color:var(--subtle);flex:none}
.m-rule{position:absolute;left:6px;bottom:-1px;height:1px;width:0;background:var(--gold);z-index:2;transition:width .35s var(--ease)}
.m-num,.m-word{transition:color .3s var(--ease)}
.m-link.is-active .m-num{color:var(--gold-300)}
.m-link.is-active .m-word{color:var(--gold-on-dark)}
.m-link.is-active .m-rule{width:calc(100% - 6px)}
/* hover system (iter 13): pure CSS — no per-event GSAP. #overlay.is-set is
   added AFTER the open animation completes (and removed on close start) so
   these transitions never fight the GSAP open/close tweens. */
#overlay.is-set .m-link{transition:transform .35s var(--ease),opacity .3s var(--ease)}
#overlay.is-set #ov-nav.has-active .m-link:not(.is-active){opacity:.45}
#overlay.is-set .m-link.is-active{transform:translateZ(36px)}
#ov-reveal .rv{transform:scale(.94) translateY(12px);transition:opacity .4s var(--ease),transform .4s var(--ease)}
#ov-reveal .rv.is-active{opacity:1;transform:none}
.m-group{margin:18px 6px 4px;font-size:0.66rem;letter-spacing:0.28em;text-transform:uppercase;color:var(--gold-dim);border-top:1px solid var(--border);padding-top:16px}
.m-extra .m-word{font-size:clamp(1.4rem,3.4vw,2.1rem);color:var(--gold-on-dark)}
.m-extra .m-num{color:var(--gold)}
#ov-reveal{position:absolute;right:clamp(24px,7vw,120px);top:50%;transform:translateY(-50%) rotateY(-13deg);width:min(280px,26vw);height:min(220px,40vh);transform-style:preserve-3d;pointer-events:none;z-index:1}
#ov-reveal .rv{position:absolute;inset:0;background:var(--logo-fill);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;opacity:0;filter:drop-shadow(0 12px 30px rgba(0,0,0,.5))}
@media(max-width:1180px){#ov-reveal{display:none}}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* mobile sheet (no 3D) */
@media(max-width:920px),(hover:none),(pointer:coarse){
  #overlay{perspective:none}
  #overlay .ov-ground{background:rgba(11,24,37,0.97)}
  #ov-stage{align-items:stretch;place-items:stretch}
  #ov-panel{position:absolute;inset:0;width:100%;border:0;border-radius:0;background:transparent;box-shadow:none;
    display:flex;flex-direction:column;justify-content:center;padding:84px clamp(20px,7vw,40px) 40px;transform:none!important}
  #ov-panel::before{display:none}
  #ov-crown{opacity:.16!important;transform:translate(-50%,-50%)!important;width:min(380px,74vw);height:auto;background:var(--logo-fill)}
  .m-link{padding:16px 2px}
  .m-word{font-size:clamp(2rem,9vw,2.8rem);white-space:normal}
  #ov-reveal{display:none}
}

/* ============================================================
   THEMED TRANSITION CURTAIN
   ============================================================ */
/* pre-paint arrival cover (iter 13): a tiny inline <head> script adds
   html.xt-arrive when sessionStorage 'xt:to' is set, so the destination
   paints NAVY from its very first frame (no page -> blue -> page flash).
   luxe.js removes the class the moment the #xt ground is set covering. */
html.xt-arrive::before{content:"";position:fixed;inset:0;background:var(--emerald,#0B1825);z-index:2000;pointer-events:none}
#xt{position:fixed;inset:0;z-index:9999;pointer-events:none;visibility:hidden}
#xt.is-on{visibility:visible}
#xt .xt-ground{position:absolute;inset:0;background:var(--emerald);transform:translateY(100%);will-change:transform}
#xt .xt-theme{position:absolute;inset:0;display:grid;place-items:center;opacity:0;z-index:1}
/* iter 15: crown raised to 42% (was 50%) so the theme text never sits under
   it; z-index 3 > #xtTheme's 1 keeps the logo ON TOP if they ever touch */
#xt .xt-crown{position:absolute;left:50%;top:42%;width:74px;height:74px;transform:translate(-50%,-50%);
  background:var(--metal);-webkit-mask:url("logos/crown.png") center/contain no-repeat;mask:url("logos/crown.png") center/contain no-repeat;opacity:0;z-index:3}
/* iter 15: text-bearing theme content (tech-boot typing line, realestate-lift
   floor counter, tourism-flap cells) sits clearly BELOW the raised crown —
   the grid centres it at 50%, this shifts its centre to ~58-60% */
#xt .xt-boot,#xt .xt-blue,#xt .xt-flap{transform:translateY(clamp(56px,9vh,110px))}
/* split-flap (tourism) */
.xt-flap{display:flex;gap:6px}
.xt-flap .cell{width:clamp(40px,8vw,72px);height:clamp(58px,11vw,104px);background:#060D18;border:1px solid var(--border);border-radius:6px;display:grid;place-items:center;font-weight:700;font-size:clamp(1.6rem,5vw,3rem);color:var(--text);overflow:hidden}
.xt-theme.flap-frame{box-shadow:none}
/* keycard (holiday homes) */
.xt-card{width:min(320px,72vw);aspect-ratio:1.6/1;background:linear-gradient(160deg,#16273C,#0B1825);border:1px solid var(--border-gold);border-radius:14px;position:relative;box-shadow:0 30px 70px -30px #000}
.xt-card .kc-logo{position:absolute;right:18px;bottom:16px;width:84px;height:46px;background:var(--logo-fill);-webkit-mask:url("logos/holiday-home.png") center/contain no-repeat;mask:url("logos/holiday-home.png") center/contain no-repeat;opacity:.85}
.xt-card .kc-led{position:absolute;left:18px;top:16px;width:9px;height:9px;border-radius:50%;background:#e0563f}
.xt-door{position:absolute;top:0;bottom:0;width:50%;background:#0B1825}
/* boot console (technologies) */
.xt-boot{width:min(560px,80vw);font-family:"JetBrains Mono",ui-monospace,monospace;color:var(--text);font-size:clamp(.8rem,1.6vw,1rem)}
.xt-boot .bl{opacity:.0}
.xt-boot .caret{display:inline-block;width:8px;height:1.05em;background:var(--gold);vertical-align:-2px;margin-left:2px}
/* blueprint lift (real estate) */
.xt-blue{width:min(420px,80vw);text-align:center;font-variant-numeric:tabular-nums}
.xt-blue .floor{font-size:clamp(3rem,12vw,6rem);font-weight:700;color:var(--gold-on-dark);line-height:1}
/* vault (about) */
.xt-vault-half{position:absolute;top:0;bottom:0;width:50%;background:var(--emerald-900)}

@media(prefers-reduced-motion:reduce){
  #page-shell.is-blurred{filter:none}
  .menu-trigger span{transition:none}
  .m-rule,.m-num,.m-word,#overlay.is-set .m-link,#ov-reveal .rv{transition:none}
  #overlay.is-set .m-link.is-active{transform:none}
  #ov-reveal .rv{transform:none}
}

/* ============================================================
   SPINE OVERRIDES — applied to pages awaiting their world rebuild
   (home is already clean; these only touch legacy markup)
   ============================================================ */
.nav,.mobile-menu,.nav-toggle{display:none!important}
body{background:var(--emerald)!important}
.sec-alt{background:var(--ink-band)!important}
.foil{background:none!important;-webkit-background-clip:initial!important;background-clip:initial!important;-webkit-text-fill-color:var(--text)!important;color:var(--text)!important}
.btn-gold{background:var(--metal)!important;color:#22190a!important}
.brand .mark{background:var(--logo-fill)!important;border-radius:0!important;color:transparent!important;box-shadow:none!important;
  -webkit-mask:url("logos/crown.png") center/contain no-repeat;mask:url("logos/crown.png") center/contain no-repeat;width:32px;height:24px}
.hero{padding-top:calc(var(--nav-h) + clamp(40px,7vh,90px))!important}
