/* ==========================================================================
   NimusAI design system
   tokens · reset · type · layout · nav · buttons · hero · bento · products
   · sections · footer · motion · responsive
   ========================================================================== */

/* ------------------------------------------------------------- tokens --- */
:root {
  /* ground */
  --bg:          #06080d;
  --bg-2:        #080b12;
  --bg-3:        #0b0f18;

  /* surfaces */
  --surface:     rgba(255, 255, 255, 0.026);
  --surface-2:   rgba(255, 255, 255, 0.045);
  --hairline:    rgba(255, 255, 255, 0.085);
  --hairline-2:  rgba(255, 255, 255, 0.16);

  /* ink */
  --ink:         #f2f5fa;
  --ink-2:       #a8b4c8;
  --ink-3:       #6d798f;

  /* brand */
  --accent:      #4da3ff;
  --accent-2:    #7c5cff;
  --accent-ink:  #04121f;
  --glow:        rgba(77, 163, 255, 0.32);

  /* product accents */
  --yuz:         #2fa8ff;
  --fortiva:     #e8503f;

  --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --shell: 1200px;
  --pad:   24px;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------- reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* fine grain — keeps large flat areas from looking cheap */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --------------------------------------------------------------- type --- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; }

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  letter-spacing: -0.042em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 3.9vw, 2.9rem);
  letter-spacing: -0.034em;
  text-wrap: balance;
}

h3 { font-size: 1.24rem; letter-spacing: -0.024em; }

p { text-wrap: pretty; }

