/* ===================================================================
   IT Brouwerij — Design Tokens & Base
   =================================================================== */

:root {
  /* Brand */
  --ink: #0a0a0a;
  --ink-soft: #171717;
  --paper: #faf9f7;
  --paper-dim: #f1efec;
  --brouwerij: #141414; /* logo charcoal */
  --blue: #001a72;      /* Serhant-derived signature blue */
  --blue-bright: #1c3fd6;
  --blue-mist: #eef1fb;

  --grey-900: #1a1a1a;
  --grey-700: #4a4a4a;
  --grey-500: #7a7a7a;
  --grey-300: #d4d1cb;
  --grey-150: #e7e5e1;
  --grey-100: #f4f3f0;

  --codelab-red: #e2231a;
  --codelab-orange: #f4901e;
  --voxxed-blue: #3f8ff2;
  --voxxed-mint: #7fe7d4;

  /* Semantic (light default) */
  --bg: var(--paper);
  --bg-raised: #ffffff;
  --fg: var(--ink);
  --fg-muted: var(--grey-700);
  --border: var(--grey-150);
  --accent: var(--blue);
  --accent-contrast: #ffffff;
  --focus-ring: var(--blue-bright);

  /* Type */
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Scale */
  --step-label: 0.8125rem;
  --step-body: 1.0625rem;
  --step-lg: 1.375rem;
  --step-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --step-h2: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem);
  --step-h1: clamp(2.8rem, 1.9rem + 4.2vw, 5.6rem);
  --step-hero: clamp(3.2rem, 1.9rem + 6vw, 7.2rem);

  /* Space */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1.25rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  --container: 1240px;
  --radius: 8px;
  --radius-pill: 100px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --dot-grid-color: rgba(0, 26, 114, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --bg-raised: #141414;
    --fg: #f4f3f0;
    --fg-muted: #a3a09a;
    --border: #2a2a2a;
    --blue-mist: #0d1230;
    --dot-grid-color: rgba(255, 255, 255, 0.05);
  }
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-raised: #141414;
  --fg: #f4f3f0;
  --fg-muted: #a3a09a;
  --border: #2a2a2a;
  --blue-mist: #0d1230;
  --dot-grid-color: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
@media (max-width: 640px) {
  .container { padding-inline: var(--space-sm); }
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-label);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* Focus visibility -- never remove */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 1px;
}
a, button { cursor: pointer; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 1.4rem;
  z-index: 1000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 106px;
  border-radius: 100px;
  transition: background-color 320ms var(--ease), box-shadow 320ms var(--ease);
}
.site-header.is-scrolled {
  background: rgba(0, 26, 114, 0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.brand {
  display: flex;
  align-items: center;
  height: 44px;
}
.brand-mark { height: 100%; width: auto; }

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
}
.nav-links a {
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  color: #fff;
  opacity: 0.75;
  transition: opacity 200ms var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
}

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.9rem 1.7rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius-pill);
  min-height: 44px;
  transition: transform 260ms var(--ease), background-color 260ms var(--ease), color 260ms var(--ease), border-color 260ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { --btn-bg: var(--blue); --btn-fg: #fff; }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border-color: var(--fg);
}
.btn--ghost:hover { --btn-bg: var(--fg); --btn-fg: var(--bg); }
.btn--on-dark { --btn-bg: #fff; --btn-fg: #0a0a0a; border-color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: transform 260ms var(--ease), opacity 200ms var(--ease), background-color 260ms var(--ease);
}
.nav-toggle[aria-expanded="true"] {
  position: relative;
  z-index: 101;
}
.nav-toggle[aria-expanded="true"] span { background: #fff; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-links, .nav-primary .btn--ghost-hide { display: none; }
  .nav-toggle { display: block; }
  .nav-primary { gap: var(--space-sm); }
}

