/* ==========================================================================
   SM:AR Technology — site styles
   Palette is taken from the logo: amber traces on graphite.
   ========================================================================== */

:root {
  --bg: #0a0b0e;
  --bg-2: #101217;
  --panel: #14171d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(253, 187, 19, .35);
  --text: #eef0f3;
  --muted: #9aa1ad;
  --graphite: #555960;
  --accent: #fdbb13;
  --accent-2: #ffd659;
  --accent-glow: rgba(253, 187, 19, .18);
  --radius: 18px;
  --font: 'DM Sans', system-ui, sans-serif;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --scroll: 0;   /* set by main.js: window.scrollY */
  --mx: 0;       /* set by main.js: pointer x in hero, -1..1 */
  --my: 0;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--accent); color: #111; }

.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* Fixed tech backdrop: faint circuit grid that drifts slower than the page */
.site-bg {
  position: fixed;
  inset: -50vh 0 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%);
  opacity: .5;
  transform: translate3d(0, calc(var(--scroll) * -.15px), 0);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(40px, 5.6vw, 74px); max-width: 760px; }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 21px; }

.muted, .section-head p { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 590px; }

.gradient-text {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 60%, #ff9f1a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.eyebrow::before { content: "</>"; opacity: .6; letter-spacing: 0; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 10px 30px rgba(253, 187, 19, .18);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px var(--accent-glow), 0 14px 34px rgba(253, 187, 19, .25); }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

.text-link { color: var(--accent); font-size: 13px; font-weight: 700; transition: letter-spacing .2s; }
.text-link:hover { letter-spacing: .02em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.scrolled {
  background: rgba(10, 11, 14, .82);
  backdrop-filter: blur(16px);
  border-color: var(--line);
}
.nav-wrap { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 46px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > a { position: relative; font-size: 14px; color: #c3c8d0; transition: color .2s; }
.main-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .25s;
}
.main-nav > a:hover, .main-nav > a.active { color: #fff; }
.main-nav > a:hover::after, .main-nav > a.active::after { transform: scaleX(1); }
.main-nav .nav-cta { padding: 10px 16px; font-size: 13px; }
.main-nav .nav-cta.btn { color: #111; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; }

/* ---------- Hero with parallax layers ---------- */
.hero {
  position: relative;
  min-height: min(calc(100vh - 84px), 960px);
  display: grid;
  align-items: center;
  padding: 60px 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.hero-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; will-change: transform; }

/* Perspective floor grid */
.hero-floor {
  top: 55%;
  inset-inline: -50%;
  background-image:
    linear-gradient(rgba(253, 187, 19, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(253, 187, 19, .35) 1px, transparent 1px);
  background-size: 70px 70px;
  transform: perspective(600px) rotateX(70deg) translateY(calc(var(--scroll) * .4px));
  transform-origin: top;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, transparent 85%);
  animation: floor 8s linear infinite;
  opacity: .45;
}
@keyframes floor { to { background-position: 0 70px; } }

.hero-glow {
  background:
    radial-gradient(circle at 75% 35%, rgba(253, 187, 19, .16), transparent 40%),
    radial-gradient(circle at 15% 80%, rgba(85, 89, 96, .35), transparent 45%);
  transform: translate3d(0, calc(var(--scroll) * .25px), 0);
}
.hero-circuits {
  color: var(--accent);
  opacity: .5;
  /* keep traces out from behind the headline */
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 0, transparent 12%, transparent 52%, #000 72%);
  transform: translate3d(calc(var(--mx) * -14px), calc(var(--scroll) * -.2px + var(--my) * -14px), 0);
}
.hero-circuits svg { width: 100%; height: 100%; }
.hero-circuits path { stroke-dasharray: 6 10; animation: trace 6s linear infinite; }
@keyframes trace { to { stroke-dashoffset: -160; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 50px;
  transform: translate3d(0, calc(var(--scroll) * .12px), 0);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 40px; color: var(--muted); font: 12px var(--mono); }
.hero-note span::before { content: "▹"; color: var(--accent); margin-right: 8px; }

/* ---------- Home: futuristic hero ---------- */
.hero h1 { font-size: clamp(40px, 5vw, 68px); }
.rotator { display: block; white-space: nowrap; min-height: 1.1em; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(253, 187, 19, .06);
  font: 500 11px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e9d9a8;
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats strong { display: block; font: 700 30px var(--mono); color: #fff; }
.hero-stats strong small { font-size: .6em; color: var(--accent); }
.hero-stats span { font: 11px var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }

/* Hero scanlines */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px);
}

/* HUD corner brackets — add .hud to any positioned box */
.hud { position: relative; }
.hud::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) top left / 18px 2px,
    linear-gradient(var(--c), var(--c)) top left / 2px 18px,
    linear-gradient(var(--c), var(--c)) top right / 18px 2px,
    linear-gradient(var(--c), var(--c)) top right / 2px 18px,
    linear-gradient(var(--c), var(--c)) bottom left / 18px 2px,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 18px,
    linear-gradient(var(--c), var(--c)) bottom right / 18px 2px,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 18px;
  background-repeat: no-repeat;
}

/* Hero visual: 3D data globe (canvas) + terminal */
.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.globe {
  width: min(480px, 88vw);
  aspect-ratio: 1;
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -10px), 0);
}
.globe canvas { width: 100%; height: 100%; display: block; }
.globe::after {
  /* soft halo behind the sphere */
  content: "";
  position: absolute;
  inset: 12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 187, 19, .18), transparent 65%);
  filter: blur(20px);
}
.hud-label { position: absolute; font: 10px var(--mono); letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.hud-label b { color: var(--accent); font-weight: 500; }
.hud-label.tl { top: 10px; left: 14px; }
.hud-label.br { bottom: 10px; right: 14px; }

.terminal {
  position: absolute;
  left: -30px;
  bottom: 0;
  width: min(330px, 80vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 13, 17, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
  font: 12px/1.75 var(--mono);
  overflow: hidden;
  transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 18px), 0);
}
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.terminal-bar i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; box-shadow: 13px 0 #febc2e, 26px 0 #28c840; margin-right: 34px; }
.terminal-body { padding: 12px 14px; min-height: 182px; color: #cfd3da; }
.t-line { display: block; white-space: pre; }
.t-cmd::before { content: "$ "; color: var(--accent); }
.t-ok { color: #7ee2a8; }
.t-live { color: var(--accent); }
.terminal-body .caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Home: capability cards ---------- */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
/* Rotating light around the border; shown on hover, or always with .is-on */
.glow-border::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 55%, var(--accent) 75%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 4s linear infinite;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.glow-border:hover::after, .glow-border.is-on::after { opacity: 1; }
@keyframes spin { to { --angle: 360deg; } }

.cap-card { transform-style: preserve-3d; }
.cap-index { position: absolute; top: 24px; right: 26px; font: 500 12px var(--mono); color: var(--graphite); }
.cap-card:hover .cap-index { color: var(--accent); }

/* ---------- Home: build pipeline (fills as you scroll) ---------- */
.pipeline {
  --progress: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pipeline::before, .pipeline::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 2px;
  background: var(--line);
}
.pipeline::after {
  right: auto;
  width: calc((100% - 44px) * var(--progress));
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px var(--accent);
}
.pipe-step { position: relative; z-index: 1; }
.pipe-node {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  font: 600 13px var(--mono);
  color: var(--muted);
  transition: background .3s, color .3s, box-shadow .3s;
}
.pipe-step.active .pipe-node { background: var(--accent); color: #111; box-shadow: 0 0 24px rgba(253, 187, 19, .5); }
.pipe-step h3 { font-size: 18px; margin-bottom: 6px; }
.pipe-step p { margin: 0; font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  /* Pipeline becomes a vertical timeline */
  .pipeline { grid-template-columns: 1fr; gap: 28px; }
  .pipeline::before, .pipeline::after { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; }
  .pipeline::after { bottom: auto; height: calc((100% - 44px) * var(--progress)); }
  .pipe-step { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .pipe-node { margin: 0; grid-row: span 2; }
  .terminal { left: 0; }
}
@media (max-width: 760px) {
  .hero-visual { min-height: 0; }
  .terminal { position: relative; left: auto; width: 100%; margin-top: -40px; }
  .hero-stats { gap: 22px; }
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  font: 11px var(--mono);
  color: var(--muted);
  letter-spacing: 2px;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.scroll-hint::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Tech ticker ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.ticker-track { display: flex; gap: 48px; width: max-content; padding: 18px 0; animation: ticker 35s linear infinite; }
.ticker span { font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
.ticker span::before { content: "◆"; color: var(--accent); margin-right: 14px; font-size: 9px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: 90px 0 70px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 30%, rgba(253, 187, 19, .14), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(85, 89, 96, .3), transparent 40%);
  transform: translate3d(0, calc(var(--scroll) * .35px), 0);
}
.page-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.page-hero p { color: var(--muted); max-width: 680px; }

/* ---------- Sections & layout ---------- */
.section { padding: 100px 0; }
.section-head { max-width: 690px; margin-bottom: 46px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }

.grid { display: grid; gap: 18px; }
.services-grid, .project-grid { grid-template-columns: repeat(3, 1fr); }
.process-grid { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.content-narrow { max-width: 850px; }
.content-narrow p, .content-narrow li { color: #b9bec7; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  overflow: hidden;
  transition: transform .3s, border-color .3s;
}
/* spotlight that follows the pointer (vars set by main.js) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px circle at var(--cx, 50%) var(--cy, 0%), rgba(253, 187, 19, .1), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); font-size: 14px; }

.icon-box {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(253, 187, 19, .08);
  color: var(--accent);
  font-size: 22px;
}

.project-visual {
  height: 190px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(rgba(253, 187, 19, .12) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(253, 187, 19, .12) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 70% 20%, rgba(253, 187, 19, .35), transparent 45%),
    #0d0f13;
  color: rgba(255, 255, 255, .75);
  font: 700 22px var(--mono);
  text-align: center;
  padding: 10px;
}

/* Screenshot inside a minimal browser frame */
.project-visual.has-image {
  position: relative;
  padding: 24px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  height: auto;
  border: 1px solid var(--line);
  background: #1a1d23;
}
.project-visual.has-image::before {
  content: "";
  position: absolute;
  top: 8px; left: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 14px 0 #febc2e, 28px 0 #28c840;
}
.project-visual.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .6s ease;
}
.project-card:hover .project-visual img { transform: scale(1.04); }
.project-visual-lg { margin-bottom: 32px; border-radius: 16px; }
.project-card .eyebrow { margin-right: 8px; }
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--accent);
  color: #111;
  font: 700 10px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
}
.card-links { display: flex; flex-wrap: wrap; gap: 18px; }
.muted-link { color: var(--muted); }
.muted-link:hover { color: var(--text); }

.feature-panel {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at 85% 0%, rgba(253, 187, 19, .14), transparent 45%), var(--bg-2);
}
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.feature-list div { color: #c9ced6; font-size: 14px; }
.feature-list b { color: var(--accent); margin-right: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stat { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.stat strong { display: block; font: 700 28px var(--mono); color: var(--accent); }
.stat span { font-size: 12px; color: var(--muted); }

.step-number { font: 600 12px var(--mono); color: var(--accent); margin-bottom: 24px; }

.service-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .25s;
}
.service-row:hover { padding-left: 12px; }
.service-row .icon-box { margin: 0; }

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    linear-gradient(rgba(253, 187, 19, .06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(253, 187, 19, .06) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(circle at 90% 10%, rgba(253, 187, 19, .2), transparent 40%),
    var(--bg-2);
  overflow: hidden;
}
.cta-band h2 { max-width: 650px; margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin: 0; }

/* ---------- Forms ---------- */
.form-card { max-width: 800px; padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: #c9ced6; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: #0b0d11;
  color: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.field textarea { min-height: 130px; resize: vertical; }

.alert { margin: 18px 0; padding: 13px 16px; border-radius: 10px; background: #13301f; color: #bdf3d2; border: 1px solid #22603c; }
.alert.error { background: #3a1c21; color: #ffd2d8; border-color: #783746; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 90px; border-top: 1px solid var(--line); background: #07080a; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1fr; gap: 36px; padding: 60px 0; }
.footer-brand img { height: 64px; width: auto; }
.footer-brand p { max-width: 300px; color: var(--muted); font-size: 13px; }
.footer-top h4 { font: 600 12px var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.footer-top > div:not(:first-child) { display: flex; flex-direction: column; gap: 10px; }
.footer-top a, .footer-top span { font-size: 13px; color: var(--muted); }
.footer-top a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--line); color: #6d737d; font-size: 12px; }
.footer-bottom div { display: flex; gap: 20px; }

/* ---------- Admin ---------- */
.admin-shell { min-height: 100vh; }
.admin-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.admin-content { padding: 45px 0; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg-2); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
.admin-table th { color: var(--accent); font-family: var(--mono); font-weight: 500; }
.admin-table td { color: #d9dde3; }
.small-btn { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: #fff; font-size: 12px; cursor: pointer; }
.small-btn:hover { border-color: var(--accent); }
.danger { color: #ff9ca8; }
.admin-cards { grid-template-columns: repeat(4, 1fr); }
.admin-card strong { display: block; font: 700 30px var(--mono); color: var(--accent); }
.admin-card span { font-size: 12px; color: var(--muted); }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.admin-table code { font: 12px var(--mono); color: #d9dde3; word-break: break-all; }
.live-dot { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: #3ddc84; vertical-align: middle; animation: ping 2s infinite; }

/* Status tags: always icon + label, never colour alone */
.tag { display: inline-block; padding: 2px 9px; border: 1px solid; border-radius: 99px; font: 600 11px var(--mono); white-space: nowrap; }
.tag.ok { color: #7ee2a8; border-color: rgba(126, 226, 168, .35); }
.tag.warn { color: var(--accent); border-color: var(--line-strong); }
.tag.bot { color: #ff9ca8; border-color: rgba(255, 156, 168, .35); }

/* Daily visitors bar chart: one series, thin rounded bars, hover tooltip per column */
.bar-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 8px;
  height: 200px;
  margin: 26px 0 34px;
  padding-left: 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat; /* max gridline */
}
.bar-max { position: absolute; top: -8px; left: 0; font: 11px var(--mono); color: var(--muted); }
.bar-col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; cursor: default; }
.bar { width: min(100%, 26px); height: calc(var(--v) * 100%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); transition: background .15s; }
.bar-col:hover .bar { background: var(--accent-2); }
.bar-label { position: absolute; bottom: -22px; font: 10px var(--mono); color: var(--muted); white-space: nowrap; }
.bar-col::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1f26;
  color: var(--text);
  font: 11px var(--mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 2;
}
.bar-col:hover::after { opacity: 1; }
.bar-col:first-child::after { left: 0; translate: 0 0; }
.bar-col:last-child::after { left: auto; right: 0; translate: 0 0; }
.table-view summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* Honeypot: off-screen for people, still filled in by naive bots */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Scroll reveal (class added by main.js) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; transition-delay: var(--delay, 0s); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { gap: 16px; }
  .services-grid, .project-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-wrap { height: 72px; }
  .brand img { height: 38px; }
  .menu-toggle { display: grid; gap: 5px; padding: 8px; }
  .menu-toggle span { width: 24px; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
    background: rgba(10, 11, 14, .97);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.open { display: flex; }
  .site-header:has(.main-nav.open) { background: rgba(10, 11, 14, .97); }

  .hero { min-height: auto; padding: 50px 0 80px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { min-height: 340px; }
  .scroll-hint { display: none; }
  .section { padding: 70px 0; }
  .services-grid, .project-grid, .process-grid, .feature-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 30px; }
  .service-row { grid-template-columns: 52px 1fr; }
  .service-row .text-link { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .footer-top { gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .admin-table { display: block; overflow-x: auto; }
  .admin-two { grid-template-columns: 1fr; }
  .bar-chart { gap: 3px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
