/* ==========================================================================
   Nodehaus · base: brand tokens, type, header, footer, buttons, shared door art
   ========================================================================== */

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

:root {
  --ink: #121212;          /* main background */
  --ink-2: #1A1A1A;        /* brand-kit ink, used on light surfaces */
  --ink-card: #151514;
  --ink-hi: #0E0E0E;
  --ink-room: #070707;     /* the dark inside of a door */
  --paper: #F3F1EC;        /* lines + text on dark, background of light sections */
  --body: #D6D2C9;         /* body text on dark */
  --label: #B9B5AC;        /* small labels */
  --hair: #3A3833;         /* hairlines */
  --hair-2: #5A5751;
  --grey: #8F8F8B;         /* warm grey */
  --grey-2: #8A867D;
  --paper-line: #CFCBC2;   /* hairlines on light */
  --paper-label: #5E5E5E;  /* labels on light */
  --paper-body: #3A3A3A;   /* body text on light */

  /* the only warm colour: light, used for glows only */
  --light-1: #FFF6DF;
  --light-2: #FFE8B4;
  --light-3: #FFD98E;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;   /* logo wordmark + tagline ONLY */

  --pad: clamp(20px, 5vw, 32px);
  --max: 1280px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip (not hidden): trims decorative glows at the viewport edge without making body a scroll
     container, which would stop the globe's position:sticky from sticking */
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
em { font-style: normal; opacity: .5; }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.nh-light :focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 400;
  background: var(--paper); color: var(--ink); padding: 12px 18px; border-radius: 999px; text-decoration: none; font-size: 14px;
}
.skip-link:focus { top: 16px; }

/* ---------- type ---------- */
.nh-h { font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
.nh-h--xxl { font-size: clamp(46px, 8vw, 80px); }
.nh-h--xl  { font-size: clamp(42px, 7vw, 88px); }
.nh-h--lg  { font-size: clamp(38px, 5vw, 64px); line-height: 1; }
.nh-h--md  { font-size: clamp(34px, 4.2vw, 52px); line-height: 1; }

.nh-label {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--label);
}
.nh-label--paper { color: var(--paper-label); }

.nh-lede { font-size: 18px; line-height: 1.6; color: var(--body); }
.nh-lede--lg { font-size: 19px; max-width: 540px; }

/* ---------- logo ---------- */
.nh-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.nh-logo-mark { width: 34px; height: 34px; flex: none; }
.nh-wordmark {
  font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .04em; line-height: 1;
}

/* ---------- header ---------- */
.nh-header { position: relative; z-index: 60; transition: background .3s ease, border-color .3s ease, opacity .3s ease; border-bottom: 1px solid transparent; }
.nh-header--fixed { position: fixed; top: 0; left: 0; right: 0; }
.nh-header-inner {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  transition: padding .3s ease;
}
.nh-header--solid {
  background: rgba(18, 18, 18, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--hair);
}
.nh-header--solid .nh-header-inner { padding-top: 16px; padding-bottom: 16px; }
body.nh-intro-active .nh-header { opacity: 0; pointer-events: none; }

.nh-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 14px; }
.nh-nav-link { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.nh-nav-link:hover { color: var(--label); }

/* ---------- buttons (pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 15px 26px; border-radius: 999px;
  font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--solid:hover { background: var(--body); }
.btn--ghost { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #2A2A2A; }
.btn--sm { padding: 12px 22px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.btn--lg { padding: 16px 28px; }

.nh-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nh-actions--center { justify-content: center; }
.nh-actions--end { gap: 10px; margin-top: auto; }

.nh-glow-dot {
  display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--light-1); box-shadow: 0 0 14px 4px rgba(255, 226, 170, .55);
}

/* ---------- footer ---------- */
.nh-footer { border-top: 1px solid var(--hair); }
.nh-footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--pad);
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--label);
}
.nh-footer-brand { display: flex; align-items: center; gap: 10px; color: var(--paper); }
.nh-footer-mark { width: 24px; height: 24px; --mk-w: 5; }
.nh-footer-lockup { display: flex; flex-direction: column; gap: 5px; }
.nh-footer-word { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: .05em; line-height: 1; }
.nh-footer-tag { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 10px; letter-spacing: .16em; color: #B8B6B0; line-height: 1; }

/* ---------- line art + warm light (shared by doors, minis and the sun) ---------- */
.pl { fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pl-fill { fill: var(--ink); stroke: var(--paper); stroke-width: 1.4; stroke-linejoin: round; }
.pl-soft { fill: none; stroke: var(--hair-2); stroke-width: 1; stroke-linecap: round; }

@keyframes breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
@keyframes spark { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-90px); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.rise { animation: rise .8s ease-out both; }
.core { animation: breathe 3.2s ease-in-out infinite; }
.spark { position: absolute; border-radius: 50%; background: #FFF3D2; animation: spark 3s ease-out infinite; }

.spillx { position: absolute; pointer-events: none; }

/* the other-doors minis (service pages) */
.mini {
  display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--paper);
  border: 1px solid var(--hair); border-radius: 6px; padding: 20px 24px; min-height: 44px;
}
.mini:hover, .mini:focus-visible { border-color: var(--hair-2); }
.mini-door { position: relative; display: block; width: 40px; height: 64px; flex: none; }
.mini-door svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-arch .pl { stroke-width: 6; }
.mini-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);
}
.mini-glow {
  position: absolute; left: 50%; top: 44%; width: 130%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, #FFFFFF 0%, #FFF3D2 14%, rgba(255, 214, 140, .5) 32%, rgba(255, 214, 140, 0) 62%);
  opacity: 0; transition: opacity .5s .1s;
}
.mini-leaf { transform-origin: left center; transform: perspective(200px) rotateY(0); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.mini-leaf .pl-fill { stroke-width: 6; }
.mini-leaf .pl { stroke-width: 5; }
.mini:hover .mini-glow, .mini:focus-visible .mini-glow { opacity: 1; }
.mini:hover .mini-leaf, .mini:focus-visible .mini-leaf { transform: perspective(200px) rotateY(-62deg); }
.mini-name { font-size: 24px; }

/* ---------- the light flare used when you step through a door ---------- */
.nh-flare {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), #FFFFFF 0%, #FFF6DF 16%, #FFE8B4 38%, rgba(255, 217, 142, .92) 62%, rgba(255, 217, 142, .55) 100%);
  transition: opacity .4s ease;
}
.nh-flare.is-on { opacity: 1; pointer-events: auto; }
html.from-light .nh-flare { opacity: 1; transition: none; }
html.flare-out .nh-flare { opacity: 0; transition: opacity .8s ease; }

@media (max-width: 720px) {
  .nh-nav { gap: 4px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .core, .spark { animation: none; }
  .mini-leaf, .mini-glow, .nh-flare { transition: none; }
}
