/* ===========================================================
   LANDING PROYECTOS IA — Adrián
   Dirección: oscuro tecnológico · alto contraste · mockups flotantes
   =========================================================== */

:root {
  /* Theme tokens (overridden by [data-theme="light"]) */
  --bg: #0a0b10;
  --bg-elev: #0f1117;
  --bg-card: #14161f;
  --bg-card-2: #1a1d28;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f6;
  --text-dim: #9da0ad;
  --text-faint: #61646f;

  /* Brand accents — kept across themes */
  --violet: #7c5cff;
  --violet-soft: #a18bff;
  --cyan: #22d3ee;
  --cyan-dim: #0ea5b7;
  --amber: #fbbf24;
  --green: #4ade80;

  /* Animation intensities — set by Edit panel */
  --anim-pulse: 1;
  --anim-reveal: 1;
  --anim-float: 1;
  --anim-marquee: 1;

  /* Type */
  --font-display: "Space Grotesk", "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Sizing */
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-card-2: #efeae0;
  --border: rgba(10, 11, 16, 0.10);
  --border-strong: rgba(10, 11, 16, 0.22);
  --text: #14161f;
  --text-dim: #5b5e6a;
  --text-faint: #9da0ad;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 320ms ease, color 320ms ease;
}

/* Subtle starfield/grain bg on dark */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 88% -5%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at -8% 22%, rgba(34, 211, 238, 0.10), transparent 60%);
  opacity: 1;
  transition: opacity 320ms ease;
}
[data-theme="light"] body::before,
body[data-theme="light"]::before {
  opacity: 0.45;
}

main { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: clamp(44px, 7vw, 96px); letter-spacing: -0.035em; font-weight: 500; }
h2 { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2.4vw, 30px); }

.mono { font-family: var(--font-mono); letter-spacing: 0; }
.dim { color: var(--text-dim); }

/* ============ LAYOUT PRIMITIVES ============ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(80px, 12vh, 140px) 0;
  position: relative;
}
.section--tight { padding: clamp(60px, 8vh, 90px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-soft);
}
.eyebrow::before { display: none; }
.eyebrow .num { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: var(--bg-card);
}
.tag--live {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
}
.tag--live .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse calc(2200ms / max(var(--anim-pulse), 0.001)) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 6px transparent; opacity: 0.5; }
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklch, var(--bg) 75%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms ease, background 240ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav__brand .mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  position: relative;
  overflow: hidden;
}
.nav__brand .mark::after {
  content: "A";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #0a0b10;
}
.nav__links {
  display: flex; gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 200ms ease;
}
.nav__cta:hover {
  border-color: var(--violet);
  color: var(--violet-soft);
}
@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(124, 92, 255, 0.6);
}
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--violet);
  color: var(--violet-soft);
}
.btn .arrow {
  width: 14px; height: 14px;
  display: inline-flex;
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translate(2px, -2px); }

/* ============ SCROLL REVEAL ============ */
/* Default: visible. Only hide when JS has marked the page ready and the
   element hasn't been revealed yet — guarantees content is never stuck
   invisible if the reveal effect fails. */
.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity calc(700ms * max(var(--anim-reveal), 0.2)) cubic-bezier(0.2, 0.7, 0.2, 1),
    transform calc(800ms * max(var(--anim-reveal), 0.2)) cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
html.reveals-armed .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(calc(28px * var(--anim-reveal)));
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  position: relative;
}
.hero__title {
  max-width: 14ch;
}
.hero__title .accent {
  font-style: italic;
  font-weight: 400;
  font-family: "Space Grotesk", serif;
  background: linear-gradient(120deg, var(--violet) 20%, var(--cyan) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero__sub {
  margin-top: 28px;
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-dim);
  line-height: 1.55;
}
.hero__bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero__bullets li {
  color: var(--text-dim);
  font-size: clamp(15px, 1.3vw, 17px);
  padding-left: 18px;
  position: relative;
}
.hero__bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--violet-soft);
  font-size: 1.2em;
  line-height: 1;
}
.hero__actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__meta {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  max-width: 720px;
}
.hero__meta-item .k {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.hero__meta-item .v {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
@media (max-width: 600px) {
  .hero__meta { grid-template-columns: 1fr; gap: 14px; }
}

/* Floating glyphs in hero */
.hero__glyphs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__glyph {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.5;
}
.hero__glyph--1 { top: 18%; right: 6%; }
.hero__glyph--2 { top: 38%; right: 2%; transform: rotate(90deg); transform-origin: right top; }
.hero__glyph--3 { bottom: 14%; right: 10%; }

/* Hero floating mockup card */
.hero__mock {
  position: absolute;
  right: -2%;
  top: 16%;
  width: 380px;
  max-width: 38vw;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  padding: 20px;
  transform: rotate(3deg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6),
              0 0 0 1px var(--border);
  animation: floatY calc(8s / max(var(--anim-float), 0.001)) ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-12px); }
}
@media (max-width: 980px) {
  .hero__mock { display: none; }
}

