/* CAT Consultores — Editorial v2 */
:root {
  --bg: #12110F;
  --bg-2: #1A1915;
  --bg-3: #221F1A;
  --fg: #EDE8DE;
  --fg-dim: rgba(237,232,222,0.62);
  --fg-faint: rgba(237,232,222,0.32);
  --rule: rgba(237,232,222,0.10);
  --rule-strong: rgba(237,232,222,0.24);
  --accent: #A9B8C7;
  --accent-ink: #12110F;
  --pad: 40px;
  --gap: 24px;
  --font-sans: 'Instrument Sans', 'Inter', system-ui, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

[data-density="compact"] { --pad: 24px; --gap: 14px; }
[data-density="roomy"]   { --pad: 64px; --gap: 36px; }

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ TOP STATUS BAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gap);
  padding: 10px var(--pad);
  background: rgba(18,17,15,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.topbar .status { display: flex; gap: 18px; align-items: center; color: var(--fg-dim); }
.topbar .dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  display: inline-block; margin-right: 8px;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(169,184,199,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(169,184,199,0); }
  100% { box-shadow: 0 0 0 0 rgba(169,184,199,0); }
}
.topbar .clock { font-variant-numeric: tabular-nums; color: var(--fg); }
.topbar .brand {
  font-family: var(--font-display);
  font-weight: 400; letter-spacing: -0.01em;
  font-size: 20px;
  font-style: italic;
}
.topbar .brand span { color: var(--accent); font-style: normal; }
.topbar .lang {
  display: flex; gap: 2px; justify-self: end;
  font-family: var(--font-mono);
}
.topbar .lang button {
  background: transparent; border: 1px solid transparent;
  color: var(--fg-dim);
  padding: 5px 10px; font-size: 11px; letter-spacing: 0.08em;
  border-radius: 2px;
}
.topbar .lang button[data-active="true"] {
  color: var(--fg); border-color: var(--rule-strong);
}

/* ============ NAV ============ */
.nav {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gap);
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--fg-dim); position: relative; transition: color 0.2s; }
.nav a:hover { color: var(--fg); }
.nav a::before {
  content: ""; position: absolute; bottom: -4px; left: 0; right: 100%;
  height: 1px; background: var(--accent);
  transition: right 0.25s ease;
}
.nav a:hover::before { right: 0; }
.nav .cta {
  border: 1px solid var(--rule-strong); padding: 8px 16px;
  color: var(--fg);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav .cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.nav .cta::before { display: none; }

/* ============ SECTIONS ============ */
section { position: relative; border-bottom: 1px solid var(--rule); }
.section-label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.section-label .idx { color: var(--accent); }
.section-label .meta { font-variant-numeric: tabular-nums; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 0;
  min-height: 88vh;
  display: grid;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
}
.hero-left {
  padding: 72px var(--pad) 48px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 72vh;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--fg-dim);
  display: flex; gap: 12px; align-items: center;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 7.8vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 28px 0 0;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic; color: var(--accent);
}
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--fg-faint);
  font-style: italic;
}
.hero h1 .bar {
  display: inline-block; height: 0.12em;
  background: var(--accent);
  width: 0.8em; vertical-align: middle;
  margin: 0 0.15em 0.12em;
}

.hero-sub {
  margin-top: 36px; max-width: 54ch; color: var(--fg-dim);
  font-size: 16px; line-height: 1.6;
}
.hero-cta-row {
  display: flex; gap: 14px; margin-top: 40px;
  flex-wrap: wrap;
}
.hero-cta {
  padding: 14px 22px; font-size: 13px; letter-spacing: 0.04em;
  background: transparent; color: var(--fg);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  display: inline-flex; align-items: center; gap: 12px;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.hero-cta.primary {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
  font-weight: 500;
}
.hero-cta:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hero-cta.primary:hover { background: var(--accent); border-color: var(--accent); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  margin-top: 56px; padding-top: 20px;
}
.hero-stats .stat {
  border-right: 1px solid var(--rule);
  padding: 0 16px 0 0;
}
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats .stat .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: 38px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-stats .stat .num em { font-style: italic; color: var(--accent); }
.hero-stats .stat .lbl {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-dim); margin-top: 6px;
}

