:root {
  --bg: #070707;
  --bg-soft: #0d0d0d;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.70);
  --muted-2: rgba(255, 255, 255, 0.45);
  --accent: #f5a154;
  --accent-soft: rgba(245, 161, 84, 0.12);
  --accent-strong: #ffc08a;
  --button-secondary-bg: rgba(255, 255, 255, 0.05);
  --metric-bg: rgba(255, 255, 255, 0.03);
  --panel-note-bg: linear-gradient(90deg, rgba(245, 161, 84, 0.12), transparent);
  --cta-bg: linear-gradient(135deg, rgba(245, 161, 84, 0.10), rgba(255, 255, 255, 0.03), transparent);
  --grid-line: rgba(255, 255, 255, 0.04);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --max: 1200px;
}

body.light {
  --bg: #f7f7f8;
  --bg-soft: #ffffff;
  --card: rgba(0, 0, 0, 0.03);
  --card-2: rgba(0, 0, 0, 0.02);
  --border: rgba(0, 0, 0, 0.08);
  --text: #0a0a0a;
  --muted: rgba(0, 0, 0, 0.65);
  --muted-2: rgba(0, 0, 0, 0.45);
  --accent: #f5a154;
  --accent-soft: rgba(245, 161, 84, 0.15);
  --accent-strong: #b96f2b;
  --button-secondary-bg: rgba(0, 0, 0, 0.04);
  --metric-bg: rgba(0, 0, 0, 0.025);
  --panel-note-bg: linear-gradient(90deg, rgba(245, 161, 84, 0.14), rgba(245, 161, 84, 0.03));
  --cta-bg: linear-gradient(135deg, rgba(245, 161, 84, 0.12), rgba(0, 0, 0, 0.02), transparent);
  --grid-line: rgba(0, 0, 0, 0.05);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.18;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.9;
}

.glow.one {
  width: 320px;
  height: 320px;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 161, 84, 0.18);
}

.glow.two {
  width: 260px;
  height: 260px;
  top: 200px;
  left: -80px;
  background: rgba(255, 255, 255, 0.06);
}

.glow.three {
  width: 360px;
  height: 360px;
  bottom: 0;
  right: -80px;
  background: rgba(245, 161, 84, 0.12);
}

body.light .glow {
  opacity: 0.28;
  filter: blur(120px);
}

body.light .glow.two {
  background: rgba(0, 0, 0, 0.05);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border);
}

.brand-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-title span {
  color: var(--accent);
}

.brand-sub {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #111111;
  border-color: transparent;
}

.btn-secondary {
  background: var(--button-secondary-bg);
  color: var(--text);
}

/* =========================
   HERO
========================= */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding: 70px 0 90px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 161, 84, 0.20);
  color: var(--accent-strong);
  font-size: 14px;
}

h1 {
  margin: 18px 0 0;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 700;
}

h1 .accent {
  display: block;
  color: var(--accent);
}

.hero p {
  margin: 24px 0 0;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.mini-card,
.panel,
.step,
.service,
.project,
.cta-box {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.mini-card {
  padding: 18px;
}

.mini-card .small {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.mini-card .big {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
}

.panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-inner {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-soft);
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-top .kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted-2);
}

.panel-top .title {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
}

.live {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 161, 84, 0.20);
}

.metric,
.metric-row > div,
.panel-note {
  border: 1px solid var(--border);
  background: var(--metric-bg);
  border-radius: 20px;
  padding: 18px;
}

.metric .label,
.metric-row .label,
.panel-note .label {
  font-size: 14px;
  color: var(--muted-2);
}

.metric .value {
  margin-top: 12px;
  font-size: 40px;
  font-weight: 700;
}

.metric .hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.metric-row .value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
}

.panel-note {
  margin-top: 14px;
  background: var(--panel-note-bg);
}

.panel-note .value {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 84px 0;
}

.divider {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step,
.service,
.project {
  padding: 26px;
}

.tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent-strong);
}

h2 {
  margin: 16px 0 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lead {
  margin-top: 18px;
  max-width: 800px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.step h3,
.service h3,
.project h3 {
  margin: 14px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.step p,
.service p,
.project p,
.section-side {
  margin: 14px 0 0;
  line-height: 1.8;
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 161, 84, 0.22);
  margin-bottom: 20px;
}

.projects-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.project-sub {
  margin-top: 10px;
  color: var(--accent-strong);
  font-weight: 500;
}

.cta-box {
  padding: 36px;
  background: var(--cta-bg);
  border-color: rgba(245, 161, 84, 0.18);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hidden-anchor {
  position: absolute;
  top: 0;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero,
  .steps,
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .projects-head {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(var(--max), calc(100% - 24px));
  }

  header {
    padding-top: 18px;
  }

  .brand-title {
    font-size: 34px;
  }

  .hero {
    padding: 48px 0 64px;
  }

  h1 {
    line-height: 0.98;
  }

  .hero p {
    font-size: 17px;
  }

  .section {
    padding: 64px 0;
  }

  .panel,
  .panel-inner,
  .step,
  .service,
  .project,
  .cta-box,
  .mini-card {
    border-radius: 22px;
  }
}

/* =========================
   ANIMACIONES
========================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   TOGGLE SVG BUTTON
========================= */

.theme-toggle-btn {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--button-secondary-bg);
  
  display: flex;
  align-items: center;
  justify-content: flex-start;
  
  padding: 4px;
  cursor: pointer;

  flex-shrink: 0;
}

.theme-toggle-btn .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.theme-toggle-btn svg {
  width: 12px;
  height: 12px;
  fill: #111;
}

/* estado activo (light) */
body.light .theme-toggle-btn {
  background: var(--accent-soft);
  border-color: rgba(245,161,84,0.4);
}

body.light .theme-toggle-btn .icon {
  transform: translateX(20px);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}