/* =========================================================
   XORLabs — Home (built from scratch)
   Editorial dark design over a living neural canvas.
   Same brand palette & type as the rest of the site.
   ========================================================= */

:root {
  --bg: #04070f;
  --bg-deep: #081120;
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, 0.72);
  --ink-3: rgba(245, 245, 247, 0.5);

  --blue: #1f5595;
  --azure: #2f80ed;
  --sky: #5eb3e8;
  --cyan: #4cc2ff;
  --green: #94bf47;
  --green-2: #abd95f;

  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --veil: rgba(255, 255, 255, 0.04);
  --veil-2: rgba(255, 255, 255, 0.07);

  --grad: linear-gradient(135deg, #1f5595 0%, #2f80ed 55%, #4cc2ff 100%);
  --grad-text: linear-gradient(135deg, #bfe0ff 0%, #6fb8f5 45%, #c6e89a 100%);

  --disp: 'Space Grotesk', 'Inter', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --shell: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--disp); letter-spacing: -0.02em; line-height: 1.1; margin: 0; font-weight: 600; }
p { margin: 0; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; left: -9999px; }
.skip-link { position: absolute; left: -1000px; top: -1000px; }
.skip-link:focus { left: 16px; top: 16px; padding: 10px 16px; background: var(--blue); color: #fff; border-radius: 8px; z-index: 1000; }
[id] { scroll-margin-top: 100px; }

.grad {
  font-style: normal;
  background: var(--grad-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hue 8s ease-in-out infinite;
}
@keyframes hue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Living background ---------- */
#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 12% 8%, rgba(31, 85, 149, 0.32), transparent 70%),
    radial-gradient(46% 40% at 88% 92%, rgba(148, 191, 71, 0.2), transparent 70%),
    radial-gradient(30% 30% at 80% 12%, rgba(76, 194, 255, 0.12), transparent 70%);
  animation: aurora-shift 18s ease-in-out infinite alternate;
}
@keyframes aurora-shift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-30px, 24px, 0) scale(1.06); }
}
.hdr, main, .ftr { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s;
}
.btn .arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn:hover::before { left: 130%; }
.btn-fill {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 18px 48px -16px rgba(47, 128, 237, 0.65);
}
.btn-fill:hover { transform: translateY(-2px); box-shadow: 0 26px 60px -16px rgba(47, 128, 237, 0.75); }
.btn-line {
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.btn-line:hover { background: var(--veil); border-color: rgba(76, 194, 255, 0.5); }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-xl { padding: 18px 36px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: padding .35s ease, background .35s ease, border-color .35s ease, backdrop-filter .35s;
}
.hdr.is-scrolled {
  padding: 10px 0;
  background: rgba(4, 7, 15, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.hdr-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 46px; width: auto; border-radius: 10px; }
.hdr-links { display: flex; gap: 4px; }
.hdr-links a {
  position: relative;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--ink-2);
  border-radius: 10px;
  transition: color .2s;
}
.hdr-links a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.hdr-links a:hover, .hdr-links a.is-active { color: var(--ink); }
.hdr-links a:hover::after, .hdr-links a.is-active::after { transform: scaleX(1); }
.hdr-cta { display: inline-flex; align-items: center; gap: 10px; }
.hdr-burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.hdr-burger span, .hdr-burger span::before, .hdr-burger span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
}
.hdr-burger span::before, .hdr-burger span::after { content: ""; position: absolute; left: 0; }
.hdr-burger span::before { top: -6px; }
.hdr-burger span::after { top: 6px; }
@media (max-width: 980px) {
  .hdr-links { display: none; }
  .hdr-burger { display: inline-flex; }
  .hdr-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 16px; right: 16px;
    background: rgba(6, 10, 22, 0.97);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    animation: drop .3s var(--ease);
  }
  .hdr-links.is-open a { padding: 14px 16px; }
  .hdr-cta .btn { padding: 10px 16px; font-size: 0.85rem; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Shared section furniture ---------- */
section { position: relative; }
.sec-tag {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-tag::before {
  content: "";
  width: 34px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.sec-title {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  max-width: 760px;
  text-wrap: balance;
  margin-bottom: 18px;
}
.sec-lead { color: var(--ink-2); font-size: 1.08rem; max-width: 620px; }
.sec-head { margin-bottom: 64px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--veil);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.kicker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.75); } }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s ease var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal], .no-observer [data-reveal] { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: calc(100svh - 78px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(48px, 8vh, 110px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}
.hero h1 {
  font-size: clamp(3rem, 7.8vw, 6.2rem);
  font-weight: 700;
  line-height: 1.02;
  margin: 26px 0 30px;
}
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.hero h1 .ln > span {
  display: inline-block;
  transform: translateY(110%);
  animation: line-up .9s var(--ease) forwards;
}
.hero h1 .ln:nth-child(1) > span { animation-delay: .1s; }
.hero h1 .ln:nth-child(2) > span { animation-delay: .22s; }
.hero h1 .ln:nth-child(3) > span { animation-delay: .34s; }
@keyframes line-up { to { transform: translateY(0); } }
.hero-lead {
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  max-width: 600px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero side rail */
.hero-side { display: grid; gap: 14px; align-content: center; }
.side-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--veil);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.9rem;
  color: var(--ink-2);
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.side-card:hover { transform: translateX(-6px); border-color: var(--line-2); background: var(--veil-2); }
.side-card:nth-child(1) { animation: bob 7s ease-in-out infinite; }
.side-card:nth-child(2) { animation: bob 9s ease-in-out infinite reverse; }
.side-card:nth-child(3) { animation: bob 8s ease-in-out 1s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.side-card p { color: var(--ink); font-size: 0.9rem; }
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 1.6s ease-in-out infinite;
  flex: 0 0 auto;
}
.side-stats { margin-top: 18px; display: grid; gap: 14px; }
.sstat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sstat strong {
  font-family: var(--disp);
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sstat span { color: var(--ink-3); font-size: 0.85rem; }

/* Logo ticker */
.hero-ticker { margin-top: clamp(40px, 7vh, 80px); padding: 26px 0 34px; border-top: 1px solid var(--line); }
.ticker-label {
  font-family: var(--body);
  font-weight: 500;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 22px;
}
.ticker {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker .tick-track {
  display: flex;
  width: max-content;
  animation: tick 38s linear infinite;
}
.ticker[data-dir="right"] .tick-track { animation-direction: reverse; }
.ticker:hover .tick-track { animation-play-state: paused; }
.ticker .tick-group {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-right: 64px;
}
@keyframes tick { to { transform: translateX(-50%); } }
.logo-ticker img {
  height: 34px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.6;
  transition: opacity .25s;
}
.logo-ticker img:hover { opacity: 1; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  right: 30px;
  bottom: 120px;
  width: 25px; height: 41px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  transition: border-color .3s;
}
.scroll-cue:hover { border-color: var(--cyan); }
.scroll-cue span {
  width: 4px; height: 8px;
  border-radius: 3px;
  background: var(--ink-2);
  margin-top: 7px;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 1100px) { .scroll-cue { display: none; } }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-side { grid-template-columns: 1fr; max-width: 460px; }
}

/* ---------- SPOTLIGHT ---------- */
.spotlight { padding: clamp(90px, 12vh, 150px) 0; }
.spot-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: start;
}
.spot-pin { position: sticky; top: 120px; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.spot-feats { display: grid; gap: 18px; }
.feat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-2);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.feat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.feat:hover { transform: translateX(8px); border-color: var(--line-2); background: var(--veil-2); }
.feat:hover::before { transform: scaleY(1); }
.feat strong { color: var(--ink); }
.feat-num {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cyan);
  border: 1px solid var(--line);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(76, 194, 255, 0.06);
}
@media (max-width: 980px) {
  .spot-grid { grid-template-columns: 1fr; gap: 44px; }
  .spot-pin { position: static; }
}

/* ---------- SERVICES (editorial index) ---------- */
.services { padding: clamp(90px, 12vh, 150px) 0; }
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  gap: 28px;
  align-items: center;
  padding: 34px 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding .35s var(--ease), background .35s;
}
.svc::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.svc:hover::after { transform: scaleX(1); }
.svc:hover { padding-left: 22px; background: linear-gradient(90deg, var(--veil), transparent 70%); }
.svc-num {
  font-family: var(--disp);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-3);
  transition: color .3s;
}
.svc:hover .svc-num { color: var(--cyan); }
.svc-body h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin-bottom: 8px;
  transition: color .3s;
}
.svc-body p { color: var(--ink-2); max-width: 640px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.svc-tags li {
  font-size: 0.78rem;
  color: var(--ink-3);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.svc:hover .svc-tags li { color: var(--ink-2); border-color: var(--line-2); }
.svc:hover .svc-tags li:nth-child(odd) { transform: translateY(-2px); }
.svc-go {
  font-size: 1.5rem;
  color: var(--ink-3);
  justify-self: end;
  transition: transform .35s var(--ease), color .35s;
}
.svc:hover .svc-go { transform: translateX(8px) rotate(-45deg); color: var(--cyan); }
@media (max-width: 720px) {
  .svc { grid-template-columns: 1fr 40px; }
  .svc-num { grid-column: 1; margin-bottom: 4px; }
  .svc-go { grid-row: 1; grid-column: 2; }
  .svc-body { grid-column: 1 / -1; }
}

/* ---------- STATS ---------- */
.stats { padding: clamp(70px, 9vh, 110px) 0; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.big-stat {
  padding: 56px 24px;
  text-align: center;
  border-right: 1px solid var(--line);
  transition: background .3s;
}
.big-stat:last-child { border-right: none; }
.big-stat:hover { background: var(--veil); }
.big-stat strong {
  display: block;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.big-stat span { color: var(--ink-3); font-size: 0.92rem; }
@media (max-width: 760px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .big-stat { padding: 36px 16px; }
  .big-stat:nth-child(2) { border-right: none; }
  .big-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- INDUSTRIES ---------- */
.industries { padding: clamp(90px, 12vh, 150px) 0 clamp(60px, 8vh, 100px); }
.ind-ticker { margin-bottom: 16px; }
.ind {
  display: inline-flex;
  padding: 16px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--disp);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  white-space: nowrap;
  background: var(--veil);
  transition: color .25s, border-color .25s, background .25s, transform .3s var(--ease);
}
.ind:hover {
  color: var(--ink);
  border-color: rgba(76, 194, 255, 0.5);
  background: var(--veil-2);
  transform: translateY(-3px);
}
.ind-ticker .tick-group { gap: 16px; padding-right: 16px; }
.ind-ticker .tick-track { animation-duration: 30s; }

/* ---------- PROCESS (scrollytelling) ---------- */
.process { padding: clamp(90px, 12vh, 150px) 0; }
.proc {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.proc-pin {
  position: sticky;
  top: 140px;
  text-align: left;
}
.proc-num {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(7rem, 16vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity .3s ease, transform .3s var(--ease);
}
.proc-num.is-switching { opacity: 0; transform: translateY(14px); }
.proc-cap {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.proc-steps { display: grid; gap: 26px; }
.pstep {
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: border-color .4s, background .4s, transform .35s var(--ease);
}
.pstep::before {
  content: attr(data-step);
  position: absolute;
  right: 18px; top: 10px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.05);
  transition: color .4s;
}
.pstep h3 { font-size: 1.4rem; margin-bottom: 10px; }
.pstep p { color: var(--ink-2); }
.pstep.is-active {
  border-color: rgba(76, 194, 255, 0.45);
  background: var(--veil-2);
  transform: translateX(6px);
}
.pstep.is-active::before { color: rgba(76, 194, 255, 0.22); }
@media (max-width: 900px) {
  .proc { grid-template-columns: 1fr; gap: 36px; }
  .proc-pin { position: static; display: flex; align-items: baseline; gap: 16px; }
  .proc-num { font-size: 4.6rem; }
}

/* ---------- CASES (stacking cards) ---------- */
.cases { padding: clamp(90px, 12vh, 150px) 0; }
.stack { display: grid; gap: 30px; }
.case {
  position: sticky;
  top: calc(110px + var(--i) * 34px);
  border: 1px solid var(--line-2);
  border-radius: 26px;
  padding: clamp(30px, 4vw, 52px);
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(47, 128, 237, 0.16), transparent 60%),
    radial-gradient(50% 80% at 10% 95%, rgba(148, 191, 71, 0.12), transparent 60%),
    rgba(8, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, 0.8);
}
.case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.case-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.case-idx { font-family: var(--disp); color: var(--ink-3); font-size: 0.85rem; }
.case h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 14px; max-width: 720px; }
.case > p { color: var(--ink-2); max-width: 680px; }
.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.case-metrics strong {
  display: block;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.case-metrics span { color: var(--ink-3); font-size: 0.85rem; }
@media (max-width: 640px) {
  .case { position: static; }
  .case-metrics { grid-template-columns: 1fr 1fr; }
}

/* ---------- QUOTE ---------- */
.quote { padding: clamp(80px, 11vh, 140px) 0; text-align: center; }
.quote-fig { margin: 0; }
.quote-mark {
  display: block;
  font-family: var(--disp);
  font-size: clamp(5rem, 10vw, 8rem);
  line-height: 0.5;
  margin-bottom: 26px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.quote blockquote {
  font-family: var(--disp);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.4;
  margin: 0 auto 26px;
  max-width: 920px;
  text-wrap: balance;
}
.quote figcaption { color: var(--ink-3); font-size: 0.92rem; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(90px, 12vh, 150px) 0; }
.faq-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}
.faq-head { position: sticky; top: 130px; margin: 0; }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
}
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  font-family: var(--disp);
  font-size: 1.08rem;
  font-weight: 500;
  transition: color .25s;
}
.faq-list summary:hover { color: var(--cyan); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--ink-3);
  flex: 0 0 auto;
  transition: transform .35s var(--ease), color .3s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); color: var(--cyan); }
.faq-list details p {
  color: var(--ink-2);
  padding: 0 0 24px;
  max-width: 640px;
  animation: faq-in .45s var(--ease);
}
@keyframes faq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; gap: 36px; }
  .faq-head { position: static; }
}

