/* Noctern Studio Vibrant v2 Design System
   Real-time WebGL flora + AXON particle physics + procedural caustics behind translucent frosted dark glass. */

@font-face {
  font-family: 'Antonio';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/antonio-latin-ext-e093c87be9.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Antonio';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/antonio-latin-8337c55278.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext-27eccb1f89.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-latin-8bd97e6bbb.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/manrope-latin-8bd97e6bbb.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-void: #040507;
  --glass-bg: rgba(10, 13, 18, 0.68);
  --glass-bg-strong: rgba(9, 12, 17, 0.80);
  --glass-bg-soft: rgba(12, 16, 22, 0.54);
  --glass-border: rgba(245, 239, 226, 0.16);
  --glass-border-strong: rgba(245, 239, 226, 0.28);
  --ivory: #F5EFE2;
  --ivory-soft: #D6D0C5;
  --ivory-muted: #A8A298;
  --pill-bg: #F5EFE2;
  --pill-ink: #121210;
  --cyan: #7EE7F5;
  --cyan-border: rgba(126, 231, 245, 0.58);
  --gold: #F0D095;
  --gold-border: rgba(240, 208, 149, 0.58);
  --cobalt: #5AB4FF;
  --coral: #FF9B82;
  --error: #FF9B9B;
  --font-display: 'Antonio', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  --radius-card: 20px;
  --radius-media: 14px;
  --radius-pill: 999px;
  --max-w: 1320px;
  --gutter: clamp(18px, 3.6vw, 48px);
  --header-h: 82px;
}

/* Cross-document and same-document View Transitions (progressive enhancement) */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

::view-transition-old(root) {
  animation: ns-vt-out 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

::view-transition-new(root) {
  animation: ns-vt-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ns-vt-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ns-vt-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ns-cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 34rem;
}

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

html {
  background: var(--bg-void);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg-void);
  color: var(--ivory);
  overflow-x: clip;
  position: relative;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 3px;
}

.sr-only,
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.ns-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-weight: 600;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.ns-skip:focus {
  transform: translateY(0);
}

/* =========================================================================
   LIVE WEBGL WORLD CANVAS (FIXED BEHIND ALL CONTENT)
   ========================================================================= */
#noctern-webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

body.is-intro #noctern-webgl {
  pointer-events: auto;
  cursor: pointer;
}

.ns-page {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.ns-main {
  flex: 1 0 auto;
  padding-top: calc(var(--header-h) + 12px);
}

body.is-home .ns-main {
  padding-top: 0;
}

.ns-container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* =========================================================================
   SHARED HEADER (DESKTOP + MOBILE)
   ========================================================================= */
.ns-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: linear-gradient(180deg, rgba(4, 5, 7, 0.78) 0%, rgba(4, 5, 7, 0.34) 68%, rgba(4, 5, 7, 0) 100%);
  pointer-events: none;
  transition: background-color 0.32s ease, backdrop-filter 0.32s ease, border-color 0.32s ease;
}

@media (min-width: 861px) {
  .ns-header.is-scrolled {
    background: rgba(5, 7, 12, 0.76);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    border-bottom: 1px solid rgba(245, 239, 226, 0.11);
  }
}

.ns-header > * {
  pointer-events: auto;
}

.ns-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  flex-shrink: 0;
}

.ns-brand img {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(1.06) sepia(0.14) saturate(0.65);
  transition: opacity 0.2s ease;
}

.ns-brand:hover img {
  opacity: 0.85;
}

.ns-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 38px);
}

.ns-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ns-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  position: relative;
  transition: color 0.2s ease;
}

.ns-nav-links a:hover,
.ns-nav-links a[aria-current="page"] {
  color: var(--ivory);
}

.ns-nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1.5px;
  background: var(--ivory);
}

.ns-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.ns-pill:hover {
  background: #FFFFFF;
  box-shadow: 0 8px 26px rgba(245, 239, 226, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .ns-pill:hover {
    transform: translateY(-1px);
  }
}

.ns-pill--sentence {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.92rem;
}

.ns-pill-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: rgba(14, 18, 25, 0.56);
  border: 1px solid rgba(245, 239, 226, 0.26);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ivory);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ns-pill-ghost:hover {
  border-color: rgba(245, 239, 226, 0.55);
  background: rgba(24, 30, 40, 0.72);
}