/* Hero right: living collage */
.hero-right {
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: 72vh;
}
.hero-collage {
  position: relative;
  height: 100%;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 12px;
  min-height: 72vh;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.card .c-tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--fg-dim); text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
.card .c-tag .id { color: var(--accent); }
.card .c-val {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1;
}
.card .c-val em { font-style: italic; color: var(--accent); }
.card .c-delta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--accent); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.card .c-delta.down { color: #E07856; }

.card.kpi-1 { grid-column: 1 / 5; grid-row: 1 / 4; }
.card.kpi-2 { grid-column: 5 / 9; grid-row: 1 / 4; }
.card.chart-main { grid-column: 1 / 9; grid-row: 4 / 9; }
.card.donut { grid-column: 1 / 4; grid-row: 9 / 13; }
.card.feed  { grid-column: 4 / 9; grid-row: 9 / 13; }

.chart-main svg, .donut svg { display: block; }
.chart-main .chart-body {
  position: absolute; inset: 42px 16px 16px;
}

.feed-row {
  display: grid; grid-template-columns: 58px 1fr auto;
  gap: 10px; padding: 7px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  border-bottom: 1px dashed var(--rule);
  align-items: baseline;
  animation: fade-up 0.5s ease;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row .f-id { color: var(--fg-faint); }
.feed-row .f-t  { color: var(--fg); font-family: var(--font-sans); font-size: 12px; }
.feed-row .f-v  { color: var(--accent); font-variant-numeric: tabular-nums; }
.feed-row .f-v.down { color: #E07856; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }

/* Donut label */
.donut .ring-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.donut .ring-label .num {
  font-family: var(--font-display); font-size: 32px; letter-spacing: -0.02em;
  color: var(--fg);
}
.donut .ring-label .lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--fg-dim); text-transform: uppercase; margin-top: 2px;
}

/* ============ HERO VARIANT B ============ */
.hero-b {
  padding: 84px var(--pad) 0;
  display: grid; gap: 48px;
  min-height: 88vh;
  grid-template-rows: auto 1fr auto;
}
.hero-b h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 12vw, 200px);
  line-height: 0.9; letter-spacing: -0.035em;
  margin: 0; text-wrap: balance;
}
.hero-b h1 em { font-style: italic; color: var(--accent); }
.hero-b h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--fg-faint);
  font-style: italic;
}
.hero-b .meta-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 1px solid var(--rule); padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; color: var(--fg-dim);
  text-transform: uppercase;
}
.hero-b .meta-row div { border-right: 1px solid var(--rule); padding: 0 16px; }
.hero-b .meta-row div:last-child { border-right: 0; }

.marquee {
  border-top: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
  margin: 0 calc(-1 * var(--pad));
  background: var(--bg);
}
.marquee-track {
  display: inline-flex; gap: 56px;
  white-space: nowrap;
  padding: 20px 0;
  animation: marquee 80s linear infinite;
  font-family: var(--font-display);
  font-size: 28px; font-style: italic;
  letter-spacing: -0.01em;
  color: var(--fg-dim);
}
.marquee-track .sep { color: var(--accent); font-style: normal; }
.marquee-track em { color: var(--fg); font-style: italic; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.service {
  padding: 48px var(--pad);
  border-right: 1px solid var(--rule);
  position: relative;
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background 0.3s;
}
.service:last-child { border-right: 0; }
.service:hover { background: var(--bg-2); }
.service .svc-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--fg-dim);
  display: flex; align-items: center; gap: 10px;
}
.service .svc-num::before {
  content: ""; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  transform: scale(0.8); transition: transform 0.3s;
}
.service:hover .svc-num::before { transform: scale(1.4); }
.service h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 44px; margin: 24px 0 16px; letter-spacing: -0.02em;
  line-height: 1;
}
.service h3 em { font-style: italic; color: var(--accent); }
.service p { color: var(--fg-dim); font-size: 15px; line-height: 1.65; max-width: 38ch; }
.service .svc-tags {
  margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--font-mono);
}
.service .svc-tags span {
  font-size: 11px; letter-spacing: 0.04em;
  border: 1px solid var(--rule); padding: 4px 10px;
  color: var(--fg-dim); border-radius: 2px;
}

