/* ============================================================
   GLOBAL.CSS — tokens, reset, typography, nav, footer, buttons, tape
   ============================================================ */

/* ── Fonts ── */
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../assets/fonts/Comfortaa-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../assets/fonts/Comfortaa-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "NimbusMono";
  src: url("../assets/fonts/NimbusMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "NimbusMono";
  src: url("../assets/fonts/NimbusMono-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "NimbusMono";
  src: url("../assets/fonts/NimbusMono-Oblique.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

/* ── Tokens ── */
:root {
  --green-900: #002B17;
  --green-800: #004727;
  --green-700: #016136;
  --green-600: #107748;
  --green-500: #268E5F;
  --green-400: #3FB97A;
  --green-300: #62E69A;
  --cyan-400:  #00B3D2;
  --cyan-500:  #00A3AE;

  --bg:        #0A0E0C;
  --bg-2:      #0D1210;
  --bg-3:      #161C17;
  --rule:      #1F2521;
  --rule-2:    #2B312C;

  --ink:       #ECEFEC;
  --ink-2:     #A6ADA8;
  --ink-3:     #6A716D;
  --ink-4:     #434946;

  --shadow-md: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  --glow: 0 0 0 1px rgba(63, 185, 122, 0.35),
    0 0 40px -8px rgba(63, 185, 122, 0.45);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  font-family: "Comfortaa", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image: linear-gradient(
      to right,
      rgba(63, 185, 122, 0.014) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(63, 185, 122, 0.014) 1px, transparent 1px);
  background-size: 56px 56px;
}
::selection {
  background: var(--green-400);
  color: #000;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Quicksand", ui-sans-serif, system-ui, sans-serif;
}
p,
li,
blockquote,
figcaption,
dd,
dt {
  font-family: "Comfortaa", ui-sans-serif, system-ui, sans-serif;
}
a,
.btn,
button,
.tag,
.chip,
.nav-cta,
.eyebrow,
.mono,
.tape-track,
.service-num,
.foot-bottom,
.cta-card .label,
.cta-card .val,
.cert-pill,
.group-label,
.stat-label,
.tl-meta,
.tl-mono,
.cal-meta,
.cal-day-num,
.cal-slot,
.cal-nav,
.dev-note,
.field-note,
.stamp {
  font-family: "NimbusMono", ui-monospace, "SF Mono", Menlo, Consolas,
    monospace;
}
.brand-name {
  font-family: "Comfortaa", sans-serif !important;
}

/* ── Utilities ── */
.mono {
  font-family: "NimbusMono", ui-monospace, "SF Mono", Menlo, Consolas,
    monospace;
  letter-spacing: 0.04em;
}
.eyebrow {
  font-family: "NimbusMono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green-400);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.eyebrow.center::before {
  display: none;
}
.container {
  width: min(1280px, calc(100% - 56px));
  margin-inline: auto;
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 10, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand-mark {
  width: 53px;
  height: 53px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.brand-mark img {
  width: 53px;
  height: 53px;
  object-fit: contain;
}
.brand-name {
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-name .labs {
  color: var(--green-400);
  font-weight: 700;
  margin-left: 1px;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.nav-links a {
  font-family: "NimbusMono", monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.22s ease,
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.22s ease, box-shadow 0.25s ease,
    text-shadow 0.22s ease;
}
.nav-links a::before {
  content: "//";
  color: var(--green-400);
  margin-right: 6px;
  transition: color 0.22s ease,
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--green-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a.is-active {
  color: var(--green-300);
}
.nav-links a.is-active::after {
  transform: scaleX(1);
}
.nav-links a:hover {
  color: var(--green-300);
  transform: translateY(-2px) scale(1.12);
  background: rgba(63, 185, 122, 0.08);
  box-shadow: 0 10px 24px -10px rgba(63, 185, 122, 0.55);
  text-shadow: 0 0 18px rgba(63, 185, 122, 0.35);
  z-index: 2;
}
.nav-links a:hover::before {
  color: var(--green-300);
  transform: translateY(-1px);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--green-400);
  color: var(--green-300);
  font-family: "NimbusMono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  transition: all 0.2s ease;
  background: rgba(63, 185, 122, 0.06);
}
.nav-cta:hover {
  background: var(--green-400);
  color: #000;
  box-shadow: var(--glow);
}
.nav-cta svg {
  width: 14px;
  height: 14px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: "NimbusMono", monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn svg {
  width: 14px;
  height: 14px;
}
.btn-primary {
  background: var(--green-400);
  color: #04130a;
  box-shadow: var(--glow);
}
.btn-primary:hover {
  background: var(--green-300);
  transform: translate(-1px, -1px);
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--rule-2);
  background: var(--bg-2);
}
.btn-ghost:hover {
  border-color: var(--green-400);
  color: var(--green-300);
}

/* ── Tape ── */
.tape {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: #050708;
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.tape::before,
.tape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.tape::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.tape::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}
.tape-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: tape-scroll 60s linear infinite;
  font-family: "NimbusMono", monospace;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tape-track span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.tape-track span::after {
  content: "◆";
  color: var(--green-400);
  font-size: 8px;
}
@keyframes tape-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ── Footer ── */
footer {
  padding: 64px 0 36px;
  background: #040506;
  border-top: 1px solid var(--rule);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.foot-brand p {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.6;
  margin: 18px 0 0;
  max-width: 38ch;
}
.foot-col h4 {
  font-family: "NimbusMono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--green-400);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.foot-col a {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  padding: 6px 0;
  transition: color 0.15s ease;
}
.foot-col a:hover {
  color: var(--green-300);
}
.foot-bottom {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "NimbusMono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.foot-bottom .dot {
  color: var(--green-400);
}

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/brand/abstract.svg");
  background-repeat: no-repeat;
  background-position: 110% 50%;
  background-size: clamp(700px, 80%, 1400px) auto;
  opacity: 0.05;
  filter: blur(6px) saturate(1.1);
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, #000 40%,
    transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, #000 40%,
    transparent 80%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -240px -160px auto auto;
  width: 820px;
  height: 820px;
  background: radial-gradient(closest-side, rgba(63, 185, 122, 0.14),
    rgba(63, 185, 122, 0) 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-400),
    transparent);
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: calc(30vh - 70px);
}
.hero h1 {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 72px;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
  text-transform: uppercase;
}
.hero h1 .em {
  color: var(--green-400);
}
.hero-sub {
  margin-top: 52px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 56ch;
}
.hero-sub b {
  color: var(--ink);
  font-weight: 600;
}

/* ── Section ── */
.section {
  padding: 180px 0;
  position: relative;
}
.section + .section {
  padding-top: 0;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
  border-top: 1px solid var(--rule);
  padding-top: 36px;
  position: relative;
}
.section-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--green-400);
  box-shadow: 0 0 18px rgba(63, 185, 122, 0.6);
}
.section-head h2 {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 5.2vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
  text-transform: uppercase;
  color: var(--ink);
}
.section-head h2 .thin {
  font-weight: 300;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: -0.025em;
}
.section-head h2 .em {
  color: var(--green-400);
}
.section-head p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 50ch;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 14px 0;
  }
  .nav-hamburger {
    display: flex;
    margin-left: auto;
  }
  .nav-cta {
    display: none;
  }
  .nav-links {
    flex: 0 0 100%;
    order: 10;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .nav-links.is-open {
    max-height: 320px;
  }
  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    transform: none !important;
    background: none !important;
    box-shadow: none !important;
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
  .foot-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tape-track,
  .reveal,
  .count,
  [class*="pulse"],
  [class*="cursor"] {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