.ns-pill-ghost.is-active,
.ns-pill-ghost[aria-pressed="true"] {
  border-color: var(--cyan-border);
  background: rgba(126, 231, 245, 0.14);
  color: var(--ivory);
  box-shadow: 0 0 20px rgba(126, 231, 245, 0.18);
}

.ns-pill-ghost.is-active-gold {
  border-color: var(--gold-border);
  background: rgba(240, 208, 149, 0.14);
  color: var(--ivory);
  box-shadow: 0 0 20px rgba(240, 208, 149, 0.18);
}

.ns-circle-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 226, 0.34);
  background: rgba(12, 16, 22, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ivory);
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.ns-circle-btn:hover {
  background: var(--pill-bg);
  color: var(--pill-ink);
  border-color: var(--pill-bg);
}

/* =========================================================================
   BESPOKE FRAMELESS PARTICLE MENU TRIGGER (PURE FLOATING SILVERY STARDUST)
   ========================================================================= */
.ns-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 46px;
  padding: 0;
  flex-shrink: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3f6fb;
  overflow: visible;
  transition: opacity 0.25s ease;
}

.ns-menu-btn-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Overflow bleed canvas lets stardust streams and orbital filaments float seamlessly into the night sky */
.ns-menu-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 184px;
  height: 92px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: block;
}

.ns-menu-btn.is-handed-off {
  opacity: 0;
  transition: none;
}

.ns-menu-btn:focus-visible {
  outline: 1px solid rgba(236, 244, 255, 0.85);
  outline-offset: 4px;
}

@media (forced-colors: active) {
  .ns-menu-btn {
    border: 1px solid ButtonText;
    padding-inline: 12px;
    width: auto;
  }
  .ns-menu-btn-sr {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: ButtonText;
  }
  .ns-menu-particles {
    display: none;
  }
}

/* Mobile particle MENU stays mobile-only; desktop uses full navigation + studio index */
@media (min-width: 861px) {
  .ns-menu-btn {
    display: none !important;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 72px;
  }
  .ns-brand img {
    height: 31px;
  }
  .ns-nav-links {
    display: none;
  }
  .ns-nav {
    gap: 10px;
  }
  .ns-menu-btn {
    width: 92px;
    height: 44px;
  }
}

/* =========================================================================
   UNIFIED FULL-VIEWPORT LUNAR HORIZON OVERLAY (<dialog> - ZERO SEPARATE-PAGE CUT)
   ========================================================================= */
.ns-drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f6fb;
  overflow: hidden;
  opacity: 0;
  transition-property: opacity, display, overlay;
  transition-duration: 0.01s;
  transition-behavior: allow-discrete;
}

.ns-drawer:modal {
  overscroll-behavior: contain;
}