/* ============ SOURCES ============ */
.sources { display: grid; grid-template-columns: 1fr 1.3fr; }
.sources-copy { padding: 72px var(--pad); border-right: 1px solid var(--rule); }
.sources-copy h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px); line-height: 1; margin: 0 0 28px;
  letter-spacing: -0.025em;
}
.sources-copy h2 em { font-style: italic; color: var(--accent); }
.sources-copy p { color: var(--fg-dim); max-width: 42ch; font-size: 15px; line-height: 1.65; }
.sources-copy .count-block {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.sources-copy .count-num {
  font-family: var(--font-display);
  font-size: 72px; line-height: 1; letter-spacing: -0.04em;
  color: var(--fg);
}
.sources-copy .count-num em { font-style: italic; color: var(--accent); }
.sources-copy .count-lbl {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--fg-dim); text-transform: uppercase;
  margin-top: 8px;
}

.source-pool {
  padding: 40px var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-content: start;
}
.src {
  border: 1px solid var(--rule);
  margin: -0.5px;
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 100px;
  position: relative;
  transition: all 0.3s;
  cursor: default;
  background: var(--bg);
}
.src:hover { background: var(--bg-2); border-color: var(--accent); }
.src .src-id {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-faint);
}
.src .src-name {
  font-family: var(--font-display); font-weight: 400;
  font-size: 20px; letter-spacing: -0.015em;
}
.src .src-dot {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--accent); letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 6px;
}
.src .src-dot::before {
  content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
}

/* ============ PHILOSOPHY ============ */
.philosophy {
  padding: 96px var(--pad);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px;
}
.philosophy .quote {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 3.8vw, 56px); line-height: 1.08;
  letter-spacing: -0.025em; margin: 0;
}
.philosophy .quote em { font-style: italic; color: var(--accent); }
.philosophy .body { color: var(--fg-dim); font-size: 15px; line-height: 1.75; max-width: 46ch; }
.philosophy .body p + p { margin-top: 18px; }

.principle-row {
  margin-top: 72px;
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.principle {
  padding: 28px 28px 28px 0;
  border-right: 1px solid var(--rule);
  padding-left: 24px;
}
.principle:first-child { padding-left: 0; }
.principle:last-child { border-right: 0; }
.principle .pnum {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; color: var(--accent);
}
.principle h4 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; margin: 12px 0; letter-spacing: -0.01em;
}
.principle p { color: var(--fg-dim); font-size: 13px; line-height: 1.6; margin: 0; }

/* ============ PROCESS ============ */
.process { padding: 80px var(--pad) 96px; }
.process-head {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 72px; margin-bottom: 64px;
}
.process-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px); line-height: 1; margin: 0;
  letter-spacing: -0.025em;
}
.process-head h2 em { font-style: italic; color: var(--accent); }
.process-head p { color: var(--fg-dim); max-width: 48ch; margin: 0; font-size: 15px; line-height: 1.65; }

.timeline {
  position: relative;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}