.grad {
  background: linear-gradient(96deg, var(--accent) 6%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.7;
  max-width: 62ch;
}

/* ------------------------------------------------------------- layout --- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }

.section { padding-block: clamp(72px, 10vw, 132px); position: relative; }

.section--tint {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(77,163,255,0.05), transparent 62%),
    var(--bg-2);
  border-block: 1px solid var(--hairline);
}

.head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.head--mid { margin-inline: auto; text-align: center; }
.head--mid .lede { margin-inline: auto; }

/* eyebrow pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(77,163,255,0.18);
}

.head h2 + .lede, .hero h1 + .lede { margin-top: 20px; }

/* --------------------------------------------------------------- nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.site-header.is-stuck {
  background: rgba(6, 8, 13, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--hairline);
}

.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand__mark { width: 28px; height: 28px; object-fit: contain; }

.brand__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

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

.nav__link {
  position: relative;
  padding: 9px 15px;
  border-radius: var(--r-sm);
  font-size: 0.935rem;
  font-weight: 450;
  color: var(--ink-2);
  transition: color 0.22s var(--ease-soft), background 0.22s var(--ease-soft);
}

.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--ink); }

.nav__cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 17px; height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease), opacity 0.2s;
}

.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; }
.nav-toggle__bars::before { transform: translateY(-5.5px); }
.nav-toggle__bars::after  { transform: translateY(5.5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: rotate(-45deg); }

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  font-size: 0.94rem;
  font-weight: 550;
  letter-spacing: -0.012em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), box-shadow 0.28s var(--ease),
              background 0.22s var(--ease-soft), border-color 0.22s var(--ease-soft);
}

.btn svg { width: 15px; height: 15px; flex: none; }

.btn--primary {
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--glow);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px var(--glow); }

.btn--ghost {
  border-color: var(--hairline-2);
  color: var(--ink);
  background: var(--surface);
}

.btn--ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.28); transform: translateY(-2px); }

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.head--mid .btn-row { justify-content: center; }

/* --------------------------------------------------------------- hero --- */
.hero { position: relative; padding-block: clamp(76px, 13vw, 152px); overflow: hidden; }

/* inner pages carry no buttons or stat strip under the heading, so the
   full hero padding leaves a large empty band — tighten it there */
.hero--sub { padding-block: clamp(46px, 6.5vw, 78px) clamp(34px, 4.5vw, 54px); }

.hero--sub .hero__aurora { height: 460px; inset: -34% -10% auto -10%; }

.hero--sub .lede { margin-top: 18px; }

/* the section straight after a compact hero does not need full top padding */
.hero--sub + .section { padding-top: clamp(42px, 5.5vw, 68px); }

/* aurora wash */
.hero__aurora {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 780px;
  pointer-events: none;
  background:
    radial-gradient(38% 52% at 22% 34%, rgba(77,163,255,0.20), transparent 70%),
    radial-gradient(34% 46% at 74% 26%, rgba(124,92,255,0.17), transparent 70%),
    radial-gradient(30% 40% at 50% 62%, rgba(47,168,255,0.10), transparent 72%);
  filter: blur(14px);
}

.hero__in { position: relative; }

.hero .lede { margin-top: 22px; font-size: clamp(1.05rem, 1.7vw, 1.22rem); }

/* thin stat / fact strip under the hero */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.facts li { display: flex; flex-direction: column; gap: 2px; }

.facts b {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.facts span { font-size: 0.83rem; color: var(--ink-3); }

/* --------------------------------------------------------------- card --- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 30px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-soft), background 0.3s var(--ease-soft),
              transform 0.3s var(--ease);
}

.card:hover { border-color: var(--hairline-2); background: var(--surface-2); transform: translateY(-3px); }

.card__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 20px;
  border-radius: 11px;
  color: var(--accent);
  background: rgba(77,163,255,0.10);
  border: 1px solid rgba(77,163,255,0.20);
}

.card__icon svg { width: 20px; height: 20px; }

.card h3 { margin-bottom: 9px; }

.card p { color: var(--ink-2); font-size: 0.955rem; }

/* -------------------------------------------------------------- bento --- */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }

.bento > .card { padding: 28px; }
.bento > .card--wide { grid-column: span 2; }

/* ----------------------------------------------------------- products --- */
.products { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }

.product {
  --tint: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px;
  border-radius: var(--r-lg);
  background: linear-gradient(168deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: border-color 0.3s var(--ease-soft), transform 0.35s var(--ease);
}

/* coloured bloom keyed to each product's own brand */
.product::before {
  content: "";
  position: absolute;
  top: -110px; right: -70px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: var(--tint);
  opacity: 0.13;
  filter: blur(64px);
  transition: opacity 0.4s var(--ease-soft);
  pointer-events: none;
}

.product:hover { transform: translateY(-4px); border-color: var(--hairline-2); }
.product:hover::before { opacity: 0.22; }

.product__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.product__logo {
  width: 62px; height: 62px;
  flex: none;
  object-fit: contain;
  border-radius: 14px;
}

.product__id { flex: 1; min-width: 0; }

.product__name {
  font-size: 1.62rem;
  letter-spacing: -0.032em;
  line-height: 1.15;
}

.product__site {
  font-size: 0.84rem;
  color: var(--ink-3);
  transition: color 0.2s;
}

.product:hover .product__site { color: var(--tint); }

.product__text { color: var(--ink-2); font-size: 1rem; }

/* platform + feature chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }

.chip {
  font-size: 0.755rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 5px 10px;
}

.feat { display: grid; gap: 11px; margin-top: 24px; }

.feat li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.55;
}

.feat li::before {
  content: "";
  flex: none;
  width: 15px; height: 15px;
  margin-top: 5px;
  border-radius: 5px;
  background: var(--tint);
  opacity: 0.5;
}

.product__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* "more coming" tile */
.product--soon {
  align-items: flex-start;
  justify-content: center;
  border-style: dashed;
  background: none;
}

/* --------------------------------------------------------------- misc --- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 76px); align-items: center; }

.dl { display: grid; gap: 20px; margin-top: 30px; }

.dl dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.dl dd { font-size: 1.04rem; }

.a-link {
  color: var(--accent);
  border-bottom: 1px solid rgba(77,163,255,0.36);
  transition: border-color 0.2s, color 0.2s;
}

.a-link:hover { color: #7dbcff; border-bottom-color: currentColor; }

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(44px, 6.5vw, 76px);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(124,92,255,0.14), transparent 62%),
    linear-gradient(168deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}

.cta .lede { margin: 18px auto 0; }

/* 404 */
.nf { min-height: 64vh; display: grid; place-content: center; text-align: center; padding-block: 90px; }

.nf__code {
  font-family: var(--display);
  font-size: clamp(4.5rem, 15vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

/* --------------------------------------------------------------- foot --- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--bg-2); padding-block: 60px 30px; }

.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 44px;
  padding-bottom: 44px;
}

.site-footer__blurb { color: var(--ink-2); font-size: 0.92rem; margin-top: 15px; max-width: 300px; }

.fcol h4 {
  font-size: 0.735rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.fcol li + li { margin-top: 11px; }
.fcol a { color: var(--ink-2); font-size: 0.92rem; transition: color 0.2s; }
.fcol a:hover { color: var(--ink); }

.site-footer__bot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- motion --- */
.skip-link {
  position: absolute; left: 16px; top: -70px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 11px 18px; border-radius: var(--r-sm); font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus { top: 16px; }

.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > .card--wide { grid-column: span 2; }
  .split { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 18px var(--pad) 26px;
    background: rgba(6, 8, 13, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s var(--ease-soft), transform 0.25s var(--ease-soft), visibility 0.25s;
  }

  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 13px 15px; font-size: 1rem; }
  .nav__cta { margin: 10px 0 0; }

  .products, .bento { grid-template-columns: 1fr; }
  .bento > .card--wide { grid-column: span 1; }
  .product { padding: 26px; }
  .product__logo { width: 52px; height: 52px; }
  .site-footer__top { grid-template-columns: 1fr; }
  .facts { gap: 18px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
