/* ==========================================================================
   Nodehaus · home: loader, hero over the globe, doors, community, office, knock
   ========================================================================== */

body.nh-intro-active { overflow: hidden; height: 100vh; }
/* repeat visits in the same session skip the loader instantly (no fade flash) */
html.intro-skip .nh-intro { display: none; }
html.intro-skip body.nh-intro-active { overflow: visible; height: auto; }
html.intro-skip body.nh-intro-active .nh-header, html.intro-skip body.nh-intro-active .nh-fab { opacity: 1; pointer-events: auto; }

/* ---------- the shared centred stack: used by BOTH the loader and the hero text, so the
   loader fades out into text that is already sitting in exactly the same place ---------- */
.nh-stack {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  text-align: center; width: 100%; max-width: 1040px; padding: 0 var(--pad);
}
.nh-stack-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nh-stack-mark { width: 64px; height: 64px; color: var(--paper); overflow: visible; }
.nh-stack-word { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .12em; color: var(--paper); }
.nh-stack-h {
  margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(40px, 8.4vw, 104px);
}
.nh-stack-copy { font-size: 19px; line-height: 1.6; max-width: 520px; color: var(--body); }
.nh-stack-hint {
  margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--label); text-decoration: none;
}
.nh-stack-hint i { display: block; width: 1px; height: 44px; background: var(--hair-2); }
a.nh-stack-hint:hover { color: var(--paper); }

/* ---------- loader (existing sequence + timing, new logo + type) ---------- */
.nh-intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  transition: opacity .6s ease, visibility .6s ease;
}
.nh-intro.nh-intro-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.nh-draw { stroke-dasharray: 140; stroke-dashoffset: 140; animation: nh-draw-line 1s cubic-bezier(.4, .1, .2, 1) forwards; }
.nh-draw-2 { animation-delay: .15s; }
@keyframes nh-draw-line { to { stroke-dashoffset: 0; } }
.nh-intro-dot { opacity: 0; transform: scale(.3); transform-origin: 50px 10px; animation: nh-dot-in .5s ease forwards; animation-delay: .9s; }
@keyframes nh-dot-in { to { opacity: 1; transform: scale(1); } }

.nh-intro-word { opacity: 0; transform: translateY(8px); animation: nh-fade-up .7s ease forwards; animation-delay: 1.15s; }
.nh-intro-tagline { opacity: 0; transform: translateY(10px); animation: nh-fade-up .8s ease forwards; animation-delay: 1.55s; }
.nh-intro-copy { opacity: 0; transform: translateY(10px); animation: nh-fade-up .8s ease forwards; animation-delay: 2.05s; }
.nh-intro-hint { opacity: 0; animation: nh-fade-in .8s ease forwards; animation-delay: 2.6s; }
.nh-intro-hint i { animation: nh-hint-pulse 1.6s ease-in-out infinite; }
@keyframes nh-fade-up { to { opacity: 1; transform: translateY(0); } }
@keyframes nh-fade-in { to { opacity: 1; } }
@keyframes nh-hint-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- hero: text over the (unchanged) interactive globe ---------- */
.nh-journey { position: relative; height: 650vh; }
.nh-journey-viewport { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--ink); }
#journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#journey-canvas:active { cursor: grabbing; }

.nh-hero-overlay {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  pointer-events: none; animation: rise .8s ease-out; /* no fill-mode: it would override the opacity the globe script fades */
}
.nh-hero-overlay .nh-stack { z-index: 0; }
/* a soft scrim so the headline reads cleanly over the wireframe */
.nh-hero-overlay .nh-stack::before {
  content: ""; position: absolute; inset: -14% -28%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 18, 18, .72), rgba(18, 18, 18, .42) 62%, rgba(18, 18, 18, 0));
}
.nh-hero-overlay .nh-stack-hint { pointer-events: auto; padding: 6px 14px; }
.nh-hero-overlay.is-gone .nh-stack-hint { pointer-events: none; visibility: hidden; }
.nh-hero-coords {
  position: absolute; left: var(--pad); bottom: 28px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--label);
}

/* service captions that appear as the camera dives (restyled, behaviour unchanged) */
.nh-caption {
  position: absolute; left: 6vw; bottom: 14vh; max-width: 380px; z-index: 3;
  opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; pointer-events: none;
}
.nh-caption.nh-caption-visible { opacity: 1; transform: translateY(0); }
.nh-caption-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--light-1);
  margin-right: 10px; box-shadow: 0 0 10px 3px rgba(255, 226, 170, .5);
}
.nh-caption-label { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); }
.nh-caption p { margin: 10px 0 0; font-size: 17px; line-height: 1.55; color: var(--body); }

.nh-coords {
  position: absolute; left: 6vw; bottom: 14vh; z-index: 3;
  opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.nh-coords.nh-coords-visible { opacity: 1; transform: translateY(0); }
.nh-coords-city { font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--paper); }
.nh-coords-num { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--label); }