/* ---------------- Mobile nav drawer ---------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(132px + var(--space-md)) var(--space-lg) var(--space-lg);
  transform: translateY(-100%);
  transition: transform 460ms var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw + 0.9rem, 2.4rem);
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  padding: 0.28em 0;
  letter-spacing: -0.02em;
}
.mobile-nav .eyebrow { color: var(--voxxed-blue); margin-bottom: var(--space-md); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  padding-top: 132px;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a0a0a;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.85) brightness(0.82) contrast(1.05);
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.hero-video.is-ready { opacity: 1; }
.hero-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(28, 63, 214, 0.28), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #111318 55%, #0a0a0a 100%);
}
.hero .hero-media {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(28, 63, 214, 0.32), transparent 60%),
    linear-gradient(180deg, rgba(6,7,10,.72) 0%, rgba(8,9,13,.42) 32%, rgba(6,7,10,.6) 68%, rgba(6,7,10,.94) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 75%);
}
.hero-content {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.6rem + 4.2vw, 5.2rem);
  max-width: 20ch;
  margin-inline: auto;
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  color: var(--voxxed-blue);
}
.hero-sub {
  max-width: 46ch;
  margin-top: var(--space-md);
  margin-inline: auto;
  font-size: var(--step-lg);
  color: rgba(255,255,255,0.72);
}
.hero-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
}
.hero-scroll-cue {
  position: absolute;
  z-index: 2;
  right: var(--space-md);
  bottom: var(--space-lg);
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hero-scroll-cue::after {
  content: "";
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, currentColor, transparent);
}
@media (max-width: 640px) { .hero-scroll-cue { display: none; } }

.page-hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding-top: calc(132px + var(--space-xl));
  padding-bottom: var(--space-xl);
  overflow: hidden;
}
.page-hero .hero-media, .page-hero .hero-grid { position: absolute; inset: 0; }
.page-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-hero h1 { font-size: var(--step-h1); max-width: 18ch; margin-inline: auto; color: #fff; }
.page-hero p { margin-top: var(--space-md); margin-inline: auto; font-size: var(--step-lg); color: rgba(255,255,255,.72); max-width: 46ch; }
.breadcrumb {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: var(--space-md);
}
.breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* ---------------- Trust strip ---------------- */
.trust-strip {
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  padding-block: var(--space-md);
  position: relative;
  z-index: 1;
}
.trust-strip__inner { display: flex; align-items: center; gap: var(--space-lg); }
.trust-strip__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.marquee {
  overflow: hidden;
  flex: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: var(--space-xl);
  width: max-content;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg-muted);
  white-space: nowrap;
  opacity: 0.8;
}

/* ---------------- Section scaffolding ---------------- */
section { position: relative; }
.section {
  padding-block: var(--space-2xl);
}
.section--tight { padding-block: var(--space-xl); }
.section--dark { background: var(--ink); color: #fff; }
.section--raised { background: var(--bg-raised); }
.section--blue { background: var(--blue); color: #fff; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.section-head h2 { font-size: var(--step-h2); max-width: 16ch; }
.section-head p { max-width: 42ch; color: var(--fg-muted); font-size: var(--step-lg); }

.kicker { margin-bottom: var(--space-sm); }

/* ---------------- Grid / cards ---------------- */
.grid {
  display: grid;
  gap: var(--space-md);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--gap-xl { gap: var(--space-md); }
}

.grid--gap-xl { gap: var(--space-xl); }

.card {
  background: var(--bg-raised);
  border: none;
  padding: var(--space-md);
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 260ms var(--ease), transform 260ms var(--ease);
}
.card:hover { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1); transform: translateY(-4px); }
.card h3 { font-size: var(--step-h3); margin-bottom: var(--space-xs); }
.card p { color: var(--fg-muted); }
.card .num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-h2);
  color: var(--accent);
}
.stat .label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ---------------- Quote / manifesto ---------------- */
.manifesto {
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.manifesto .accent { color: var(--accent); }
.section--dark .accent, .section--blue .accent { color: #fff; }

.section--dark .eyebrow,
.section--blue .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow,
.mobile-nav .eyebrow,
.site-footer .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

/* ---------------- Placeholder note (content to be supplied) ---------------- */
.needs-input {
  border: 1px dashed var(--accent);
  background: var(--blue-mist);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  border-radius: var(--radius);
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding-block: var(--space-xl) var(--space-md);
}
.site-footer a { text-decoration: none; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-top h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-sm);
}
.footer-top ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-top a { color: #fff; opacity: 0.85; transition: opacity 200ms; }
.footer-top a:hover { opacity: 1; color: var(--voxxed-blue); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---------------- Decorative section graphics ---------------- */
.section--graphic { position: relative; overflow: hidden; }
.network-graphic {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 45%;
  width: 55%;
  height: 100%;
  z-index: 0;
  mask-image: linear-gradient(90deg, transparent, black 15%);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 15%);
}
.section--graphic .container { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .network-graphic { display: none; }
}

body.page-home {
  background:
    radial-gradient(var(--dot-grid-color) 1px, transparent 1.6px) 0 0 / 28px 28px,
    var(--bg);
}

.section--watermark { position: relative; overflow: hidden; }
.brand-watermark {
  position: absolute;
  bottom: -8%;
  right: -4%;
  width: 46%;
  max-width: 620px;
  height: auto;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}
.section--watermark .container { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .brand-watermark { width: 70%; bottom: -6%; right: -10%; }
}

/* ---------------- Back to top ---------------- */
.back-to-top {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease), background-color 200ms var(--ease), visibility 260ms;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--blue-bright); }
.back-to-top img { width: 18px; height: auto; }
@media (max-width: 640px) {
  .back-to-top { right: var(--space-sm); bottom: var(--space-sm); width: 44px; height: 44px; }
}

/* Utility */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.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;
}
[data-reveal] { opacity: 1; }
