/* Header: Full-Width Clean Bar at Top -> Morphs into Floating Island Pill on Scroll */
.nav-pill {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-nav);
  width: 100%;
  max-width: 100%;
  height: 76px;
  padding: 0 32px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  transition:
    top 0.42s var(--ease-expo),
    width 0.42s var(--ease-expo),
    max-width 0.42s var(--ease-expo),
    height 0.42s var(--ease-expo),
    padding 0.42s var(--ease-expo),
    border-radius 0.42s var(--ease-expo),
    background-color 0.35s var(--ease-ui),
    border-color 0.35s var(--ease-ui),
    color 0.35s var(--ease-ui),
    box-shadow 0.35s var(--ease-ui);
}

.nav-pill.nav-pill--island {
  top: 16px;
  width: min(calc(100% - 32px), 1060px);
  height: 60px;
  padding: 0 10px 0 18px;
  border-radius: var(--radius-pill);
  background: rgba(0, 22, 27, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(106, 243, 227, 0.2);
  box-shadow: 0 12px 36px rgba(0, 12, 16, 0.28);
}

.nav-pill.nav-pill--island.nav-pill--scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 83, 99, 0.16);
  color: var(--ink);
  box-shadow: 0 12px 34px rgba(0, 34, 41, 0.09);
}

.nav-pill__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-pill__logo-wrap {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  transition: background-color 0.3s var(--ease-ui), padding 0.3s var(--ease-ui);
}

.nav-pill--scrolled .nav-pill__logo-wrap {
  background: var(--petrol-950);
  padding: 5px 14px;
}

.nav-pill__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-pill--island .nav-pill__logo-img {
  height: 30px;
}

.nav-pill__brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-pill__sub {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.76);
  transition: opacity 0.25s var(--ease-ui), max-height 0.25s var(--ease-ui), color 0.25s var(--ease-ui);
  max-height: 20px;
  overflow: hidden;
}

.nav-pill--island .nav-pill__sub {
  opacity: 0;
  max-height: 0;
}

.nav-pill__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-pill__link {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s var(--ease-ui);
}

.nav-pill__link:hover {
  color: var(--aqua-300);
}

.nav-pill--scrolled .nav-pill__link {
  color: var(--ink-muted);
}

.nav-pill--scrolled .nav-pill__link:hover {
  color: var(--petrol-900);
}

.nav-pill__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill__contact-btn {
  background: #ffffff;
  color: var(--petrol-950);
  border-color: #ffffff;
}

.nav-pill__contact-btn:hover {
  background: var(--aqua-300);
  border-color: var(--aqua-300);
  color: var(--petrol-950);
}

.nav-pill--scrolled .nav-pill__contact-btn {
  background: var(--petrol-900);
  color: #ffffff;
  border-color: var(--petrol-900);
}

.nav-pill__circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.28s var(--ease-ui);
}

.nav-pill__circle-btn:hover {
  background: rgba(0, 182, 217, 0.28);
  border-color: var(--aqua-300);
  transform: scale(1.06);
}

.nav-pill--scrolled .nav-pill__circle-btn {
  border-color: var(--sage-100);
  background: var(--paper-subtle);
  color: var(--petrol-900);
}

.nav-pill--island .nav-pill__circle-btn {
  display: none;
}

.nav-pill__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-pill--scrolled .nav-pill__menu-btn {
  border-color: var(--sage-100);
  background: var(--paper-subtle);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 86px;
  left: 16px;
  right: 16px;
  z-index: var(--z-mobile-nav);
  border-radius: var(--radius-lg);
  background: rgba(0, 28, 34, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(106, 243, 227, 0.22);
  color: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow-drawer);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.mobile-nav__link {
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.mobile-nav__link:hover {
  background: rgba(106, 243, 227, 0.1);
  color: var(--aqua-300);
}

.mobile-nav__ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 900px) {
  .nav-pill__links,
  .nav-pill__actions {
    display: none;
  }
  .nav-pill__menu-btn {
    display: inline-flex;
  }
}

/* ===================================================================== */
/* PART 1: DARK ATMOSPHERIC HERO (NocturneHero adapted to MTPT palette)  */
/* ===================================================================== */
.nocturne-hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--nocturne-void);
  color: #ffffff;
  padding-top: 86px;
}

.nocturne-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, #001419 0%, #002229 58%, #003944 100%);
}

.nocturne-aurora {
  position: absolute;
  inset: 0;
  opacity: 0.86;
  transition: opacity 2.5s ease;
}

.nocturne-aurora.is-energized {
  opacity: 1;
}

.nocturne-aurora-a {
  position: absolute;
  left: -10%;
  top: -20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(0, 182, 217, 0.34), rgba(0, 182, 217, 0));
  animation: aurora-drift-a 28s ease-in-out infinite;
}

.nocturne-aurora-b {
  position: absolute;
  right: -15%;
  top: 5%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(106, 243, 227, 0.22), rgba(106, 243, 227, 0));
  animation: aurora-drift-b 34s ease-in-out infinite;
}

