/* ============================================================
   VIRE SOFTWARE — company landing page
   Design system + components. Vanilla CSS, no build step.
   Perf notes: animations are limited to transform/opacity,
   backdrop-filter is only used on the (small) navbar, and
   the hero background is pure CSS/SVG (no video/large images).
   ============================================================ */

/* ----------------------- Design tokens ----------------------- */
:root {
  color-scheme: light;

  /* Surfaces */
  --white: #ffffff;
  --off-white: #fbfcfd;
  --surface: #f4f6f8;
  --ink-bg: #0a0f16;
  --ink-bg-2: #0d1622;

  /* Text */
  --ink: #0d1320;
  --ink-soft: #475160;
  --ink-mute: #6b7585;
  --ink-faint: #98a2b3;
  --on-dark: #f5f7fa;
  --on-dark-soft: #aeb8c6;

  /* Accent */
  --blue: #2d7ff9;

  /* Lines + shadows */
  --line: rgba(13, 19, 32, 0.08);
  --line-strong: rgba(13, 19, 32, 0.12);
  --shadow-sm: 0 1px 2px rgba(13, 19, 32, 0.04);
  --shadow-md: 0 8px 24px rgba(13, 19, 32, 0.06);
  --shadow-lg: 0 24px 60px rgba(13, 19, 32, 0.10);

  /* Layout */
  --maxw: 1320px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 14px;
  --nav-h: 72px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ----------------------- Shared bits ----------------------- */
.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

.section-lead {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 48ch;
}

/* ----------------------- Buttons ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 20px;
  border-radius: 0;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn--lg {
  padding: 14px 24px;
  font-size: 0.98rem;
}
.btn__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: #1c2533;
}

.btn--light {
  background: var(--white);
  color: var(--ink);
}
.btn--light:hover {
  background: #eef1f5;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--outline:hover {
  background: var(--surface);
}

/* ============================ NAVBAR ============================ */
#top-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

/* Transparent over the hero: the CTA becomes a cool glass pill, then
   reverts to the solid dark button once scrolled onto light sections. */
.navbar:not(.is-scrolled) .nav__actions .btn--primary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.navbar:not(.is-scrolled) .nav__actions .btn--primary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.navbar__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand wordmark — VIRE (bold) + SOFTWARE (spaced light) */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--on-dark);
  transition: color 0.25s ease;
}
.navbar.is-scrolled .brand {
  color: var(--ink);
}
.brand__mark {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.04em;
}
.brand__sub {
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  opacity: 0.78;
}

/* Center nav */
.nav__list {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-dark-soft);
  transition: color 0.18s ease;
}
.navbar.is-scrolled .nav__link {
  color: var(--ink-soft);
}
.nav__link:hover {
  color: var(--white);
}
.navbar.is-scrolled .nav__link:hover {
  color: var(--ink);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  color: var(--on-dark);
}
.navbar.is-scrolled .nav__toggle span {
  color: var(--ink);
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  margin-top: calc((var(--nav-h) + env(safe-area-inset-top, 0px)) * -1);
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 40px);
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0a1f14;
}

/* Full-bleed aerial sports slideshow — 5 images cross-fading every 3s.
   Only opacity animates (compositor-friendly), so it stays smooth. */
.hero__slides {
  position: absolute;
  inset: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero__slide.is-active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 18, 0.9) 0%, rgba(8, 12, 18, 0.5) 48%, rgba(8, 12, 18, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.55) 0%, transparent 28%, transparent 62%, rgba(8, 12, 18, 0.78) 100%);
}

/* Subtle film grain — tiny inline SVG noise, cheap to paint. */
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__content {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}

.hero__title {
  color: var(--on-dark);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 20ch;
  margin: 0 auto;
}

/* ============================ STATEMENT ============================ */
.statement {
  background: var(--white);
}
.statement__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 150px) var(--pad);
  text-align: center;
}
.statement__text {
  font-size: clamp(1.7rem, 4.2vw, 3.2rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.statement__muted {
  color: var(--ink-faint);
}
.statement__actions {
  margin-top: clamp(32px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ============================ PRODUCTS ============================ */
.products {
  background: var(--white);
  border-top: 1px solid var(--line);
}
.products__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--pad);
}
.products__label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: clamp(16px, 3vw, 30px);
}

.product-list {
  list-style: none;
}
.product-row {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px) 0;
}
.product-row__index {
  position: absolute;
  top: clamp(30px, 4vw, 56px);
  right: 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.product-row__name {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  padding-right: 56px;
}
.product-row__desc {
  margin-top: clamp(12px, 1.6vw, 20px);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 90ch;
}

/* ============================ APPROACH ============================ */
.approach {
  background: #202426;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.approach .section-title {
  color: var(--on-dark);
}
.approach__intro {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 90px) var(--pad) 0;
}
.principles {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--pad) clamp(56px, 8vw, 90px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.principle {
  padding: 8px 28px 8px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 28px;
}
.principle:first-child {
  border-left: none;
  padding-left: 0;
}
.principle__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  color: var(--on-dark);
  margin-bottom: 18px;
}
.principle__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.principle__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-dark);
  margin-bottom: 8px;
}
.principle__desc {
  font-size: 0.9rem;
  color: var(--on-dark-soft);
  line-height: 1.55;
  max-width: 30ch;
}

/* ============================ CONTACT / CTA ============================ */
.cta-band {
  position: relative;
  overflow: hidden;
  background: #dbdbdb;
  isolation: isolate;
}
.cta-band__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 120% at 85% 120%, rgba(45, 127, 249, 0.10) 0%, transparent 55%);
}
.cta-band__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 100px) var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band__title {
  color: var(--ink);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.cta-band__sub {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 42ch;
}
.cta-band__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================ FOOTER ============================ */
.footer {
  background: #202426;
  color: var(--on-dark-soft);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) var(--pad) 36px;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
}
.brand--footer {
  color: var(--on-dark);
}
.footer__tag {
  margin-top: 14px;
  font-size: 0.88rem;
  max-width: 30ch;
  color: var(--on-dark-soft);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 4px;
}
.footer__col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--on-dark-soft);
  transition: color 0.18s ease;
}
.footer__col a:hover {
  color: var(--on-dark);
}
.footer__soon {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(45, 127, 249, 0.12);
  padding: 2px 7px;
  border-radius: 999px;
}
.footer__bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 920px) {
  .nav {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }

  /* Mobile dropdown nav */
  .nav.is-open {
    display: block;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px var(--pad) 18px;
  }
  .nav.is-open .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .nav.is-open .nav__link {
    color: var(--ink-soft);
    padding: 10px 0;
    width: 100%;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .principle {
    border-left: none;
    padding-left: 0;
    padding-top: 24px;
    padding-bottom: 24px;
    border-top: 1px solid var(--line);
  }
  .principle:first-child {
    border-top: none;
    padding-top: 8px;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 100vh;
    min-height: 100lvh;
  }
  .cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .brand__sub {
    letter-spacing: 0.24em;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
