/* =========================================================
   CONEXA — Inteligência Operacional
   ========================================================= */
:root {
  --bg: #04050a;
  --bg-2: #0a0d17;
  --panel: rgba(12, 16, 28, 0.55);
  --text: #e8edf5;
  --muted: #8a93a6;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --cyan: #00d9ff;
  --violet: #8b5cf6;
  --lilac: #c084fc;
  --grad: linear-gradient(95deg, #00d9ff 0%, #6d8bff 45%, #8b5cf6 70%, #c084fc 100%);
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: var(--cyan); color: #000; }

.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Background layers ---------- */
#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
.no-webgl #webgl { display: none; }
.no-webgl body,
body.no-webgl {
  background:
    radial-gradient(60% 50% at 75% 30%, rgba(0, 217, 255, 0.16), transparent 70%),
    radial-gradient(50% 50% at 20% 80%, rgba(139, 92, 246, 0.16), transparent 70%),
    var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 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: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.35;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 7%); }
  80% { transform: translate(6%, 2%); }
  100% { transform: translate(0, 0); }
}

.scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 140px;
  z-index: 49;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 217, 255, 0.035), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan {
  from { top: -140px; }
  to { top: 100%; }
}

/* ---------- Cursor ---------- */
.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0);
}
.cursor {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(0, 217, 255, 0.7);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease),
    background 0.3s, border-color 0.3s;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.cursor.is-hover {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}
@media (pointer: coarse) {
  .cursor,
  .cursor-dot { display: none; }
}
@media (pointer: fine) {
  body, a, button, input, textarea { cursor: none; }
}

.ripple {
  position: fixed;
  z-index: 299;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  pointer-events: none;
  animation: ripple 0.9s var(--ease) forwards;
}
.ripple.r2 { border-color: var(--violet); animation-delay: 0.08s; opacity: 0; }
@keyframes ripple {
  0% { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(14); opacity: 0; }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: clip-path 1.1s var(--ease), visibility 0s linear 1.1s;
  clip-path: inset(0 0 0 0);
}
.loaded .loader {
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.loader__inner {
  width: min(560px, calc(100vw - 32px));
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.loader__logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(36px, 8vw, 56px);
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 18px;
}
.loader__logo span { color: var(--cyan); }
.loader pre {
  margin: 0 0 22px;
  min-height: 7.5em;
  font: inherit;
  white-space: pre-wrap;
  line-height: 1.55;
}
.loader pre .ok { color: var(--cyan); }
.loader__bar {
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 16px var(--cyan);
}
.loader__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--text);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding 0.4s var(--ease), background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(4, 5, 10, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}

.logo {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.logo__mark {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  align-self: center;
}
.logo__io { color: var(--cyan); }
.logo__sub {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 12px;
  align-self: center;
  border-left: 1px solid var(--line-2);
  padding-left: 12px;
  line-height: 1.3;
}

.glitch { position: relative; display: inline-block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitch::before { color: var(--cyan); }
.glitch::after { color: #ff2bd6; }
.logo:hover .glitch::before,
.glitch.is-glitching::before {
  opacity: 0.85;
  animation: glitch-a 0.35s steps(2) infinite;
}
.logo:hover .glitch::after,
.glitch.is-glitching::after {
  opacity: 0.85;
  animation: glitch-b 0.35s steps(2) infinite;
}
@keyframes glitch-a {
  0% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, -1px); }
  50% { clip-path: inset(55% 0 15% 0); transform: translate(3px, 1px); }
  100% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 0); }
}
@keyframes glitch-b {
  0% { clip-path: inset(65% 0 5% 0); transform: translate(3px, 1px); }
  50% { clip-path: inset(5% 0 70% 0); transform: translate(-3px, -1px); }
  100% { clip-path: inset(40% 0 30% 0); transform: translate(2px, 0); }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 13, 23, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__links a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.nav__links a.is-active { color: var(--cyan); }

.nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  position: relative;
}
.nav__burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.nav__burger span:nth-child(1) { top: 17px; }
.nav__burger span:nth-child(2) { top: 25px; }
.nav.is-open .nav__burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --b: 1px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  border: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  isolation: isolate;
  transition: transform 0.3s var(--ease);
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(4px) rotate(-45deg); }

.btn--primary { color: #03040a; font-weight: 600; }
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--grad);
  background-size: 200% 100%;
  animation: shift 4s linear infinite;
  box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.5), 0 10px 40px -10px rgba(0, 217, 255, 0.7);
  transition: box-shadow 0.4s;
}
.btn--primary:hover::before {
  box-shadow: 0 0 0 6px rgba(0, 217, 255, 0.12), 0 14px 50px -8px rgba(139, 92, 246, 0.9);
}
@keyframes shift {
  to { background-position: 200% 0; }
}