.timeline-progress {
  position: absolute; top: -1px; left: 0;
  height: 2px; background: var(--accent);
  transition: width 1.2s cubic-bezier(.3,.9,.4,1);
}
.timeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.tstep {
  padding: 32px 22px;
  border-right: 1px solid var(--rule);
  min-height: 240px;
  position: relative;
  display: flex; flex-direction: column;
  transition: background 0.3s;
}
.tstep:last-child { border-right: 0; }
.tstep:hover { background: var(--bg-2); }
.tstep .tick {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rule-strong);
  position: absolute; top: -6px; left: 22px;
  transition: background 0.3s, transform 0.3s;
}
.tstep[data-active="true"] .tick { background: var(--accent); transform: scale(1.3); }
.tstep .week {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; color: var(--fg-dim);
}
.tstep .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: 56px; letter-spacing: -0.03em; margin: 10px 0;
  line-height: 1;
}
.tstep[data-active="true"] .num em { font-style: italic; color: var(--accent); }
.tstep h4 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; margin: 0 0 12px; letter-spacing: -0.01em;
}
.tstep p { color: var(--fg-dim); font-size: 13px; line-height: 1.6; margin: 0; }
.tstep .barrow {
  margin-top: auto; padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--accent); letter-spacing: 0.08em;
}

/* ============ DEMO ============ */
.demo { padding: 72px var(--pad) 96px; }
.demo-head {
  display: grid; grid-template-columns: 1.2fr 1fr;
  align-items: end;
  margin-bottom: 36px; gap: 72px;
}
.demo-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px); line-height: 1; margin: 0;
  letter-spacing: -0.025em;
}
.demo-head h2 em { font-style: italic; color: var(--accent); }
.demo-head p { color: var(--fg-dim); margin: 0; max-width: 44ch; font-size: 15px; line-height: 1.65; }

.demo-frame {
  border: 1px solid var(--rule-strong);
  background: var(--bg-2);
  overflow: hidden;
  border-radius: 4px;
}
.demo-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--font-mono);
}
.demo-tabs button {
  padding: 16px 24px; font-size: 12px; letter-spacing: 0.08em;
  color: var(--fg-dim);
  background: transparent; border: 0;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: color 0.2s;
}
.demo-tabs button[data-active="true"] {
  color: var(--fg); background: var(--bg-2);
}
.demo-tabs button[data-active="true"]::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
}
.demo-tabs button:hover { color: var(--fg); }

.demo-body {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  min-height: 600px;
}
.demo-filters {
  border-right: 1px solid var(--rule);
  padding: 24px;
  font-size: 12px;
}
.demo-filters .flabel {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim);
  text-transform: uppercase; margin: 22px 0 10px;
}
.demo-filters .flabel:first-child { margin-top: 0; }
.demo-filters .pill {
  display: inline-block;
  border: 1px solid var(--rule-strong);
  padding: 5px 11px; margin: 0 5px 5px 0;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-dim); cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.demo-filters .pill:hover { color: var(--fg); border-color: var(--fg); }
.demo-filters .pill[data-on="true"] {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}

.demo-canvas {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 150px 1fr 200px;
  gap: 16px;
}
.demo-canvas .kpi {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  background: var(--bg);
}
.demo-canvas .kpi .klbl {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim); text-transform: uppercase;
}
.demo-canvas .kpi .kval {
  font-family: var(--font-display); font-weight: 400;
  font-size: 44px; letter-spacing: -0.025em;
  line-height: 1;
}
.demo-canvas .kpi .kval em { font-style: italic; color: var(--accent); }
.demo-canvas .kpi .kdelta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.demo-canvas .chart {
  grid-column: 1 / -1;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px; position: relative;
  background: var(--bg);
}
.demo-canvas .chart-title {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim); text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; justify-content: space-between;
}
.demo-canvas .chart svg { display: block; width: 100%; height: 100%; }
.demo-canvas .bars {
  grid-column: 1 / -1;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px;
  background: var(--bg);
}

