/*
  Nowrox — endurance livery.

  A racing livery is a portable identity system: one stripe logic survives being
  painted across a car, a pit board and a crew suit, and the team stays
  unmistakable. Nowrox has the same problem — two applications that a visitor
  must read as one thing — so the stripe carries the argument rather than
  decorating it.

  The geometry comes from assets/nowrox-logo.svg: an indigo field cut by a cyan
  diagonal. The reference garage is Gulf and Martini; its grammar carries over,
  its palette does not. A livery in another team's colours is another team's car.

  This file replaces a `styles.css` that was linked by every page and did not
  exist in the repository, and a Tailwind CDN build that has no place in
  production.
*/

:root {
  --track: #0a0a0c;
  --panel: #121218;
  --panel-2: #17171f;
  --race: #f3f4fa;
  --indigo: #5b5fef;
  --indigo-lit: #7d80f5;
  --cyan: #2fe6d9;
  --mist: #9aa0b4;
  --hairline: rgba(243, 244, 250, 0.1);
  --hairline-2: rgba(243, 244, 250, 0.16);

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --measure: 68ch;
  --gutter: clamp(20px, 5vw, 56px);
  --shell: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--track);
  color: var(--race);
  font-family: var(--text);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--race);
  color: var(--track);
  font-weight: 600;
  border-radius: 2px;
  transition: top 140ms ease;
}

.skip:focus {
  top: 16px;
}

/* ==========================================================================
   The stripe.

   First attempt was a 7px full-bleed slab of indigo, cyan and pure white
   repeated between every section — which reads as a browser debug ruler, not
   as paint. A livery stripe runs ALONG the body in the direction of travel; it
   does not chop the car into slices every few feet.

   So: a pair of strokes with air between them, inset to the text column rather
   than bleeding off both edges, no pure white, and used twice on a page rather
   than six times. Section separation is a hairline.
   ========================================================================== */
.band {
  width: 100%;
  max-width: var(--shell);
  height: 6px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  border: 0;
  background:
    linear-gradient(var(--indigo) 0 0) padding-box no-repeat,
    linear-gradient(var(--cyan) 0 0) padding-box no-repeat;
  background-size: 100% 3px, 38% 2px;
  background-position: 0 0, 0 4px;
}

.band-v {
  width: 7px;
  align-self: stretch;
  background: linear-gradient(
    to right,
    var(--indigo) 0 4px,
    var(--cyan) 4px 6px,
    var(--race) 6px 7px
  );
}

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

/* ==========================================================================
   Navigation — the spine runs down its leading edge.
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: rgba(10, 10, 12, 0.86);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--hairline);
}

.site-nav > .band-v {
  flex: 0 0 7px;
}

.nav-inner {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 28px;
  min-width: 0;
  height: 68px;
  padding-inline: var(--gutter);
  max-width: var(--shell);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand span {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 26px;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--mist);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.nav-links a:hover {
  color: var(--race);
}

/* The current panel carries the lit edge, the way the running car carries the
   lit roundel on the pit board. */
.nav-links a[aria-current="page"] {
  color: var(--race);
  border-bottom-color: var(--cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--race);
  border: 1px solid var(--hairline-2);
  border-radius: 3px;
  cursor: pointer;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 14px var(--gutter) 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--hairline);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 12px 0;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

.nav-mobile .btn {
  margin-top: 12px;
  border-bottom: 0;
}

/* ==========================================================================
   Actions — the band becomes the leading edge of the primary control.
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms
    cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn svg {
  flex: 0 0 auto;
  transition: transform 150ms ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  color: var(--track);
  background: var(--race);
  border-left: 5px solid var(--indigo);
  box-shadow: inset 7px 0 0 -5px var(--cyan);
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--race);
  border-color: var(--hairline-2);
}

.btn-ghost:hover {
  border-color: var(--race);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13.5px;
}

/* ==========================================================================
   Type
   ========================================================================== */
.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

h1.display {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
}

h2.display {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
}

h3.display {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  letter-spacing: -0.02em;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lede {
  max-width: var(--measure);
  margin: 22px 0 0;
  color: var(--mist);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.62;
}

.prose {
  max-width: var(--measure);
  color: var(--mist);
}

.prose strong {
  color: var(--race);
  font-weight: 600;
}

/* The roundel. A real number, carrying the reading order the copy already
   used — never a decorative 01/02/03. */
.roundel {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--track);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  background: var(--race);
  border-radius: 50%;
}

