/* ===== Tokens ===== */
:root {
  --ink: #070a08;
  --panel: #10140f;
  --panel-2: #161c15;
  --line: #212a1f;
  --copper: #1e8f4e;
  --copper-bright: #37b06a;
  --volt: #9bd83f;
  --text: #eef4ec;
  --text-muted: #8b9690;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
}

/* ===== Eyebrow / labels ===== */
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  color: var(--copper-bright);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow-dark { color: var(--copper); }

.led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 8px 2px rgba(155, 216, 63, 0.7);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-volt { background: var(--volt); color: #0d1a0a; }
.btn-volt:hover { background: #b3ec55; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--copper); color: var(--copper-bright); }
.btn-small { padding: 9px 18px; font-size: 12px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  margin-right: auto;
}
.logo-mark { flex-shrink: 0; width: 30px; height: 32px; object-fit: contain; }
.logo-mark-sm { width: 24px; height: 26px; }
.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.03em;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--copper-bright); }

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.header-badge .sec-badge { width: 26px; height: 26px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none; border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; width: 16px; margin: 0 auto; background: var(--text); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 28px 22px;
  border-top: 1px solid var(--line);
  gap: 4px;
}
.mobile-nav a {
  padding: 12px 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 14px; align-self: flex-start; }

@media (max-width: 860px) {
  .main-nav, .header-cta, .header-badge { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav.open { display: flex; }
}

/* ===== Hero ===== */
.hero { padding: 84px 0 64px; position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0 0 22px;
  text-transform: uppercase;
}
.accent-copper { color: var(--copper); }
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.circuit-wrap { position: relative; }
.circuit { width: 100%; height: auto; color: var(--line); display: block; }
.circuit-grid { transition: opacity 0.4s ease; }

.fact {
  position: absolute;
  max-width: 132px;
  margin: 0;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--volt);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
  pointer-events: none;
}
.fact strong { display: block; color: var(--volt); font-size: 11px; margin-bottom: 2px; }
.fact-1 { top: 2%; left: 1%; }
.fact-2 { top: 2%; right: 1%; }
.fact-3 { bottom: 4%; left: 1%; }
.fact-4 { bottom: 2%; right: 1%; }

#circuitSvg.off ~ .fact { opacity: 0; transform: translateY(6px); transition-delay: 0s; }

@media (max-width: 860px) {
  .fact { max-width: 88px; font-size: 8px; padding: 5px 6px; line-height: 1.35; }
  .fact strong { font-size: 8.5px; margin-bottom: 1px; }
}

.trace {
  fill: none;
  stroke: var(--copper);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.8s ease forwards;
}
.trace-1 { stroke: var(--volt); animation-delay: 0.05s; }
.trace-2 { stroke: var(--copper-bright); animation-delay: 0.2s; }
.trace-3 { stroke: var(--copper-bright); animation-delay: 0.35s; }
.trace-4 { stroke: var(--volt); animation-delay: 0.5s; }
.trace-5 { stroke: var(--copper); animation-delay: 0.65s; }
.trace-6 { stroke: var(--volt); animation-delay: 0.8s; }
.trace-7 { stroke: var(--copper); animation-delay: 0.95s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.node { fill: var(--copper); }
.node-volt { fill: var(--volt); filter: drop-shadow(0 0 5px rgba(155,216,63,0.8)); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.pad { fill: var(--panel-2); stroke: var(--copper); stroke-width: 1; }

.chip-glow {
  fill: var(--volt);
  opacity: 0.4;
  filter: blur(16px);
  animation: chip-glow-pulse 2.6s ease-in-out infinite;
  transition: opacity 0.5s ease, filter 0.5s ease;
}
@keyframes chip-glow-pulse {
  0%, 100% { opacity: 0.3; filter: blur(14px); }
  50% { opacity: 0.6; filter: blur(20px); }
}

.chip-logo {
  filter: drop-shadow(0 0 10px rgba(155, 216, 63, 0.75)) drop-shadow(0 0 22px rgba(155, 216, 63, 0.5)) brightness(1.1) saturate(1.15);
  animation: chip-glow 2.6s ease-in-out infinite;
  transition: filter 0.5s ease, opacity 0.5s ease;
}
@keyframes chip-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(155, 216, 63, 0.7)) drop-shadow(0 0 18px rgba(155, 216, 63, 0.4)) brightness(1.08) saturate(1.15); }
  50% { filter: drop-shadow(0 0 16px rgba(155, 216, 63, 0.95)) drop-shadow(0 0 32px rgba(155, 216, 63, 0.65)) brightness(1.18) saturate(1.25); }
}

.circuit.off .trace, .circuit.off .node-volt { animation: none; opacity: 0.22; }
.circuit.off .node { opacity: 0.28; }
.circuit.off .pad { stroke: var(--line); opacity: 0.5; }
.circuit.off .chip-glow { animation: none; opacity: 0.03; }
.circuit.off .chip-logo { animation: none; filter: grayscale(1) brightness(0.4); opacity: 0.55; }

.power-switch {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  margin-bottom: 18px; padding: 0;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
}
.power-track {
  width: 40px; height: 20px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); position: relative; transition: border-color 0.2s ease;
}
.power-knob {
  position: absolute; top: 1px; left: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--volt); transition: transform 0.25s ease;
  box-shadow: 0 0 6px rgba(155,216,63,0.6);
}
.power-switch[aria-pressed="false"] .power-knob { transform: translateX(20px); background: var(--text-muted); box-shadow: none; }
.power-switch[aria-pressed="false"] .power-track { border-color: var(--line); }