.demo-insights {
  border-left: 1px solid var(--rule);
  padding: 24px;
}
.demo-insights .ih {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim); text-transform: uppercase;
  margin-bottom: 16px;
}
.insight {
  border-left: 2px solid var(--accent);
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--bg);
  border-radius: 0 3px 3px 0;
  font-size: 13px; line-height: 1.5; color: var(--fg);
}
.insight .tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--accent);
  display: block; margin-bottom: 6px;
}

/* ============ CONTACT ============ */
.contact { display: grid; grid-template-columns: 1fr 1fr; min-height: 540px; }
.contact-left { padding: 80px var(--pad); border-right: 1px solid var(--rule); }
.contact-left h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.95; letter-spacing: -0.035em; margin: 0;
}
.contact-left h2 em { font-style: italic; color: var(--accent); }
.contact-left .info { margin-top: 48px; display: grid; gap: 24px; }
.contact-left .info .k {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim); text-transform: uppercase;
  margin-bottom: 6px;
}
.contact-left .info .v { font-size: 17px; }

.contact-form {
  padding: 80px var(--pad);
  display: grid; gap: 20px; align-content: start;
}
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim); text-transform: uppercase;
}
.field input, .field textarea, .field select {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong);
  color: var(--fg); font-family: var(--font-sans); font-size: 16px;
  padding: 10px 0; outline: none; resize: none;
  transition: border-color 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 100px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.submit {
  justify-self: start; background: var(--fg); color: var(--bg);
  border: 0; padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 13px; letter-spacing: 0.04em;
  font-weight: 500;
  border-radius: 2px;
  display: inline-flex; gap: 12px; align-items: center;
  transition: all 0.2s;
}
.submit:hover { background: var(--accent); color: var(--accent-ink); }

/* ============ FOOTER ============ */
footer {
  padding: 56px var(--pad) 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
footer .f-brand {
  font-family: var(--font-display); font-weight: 400;
  font-size: 32px; font-style: italic;
  letter-spacing: -0.01em;
}
footer .f-brand span { color: var(--accent); font-style: normal; }
footer .disclaimer {
  margin-top: 16px; color: var(--fg-dim); max-width: 52ch;
  font-size: 13px; line-height: 1.6;
}
footer h5 {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim);
  margin: 0 0 16px;
}
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer ul a { font-size: 14px; color: var(--fg); transition: color 0.2s; }
footer ul a:hover { color: var(--accent); }
footer .bottom {
  grid-column: 1 / -1; margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; color: var(--fg-dim); font-size: 12px;
  font-family: var(--font-mono);
}

/* Sparkline */
.sparkline-path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.sparkline-fill { fill: var(--accent); opacity: 0.10; }
.bar { fill: var(--fg-faint); }
.bar.hi { fill: var(--accent); }