/* ============ CONTEXT BLOCK ============ */
.context {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.context__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.context__lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  text-wrap: pretty;
}
.context__lede em {
  font-style: italic;
  color: var(--violet-soft);
  font-weight: 400;
}
.context__copy { color: var(--text-dim); max-width: 56ch; }
.context__copy p + p { margin-top: 14px; }
@media (max-width: 880px) {
  .context__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ PROJECT BLOCK ============ */
.project {
  position: relative;
  border-top: 1px solid var(--border);
}
.project__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.project__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}
.project__num strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 0.85;
  font-feature-settings: "ss01";
}
.project__title h2 { text-wrap: balance; }
.project__title .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-soft);
  margin-bottom: 14px;
  display: block;
}
.project__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 880px) {
  .project__head { grid-template-columns: 1fr; gap: 18px; }
  .project__tags { justify-content: flex-start; }
}

.project__summary {
  margin-top: 24px;
  max-width: 62ch;
  color: var(--text-dim);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.55;
}
.project__toggle {
  margin-top: 28px;
}
.project__detail {
  margin-top: 48px;
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Problem / solution columns */
.project__body {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.project__col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  font-weight: 500;
}
.project__col p { color: var(--text-dim); }
.project__col strong { color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .project__body { grid-template-columns: 1fr; gap: 28px; }
}

/* Flow steps */
.flow {
  margin-top: 60px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elev);
  overflow: hidden;
}
.flow__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}
.flow__header .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.flow__header .dots { display: flex; gap: 6px; }
.flow__header .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-strong);
}
.flow__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.flow__step {
  padding: 22px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.flow__step .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet-soft);
  letter-spacing: 0.05em;
}
.flow__step h5 {
  margin: 6px 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.flow__step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
}
.flow__step::after {
  content: "→";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--violet-soft);
  background: var(--bg-elev);
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: 14px;
  border-radius: 50%;
}
.flow__step:last-child::after { display: none; }
@media (max-width: 700px) {
  .flow__step::after { display: none; }
}

/* Tools strip */
.tools {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tools .tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-card);
  color: var(--text);
}
.tools .tool .ico {
  width: 14px; height: 14px;
  display: inline-grid; place-items: center;
  color: var(--violet-soft);
}

/* ============ FLOATING GALLERY ============ */
.gallery {
  margin-top: 80px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 20% 30%, rgba(124,92,255,0.10), transparent 60%),
    radial-gradient(600px 360px at 85% 70%, rgba(34,211,238,0.08), transparent 60%),
    var(--bg-elev);
  min-height: 600px;
  padding: 80px 40px;
  display: grid;
  place-items: center;
}
.gallery__stage {
  position: relative;
  width: 100%;
  height: 540px;
  max-width: 1040px;
  perspective: 1400px;
}
.gallery__cap {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  z-index: 5;
}
.gallery__hint {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}
.gallery__hint .key {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 11px;
  background: var(--bg-card);
}

