/* ==========================================================================
   Navita Origo Solutions — Design System
   Theme: deep-subsurface / real-time telemetry
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Depth scale — darkest is deepest subsurface */
  --abyss: #00121f;
  --deep: #001b2e;
  --navy: #002b46;
  --navy-2: #00395c;
  --steel: #0d4a72;

  /* Signal colours — live telemetry */
  --cyan: #248bca;
  --cyan-hi: #4db8f0;
  --cyan-glow: #6fd3ff;
  --amber: #f5a623;
  --amber-hi: #ffc35c;

  /* Neutrals */
  --white: #ffffff;
  --mist: #e8f1f8;
  --fog: #a8c2d4;
  --slate: #6e8ca3;

  /* Surfaces */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --edge: rgba(109, 190, 245, 0.16);
  --edge-hi: rgba(109, 190, 245, 0.38);

  /* Type */
  --display: "Sora", system-ui, -apple-system, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --gut: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 11vw, 150px);
  --maxw: 1280px;

  /* Elevation — cool-shifted, never neutral grey */
  --lift-1: 0 2px 8px rgba(0, 10, 20, 0.4);
  --lift-2: 0 18px 44px -12px rgba(0, 8, 18, 0.66);
  --lift-3: 0 40px 90px -24px rgba(0, 6, 14, 0.8);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--mist);
  background: var(--abyss);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  color: var(--white);
}

h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.15rem);
  font-weight: 800;
  letter-spacing: -0.032em;
}

h2 {
  font-size: clamp(1.8rem, 3.7vw, 2.85rem);
}

h3 {
  font-size: clamp(1.14rem, 1.9vw, 1.42rem);
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1.1em;
  color: var(--fog);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--mist);
  font-weight: 600;
}

::selection {
  background: var(--cyan);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--cyan-glow);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.section {
  position: relative;
  padding: var(--section) 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cyan);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

.skip:focus {
  left: 0;
}

/* Eyebrow — the small monospace label above each heading */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--cyan-hi);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.lede {
  font-size: clamp(1rem, 1.55vw, 1.14rem);
  color: var(--fog);
  max-width: 62ch;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 68px);
}

/* ----------------------------------------------------- ambient backdrop -- */
/* A single fixed layer behind everything: subsurface strata + grid.
   Pure CSS, no images, no repaint cost while scrolling. */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse 80% 55% at 78% -8%,
      rgba(36, 139, 202, 0.2),
      transparent 62%
    ),
    radial-gradient(
      ellipse 62% 48% at 8% 42%,
      rgba(13, 74, 114, 0.26),
      transparent 68%
    ),
    radial-gradient(
      ellipse 90% 60% at 50% 108%,
      rgba(245, 166, 35, 0.07),
      transparent 60%
    ),
    linear-gradient(175deg, var(--deep) 0%, var(--abyss) 52%, #000d18 100%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(109, 190, 245, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(109, 190, 245, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 72% 62% at 50% 34%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    ellipse 72% 62% at 50% 34%,
    #000 25%,
    transparent 78%
  );
}

/* ------------------------------------------------------------- header -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 18, 31, 0.72);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.masthead.is-stuck {
  background: rgba(0, 14, 25, 0.92);
  border-bottom-color: var(--edge);
  box-shadow: var(--lift-1);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 34px;
  width: auto;
  max-width: 44vw;
  object-fit: contain;
  object-position: center;
  padding: 5px 11px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px -3px rgba(0, 0, 0, 0.55);
}

/* ---------------------------------------------------------------- nav -- */

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  position: relative;
  display: block;
  padding: 9px 15px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--fog);
  border-radius: 7px;
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--white);
  background: var(--glass);
}

.nav__link.is-active {
  color: var(--white);
}

.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-glow));
  box-shadow: 0 0 10px rgba(109, 190, 245, 0.7);
}

/* Dropdown */
.nav__group {
  position: relative;
}

.nav__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav__caret {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.28s var(--ease);
}

.nav__group:hover .nav__caret,
.nav__group:focus-within .nav__caret {
  transform: rotate(180deg);
}

.nav__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 272px;
  padding: 8px;
  background: rgba(0, 24, 40, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--edge);
  border-radius: 13px;
  box-shadow: var(--lift-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s;
}

.nav__group:hover .nav__menu,
.nav__group:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.855rem;
  color: var(--fog);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav__menu a:hover {
  background: var(--glass-hi);
  color: var(--white);
}

.nav__menu .sub {
  display: block;
  font-size: 0.72rem;
  color: var(--slate);
  margin-top: 2px;
}

/* Header CTA */
.masthead .btn {
  flex-shrink: 0;
}

/* Burger */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 9px;
  cursor: pointer;
  place-items: center;
}