/* ===== Ticker ===== */
.ticker {
  background: var(--copper);
  color: #06120a;
  overflow: hidden;
  white-space: nowrap;
  padding: 11px 0;
  position: relative;
  z-index: 2;
}
.ticker-track {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: scroll 22s linear infinite;
}
.ticker .dot { font-size: 8px; opacity: 0.6; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ===== Sections ===== */
.section { padding: 96px 0; position: relative; z-index: 2; }
.section-alt { background: var(--panel); }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  max-width: 720px;
  margin: 0 0 46px;
}
.body-text { color: var(--text-muted); font-size: 16.5px; max-width: 480px; margin: 0 0 28px; }

/* ===== Servicios (breaker panel) ===== */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.breaker-card {
  background: var(--panel);
  padding: 32px;
  position: relative;
  transition: background 0.3s ease, box-shadow 0.4s ease;
}
.breaker-card:hover {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--copper), 0 0 30px 4px rgba(155, 216, 63, 0.22), 0 0 60px 10px rgba(155, 216, 63, 0.08);
}
.breaker-card h3 { transition: color 0.3s ease, text-shadow 0.3s ease; }
.breaker-card:hover h3 { text-shadow: 0 0 14px rgba(155, 216, 63, 0.5); }
.breaker-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.breaker-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.switch {
  width: 22px; height: 34px; border-radius: 3px;
  background: var(--ink); border: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 3px;
  transition: border-color 0.25s ease;
}
.switch-nub {
  width: 12px; height: 12px; border-radius: 2px;
  background: var(--text-muted);
  transition: transform 0.25s ease, background 0.25s ease;
}
.breaker-card:hover .switch { border-color: var(--copper); }
.breaker-card:hover .switch-nub { background: var(--volt); transform: translateY(16px); box-shadow: 0 0 6px rgba(155,216,63,0.6); }

.breaker-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.breaker-card ul li {
  position: relative;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}
.breaker-card ul li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 1.5px; background: var(--copper);
}

@media (max-width: 720px) {
  .panel-grid { grid-template-columns: 1fr; }
}

/* ===== Nosotros ===== */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.specsheet {
  position: relative;
  border: 1px dashed var(--line);
  padding: 34px 30px;
  background: var(--ink);
}
.specsheet-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--copper);
  border-style: solid;
}
.specsheet-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.specsheet-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.specsheet-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.specsheet-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.specsheet-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--copper);
  margin: 0 0 24px;
}
.spec-row { padding: 16px 0; border-top: 1px solid var(--line); }
.spec-row:first-child { border-top: none; padding-top: 0; }
.spec-row dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 6px;
}
.spec-row dd { margin: 0; color: var(--text-muted); font-size: 14.5px; }

@media (max-width: 860px) {
  .nosotros-grid, .hero-grid, .contacto-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; }
}

/* ===== Contacto ===== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form span {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.contact-form input, .contact-form textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(30, 143, 78, 0.28);
}
.contact-form button { align-self: flex-start; margin-top: 6px; }
.form-status { font-family: var(--font-mono); font-size: 13px; color: var(--copper-bright); min-height: 18px; margin: 4px 0 0; }

.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px;
  height: fit-content;
}
.contact-card-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--copper);
  margin: 0 0 20px;
}
.contact-label { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.contact-value { font-size: 15.5px; }
.contact-link { color: var(--text); text-decoration: none; transition: color 0.2s ease; }
.contact-link:hover { color: var(--volt); }
.contact-note { font-size: 12px; color: var(--text-muted); margin: 20px 0 0; font-style: italic; }

/* ===== Contact accordion ===== */
.acc-list { display: flex; flex-direction: column; }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:first-child { border-top: none; }

.acc-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  margin: 0 -10px;
  border-radius: 3px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, box-shadow 0.4s ease;
}
.acc-trigger::-webkit-details-marker { display: none; }
.acc-trigger::marker { content: ""; }
.acc-trigger:hover {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--copper), 0 0 22px 2px rgba(155, 216, 63, 0.2);
}

.acc-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--copper);
  display: flex;
  transition: color 0.3s ease, filter 0.3s ease;
}
.acc-icon svg { width: 100%; height: 100%; }
.acc-trigger:hover .acc-icon { color: var(--volt); filter: drop-shadow(0 0 6px rgba(155, 216, 63, 0.7)); }
.acc-trigger:hover .acc-title { color: var(--text); }

.acc-title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.acc-chevron {
  flex-shrink: 0;
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.acc-item[open] .acc-chevron { transform: rotate(180deg); }
.acc-item[open] .acc-icon { color: var(--copper-bright); }

.acc-panel { padding: 0 0 16px 32px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; position: relative; z-index: 2; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner .logo-word { font-size: 17px; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.footer-nav a:hover { color: var(--copper-bright); }
.footer-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.sec-badge { flex-shrink: 0; color: var(--copper); }
.sec-badge-text { font-family: var(--font-display); font-weight: 700; font-size: 12px; fill: var(--text); letter-spacing: 0.02em; }
.sec-badge-sub { font-family: var(--font-mono); font-size: 4px; fill: var(--text-muted); letter-spacing: 0.05em; }
.sec-badge-check-bg { fill: var(--volt); }
.footer-copy { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ===== Scroll reveal ===== */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