.mock {
  position: absolute;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px var(--border);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 400ms ease,
    z-index 0s 0s;
  transform-style: preserve-3d;
}
.mock:hover {
  transform: translate(-50%, -50%) scale(1.05) !important;
  z-index: 20 !important;
  box-shadow:
    0 50px 120px -20px rgba(124,92,255,0.4),
    0 0 0 1px var(--violet);
}
.mock__chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}
.mock__chrome .d {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong);
}
.mock__chrome .url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}
.mock__label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__inner {
  width: min(94vw, 1600px);
  height: calc(100vh - 32px);
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.lightbox.is-open .lightbox__inner { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  background: var(--bg-card);
  color: var(--text);
}
.lightbox__close:hover { border-color: var(--violet); color: var(--violet-soft); }
.lightbox__caption {
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lightbox__nav {
  display: flex; gap: 8px;
}
.lightbox__nav button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.lightbox__nav button:hover { border-color: var(--violet); color: var(--violet-soft); }
.lightbox__media {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* ============ STACK SECTION (infinite marquee) ============ */
.stack {
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.marquee {
  margin-top: 50px;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee calc(40s / max(var(--anim-marquee), 0.2)) linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  white-space: nowrap;
  transition: border-color 200ms ease, background 200ms ease;
}
.brand__logo {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand__logo svg { width: 100%; height: 100%; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand__type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-left: 4px;
}

/* ============ METRICS ============ */
.metrics {
  border-top: 1px solid var(--border);
}
.metrics__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  overflow: hidden;
  margin-top: 40px;
}
.metric {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  position: relative;
}
.metric:last-child { border-right: 0; }
.metric .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.metric .v {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.metric .v sup {
  font-size: 0.45em;
  color: var(--violet-soft);
  margin-left: 4px;
  vertical-align: super;
  font-weight: 400;
}
.metric .desc {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 14px;
}
.desc--bullets {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.desc--bullets li {
  color: var(--text-dim);
  font-size: 14px;
  padding-left: 14px;
  position: relative;
}
.desc--bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--violet-soft);
}
@media (max-width: 760px) {
  .metrics__grid { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ============ CAPABILITIES ============ */
.caps {
  border-top: 1px solid var(--border);
}
.caps__grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.cap {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: background 240ms ease;
}
.cap .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet-soft);
  letter-spacing: 0.1em;
  min-width: 30px;
  padding-top: 4px;
}
.cap h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.cap p { color: var(--text-dim); margin: 0; font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) {
  .caps__grid { grid-template-columns: 1fr; }
}

/* ============ CTA FOOTER ============ */
.cta {
  border-top: 1px solid var(--border);
  padding: clamp(80px, 14vh, 160px) 0 60px;
  position: relative;
  overflow: hidden;
}
.cta__inner {
  position: relative;
  z-index: 1;
}
.cta__title {
  font-size: clamp(48px, 8vw, 120px);
  text-wrap: balance;
  max-width: 14ch;
}
.cta__title em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(120deg, var(--violet) 20%, var(--cyan) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.cta__sub {
  margin-top: 28px;
  max-width: 56ch;
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.55;
}
.cta__contact {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 720px;
}
.cta__contact a {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  padding-right: 24px;
  transition: padding 240ms ease;
}
.cta__contact a:first-child { padding-left: 0; }
.cta__contact a:last-child { border-right: 0; padding-left: 24px; }
.cta__contact a:hover { padding-left: 8px; padding-right: 16px; }
.cta__contact a:last-child:hover { padding-left: 32px; }
.cta__contact .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 6px;
}
.cta__contact .value {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
}
.cta__contact .arrow {
  color: var(--violet-soft);
  transition: transform 200ms ease;
}
.cta__contact a:hover .arrow { transform: translate(4px, -4px); }
@media (max-width: 600px) {
  .cta__contact { grid-template-columns: 1fr; }
  .cta__contact a { border-right: 0; border-bottom: 1px solid var(--border); padding-left: 0 !important; padding-right: 0 !important; }
  .cta__contact a:last-child { border-bottom: 0; }
}

.footer {
  margin-top: 80px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* ============ SCROLL PROGRESS ============ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  z-index: 100;
  width: 0%;
  transition: width 80ms linear;
}

/* ============ THEME TOGGLE FLOATING ============ */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  display: grid;
  place-items: center;
  transition: all 200ms ease;
  backdrop-filter: blur(12px);
}
.theme-toggle:hover { border-color: var(--violet); }

/* =========================================================
   COVER CAROUSEL
========================================================= */
.ccarousel {
  margin-top: 80px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 20% 30%, rgba(124,92,255,0.10), transparent 60%),
    radial-gradient(600px 360px at 85% 70%, rgba(34,211,238,0.08), transparent 60%),
    var(--bg-elev);
  padding: 0 0 48px;
}
.ccarousel__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.ccarousel__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.ccarousel__benefit-top {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--violet-soft);
  text-align: right;
}
.ccarousel__stage {
  position: relative;
  height: 380px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}
.ccarousel__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 293px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 520ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 450ms ease,
    opacity 350ms ease,
    box-shadow 400ms ease;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px var(--border-strong);
}
.ccarousel__card.is-center {
  box-shadow:
    0 40px 100px -20px rgba(124,92,255,0.35),
    0 0 0 1px var(--violet);
}
.ccarousel__card:not(.is-center):hover { filter: brightness(0.7) !important; }
.ccarousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.ccarousel__arrow {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: border-color 200ms, color 200ms;
}
.ccarousel__arrow:hover { border-color: var(--violet); color: var(--violet-soft); }
.ccarousel__dots { display: flex; gap: 8px; align-items: center; }
.ccarousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-strong);
  cursor: pointer;
  padding: 0;
  transition: background 250ms, transform 250ms;
}
.ccarousel__dot.is-active { background: var(--violet); transform: scale(1.35); }
.ccarousel__hint {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
@media (max-width: 760px) {
  .ccarousel__stage { height: 260px; }
  .ccarousel__card {
    width: min(85vw, 380px);
    height: calc(min(85vw, 380px) * 9 / 16);
  }
  .ccarousel__card:not(.is-center) { opacity: 0 !important; pointer-events: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