.nocturne-aurora-c {
  position: absolute;
  bottom: -24%;
  left: 20%;
  width: 70%;
  height: 60%;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(0, 83, 99, 0.45), rgba(0, 83, 99, 0));
  animation: aurora-drift-c 40s ease-in-out infinite;
}

.nocturne-curtain-1,
.nocturne-curtain-2 {
  position: absolute;
  left: -15%;
  right: -15%;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 86%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 86%);
}

.nocturne-curtain-1 {
  top: -12%;
  height: 75%;
  filter: blur(42px);
  background: linear-gradient(
    100deg,
    transparent 8%,
    rgba(0, 83, 99, 0.45) 32%,
    rgba(0, 182, 217, 0.32) 50%,
    rgba(106, 243, 227, 0.24) 68%,
    transparent 90%
  );
  animation: curtain-sway-1 26s ease-in-out infinite;
}

.nocturne-curtain-2 {
  top: -8%;
  height: 60%;
  filter: blur(60px);
  background: linear-gradient(
    80deg,
    transparent 15%,
    rgba(106, 243, 227, 0.26) 38%,
    rgba(51, 144, 151, 0.32) 60%,
    transparent 85%
  );
  animation: curtain-sway-2 32s ease-in-out infinite;
}

@keyframes aurora-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12%, 9%) scale(1.14); }
}

@keyframes aurora-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-14%, 12%) scale(0.92); }
}

@keyframes aurora-drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, -4%) scale(1.1); }
}

@keyframes curtain-sway-1 {
  0%, 100% { transform: translateX(-5%) skewX(-7deg); opacity: 0.55; }
  50% { transform: translateX(5%) skewX(7deg); opacity: 0.82; }
}

@keyframes curtain-sway-2 {
  0%, 100% { transform: translateX(6%) skewX(6deg); opacity: 0.38; }
  50% { transform: translateX(-6%) skewX(-6deg); opacity: 0.65; }
}

/* 10s BreathOrb */
.breath-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(115vw, 880px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -55%);
  pointer-events: none;
}

.breath-orb__core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(106, 243, 227, 0.22), rgba(0, 83, 99, 0.16) 45%, rgba(0, 57, 68, 0) 72%);
  animation: breath-pulse 10s ease-in-out infinite;
}

.breath-orb__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(106, 243, 227, 0.08);
  animation: breath-ring 10s ease-in-out infinite;
}

.breath-orb__ring--1 { inset: 25%; }
.breath-orb__ring--2 { inset: 14%; animation-delay: 0.35s; }
.breath-orb__ring--3 { inset: 3%; animation-delay: 0.7s; }

@keyframes breath-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  40% { transform: scale(1.12); opacity: 1; }
}

@keyframes breath-ring {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.06); }
}

#sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nocturne-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 72%, #001B22 100%),
    radial-gradient(ellipse at 50% 45%, rgba(0, 20, 25, 0) 30%, rgba(0, 20, 25, 0.72) 100%);
}

.nocturne-content {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nocturne-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.nocturne-headline {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.85rem, 6.8vw, 6.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
  color: #ffffff;
  text-wrap: balance;
}

.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  animation: word-in 1.15s var(--ease-expo) forwards;
  animation-delay: var(--w-delay, 0.2s);
}

@keyframes word-in {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.nocturne-sub {
  margin-top: 24px;
  max-width: 52ch;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  animation: fade-soft 1.1s var(--ease-expo) 1.35s forwards;
}

.nocturne-ctas {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  animation: fade-soft 1.1s var(--ease-expo) 1.55s forwards;
}

.nocturne-note {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.45);
  opacity: 0;
  animation: fade-soft 1.1s var(--ease-expo) 1.75s forwards;
}

@keyframes fade-soft {
  to {
    opacity: 1;
  }
}

.nocturne-foot {
  position: relative;
  z-index: 10;
  padding: 12px 24px 32px;
  display: flex;
  justify-content: center;
}

.breath-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(213, 227, 220, 0.68);
}

.breath-cue__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua-300);
  animation: breath-dot 10s ease-in-out infinite;
}

@keyframes breath-dot {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  40% { transform: scale(1.85); opacity: 1; }
}

.breath-cue__label {
  min-width: 142px;
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  .word-reveal,
  .nocturne-sub,
  .nocturne-ctas,
  .nocturne-note {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .breath-cue__dot {
    animation: none !important;
  }
}

/* Ultra-Long, Seamless Dark-to-Light Gradient Bridge */
.theme-bridge {
  position: relative;
  z-index: 2;
  background: linear-gradient(to bottom, #001B22 0%, #012730 35%, #03333D 70%, #053E49 100%);
  padding: 40px 0 64px;
  margin-bottom: 0;
}

.verticals-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 24px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(213, 227, 220, 0.22);
}

.verticals-strip__item {
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.verticals-strip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--aqua-300);
}

/* White-Themed Section Head Over Seamless Dark-to-Light Gradient */
.section-head--inverted {
  position: relative;
  z-index: 6;
  color: #ffffff;
  padding-top: 28px;
  margin-bottom: 78px;
}