.nh-journey-rail {
  position: absolute; right: 5vw; top: 50%; transform: translateY(-50%);
  width: 1px; height: 140px; background: var(--hair); z-index: 3;
}
.nh-journey-rail i {
  position: absolute; top: 0; left: -1px; width: 3px; height: 0%;
  background: var(--light-1); box-shadow: 0 0 8px rgba(255, 226, 170, .6); transition: height .1s linear;
}

/* ---------- the four doors ---------- */
.nh-doors {
  border-top: 1px solid var(--hair);
  background: radial-gradient(ellipse at 50% 0%, rgba(243, 241, 236, .06), rgba(243, 241, 236, 0) 60%);
}
.nh-doors-head {
  max-width: var(--max); margin: 0 auto; padding: 110px var(--pad) 16px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.nh-doors-head .nh-lede { max-width: 540px; }
.only-touch { display: none; }
@media (hover: none) { .only-hover { display: none; } .only-touch { display: inline; } }

.nh-doors-grid {
  max-width: var(--max); margin: 0 auto; padding: 56px var(--pad) 110px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; align-items: start;
}

.door {
  text-decoration: none; color: var(--paper);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .8s ease-out var(--d, 0s), transform .8s ease-out var(--d, 0s);
}
.door.is-in { opacity: 1; transform: translateY(0); }
html:not(.js) .door { opacity: 1; transform: none; }

.door-frame { position: relative; width: 100%; max-width: 240px; aspect-ratio: 200 / 320; transition: transform .4s; }
.door-arch { position: absolute; inset: 0; width: 100%; height: 100%; }
.door-floor { left: -30%; right: -30%; bottom: -10%; height: 22%; background: radial-gradient(ellipse at 50% 30%, rgba(255, 236, 196, .4), rgba(255, 236, 196, 0) 68%); }
.door-room {
  position: absolute; left: 11%; right: 11%; top: 8%; bottom: 1.25%;
  border-radius: 50% 50% 0 0 / 30% 30% 0 0; overflow: hidden; background: var(--ink-room);
}
.door-room-spill { left: -20%; right: -20%; bottom: 0; height: 46%; background: radial-gradient(ellipse at 50% 100%, rgba(255, 236, 196, .45), rgba(255, 236, 196, 0) 70%); }

.door .glow {
  position: absolute; left: 50%; top: 44%; opacity: 0; transform: translate(-50%, -50%) scale(.4);
  transition: opacity .8s .15s ease-out, transform 1.1s .15s cubic-bezier(.2, .7, .2, 1);
}
.glow--halo {
  width: 150%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 223, .95) 0%, rgba(255, 232, 180, .6) 12%, rgba(255, 214, 140, .22) 30%, rgba(255, 214, 140, .06) 48%, rgba(255, 214, 140, 0) 62%);
}
.glow--core { width: 30%; aspect-ratio: 1 / 1; }
.glow--core .core {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #FFFFFF 0%, #FFF3D2 45%, #FFD98E 100%);
  box-shadow: 0 0 24px 8px rgba(255, 236, 190, .75), 0 0 70px 24px rgba(255, 214, 140, .35);
}
.door .spillx { opacity: 0; transition: opacity .9s .25s; }

.door .leaf { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: left center; transform: perspective(600px) rotateY(0); transition: transform .95s cubic-bezier(.2, .7, .2, 1); }

.door-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.door-name { font-size: 28px; line-height: 1.15; text-align: center; }
.door-line { font-size: 14px; color: var(--label); text-align: center; max-width: 220px; }
.door .go {
  margin-top: 6px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--paper); padding-bottom: 3px; opacity: 0; transform: translateY(-4px);
  transition: opacity .4s .3s, transform .4s .3s;
}
.go-touch { display: none; }
@media (hover: none) { .go-hover { display: none; } .go-touch { display: inline; } }

/* open on hover, keyboard focus, or (touch) first tap */
.door:hover .door-frame, .door:focus-visible .door-frame, .door.is-open .door-frame { transform: translateY(-6px); }
.door:hover .leaf, .door:focus-visible .leaf, .door.is-open .leaf { transform: perspective(600px) rotateY(-62deg); }
.door:hover .glow, .door:focus-visible .glow, .door.is-open .glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.door:hover .spillx, .door:focus-visible .spillx, .door.is-open .spillx { opacity: 1; }
.door:hover .go, .door:focus-visible .go, .door.is-open .go { opacity: 1; transform: translateY(0); }
.door:focus-visible { outline: 1px solid var(--paper); outline-offset: 10px; }