.ns-drawer::backdrop {
  background: rgba(3, 5, 10, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  overflow: hidden;
  overscroll-behavior: contain;
  transition-property: background-color, backdrop-filter, -webkit-backdrop-filter, display, overlay;
  transition-duration: 0.56s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-behavior: allow-discrete;
}

.ns-drawer[open]:where(:not([data-closing])) {
  display: block;
  opacity: 1;
}

.ns-drawer[open]:where(:not([data-closing]):not(.is-closing-veil))::backdrop {
  background: rgba(3, 5, 10, 0.42);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

@starting-style {
  .ns-drawer[open]:where(:not([data-closing]):not(.is-closing-veil))::backdrop {
    background: rgba(3, 5, 10, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}

.ns-drawer.is-closing-veil::backdrop {
  background: rgba(3, 5, 10, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition-duration: 0.42s;
}

@media (prefers-reduced-motion: reduce) {
  .ns-drawer,
  .ns-drawer::backdrop {
    transition-duration: 0.12s;
  }
}

/* Shared circular close button (also reused by video/sequence modals) */
.ns-drawer-close {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(220, 232, 248, 0.44);
  background: radial-gradient(circle at 35% 30%, rgba(42, 50, 64, 0.72), rgba(12, 15, 22, 0.88));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 20px rgba(212, 226, 248, 0.14);
  display: grid;
  place-items: center;
  color: #f4f7fc;
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.ns-drawer-close:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(240, 246, 255, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  .ns-drawer-close:hover {
    transform: scale(1.05);
  }
}

.ns-horizon {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.ns-horizon-bg,
.ns-horizon-flora-fg,
.ns-horizon-fx {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ns-horizon-bg {
  z-index: 0;
}

.ns-horizon-flora-fg {
  z-index: 3;
}

.ns-horizon-fx {
  z-index: 5;
}

.ns-horizon-chrome {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Pixel-locked to .ns-header so the Noctern Studio logo never shifts by even 1px */
.ns-horizon-top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  flex-shrink: 0;
}

.ns-horizon-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

.ns-horizon-brand img {
  display: block;
  height: 36px;
  width: auto;
  filter: brightness(1.06) sepia(0.14) saturate(0.65);
}

@media (max-width: 860px) {
  .ns-horizon-brand img {
    height: 31px;
  }
}

/* Close control emerges gently right where the MENU particles dissolved away */
.ns-horizon-top .ns-drawer-close {
  opacity: 0;
  transform: scale(0.84);
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
}

.ns-drawer.is-veil-ready .ns-horizon-top .ns-drawer-close {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.18s;
}

.ns-drawer.is-closing-veil .ns-horizon-top .ns-drawer-close {
  opacity: 0;
  transform: scale(0.84);
  transition-delay: 0s;
  transition-duration: 0.18s;
}

/* Concave-crowned frosted obsidian meadow-glass sanctuary (Concept 02-C) */
.ns-horizon-sheet-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 16px max(14px, env(safe-area-inset-bottom));
  margin-top: clamp(148px, 23vh, 212px);
  min-height: 0;
}

.ns-horizon-sheet {
  position: relative;
  width: min(440px, 100%);
  height: 100%;
  max-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 20px 18px;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 22, 0.70) 0%,
    rgba(8, 11, 18, 0.56) 54%,
    rgba(7, 10, 16, 0.34) 82%,
    rgba(6, 8, 13, 0.10) 100%
  );
  backdrop-filter: blur(16px) saturate(148%);
  -webkit-backdrop-filter: blur(16px) saturate(148%);
  clip-path: polygon(
    0% 3.4%, 1.2% 1.6%, 4.2% 1.2%, 15% 1.8%, 28% 2.6%, 40% 3.1%, 50% 3.3%,
    60% 3.1%, 72% 2.6%, 85% 1.8%, 95.8% 1.2%, 98.8% 1.6%, 100% 3.4%,
    100% 100%, 0% 100%
  );
  border-radius: 16px 16px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.14s, transform 0.56s cubic-bezier(0.22, 1, 0.36, 1) 0.14s;
}

.ns-drawer.is-veil-ready .ns-horizon-sheet {
  opacity: 1;
  transform: translateY(0);
}

.ns-drawer.is-closing-veil .ns-horizon-sheet {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.24s ease, transform 0.30s ease;
}

@media (prefers-reduced-motion: reduce) {
  .ns-horizon-sheet,
  .ns-horizon-top .ns-drawer-close {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.ns-horizon-sheet::-webkit-scrollbar {
  display: none;
}

.ns-drawer.is-navigating-out .ns-horizon-sheet {
  opacity: 0.42;
}

.ns-horizon-rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* 100% centered, number-free editorial navigation list */
.ns-horizon-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: auto 0;
}

.ns-hnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 6px 16px;
  font-family: var(--font-display);
  font-size: clamp(2.0rem, 7.6vw, 2.45rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.012em;
  text-align: center;
  color: rgba(244, 240, 230, 0.80);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.82);
  transition: color 0.22s ease, text-shadow 0.22s ease, transform 0.22s ease;
}

.ns-hnav-link:hover,
.ns-hnav-link:focus-visible {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9), 0 0 24px rgba(232, 242, 255, 0.44);
}

.ns-hnav-link.is-active {
  color: #f8f9fc;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.92), 0 0 22px rgba(232, 242, 255, 0.36);
}

.ns-hnav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(232, 242, 255, 0), rgba(244, 248, 255, 0.95), rgba(232, 242, 255, 0));
  box-shadow: 0 0 12px rgba(232, 242, 255, 0.85);
}

.ns-hnav-text {
  display: inline-block;
  transition: opacity 0.18s ease, transform 0.24s ease;
}

.is-dissolving .ns-hnav-text,
.is-dissolving .ns-hnav-card-label {
  opacity: 0;
  transform: translateY(-4px) scale(1.03);
}

.is-dissolving.ns-hnav-link::after {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.ns-hnav-rule {
  display: block;
  width: 88%;
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 236, 252, 0), rgba(226, 236, 252, 0.20) 20%, rgba(226, 236, 252, 0.20) 80%, rgba(226, 236, 252, 0));
  margin: 3px 0;
}

.ns-hnav-campaign-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 2px 0 10px;
}