/* ---------- FINALE ---------- */
.finale {
  padding: clamp(110px, 16vh, 200px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.finale::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 150%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg,
    transparent 0%,
    rgba(47, 128, 237, 0.16) 14%,
    transparent 30%,
    rgba(148, 191, 71, 0.13) 52%,
    transparent 68%,
    rgba(76, 194, 255, 0.12) 86%,
    transparent 100%);
  animation: spin 18s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.finale-inner { position: relative; }
.finale h2 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  margin: 26px auto 18px;
  max-width: 860px;
  text-wrap: balance;
}
.finale .sec-lead { margin: 0 auto 40px; }
.finale-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- FOOTER ---------- */
.ftr {
  border-top: 1px solid var(--line);
  padding: 64px 0 36px;
  background: rgba(4, 7, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ftr-mark {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(3.4rem, 13vw, 11.5rem);
  line-height: 1;
  text-align: center;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  margin-bottom: 56px;
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.ftr-col h4 {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 16px;
}
.ftr-col a {
  display: block;
  padding: 6px 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  transition: color .2s, transform .25s var(--ease);
}
.ftr-col a:hover { color: var(--ink); transform: translateX(4px); }
.ftr-brand p { color: var(--ink-2); max-width: 330px; font-size: 0.95rem; margin-top: 14px; }
.ftr-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--veil);
  transition: background .2s, border-color .2s, transform .25s var(--ease);
}
.socials a:hover { background: var(--veil-2); border-color: var(--line-2); transform: translateY(-3px); }
.socials svg { width: 16px; height: 16px; fill: var(--ink-2); }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Sub-page components (same design language)
   ========================================================= */

/* ---------- Generic sub-page section rhythm ---------- */
.sect { padding: clamp(70px, 10vh, 120px) 0; }
.panel-wide { margin-top: 26px; padding: clamp(30px, 4vw, 48px); }
.sec-title.sm { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.panel strong { color: var(--ink); }

/* ---------- Page head (sub-page hero) ---------- */
.page-head { padding: clamp(64px, 9vh, 120px) 0 clamp(36px, 5vh, 64px); }
.page-head h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  font-weight: 700;
  line-height: 1.04;
  margin: 26px 0 28px;
  max-width: 1020px;
}
.page-head h1 .ln { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.page-head h1 .ln > span {
  display: inline-block;
  transform: translateY(110%);
  animation: line-up .9s var(--ease) forwards;
}
.page-head h1 .ln:nth-child(1) > span { animation-delay: .1s; }
.page-head h1 .ln:nth-child(2) > span { animation-delay: .22s; }
.page-head h1 .ln:nth-child(3) > span { animation-delay: .34s; }
.page-head .sec-lead { max-width: 680px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.page-head .shell::after {
  content: "";
  display: block;
  margin-top: clamp(36px, 6vh, 64px);
  height: 1px;
  background: linear-gradient(90deg, rgba(76, 194, 255, 0.6), rgba(47, 128, 237, 0.35) 35%, rgba(148, 191, 71, 0.3) 70%, transparent);
}

/* ---------- Grids & panels ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.panel::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.panel:hover { transform: translateY(-6px); border-color: var(--line-2); background: var(--veil-2); }
.panel:hover::before { transform: scaleY(1); }
.panel h3 { font-size: 1.3rem; }
.panel h3 a { transition: color .25s; }
.panel h3 a:hover { color: var(--cyan); }
.panel p { color: var(--ink-2); }
.panel .label {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.glyph {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(76, 194, 255, 0.06);
  color: var(--cyan);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: transform .35s var(--ease);
}
.glyph.alt { color: var(--green-2); background: rgba(148, 191, 71, 0.07); }
.panel:hover .glyph { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.bullets { display: grid; gap: 7px; margin-top: 4px; }
.bullets li { position: relative; padding-left: 18px; color: var(--ink-3); font-size: 0.92rem; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
}
.post-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.93rem;
}
.post-link .arrow { transition: transform .3s var(--ease); }
.panel:hover .post-link .arrow { transform: translateX(5px); }

/* Wide feature-number variant (text labels like "LLM" / "RAG") */
.feat-num.wide { width: auto; min-width: 38px; padding: 0 12px; }
.feat h3 { font-size: 1.25rem; margin-bottom: 6px; }

/* ---------- Story split (about) ---------- */
.story-copy p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 18px; }
.story-copy p:first-of-type { color: var(--ink); font-size: 1.15rem; }

/* ---------- Contact layout ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-panel h2 { font-size: 1.7rem; margin-bottom: 8px; }
.form-panel > p { margin-bottom: 26px; }
.side-stack { display: grid; gap: 22px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.85rem; color: var(--ink-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(76, 194, 255, 0.55);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 4px rgba(76, 194, 255, 0.12);
}
.field textarea { min-height: 140px; resize: vertical; }
.col-2 { grid-column: span 2; }
@media (max-width: 640px) { .col-2 { grid-column: span 1; } }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-3);
  cursor: pointer;
  margin-top: 20px;
}
.consent input {
  width: 18px; height: 18px;
  accent-color: var(--azure);
  margin-top: 3px;
  flex: 0 0 auto;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.form-note { font-size: 0.85rem; color: var(--ink-3); margin-top: 16px; }
.inline-link { color: var(--cyan); }
.inline-link:hover { text-decoration: underline; }
#formStatus { margin-top: 14px; font-size: 0.9rem; display: none; }

/* ---------- Prose (legal & articles) ---------- */
.prose-panel {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 4.5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.prose-panel .updated { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 22px; }
.prose-panel h2 { font-size: 1.45rem; margin: 38px 0 12px; }
.prose-panel h2:first-of-type { margin-top: 24px; }
.prose-panel p { color: var(--ink-2); line-height: 1.75; margin-bottom: 14px; }
.prose-panel ul { list-style: disc; padding-left: 22px; margin: 12px 0 18px; }
.prose-panel li { color: var(--ink-2); line-height: 1.7; margin-bottom: 8px; }
.prose-panel a { color: var(--cyan); }
.prose-panel a:hover { text-decoration: underline; }
.prose-panel strong { color: var(--ink); }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #4cc2ff, #1f5595 48%, #94bf47);
  box-shadow: 0 0 12px rgba(76, 194, 255, 0.55);
  z-index: 200;
  pointer-events: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero h1 .ln > span { transform: none; animation: none; }
  #net { display: none; }
}
