/* =========================================================
   CARLOS COLOTO — Bombas & Automatización
   ========================================================= */

:root {
  /* Color */
  --bg: #0B1220;
  --surface: #121B2E;
  --surface-2: #182437;
  --border: rgba(255, 255, 255, 0.08);
  --text: #E9EEF7;
  --text-muted: #8D9AB5;
  --accent: #2E9BFF;
  --accent-dim: rgba(46, 155, 255, 0.15);
  --positive: #33D69F;
  --positive-dim: rgba(51, 214, 159, 0.15);
  --warning: #FFB020;

  /* Type */
  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 14px;
  --max-width: 1140px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }
p { margin: 0; }

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

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: #05131f;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout helpers ---------- */
.section-inner,
.header-inner,
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section { padding: 96px 0; }
.section-featured { background: linear-gradient(180deg, rgba(46,155,255,0.05), transparent 60%); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 16px; }
.section-lead {
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #05131f;
}
.btn-primary:hover { background: #4dabff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-wa { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  max-height: 100vh;
  overflow-y: auto;
}

.header-inner {
  width: 100%;
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 32px;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }

.main-nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.main-nav-mobile a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}
.main-nav-mobile a:last-child { border-bottom: none; margin-top: 8px; }
.main-nav-mobile.is-open { display: flex; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + 72px) 0 96px;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(46,155,255,0.10), transparent),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 22px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 34px;
}

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

/* ---------- Signature panel widget ---------- */
.hero-panel { display: flex; }

.panel-widget {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

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

.panel-widget-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--positive-dim);
  color: var(--positive);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 0 rgba(51,214,159, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(51,214,159, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(51,214,159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(51,214,159, 0); }
}

.panel-widget-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.gauge-block { display: flex; flex-direction: column; align-items: center; }

.gauge { width: 100%; max-width: 220px; overflow: visible; }

.gauge-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-needle-group { transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.gauge-needle { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.gauge-hub { fill: var(--text); }

.gauge-label {
  margin-top: -18px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
}
.gauge-value { font-size: 1.7rem; font-weight: 600; color: var(--text); }
.gauge-unit { font-size: 0.85rem; color: var(--text-muted); }
.gauge-name { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.readout-block { display: flex; flex-direction: column; gap: 14px; }

.readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.readout-label { font-size: 0.82rem; color: var(--text-muted); }
.readout-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.readout-value small { color: var(--text-muted); font-weight: 500; font-size: 0.72rem; }

.panel-widget-foot {
  margin-top: 20px;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Cards / services ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(46,155,255,0.35); }

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.photo-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.photo-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-2);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-card figcaption {
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Process ---------- */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.process-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.process-copy h3 { font-size: 1.02rem; margin-bottom: 8px; }
.process-copy p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }

.form-field input,
.form-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); outline: none; }
.form-field input:focus-visible,
.form-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-note {
  font-size: 0.88rem;
  color: var(--positive);
  min-height: 1.2em;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }

.info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.info-list li { display: flex; flex-direction: column; gap: 4px; }
.info-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.info-value { font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .btn-header { display: none; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { order: -1; }

  .cards-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .hero { padding: calc(var(--header-h) + 40px) 0 64px; }
  .process-list { grid-template-columns: 1fr; }
  .panel-widget-body { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .header-inner { padding-left: 16px; padding-right: 16px; }
  .section-inner { padding-left: 16px; padding-right: 16px; }
}