/* ---------- community (light) ---------- */
.nh-light { background: var(--paper); color: var(--ink); }
.nh-community-inner {
  max-width: var(--max); margin: 0 auto; padding: 120px var(--pad);
  display: flex; flex-wrap: wrap; gap: 64px; align-items: center;
}
.nh-community-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.nh-community-intro { font-size: 17px; line-height: 1.7; color: var(--paper-body); max-width: 520px; }
.nh-benefits {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; max-width: 520px;
  background: var(--paper-line); border: 1px solid var(--paper-line);
}
.nh-benefits > div { background: var(--paper); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.nh-benefits span { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-label); }
.nh-benefits p { font-size: 15px; line-height: 1.5; }
.nh-community-art { flex: 1.1 1 460px; min-width: 0; }

/* hub diagram */
.hub { width: 100%; height: auto; }
.hub--narrow, .hub-chips { display: none; }
.hub .orbit { fill: none; stroke: var(--paper-line); stroke-width: 1; }
.hub .orbit--out { stroke-dasharray: 2 5; }
.hub .edge { fill: none; transition: opacity .25s ease, stroke-width .25s ease, stroke .25s ease; }
.hub .edge--spoke { stroke: var(--ink); stroke-width: 1; }
.hub .edge--orbit { stroke: var(--grey-2); stroke-width: 1; stroke-dasharray: 3 4; }
.hub .hub-dot { stroke: var(--ink); stroke-width: 1.2; }
.hub .hub-node--out .hub-dot, .hub .hub-dot--out { fill: var(--paper); }
.hub .hub-node--in .hub-dot, .hub .hub-dot--in { fill: var(--ink); }
.hub .pill { stroke: var(--ink); stroke-width: 1; transition: fill .25s ease; }
.hub .hub-node--out .pill { fill: var(--paper); }
.hub .hub-node--in .pill, .hub .pill--in { fill: var(--ink); }
.hub text { font-family: var(--font); font-size: 10px; letter-spacing: 1.2px; transition: fill .25s ease; }
.hub .hub-node--out text { fill: var(--ink); }
.hub .hub-node--in text, .hub .pill-text { fill: var(--paper); }
.hub .hit { fill: transparent; stroke: none; cursor: default; }
.hub .hub-node { transition: opacity .25s ease; }
.hub .hub-core { fill: var(--ink); }
.hub .hub-ring { fill: none; stroke: var(--ink); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: hub 3s ease-out infinite; }
.hub .hub-house { fill: none; stroke: var(--paper); stroke-width: 1.3; stroke-linejoin: round; }
.hub .hub-word { fill: var(--paper); font-size: 8px; letter-spacing: 2px; }
@keyframes hub { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.9); opacity: 0; } }

/* hovering a node dims everything that is not connected to it */
.hub.is-active .edge { opacity: .16; }
.hub.is-active .hub-node { opacity: .3; }
.hub.is-active .edge.is-hi { opacity: 1; }
.hub.is-active .edge--spoke.is-hi { stroke-width: 2.2; }
.hub.is-active .edge--orbit.is-hi { stroke: var(--ink); stroke-width: 1.8; }
.hub.is-active .hub-node.is-hi { opacity: 1; }
.hub.is-active .hub-node--out.is-focus .pill { fill: var(--ink); }
.hub.is-active .hub-node--out.is-focus text { fill: var(--paper); }
.hub.is-active .hub-node--in.is-focus .pill { stroke-width: 2.4; }

.hub-chips { flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
.hub-chips li { border: 1px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 12px; letter-spacing: .04em; }

/* ---------- office ---------- */
.nh-office-inner { max-width: var(--max); margin: 0 auto; padding: 120px var(--pad); display: flex; flex-direction: column; gap: 32px; }
.nh-office-head { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.nh-office-panel {
  display: flex; flex-wrap: wrap; border: 1px solid var(--hair); border-radius: 6px; overflow: hidden; background: var(--ink-hi);
}
.nh-office-card {
  flex: 1 1 320px; min-width: 0; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 24px;
  border-right: 1px solid var(--hair); background: var(--ink);
}
.nh-hq { display: flex; align-items: center; gap: 12px; }
.nh-label--paper-on-dark { color: var(--paper); font-size: 11px; }
.nh-office-card address { font-style: normal; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; }
.nh-office-card address span { font-size: 15px; color: var(--label); }
.nh-office-rows { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--hair); padding-top: 20px; font-size: 14px; color: var(--body); }
.nh-office-rows > div { display: flex; gap: 12px; align-items: baseline; }
.nh-office-rows dt { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--label); min-width: 84px; }

.nh-map { flex: 2 1 520px; min-width: 0; position: relative; min-height: 420px; background: #161615; }
.nh-map-canvas { position: absolute; inset: 0; }
.nh-map-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--label);
}
.nh-map.is-ready .nh-map-placeholder { display: none; }
.nh-map-hint {
  position: absolute; z-index: 500; right: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; pointer-events: none;
  background: rgba(18, 18, 18, .85); border: 1px solid var(--hair); color: var(--label);
  font-size: 11px; letter-spacing: .08em; opacity: 0; transition: opacity .3s ease;
}
.nh-map.is-ready .nh-map-hint { opacity: 1; }
.nh-map.is-active .nh-map-hint { opacity: 0; }