.ns-hnav-campaign {
  min-height: 44px;
  padding-bottom: 4px;
}

.ns-hnav-campaign.is-active::after {
  display: none;
}

.ns-hnav-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ns-hnav-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10.6;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(226, 238, 255, 0.34);
  background: #0a0e16;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.56);
  transition: border-color 0.22s ease, transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.ns-hnav-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.ns-hnav-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 14, 0.04) 34%, rgba(4, 7, 14, 0.82) 100%);
  pointer-events: none;
}

.ns-hnav-card:hover,
.ns-hnav-card:focus-visible,
.ns-hnav-card.is-active {
  border-color: rgba(248, 252, 255, 0.84);
  box-shadow: 0 0 22px rgba(224, 238, 255, 0.24), 0 12px 28px rgba(0, 0, 0, 0.64);
}

.ns-hnav-card:hover img {
  transform: scale(1.05);
}

.ns-hnav-card.is-dissolving {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 26px rgba(235, 244, 255, 0.52);
}

.ns-hnav-card-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: #f6f8fc;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92);
  transition: opacity 0.18s ease, transform 0.24s ease;
}

/* Bottom luminous CTA + centered replay link */
.ns-horizon-foot {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ns-horizon-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 188px;
  height: 48px;
  padding: 0 34px;
  border-radius: 999px;
  background: #f5f3ec;
  color: #06080d;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 26px rgba(236, 243, 255, 0.36), 0 10px 26px rgba(0, 0, 0, 0.56);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, opacity 0.22s ease;
}

.ns-horizon-cta:hover,
.ns-horizon-cta:focus-visible {
  background: #ffffff;
  box-shadow: 0 0 34px rgba(246, 250, 255, 0.56), 0 12px 28px rgba(0, 0, 0, 0.62);
}

.ns-horizon-cta.is-dissolving {
  background: rgba(245, 243, 236, 0.22);
  box-shadow: 0 0 34px rgba(240, 248, 255, 0.58);
}

@media (prefers-reduced-motion: no-preference) {
  .ns-horizon-cta:hover {
    transform: translateY(-1px) scale(1.02);
  }
}

.ns-horizon-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 4px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  color: rgba(240, 245, 252, 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ns-horizon-replay:hover,
.ns-horizon-replay:focus-visible {
  color: #ffffff;
}

@media (max-height: 700px) {
  .ns-horizon-sheet-wrap {
    margin-top: clamp(106px, 18.5vh, 142px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .ns-horizon-sheet {
    padding: 24px 16px 14px;
  }
  .ns-hnav-link {
    min-height: 38px;
    font-size: clamp(1.68rem, 6.2vw, 2.0rem);
  }
  .ns-hnav-card {
    aspect-ratio: 16 / 9.0;
  }
  .ns-horizon-foot {
    margin-top: 6px;
    gap: 5px;
  }
  .ns-horizon-cta {
    height: 42px;
  }
}

/* =========================================================================
   TRANSLUCENT FROSTED OBSIDIAN GLASS SURFACES & TYPOGRAPHY
   ========================================================================= */
.ns-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.45);
}

.ns-glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 28px 72px rgba(0, 0, 0, 0.55);
}

.ns-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.014em;
  color: var(--ivory);
}

.ns-h1 {
  font-size: clamp(2.85rem, 6.2vw, 5.15rem);
}

.ns-h2 {
  font-size: clamp(2.05rem, 3.8vw, 3.35rem);
}

.ns-h3 {
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
}

.ns-lead {
  margin: 0;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.58;
  color: var(--ivory-soft);
}

.ns-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.ns-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--cyan);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(126, 231, 245, 0.45);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.ns-link:hover {
  color: #B4F5FF;
  text-decoration-color: #B4F5FF;
}

.ns-link--gold {
  color: var(--gold);
  text-decoration-color: rgba(240, 208, 149, 0.45);
}

.ns-link--gold:hover {
  color: #FFE7B8;
  text-decoration-color: #FFE7B8;
}

/* =========================================================================
   FLOATING AMBIENT CONTROLS (UNOBTRUSIVE, NEVER OVERLAPS PAGE CTAs)
   ========================================================================= */
