/* ==========================================================================
   Steel Soluciones — hoja de estilos principal
   Estética industrial: grises, negro y acento naranja.
   ========================================================================== */

:root {
  --ink: #0b0c0e;
  --ink-2: #111317;
  --ink-3: #171a1f;
  --line: rgba(255, 255, 255, 0.10);
  --paper: #f2f1ed;
  --paper-2: #e8e6e0;
  --text: #14161a;
  --muted: #6d7480;
  --accent: #ff6a1a;
  --accent-deep: #c2410c;
  --accent-soft: rgba(255, 106, 26, 0.12);
  --maxw: 1200px;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

section[id] { scroll-margin-top: 80px; }

/* ---------- Tipografía auxiliar ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--dark { color: var(--accent-deep); }

.eyebrow__dash {
  width: 26px;
  height: 2px;
  background: currentColor;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn svg { flex: 0 0 auto; }

.btn--accent {
  background: var(--accent);
  color: var(--ink);
}
.btn--accent:hover {
  background: #ff7f3a;
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover {
  background: #24272d;
  transform: translateY(-1px);
}

.btn--sm {
  padding: 10px 16px;
  font-size: 0.82rem;
}

.btn--block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(9, 10, 12, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}
.brand__text small {
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #9aa2ac;
}

.nav {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
}
.nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #c6ccd4;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(94vh, 880px);
  padding-top: calc(74px + clamp(56px, 10vh, 120px));
  padding-bottom: clamp(46px, 7vh, 84px);
  overflow: hidden;
  color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: grayscale(0.35) contrast(1.06) brightness(0.9);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(8, 9, 11, 0.95) 0%, rgba(8, 9, 11, 0.84) 38%, rgba(8, 9, 11, 0.32) 72%, rgba(8, 9, 11, 0.55) 100%),
    linear-gradient(to top, rgba(8, 9, 11, 0.9) 0%, rgba(8, 9, 11, 0) 55%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: repeating-linear-gradient(135deg, var(--accent) 0 18px, #0b0c0e 18px 36px);
  z-index: 1;
}

.hero__inner { position: relative; z-index: 2; }

.hero h1 {
  max-width: 16ch;
  margin: 0 0 22px;
  font-size: clamp(3rem, 7.4vw, 6.2rem);
  font-weight: 700;
  line-height: 0.88;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__lead {
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__stats {
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  margin: clamp(38px, 5vw, 56px) 0 0;
  padding: 0;
  padding-top: 26px;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.1vw, 2.7rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
}
.hero__stats span {
  display: block;
  margin-top: 7px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- Secciones ---------- */

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section--paper2 { background: var(--paper-2); }

.section--dark {
  background-color: var(--ink-2);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  color: #e8eaed;
}

.section__head { max-width: 900px; margin-bottom: clamp(34px, 4.5vw, 54px); }

.section__head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 0.94;
}

.section__head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
  max-width: none;
}

.section__note {
  max-width: 44ch;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}
.section--dark .section__note { color: #9aa2ac; }

/* ---------- Servicios ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: clamp(22px, 2.4vw, 30px);
  background: #fff;
  border: 1px solid rgba(20, 22, 26, 0.13);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.card:hover::before { transform: scaleX(1); }

.card__num {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: 0.015em;
}

.card > p:not(.card__num) {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #4c525c;
}

.card__list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(20, 22, 26, 0.1);
}
.card__list li {
  padding: 8px 0 8px 18px;
  position: relative;
  font-size: 0.83rem;
  color: #363b43;
  border-bottom: 1px solid rgba(20, 22, 26, 0.07);
}
.card__list li:last-child { border-bottom: 0; }
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 7px; height: 7px;
  background: var(--accent);
}

/* ---------- Proceso ---------- */

.proceso {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.proceso li {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.proceso__num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-deep);
}
.proceso h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}
.proceso p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #4c525c;
}

/* ---------- Obras ---------- */

.obras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 198px 198px;
  gap: 14px;
}