/* leaflet, restyled to the dark monochrome look */
.nh-map .leaflet-container { background: #161615; font-family: var(--font); outline: none; }
.nh-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(1) brightness(.78) contrast(1.15); }
.nh-map .leaflet-container .leaflet-control-attribution { background: rgba(18, 18, 18, .85); color: var(--label); font-size: 10px; }
.nh-map .leaflet-container .leaflet-control-attribution a { color: var(--body); }
.nh-map .leaflet-bar a { background: var(--ink); color: var(--paper); border-color: var(--hair); }
.nh-map .leaflet-bar a:hover { background: #222; }

.nh-pin { position: relative; width: 0; height: 0; }
.nh-pin-halo { position: absolute; left: -35px; top: -35px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 170, .32), rgba(255, 226, 170, 0) 70%); }
.nh-pin-ring {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 1.2px solid #FFE9BF;
  animation: ping 2.4s ease-out infinite;
}
.nh-pin-dot { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--light-1); box-shadow: 0 0 14px 5px rgba(255, 226, 170, .6); }
.nh-pin-line { position: absolute; left: 0; top: 8px; width: 1px; height: 34px; background: var(--paper); }
.nh-pin-card {
  position: absolute; left: -84px; top: 42px; width: 168px; padding: 8px 12px; border-radius: 4px; background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; white-space: nowrap;
}
.nh-pin-card b { font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.nh-pin-card i { font-style: normal; font-size: 9.5px; letter-spacing: .08em; color: var(--paper-body); }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- knock ---------- */
.nh-knock { border-top: 1px solid var(--hair); }
.nh-knock-inner { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 130px) var(--pad); display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }

/* ---------- whatsapp button (kept from the previous site) ---------- */
.nh-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 50; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); border: 1px solid var(--hair-2); color: var(--paper);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45); transition: transform .2s, border-color .2s, background .2s;
}
.nh-fab:hover { transform: translateY(-2px); border-color: var(--paper); background: #1c1c1c; }
body.nh-intro-active .nh-fab { opacity: 0; pointer-events: none; }

/* ---------- responsive ---------- */
@media (min-width: 1600px) { .nh-caption, .nh-coords { left: 7vw; } }
@media (min-width: 1024px) {
  .nh-caption { max-width: 440px; bottom: 16vh; }
  .nh-caption p { font-size: 19px; }
  .nh-coords { bottom: 16vh; }
  .nh-journey-rail { height: 220px; }
}

@media (max-width: 1000px) {
  .nh-doors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
}

@media (max-width: 820px) {
  .nh-office-card { border-right: 0; border-bottom: 1px solid var(--hair); }
  .nh-map { min-height: 380px; }
}

@media (max-width: 720px) {
  .nh-nav-link { display: none; }
  .nh-caption, .nh-coords { left: 6vw; right: 6vw; max-width: none; bottom: 12vh; }
  .nh-journey-rail { display: none; }
  .nh-stack-copy { font-size: 17px; }
  .nh-community-inner { padding: 80px var(--pad); gap: 48px; }
  .nh-office-inner { padding: 80px var(--pad); }
  .nh-doors-head { padding-top: 80px; }
  .hub--wide { display: none; }
  .hub--narrow { display: block; }
  .hub-chips { display: flex; }
  .nh-fab { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}

@media (max-width: 560px) {
  .nh-doors-grid { grid-template-columns: minmax(0, 1fr); row-gap: 64px; padding-bottom: 80px; }
  .door-frame { max-width: 220px; }
}

/* reduced motion: no door swings, flares, bursts or loops, only static glows */
@media (prefers-reduced-motion: reduce) {
  .nh-draw, .nh-intro-dot, .nh-intro-word, .nh-intro-tagline, .nh-intro-copy, .nh-intro-hint, .nh-intro-hint i {
    animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important;
  }
  .nh-intro { transition: none; }
  .nh-hero-overlay, .hub .hub-ring, .nh-pin-ring { animation: none; }
  .door { opacity: 1; transform: none; transition: none; }
  .door-frame, .door .leaf, .door .glow, .door .spillx, .door .go { transition: none; }
}

/* keep the WhatsApp button clear of the footer text */
.nh-footer-inner { padding-right: calc(var(--pad) + 64px); }
@media (max-width: 720px) { .nh-footer-inner { padding-right: var(--pad); padding-bottom: 76px; } }

/* the scroll-zoom hint is for mouse users only */
@media (hover: none) { .nh-map-hint { display: none; } }