.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: var(--b);
  background: conic-gradient(from var(--angle, 0deg), var(--cyan), transparent 30%, var(--violet) 60%, transparent 80%, var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-border 4s linear infinite;
}
.btn--ghost::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -2;
  border-radius: inherit;
  background: rgba(10, 13, 23, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin-border {
  to { --angle: 360deg; }
}

.btn--sm { padding: 11px 18px; font-size: 12px; }

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { position: relative; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.label b { color: var(--muted); font-weight: 400; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 120px;
}
.hero__content { max-width: 820px; }
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(10, 13, 23, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2bff88;
  box-shadow: 0 0 0 0 rgba(43, 255, 136, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 255, 136, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(43, 255, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 255, 136, 0); }
}

.hero h1 {
  margin: 28px 0 28px;
  font-size: clamp(2.7rem, 7vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.hero h1 .line { display: block; }
.hero h1 .sc { color: var(--cyan); opacity: 0.8; -webkit-text-fill-color: var(--cyan); }

.hero__sub {
  max-width: 560px;
  margin: 0 0 40px;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--muted);
}
.hero__sub strong { color: var(--text); font-weight: 500; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
}
.hero__foot .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue { display: flex; align-items: center; gap: 14px; }
.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 48px;
  background: var(--line-2);
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip {
  to { top: 100%; }
}
.click-hint { opacity: 0.7; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: rotate(-1.5deg) scale(1.03);
  margin: 40px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 22px 18px;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__track span:nth-child(even) {
  -webkit-text-stroke: 1px rgba(232, 237, 245, 0.5);
  color: transparent;
}
.marquee__track em {
  font-style: normal;
  color: var(--cyan);
  font-size: 0.6em;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- About ---------- */
.about { padding: clamp(100px, 16vh, 180px) 0; }
.statement {
  margin: 32px 0 80px;
  max-width: 1100px;
  font-size: clamp(2.1rem, 5.4vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.statement .w {
  display: inline-block;
  opacity: 0.12;
  filter: blur(4px);
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.6s var(--ease), color 0.6s;
}
.statement .w.on { opacity: 1; filter: blur(0); transform: none; }
.statement .w.hl.on { color: var(--cyan); text-shadow: 0 0 30px rgba(0, 217, 255, 0.5); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__text p { margin: 0 0 22px; color: var(--muted); font-size: 1.08rem; }
.about__text p:first-child { color: var(--text); font-size: 1.22rem; }

.pillars { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pillar {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.4s;
}
.pillar:hover { background: rgba(14, 20, 36, 0.85); }
.pillar__ico {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  color: var(--cyan);
  background: radial-gradient(circle at 30% 20%, rgba(0, 217, 255, 0.18), transparent 70%);
}
.pillar__ico svg { width: 26px; height: 26px; }
.pillar h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.pillar__n { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.outcomes {
  margin-top: clamp(80px, 12vh, 140px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-2);
}
.outcome {
  padding: 32px 28px 8px 0;
  position: relative;
}
.outcome + .outcome { padding-left: 28px; border-left: 1px solid var(--line); }
.outcome__k {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
}
.outcome__v {
  margin-top: 14px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.outcome::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px var(--cyan);
  transition: width 1.4s var(--ease);
}
.outcome.in::before { width: 100%; }

/* ---------- Services ---------- */
.services { padding: clamp(100px, 16vh, 180px) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 64px;
}
.section-head h2 {
  margin-top: 22px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  letter-spacing: -0.045em;
}
.section-head p { max-width: 400px; margin: 0; color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1200px;
}
.card {
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  min-height: 460px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: rgba(8, 10, 18, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.card:hover { border-color: rgba(0, 217, 255, 0.35); transition: transform 0.1s linear, border-color 0.4s; }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 217, 255, 0.16), rgba(139, 92, 246, 0.08) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(0, 217, 255, 0.9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.card__n { color: var(--cyan); }
.card__visual {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 0;
  transform: translateZ(40px);
}
.card__visual svg {
  width: 120px;
  height: 120px;
  color: var(--cyan);
  filter: drop-shadow(0 0 18px rgba(0, 217, 255, 0.45));
  transition: transform 0.8s var(--ease);
}
.card:hover .card__visual svg { transform: scale(1.08) rotate(-4deg); }
.card__visual .spin { transform-origin: 60px 60px; animation: rot 14s linear infinite; }
.card__visual .spin-r { transform-origin: 60px 60px; animation: rot 20s linear infinite reverse; }
@keyframes rot {
  to { transform: rotate(360deg); }
}
.card__visual .blink { animation: blink 1.6s steps(2) infinite; }
@keyframes blink {
  50% { opacity: 0.2; }
}
.card__visual .flow { stroke-dasharray: 4 6; animation: flow 1.2s linear infinite; }
@keyframes flow {
  to { stroke-dashoffset: -20; }
}

.card h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  transform: translateZ(30px);
}
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; transform: translateZ(20px); }
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.card__tags span {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Terminal strip ---------- */
.terminal {
  margin-top: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 14, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2f3d; }
.terminal__bar i:nth-child(1) { background: #ff5f57; }
.terminal__bar i:nth-child(2) { background: #febc2e; }
.terminal__bar i:nth-child(3) { background: #28c840; }
.terminal__bar b { margin-left: 10px; font-weight: 400; }
.terminal__body {
  padding: 20px 22px;
  min-height: 170px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}
.terminal__body .c { color: var(--cyan); }
.terminal__body .g { color: #2bff88; }
.terminal__body .v { color: var(--lilac); }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: -0.18em;
  background: var(--cyan);
  animation: blink 1s steps(2) infinite;
}

/* ---------- Contact ---------- */
.contact { padding: clamp(100px, 16vh, 180px) 0 120px; }
.contact__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact h2 {
  margin: 22px 0 40px;
  font-size: clamp(2.4rem, 5.6vw, 4.8rem);
  letter-spacing: -0.045em;
}
.contact__list { list-style: none; margin: 0 0 36px; padding: 0; border-top: 1px solid var(--line); }
.contact__list li { border-bottom: 1px solid var(--line); }
.contact__list a,
.contact__list div {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  transition: padding 0.4s var(--ease), color 0.3s;
}
.contact__list a:hover { padding-left: 12px; color: var(--cyan); }
.contact__list small {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__list span { font-size: clamp(1.02rem, 1.6vw, 1.3rem); font-weight: 500; letter-spacing: -0.01em; word-break: break-word; }
.contact__list svg { width: 18px; height: 18px; opacity: 0.6; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.form {
  position: relative;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.form::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--grad);
  opacity: 0.25;
  filter: blur(30px);
}
.form__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.form__head h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.form__head .mono { font-size: 11px; color: var(--muted); letter-spacing: 0.12em; }

.field { position: relative; margin-bottom: 22px; }
.field input,
.field textarea {
  width: 100%;
  padding: 22px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  outline: none;
  resize: vertical;
  border-radius: 0;
}
.field textarea { min-height: 110px; }
.field label {
  position: absolute;
  left: 0;
  top: 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  transition: top 0.3s var(--ease), font-size 0.3s var(--ease), color 0.3s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: 0;
  font-size: 10.5px;
  color: var(--cyan);
}
.field::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.6s var(--ease);
}
.field:focus-within::after { width: 100%; }
.field textarea + label + i { display: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}
.form__status { font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 1em; }
.form__status.ok { color: #2bff88; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  padding: 40px 0 36px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(4, 5, 10, 0.4), var(--bg));
  overflow: hidden;
}
.footer__big {
  font-size: clamp(3rem, 12vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 237, 245, 0.18);
  text-align: center;
  user-select: none;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 1.2s var(--ease);
  margin: 0 0 30px;
}
.footer__big:hover { background-size: 100% 100%; }
.footer__big .io {
  -webkit-text-stroke: 0;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  text-shadow: 0 0 40px rgba(0, 217, 255, 0.45);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.footer__row a:hover { color: var(--cyan); }

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  z-index: 40;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s 0.6s;
}
.loaded .hud { opacity: 1; }
.hud--rail {
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}
.hud--rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  transition: color 0.3s;
}
.hud--rail a span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; }
.hud--rail a:hover span,
.hud--rail a.is-active span { opacity: 1; transform: none; }
.hud--rail a i {
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease), background 0.3s;
}
.hud--rail a.is-active { color: var(--cyan); }
.hud--rail a.is-active i { width: 36px; box-shadow: 0 0 8px var(--cyan); }

.hud--bl {
  left: var(--pad);
  bottom: 24px;
  display: grid;
  gap: 4px;
}
.hud--br {
  right: var(--pad);
  bottom: 24px;
  text-align: right;
  display: grid;
  gap: 4px;
}
.hud b { color: var(--text); font-weight: 400; }
.hud .live { color: #2bff88; }

/* hide bottom HUD while in hero (overlaps hero foot) */
.hud--bl,
.hud--br { transition: opacity 0.6s; }
.in-hero .hud--bl,
.in-hero .hud--br { opacity: 0; }

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

.hero [data-intro] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.loaded .hero [data-intro] { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hud--rail { display: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; min-height: 360px; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border-radius: 0;
    border: 0;
    background: rgba(4, 5, 10, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0s linear 0.4s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity 0.4s; }
  .nav__links a { font-size: 22px; padding: 14px 24px; }
  .nav__burger { display: block; }
  .nav__cta { display: none; }
  .logo__sub { display: none; }

  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .outcome + .outcome { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .outcome { padding: 26px 0 18px; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child { grid-column: auto; }
  .card { min-height: 380px; }

  .hud--bl,
  .hud--br { display: none; }
  .hero__foot .click-hint { display: none; }

  .contact__list a,
  .contact__list div { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .contact__list small { grid-column: 1 / -1; }
  .form__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .statement .w { opacity: 1; filter: none; transform: none; }
}