.roundel-sm {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

/* ==========================================================================
   Sections and panels
   ========================================================================== */
.section {
  padding-block: clamp(64px, 9vw, 116px);
}

/* Sections are divided by a hairline. The stripe is reserved for the two
   moments that open and close the page. */
.section + .section,
.section + .closer {
  border-top: 1px solid var(--hairline);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.panels {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.panel {
  padding: clamp(26px, 3.4vw, 40px) 0;
  border-bottom: 1px solid var(--hairline);
}

.panel-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 34px);
}

.panel-row > div {
  min-width: 0;
}

.panel h3 {
  margin: 0 0 8px;
}

.panel p {
  margin: 0;
  max-width: var(--measure);
  color: var(--mist);
}

/* Two body panels side by side: Docs and Tasks, divided by a panel line the
   way two panels of bodywork meet. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.split > * {
  padding: clamp(28px, 3.6vw, 44px) clamp(24px, 3vw, 40px);
}

.split > * + * {
  border-left: 1px solid var(--hairline);
}

.app-panel {
  background: var(--panel);
}

.app-panel .label {
  color: var(--cyan);
}

.app-panel h3 {
  margin: 14px 0 10px;
}

.app-panel p {
  margin: 0 0 18px;
  color: var(--mist);
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--race);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--indigo);
  padding-bottom: 2px;
  transition: border-color 150ms ease, color 150ms ease;
}

.textlink:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(70px, 11vw, 132px) clamp(48px, 7vw, 84px);
  overflow: hidden;
}

/*
  The diagonal from the mark, at page scale. Not a glow and not a grid — the
  logo's own cyan cut, enlarged until it is architecture.
*/
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    transparent 0 54%,
    rgba(91, 95, 239, 0.6) 54% calc(54% + 1px),
    rgba(91, 95, 239, 0.085) calc(54% + 1px) 76%,
    rgba(47, 230, 217, 0.34) 76% calc(76% + 1px),
    rgba(47, 230, 217, 0.05) calc(76% + 1px) 100%
  );
}

.hero > * {
  position: relative;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   The mechanism figure — an honest diagram, drawn, not a screenshot mock.
   ========================================================================== */
.figure {
  margin: 0;
  border: 1px solid var(--hairline);
  background: var(--panel);
}

.figure figcaption {
  padding: 14px 18px;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--hairline);
}

.figure svg {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Stage list — the numbered sequence the copy already carried.
   ========================================================================== */
.stages {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.stage {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.6vw, 30px);
  padding: clamp(24px, 3.2vw, 38px) 0;
  border-bottom: 1px solid var(--hairline);
}

.stage-body h3 {
  margin: 0 0 8px;
}

.stage-body p {
  margin: 0;
  max-width: var(--measure);
  color: var(--mist);
}

/* ==========================================================================
   Teams
   ========================================================================== */
.teams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team {
  padding: 9px 15px;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--indigo);
  border-radius: 2px;
}

/* ==========================================================================
   Closing action
   ========================================================================== */
.closer {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
}

.closer .shell {
  padding-block: clamp(56px, 8vw, 96px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-foot {
  border-top: 1px solid var(--hairline);
  padding-block: 44px 56px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foot-links a {
  color: var(--mist);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--race);
}

.foot-note {
  margin: 0;
  color: var(--mist);
  font-size: 13px;
}

/* ==========================================================================
   Motion — one authored moment: the band draws across, then panels settle.
   ========================================================================== */
@keyframes bandDraw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-band {
  transform-origin: left center;
  animation: bandDraw 720ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.hero h1 {
  animation: settle 560ms 180ms both;
}
.hero .lede {
  animation: settle 560ms 320ms both;
}
.hero .hero-actions {
  animation: settle 560ms 400ms both;
}
.hero .hero-note {
  animation: settle 560ms 460ms both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 940px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split > * + * {
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }
}

@media (max-width: 620px) {
  .stage,
  .panel-row {
    flex-direction: column;
    gap: 14px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Comparison panels — the honest "if you're coming from X" tables the site
   already carried, set as body panels rather than a bordered grid.
   ========================================================================== */
.compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3vw, 34px);
  padding-bottom: 12px;
}

.label-lit {
  color: var(--cyan);
}

.panel-compare .label {
  display: block;
  margin-bottom: 12px;
}

.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3vw, 34px);
}

.compare-pair p {
  margin: 0;
}

/* The Nowrox column carries the band's leading edge, so which column is the
   product's own answer is never in doubt. */
.compare-pair p + p {
  padding-left: 16px;
  border-left: 3px solid var(--indigo);
}

@media (max-width: 620px) {
  .compare-head {
    display: none;
  }
  .compare-pair {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .compare-pair p + p {
    padding-left: 13px;
  }
}