.burger span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 3.5px auto;
  background: var(--mist);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* --------------------------------------------------------------- btns -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  font-family: var(--body);
  font-size: 0.815rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
    background 0.24s var(--ease), border-color 0.24s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.24s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan) 0%, #1a6fa8 100%);
  box-shadow: 0 6px 20px -6px rgba(36, 139, 202, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(36, 139, 202, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--ghost {
  color: var(--mist);
  background: var(--glass);
  border-color: var(--edge);
}

.btn--ghost:hover {
  color: var(--white);
  background: var(--glass-hi);
  border-color: var(--edge-hi);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.735rem;
}

/* -------------------------------------------------------------- cards -- */

.card {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.058),
    rgba(255, 255, 255, 0.016)
  );
  border: 1px solid var(--edge);
  border-radius: 16px;
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  box-shadow: var(--lift-2);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

/* The light-catch: a hairline highlight along the top edge, as on real glass */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(109, 190, 245, 0.55) 22%,
    rgba(109, 190, 245, 0.55) 78%,
    transparent
  );
  opacity: 0.6;
  transition: opacity 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--edge-hi);
  box-shadow: var(--lift-3);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-bottom: 0.55em;
}

.card p {
  font-size: 0.925rem;
  margin-bottom: 0;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: linear-gradient(
    140deg,
    rgba(36, 139, 202, 0.26),
    rgba(36, 139, 202, 0.07)
  );
  border: 1px solid rgba(109, 190, 245, 0.28);
}

.card__icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(72%) sepia(42%) saturate(1180%)
    hue-rotate(168deg) brightness(101%) contrast(97%);
}

.card__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--cyan-glow);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--slate);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(282px, 1fr));
}

/* ---------------------------------------------------------- split rows -- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}

.split--rev .split__visual {
  order: -1;
}

@media (max-width: 767px) {
  .split--rev .split__visual {
    order: 0;
  }
}

/* --------------------------------------------------------------- stats -- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: 15px;
  overflow: hidden;
}

.stat {
  padding: clamp(22px, 3vw, 30px);
  background: rgba(0, 20, 34, 0.82);
  text-align: center;
  transition: background 0.35s var(--ease);
}

.stat:hover {
  background: rgba(0, 32, 54, 0.9);
}

.stat__val {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, var(--white) 18%, var(--cyan-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 9px;
}

.stat__key {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ------------------------------------------------------ page hero (sub) -- */

.pagehero {
  position: relative;
  padding: clamp(74px, 11vw, 126px) 0 clamp(50px, 7vw, 76px);
  border-bottom: 1px solid var(--edge);
  overflow: hidden;
}

.pagehero__inner {
  position: relative;
  z-index: 2;
}

.pagehero__inner > * {
  max-width: 760px;
}

.pagehero h1 {
  font-size: clamp(2.05rem, 4.6vw, 3.35rem);
}

/* Contour lines behind sub-page heroes */
.pagehero__art {
  position: absolute;
  top: 0;
  right: 0;
  width: min(52%, 640px);
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
}

/* ------------------------------------------------------------- footer -- */

.foot {
  position: relative;
  padding: clamp(56px, 7vw, 82px) 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 10, 19, 0.85));
  border-top: 1px solid var(--edge);
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr;
  gap: clamp(30px, 5vw, 58px);
  padding-bottom: clamp(38px, 5vw, 56px);
}

@media (max-width: 860px) {
  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot__brand {
    grid-column: 1 / -1;
  }
}

.foot__brand img {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 20px;
}

.foot__brand p {
  font-size: 0.895rem;
  max-width: 34ch;
}

.foot h4 {
  font-size: 0.7rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 18px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot li {
  margin-bottom: 11px;
}

.foot li a,
.foot address a {
  font-size: 0.895rem;
  color: var(--fog);
  transition: color 0.2s var(--ease);
}

.foot li a:hover,
.foot address a:hover {
  color: var(--cyan-hi);
}

.foot address {
  font-style: normal;
  font-size: 0.895rem;
  color: var(--fog);
  line-height: 1.85;
}

.foot__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--edge);
  font-size: 0.79rem;
  color: var(--slate);
}

/* --------------------------------------------------------- reveal anim -- */

[data-reveal] {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1040px) {
  .nav,
  .masthead .btn {
    display: none;
  }

  .burger {
    display: grid;
  }

  /* Mobile drawer */
  .nav.is-open {
    position: fixed;
    top: calc(74px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 22px var(--gut) 60px;
    overflow-y: auto;
    background: rgba(0, 16, 28, 0.985);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .nav.is-open .nav__link {
    padding: 15px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--edge);
    border-radius: 0;
  }

  .nav.is-open .nav__link:hover {
    background: none;
  }

  .nav.is-open .nav__link.is-active::after {
    display: none;
  }

  .nav.is-open .nav__link.is-active {
    color: var(--cyan-hi);
  }

  .nav.is-open .nav__group {
    display: block;
  }

  .nav.is-open .nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    margin: 6px 0 10px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
  }

  .nav.is-open .nav__toggle {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