.obra {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #000;
}
.obra--big {
  grid-column: span 2;
  grid-row: span 2;
}

.obra img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) brightness(0.95);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.obra:hover img {
  transform: scale(1.03);
  filter: grayscale(0) brightness(1);
}

.obra figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 18px 16px;
  background: linear-gradient(to top, rgba(8, 9, 11, 0.92), rgba(8, 9, 11, 0));
}
.obra:not(.obra--big) figcaption {
  flex-direction: column;
  align-items: flex-start;
}
.obra:not(.obra--big) figcaption span { text-align: left; }

.obra figcaption strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.obra figcaption span {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aab1ba;
  text-align: right;
}

/* Fotos reales cargadas desde el panel */

.obras--dinamica {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-template-rows: auto;
}
.obras--dinamica .obra { aspect-ratio: 4 / 3; }

/* Carrusel de obras */

.obras-carrusel { position: relative; }

.obras--carrusel {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.obras--carrusel::-webkit-scrollbar { display: none; }

.obras--carrusel .obra {
  flex: 0 0 clamp(250px, 46%, 560px);
  grid-column: auto;
  grid-row: auto;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
}

.obras-carrusel__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.obras-carrusel__barra[hidden] { display: none; }

.obras-carrusel__cuenta {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #98a0aa;
}

.obras-carrusel__flechas { display: flex; gap: 8px; }

.obras-carrusel__flecha {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1;
  color: #e8eaed;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.obras-carrusel__flecha:hover:not(:disabled) {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}
.obras-carrusel__flecha:disabled { opacity: 0.35; cursor: default; }

.obras-carrusel__progreso {
  height: 2px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.obras-carrusel__progreso[hidden] { display: none; }
.obras-carrusel__progreso span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

@media (max-width: 640px) {
  .obras--carrusel .obra {
    flex-basis: 82%;
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    background: var(--ink-2);
  }
  .obras--carrusel .obra img {
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  .obras--carrusel .obra figcaption,
  .obras--carrusel .obra.obra--big figcaption {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 14px 12px;
    background: var(--ink-2);
    border-top: 2px solid var(--accent);
  }
  .obras--carrusel .obra figcaption span { text-align: left; }
}

.obra__borrar {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: rgba(8, 9, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.obra__borrar:hover { background: #b91c1c; border-color: #ef4444; }

/* Página privada de administración (/admin/) */

.admin {
  min-height: 100vh;
  color: #e8eaed;
  background: var(--ink);
}

.admin__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
}
.admin__top .eyebrow { margin-bottom: 6px; }
.admin__top h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

.admin__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.admin__volver {
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a0aa;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.admin__volver:hover { color: var(--accent); }

.admin__main {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(16px, 4vw, 32px) 64px;
}

.admin__panel {
  display: grid;
  gap: 20px;
}
.admin__panel[hidden] { display: none; }

.admin__card {
  width: 100%;
  max-width: none;
  max-height: none;
}

.admin__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.admin__grid .obra { aspect-ratio: 4 / 3; }

.admin__vacio {
  font-size: 0.85rem;
  color: #98a0aa;
}
.admin__vacio[hidden] { display: none; }

/* Panel de carga */

.obras-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  color: #e8eaed;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.obras-dialog::backdrop { background: rgba(4, 5, 7, 0.72); }

.obras-dialog__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: inherit;
  padding: clamp(20px, 3vw, 28px);
  overflow: auto;
}

.obras-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.obras-dialog__head .eyebrow { margin-bottom: 8px; }
.obras-dialog__head h2 { font-size: 1.7rem; }

.obras-dialog__close {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  color: #c6ccd4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}
.obras-dialog__close:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.obras-dialog__hint {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #98a0aa;
}

.obras-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b9c0c9;
}

.obras-dialog input[type="text"],
.obras-dialog input[type="password"] {
  height: 42px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
}
.obras-dialog input[type="text"]:focus,
.obras-dialog input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.16);
}

.obras-field--file input {
  height: auto;
  padding: 9px 12px;
  font-size: 0.82rem;
  color: #98a0aa;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.obras-field--file input::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent);
  border: 0;
  cursor: pointer;
}

.obras-dialog__lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.obras-dialog__lista:empty { display: none; }

.obras-fila {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.obras-fila__thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
}
.obras-fila__campos {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.obras-fila__nombre {
  font-size: 0.72rem;
  color: #8b939d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obras-dialog__estado {
  font-size: 0.8rem;
  color: #9aa2ac;
}
.obras-dialog__estado:empty { display: none; }
.obras-dialog__estado.is-error { color: #ff9366; }

/* ---------- Beneficios ---------- */

.beneficios {
  background: var(--ink);
  border-top: 3px solid var(--accent);
  color: #e8eaed;
  padding-block: clamp(38px, 5vw, 56px);
}
.beneficios__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.beneficio__icon {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.beneficio h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
}
.beneficio p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #98a0aa;
}

/* ---------- Cotizador ---------- */

.section--cotizador { padding-block: clamp(60px, 8vw, 104px); }

.cotizador {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.88fr);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.cotizador__form {
  padding: clamp(20px, 3vw, 38px);
  border-right: 1px solid var(--line);
}

.fieldset {
  min-width: 0;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}
.fieldset:last-child { margin-bottom: 0; }

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c2c8d0;
}
.step span {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 20px;
  padding: 0 5px;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 26, 0.35);
}

/* Tipo de obra */

.tipos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tipo {
  position: relative;
  display: block;
  cursor: pointer;
}
.tipo input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.tipo__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.13);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.tipo:hover .tipo__body { border-color: rgba(255, 255, 255, 0.32); }
.tipo input:checked + .tipo__body {
  border-color: var(--accent);
  background: rgba(255, 106, 26, 0.1);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.tipo input:focus-visible + .tipo__body {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tipo__name {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
.tipo__desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #98a0aa;
}

/* Superficie */

.m2 { position: relative; }
.m2 input {
  width: 100%;
  height: 66px;
  padding: 0 64px 0 16px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.m2 input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.16);
}
.m2__unit {
  position: absolute;
  top: 50%; right: 18px;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--accent);
  pointer-events: none;
}

.field-hint {
  margin-top: 9px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #8b939d;
}

.field-error {
  margin-top: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ff9366;
}
.field-error:empty { display: none; }

/* Terminación */

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.segmented label {
  position: relative;
  display: block;
  cursor: pointer;
}
.segmented input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.segmented span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.13);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.segmented small {
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  color: #98a0aa;
}
.segmented label:hover span { border-color: rgba(255, 255, 255, 0.32); }
.segmented input:checked + span {
  border-color: var(--accent);
  background: rgba(255, 106, 26, 0.1);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Contadores */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.counter > label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a0aa;
}
.counter__row { display: flex; }

.counter__btn {
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.counter__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.counter__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.counter input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: center;
  color: #fff;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-inline: 0;
  border-radius: 0;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.counter input::-webkit-outer-spin-button,
.counter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.counter input:focus { outline: none; background: #12161c; }

/* Checkboxes */

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  font-size: 0.85rem;
  color: #dfe3e8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.check:hover { border-color: rgba(255, 255, 255, 0.34); }
.check input {
  width: 16px; height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 106, 26, 0.1);
  color: #fff;
}

/* Resumen */

.resumen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(22px, 2.8vw, 34px);
  background: #080a0d;
}

.resumen__label {
  margin-bottom: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
}

.resumen__total {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.resumen__nota {
  margin: 9px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #8b939e;
}

/* Variante del check para el panel del resumen */
.check--iva {
  margin-top: 14px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.resumen__usd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #9aa2ac;
}
.resumen__tc {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #6f7782;
}

.resumen__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.resumen__meta dt {
  margin-bottom: 4px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f8792;
}
.resumen__meta dd {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
}

.resumen__detalle {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.83rem;
}
.resumen__detalle li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  color: #a8b0ba;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.09);
}
.resumen__detalle li:last-child { border-bottom: 0; padding-bottom: 0; }
.resumen__detalle span { flex: 1; }
.resumen__detalle b {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.resumen__legal {
  margin: 0;
  font-size: 0.69rem;
  line-height: 1.55;
  color: #737b86;
}

/* ---------- Contacto ---------- */

.contacto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.contacto h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  margin-bottom: 18px;
}
.contacto__lead {
  max-width: 44ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.98rem;
}

.contacto__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.contacto__card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 20px;
  background: #fff;
  border: 1px solid rgba(20, 22, 26, 0.14);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contacto__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.contacto__label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.contacto__card strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.contacto__card small {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 38px;
  background: #08090b;
  color: #8d949e;
  font-size: 0.82rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.brand--footer .brand__text { font-size: 1.05rem; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer__nav a {
  color: #b9c0c9;
  text-decoration: none;
  font-size: 0.82rem;
}
.footer__nav a:hover { color: var(--accent); }

.footer__legal {
  flex: 1 1 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  line-height: 1.6;
  color: #626a75;
}

/* ---------- WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #062b13;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- Animación de entrada ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .obra img, .btn, .wa-float { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .cotizador { grid-template-columns: 1fr; }
  .cotizador__form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .proceso { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beneficios__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacto { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { min-height: auto; padding-top: 150px; }
  .section__head--split { grid-template-columns: 1fr; align-items: start; }
  .section__note { max-width: 60ch; }
  .obras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .obra { aspect-ratio: 4 / 3; }
  .obra--big {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
  .section__head { max-width: none; }
}

@media (max-width: 640px) {
  .header__inner { min-height: 66px; gap: 12px; }
  .brand__text { font-size: 1rem; }
  .brand__text small { display: none; }
  .brand__mark { width: 34px; height: 34px; font-size: 0.9rem; }
  .hero { padding-top: 120px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__stats { flex-wrap: wrap; gap: 20px 32px; }
  .tipos { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .obras { grid-template-columns: 1fr; }
  .obra--big { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .contacto__cards { grid-template-columns: 1fr; }
  .proceso { grid-template-columns: 1fr; }
  .beneficios__grid { grid-template-columns: 1fr; }
  .resumen__meta { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer { padding-bottom: 86px; } /* deja lugar al botón flotante de WhatsApp */
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}

/* ---------- Panel de precios (/admin/precios/) ---------- */

.precios-campos {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.precios-link {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.precios-link .obras-field { flex: 1 1 auto; }

.precios-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.obras-field textarea {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e8eaed;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 9px 12px;
  resize: vertical;
}

.precios-tabla-wrap { overflow-x: auto; }

.precios-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  color: #dfe3e8;
}
.precios-tabla th,
.precios-tabla td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
  white-space: nowrap;
}
.precios-tabla th:first-child,
.precios-tabla td:first-child {
  text-align: left;
  white-space: normal;
}
.precios-tabla th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b9c0c9;
}
.precios-tabla tbody tr:last-child td { border-bottom: 0; }
.precios-tabla td.is-error {
  color: var(--accent);
  font-weight: 600;
}

.precios-avisos {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #9aa2ac;
}
.precios-avisos:empty { display: none; }
.precios-avisos .is-error { color: #ff9366; }

.precios-versiones {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.precios-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.precios-version strong {
  display: block;
  font-size: 0.9rem;
  color: #f2f3f5;
}
.precios-version span {
  font-size: 0.76rem;
  color: #9aa2ac;
}
.precios-version__actual {
  color: var(--accent) !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resumen__aviso {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--accent);
}

/* ---------- Panel unificado (/admin/) ---------- */

.admin__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin__tab {
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #9aa2ac;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.admin__tab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.34); }
.admin__tab.is-active {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}
.admin__seccion {
  display: grid;
  gap: 16px;
}
.admin__seccion[hidden] { display: none; }