.ns-corner {
  position: relative;
  z-index: 5;
  margin: 0 auto 28px;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(8, 11, 16, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ivory-soft);
}

.ns-corner-wrap {
  display: flex;
  justify-content: flex-end;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 16px;
}

.ns-corner-sep {
  width: 1px;
  height: 16px;
  background: rgba(245, 239, 226, 0.25);
}

.ns-corner button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 6px;
  white-space: nowrap;
  color: var(--ivory-soft);
  transition: color 0.18s ease;
}

.ns-corner button:hover {
  color: var(--ivory);
}

.ns-corner svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .ns-corner {
    padding: 4px 12px;
    font-size: 0.68rem;
  }
  .ns-corner-label {
    display: none;
  }
}

/* =========================================================================
   SHARED FOOTER
   ========================================================================= */
.ns-footer {
  margin-top: clamp(56px, 8vw, 112px);
  padding: 0 var(--gutter) 72px;
}

.ns-footer-bar {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.ns-footer-brand img {
  height: 32px;
  width: auto;
  filter: brightness(1.06) sepia(0.14) saturate(0.65);
  margin-bottom: 14px;
}

.ns-footer-brand p {
  margin: 0 0 18px;
  color: var(--ivory-soft);
  max-width: 28ch;
  font-size: 0.92rem;
}

.ns-footer-brand p:last-child {
  margin-bottom: 0;
}

.ns-footer-col h3 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.ns-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ns-footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ivory-soft);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}

.ns-footer-col a:hover {
  color: var(--ivory);
}

.ns-footer-sub {
  max-width: var(--max-w);
  margin: 18px auto 0;
  padding-inline: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ivory-muted);
}

@media (max-width: 820px) {
  .ns-footer-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "brand brand"
      "left  right"
      "base  base";
    column-gap: 16px;
    row-gap: 28px;
  }

  .ns-footer-brand {
    grid-area: brand;
  }

  .ns-footer-bar > .ns-footer-col:nth-child(2) {
    grid-area: left;
  }

  .ns-footer-bar > .ns-footer-col:nth-child(3) {
    grid-area: right;
  }

  .ns-footer-bar > .ns-footer-col:nth-child(4) {
    grid-area: base;
    justify-self: center;
    padding-top: 4px;
  }

  .ns-footer-col {
    text-align: center;
  }

  .ns-footer-col ul {
    align-items: safe center;
  }

  .ns-footer-col a {
    justify-content: center;
  }
}

/* =========================================================================
   MODAL DIALOG (TIMING STUDY / PRINT / AURAI INSPECTOR)
   ========================================================================= */
.ns-modal {
  margin: auto;
  padding: 0;
  border: 1px solid var(--glass-border-strong);
  border-radius: 22px;
  background: rgba(8, 11, 16, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  color: var(--ivory);
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  overflow: auto;
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.72);
}

.ns-modal::backdrop {
  background: rgba(2, 3, 5, 0.78);
  backdrop-filter: blur(8px);
}

.ns-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border);
}

.ns-modal-body {
  padding: 20px 22px 24px;
}

.ns-modal-body video,
.ns-modal-body img {
  width: 100%;
  max-height: 68svh;
  object-fit: contain;
  border-radius: 12px;
  background: #020305;
}

/* =========================================================================
   FORM INPUTS & DEFERRED VALIDATION (:user-invalid)
   ========================================================================= */
.ns-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ns-field label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ivory);
}

.ns-field input,
.ns-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(245, 239, 226, 0.22);
  color: var(--ivory);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ns-field textarea {
  min-height: 104px;
  resize: vertical;
}

.ns-field input::placeholder,
.ns-field textarea::placeholder {
  color: var(--ivory-muted);
}

.ns-field input:focus,
.ns-field textarea:focus {
  border-color: var(--ivory);
  background: rgba(255, 255, 255, 0.085);
}

.ns-error-msg {
  display: none;
  font-size: 0.82rem;
  color: var(--error);
}

.ns-field :is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--error);
  background: rgba(255, 110, 110, 0.08);
}

.ns-field :is(:user-invalid, .user-invalid-fallback) + .ns-error-msg {
  display: block;
}

.ns-field :is(:user-valid, .user-valid-fallback) {
  border-color: rgba(126, 231, 245, 0.55);
}