/* ====== DESARROLLOS ====== */
#desarrollos { border-bottom: 1px solid var(--rule); }
.desarrollos { display: grid; grid-template-columns: 1.15fr 1.85fr; }
.des-left {
  padding: 56px var(--pad); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 40px;
}
.des-left h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 4.6vw, 72px); line-height: 0.98;
  letter-spacing: -0.025em; margin: 0; text-wrap: balance;
}
.des-left h2 em { font-style: italic; color: var(--accent); }
.des-left .lede { color: var(--fg-dim); font-size: 15px; line-height: 1.65; max-width: 46ch; margin: 0; }
.des-left .stack {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.04em; line-height: 1.9;
  padding-top: 20px; border-top: 1px dashed var(--rule);
}
.des-left .stack-row { display: flex; gap: 8px; flex-wrap: wrap; }
.des-left .stack-row span {
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 2px;
  color: var(--fg); background: var(--bg-2); transition: all 0.25s;
}
.des-left .stack-row span:hover { border-color: var(--accent); color: var(--accent); }
.mvp-stat {
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  position: relative; overflow: hidden;
}
.mvp-stat::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 40%, transparent 40%);
  animation: sweep 6s ease-in-out infinite;
}
@keyframes sweep { 0%, 100% { transform: translateX(-60%); } 50% { transform: translateX(60%); } }
.mvp-stat .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: 104px; line-height: 0.9; letter-spacing: -0.04em; color: var(--fg);
}
.mvp-stat .num em { font-style: italic; color: var(--accent); }
.mvp-stat .lbl {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); line-height: 1.7;
}
.mvp-stat .lbl strong { display: block; color: var(--fg); font-weight: 500; font-size: 12px; margin-bottom: 4px; }
.des-right { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; }
.des-card {
  padding: 48px 36px 36px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: background 0.3s; min-height: 360px;
}
.des-card:last-of-type { border-right: 0; }
.des-card:hover { background: var(--bg-2); }
.des-card:hover .viz { opacity: 1; }
.des-card .ix {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-dim);
  display: flex; align-items: center; gap: 10px;
}
.des-card .ix::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  transform: scale(0.85); transition: transform 0.35s;
}
.des-card:hover .ix::before { transform: scale(1.4); }
.des-card h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 44px; line-height: 1; letter-spacing: -0.02em; margin: 20px 0 18px;
}
.des-card h3 em { font-style: italic; color: var(--accent); }
.des-card p { color: var(--fg-dim); font-size: 14px; line-height: 1.65; max-width: 32ch; margin: 0; }
.des-card .viz { margin-top: auto; padding-top: 28px; opacity: 0.55; transition: opacity 0.4s; }
.des-card .tags { margin-top: 20px; display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); }
.des-card .tags span { font-size: 10px; letter-spacing: 0.06em; padding: 4px 10px; border: 1px solid var(--rule); color: var(--fg-dim); border-radius: 2px; }
.sprint-viz { display: grid; gap: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg-dim); }
.sprint-row { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; }
.sprint-row .bar-wrap { height: 6px; background: var(--rule); border-radius: 2px; position: relative; overflow: hidden; }
.sprint-row .bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); animation: sprint-fill 3s ease-out infinite; transform-origin: left; }
.sprint-row .bar-fill.r2 { animation-delay: 0.25s; animation-duration: 3.3s; }
.sprint-row .bar-fill.r3 { animation-delay: 0.5s; animation-duration: 3.6s; }
.sprint-row .bar-fill.r4 { animation-delay: 0.75s; animation-duration: 3.9s; }
@keyframes sprint-fill { 0% { width: 0%; } 60% { width: var(--target, 80%); } 100% { width: var(--target, 80%); } }
.sprint-row .snum { color: var(--fg); font-variant-numeric: tabular-nums; }
.adapt-viz { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 80px; }
.adapt-block { background: var(--rule); border-radius: 2px; position: relative; overflow: hidden; }
.adapt-block::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: bottom; }
.adapt-block:nth-child(1)::after { animation: adapt-h 5s ease-in-out infinite; }
.adapt-block:nth-child(2)::after { animation: adapt-h 5s ease-in-out infinite 0.3s; }
.adapt-block:nth-child(3)::after { animation: adapt-h 5s ease-in-out infinite 0.6s; }
.adapt-block:nth-child(4)::after { animation: adapt-h 5s ease-in-out infinite 0.9s; }
@keyframes adapt-h { 0%, 100% { transform: scaleY(0.25); } 30% { transform: scaleY(0.85); } 60% { transform: scaleY(0.5); } 80% { transform: scaleY(1); } }
.cost-viz { display: grid; gap: 8px; font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); letter-spacing: 0.06em; }
.cost-row-head { display: flex; justify-content: space-between; margin-bottom: 2px; }
.cost-bar { height: 14px; background: var(--rule); border-radius: 2px; position: relative; overflow: hidden; }
.cost-bar span { position: absolute; inset: 0 auto 0 0; background: var(--fg-faint); animation: cost-grow 4s ease-in-out infinite; }
.cost-bar.yours span { background: var(--accent); animation: cost-stay 4s ease-in-out infinite; width: 22%; }
@keyframes cost-grow { 0% { width: 100%; } 40% { width: 100%; } 70% { width: 140%; } 100% { width: 160%; } }
@keyframes cost-stay { 0%, 100% { width: 22%; } 50% { width: 24%; } }
.cost-label { color: var(--fg); }
.cost-label.accent { color: var(--accent); }
.ai-card {
  grid-column: 1 / -1; padding: 40px var(--pad); background: var(--bg); border-bottom: 0;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
  position: relative; overflow: hidden;
}
.ai-card::before {
  content: ""; position: absolute; right: -100px; top: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 55%);
  opacity: 0.06; animation: ai-pulse 8s ease-in-out infinite;
}
@keyframes ai-pulse { 0%, 100% { transform: scale(1); opacity: 0.06; } 50% { transform: scale(1.15); opacity: 0.12; } }
.ai-card .ai-main { display: flex; gap: 28px; align-items: center; }
.ai-card .ai-icon {
  width: 54px; height: 54px; flex-shrink: 0;
  border: 1px solid var(--rule-strong); border-radius: 50%;
  display: grid; place-items: center; position: relative; color: var(--accent);
}
.ai-card .ai-icon::before {
  content: ""; position: absolute; inset: -1px;
  border: 1px solid var(--accent); border-radius: 50%;
  animation: ai-ring 3s ease-out infinite; opacity: 0;
}
@keyframes ai-ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.8); opacity: 0; } }
.ai-card .ai-icon span { font-family: var(--font-display); font-style: italic; font-size: 22px; }
.ai-card h4 { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 6px; }
.ai-card h4 em { font-style: italic; color: var(--accent); }
.ai-card .ai-sub { color: var(--fg-dim); font-size: 14px; margin: 0; max-width: 60ch; }
.ai-card .ai-chips { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); }
.ai-chips span {
  padding: 8px 14px; font-size: 11px; border: 1px solid var(--rule-strong); border-radius: 2px;
  color: var(--fg); background: var(--bg-2); letter-spacing: 0.04em; transition: all 0.25s; cursor: default;
}
.ai-chips span:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: translateY(-2px); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid, .sources, .contact, .philosophy, .process-head, .demo-head { grid-template-columns: 1fr; }
  .sources-copy, .contact-left, .hero-left { border-right: 0; border-bottom: 1px solid var(--rule); }
  .services-grid { grid-template-columns: 1fr; }
  .service { border-right: 0; border-bottom: 1px solid var(--rule); }
  .timeline-steps { grid-template-columns: 1fr 1fr; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-filters, .demo-insights { border: 0; border-bottom: 1px solid var(--rule); }
  .source-pool { grid-template-columns: repeat(2, 1fr); }
  .desarrollos { grid-template-columns: 1fr; }
  .des-left { border-right: 0; border-bottom: 1px solid var(--rule); }
  .des-right { grid-template-columns: 1fr; }
  .des-card { border-right: 0; }
  .ai-card { grid-template-columns: 1fr; }
  .hero-collage { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(8, 1fr); }
  .card.kpi-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
  .card.kpi-2 { grid-column: 3 / 5; grid-row: 1 / 3; }
  .card.chart-main { grid-column: 1 / 5; grid-row: 3 / 6; }
  .card.donut { grid-column: 1 / 3; grid-row: 6 / 9; }
  .card.feed { grid-column: 3 / 5; grid-row: 6 / 9; }
}

@media (max-width: 700px) {
  :root { --pad: 20px; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar .status { display: none; }
  .nav ul { gap: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat { padding: 8px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .principle-row { grid-template-columns: 1fr 1fr; }
  .timeline-steps { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .source-pool { grid-template-columns: 1fr 1fr; }
  .hero-b h1 { font-size: clamp(48px, 14vw, 100px); }
}