.section-head--inverted .label-micro--light {
  color: var(--sage-100);
}

.section-head--inverted .heading-section {
  color: #ffffff;
}

.section-head--inverted .section-lead {
  color: rgba(255, 255, 255, 0.86);
}

.section-head--inverted .label-micro__dot {
  background: var(--aqua-300);
}

/* Smooth Light-to-Dark Gradient Bridge Before Meadow Footer */
.footer-bridge {
  height: 280px;
  background: linear-gradient(
    to bottom,
    #FFFFFF 0%,
    #F3F7F7 14%,
    #D6E4E5 30%,
    #9BBAC0 48%,
    #5A8B93 66%,
    #245963 82%,
    #0B3139 92%,
    #001419 100%
  );
}

/* ===================================================================== */
/* PART 2: LIGHT BODY SECTIONS                                           */
/* ===================================================================== */
.light-body {
  position: relative;
  z-index: 4;
  background-color: var(--paper-subtle);
  color: var(--ink);
}

.light-section {
  padding: 96px 0;
  background-color: var(--paper-subtle);
}

#how-it-works.light-section {
  background-color: var(--paper-subtle);
  background-image: linear-gradient(
    to bottom,
    #053E49 0%,
    #0C4550 18%,
    #1B5661 34%,
    #3B737B 50%,
    #77A2A7 66%,
    #B8D1D3 80%,
    #E1ECEC 91%,
    #F6F9F8 100%
  );
  background-size: 100% 410px;
  background-repeat: no-repeat;
  padding-top: 72px;
}

.light-section--white {
  background-color: var(--paper);
  border-top: 1px solid var(--sage-100);
  border-bottom: 1px solid var(--sage-100);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  margin-bottom: 52px;
}

.section-head > div:first-child {
  flex: 1 1 460px;
}

.section-head > .section-lead {
  flex: 0 1 400px;
  margin-top: 0;
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head--center > div:first-child,
.section-head--center > .section-lead {
  flex: none;
}

.section-head--center .section-lead {
  margin-top: 16px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .light-section {
    padding: 64px 0;
  }
  .section-head {
    margin-bottom: 36px;
  }
}

/* ===================================================================== */
/* PART 3: DARK PROCEDURAL MEADOW RISE FOOTER                            */
/* ===================================================================== */
.mrf-root {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 900px;
  overflow: hidden;
  background: var(--ground-dark);
  color: #ffffff;
}

.mrf-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(420px, 58svh, 620px);
  z-index: 0;
  pointer-events: none;
}

#mrf-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mrf-hero {
  position: relative;
  z-index: 2;
  min-height: clamp(400px, 54svh, 580px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(68px, 11vh, 118px) 24px 0;
  text-align: center;
  transform: translate3d(0, calc((1 - var(--mrf-k, 1)) * 48px), 0);
}

.mrf-h {
  max-width: 16ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.65rem, 6vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-wrap: balance;
}

.mrf-line {
  display: block;
}

.mrf-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.mrf-wi {
  display: inline-block;
  transform: translate3d(0, 108%, 0) rotate(3deg);
  transform-origin: 0 100%;
  transition: transform 1100ms var(--ease-expo);
  transition-delay: calc(var(--d, 0) * 1ms);
}

.mrf-in .mrf-wi {
  transform: none;
}

.mrf-sub {
  margin-top: 20px;
  max-width: 48ch;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
  color: rgba(213, 227, 220, 0.85);
}

.mrf-r {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  filter: blur(4px);
  transition: opacity 850ms ease, transform 1050ms var(--ease-expo), filter 850ms ease;
  transition-delay: calc(var(--d, 0) * 1ms);
}

.mrf-in .mrf-r {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.mrf-cta-wrap {
  margin-top: 28px;
}

.mrf-body {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.mrf-botany {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: max(100%, 1100px);
  height: 92%;
  transform: translateX(-50%);
  color: #6AF3E3;
  opacity: 0.085;
  pointer-events: none;
  z-index: 0;
}

.mrf-draw {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2200ms cubic-bezier(0.45, 0, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 1ms);
}

.mrf-in .mrf-draw {
  stroke-dashoffset: 0;
}

.mrf-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

.mrf-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(0, 1.85fr);
  gap: 48px;
}

.mrf-brand-logo {
  width: 142px;
  height: auto;
}

.mrf-tag {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted-dark);
  max-width: 34ch;
}

.mrf-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.mrf-col h3 {
  margin-bottom: 16px;
  color: var(--aqua-300);
}

.mrf-col ul {
  display: grid;
  gap: 10px;
}

.mrf-link {
  font-size: 0.92rem;
  color: var(--text-muted-dark);
  transition: color 0.25s ease, transform 0.35s var(--ease-expo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mrf-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.mrf-watermark {
  margin-top: 44px;
  user-select: none;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3rem, 12.2vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(213, 227, 220, 0.14);
}

.mrf-bottom {
  position: relative;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(106, 243, 227, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}

@media (max-width: 820px) {
  .mrf-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .mrf-cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mrf-hero { transform: none; }
  .mrf-wi, .mrf-r, .mrf-draw {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}
