/* ===== Tokens ===== */
:root {
  color-scheme: dark;
  --bg: #0c0c0e;
  --bg-2: #121215;
  --panel: #1a1a1f;
  --panel-2: #212128;
  --line: #2c2c34;
  --accent: #e2202e;
  --accent-dark: #b71822;
  --text: #ececef;
  --muted: #9a9aa4;
  --heading-strong: #f4f4f6;
  --header-bg: rgba(12, 12, 14, 0.92);
  --hero-a: #0c0c0e;
  --hero-b: #1c1d22;
  --hero-c: #26272e;
  --hero-tint: rgba(37, 99, 235, 0.16);
  --hero-grid: rgba(255, 255, 255, 0.03);
  --thumb-bg: #17181c;
  --heading: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
}

/* ===== Tema claro ===== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef0f3;
  --line: #e0e2e8;
  --text: #17181c;
  --muted: #5b5d67;
  --heading-strong: #0f1013;
  --header-bg: rgba(255, 255, 255, 0.9);
  --hero-a: #eef1f6;
  --hero-b: #e2e7f0;
  --hero-c: #d2dae8;
  --hero-tint: rgba(37, 99, 235, 0.12);
  --hero-grid: rgba(0, 0, 0, 0.05);
  --thumb-bg: #e6e8ec;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.accent {
  color: var(--accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-dark);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-lg {
  font-size: 15px;
  padding: 17px 34px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--heading-strong);
  border: 3px solid var(--accent);
  padding: 6px 10px 4px;
  line-height: 1;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: 2px;
}
.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.16s ease;
}
.main-nav a:not(.nav-cta):hover {
  color: var(--accent);
}
.main-nav a.nav-cta {
  padding: 16px 24px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 40%, var(--hero-tint), transparent 55%),
    linear-gradient(
      115deg,
      var(--hero-a) 0%,
      var(--hero-a) 42%,
      var(--hero-b) 42%,
      var(--hero-c) 100%
    );
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(115deg, transparent 45%, #000 70%);
}
.hero-inner {
  position: relative;
  padding: 96px 24px 90px;
  max-width: var(--maxw);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  letter-spacing: 3px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}
.tick {
  width: 34px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 1.02;
}
.hero-lead {
  max-width: 420px;
  color: var(--muted);
  margin: 26px 0 34px;
  font-size: 17px;
}
.hero-social {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}
.hero-social a,
.footer-social div a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}
.hero-social a:hover,
.footer-social div a:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== Section base ===== */
.section {
  padding: 78px 0;
}
.section-kicker {
  text-align: center;
  font-family: var(--heading);
  letter-spacing: 4px;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 42px;
  position: relative;
}
.section-kicker::before,
.section-kicker::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 90px;
  height: 1px;
  background: var(--line);
}
.section-kicker::before {
  right: calc(50% + 130px);
}
.section-kicker::after {
  left: calc(50% + 130px);
}
.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}
.section-head-row .section-kicker {
  margin: 0;
  text-align: left;
}
.section-head-row .section-kicker::before,
.section-head-row .section-kicker::after {
  display: none;
}

/* ===== Servicios ===== */
.services {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.service {
  text-align: center;
  padding: 8px 22px;
  border-left: 1px solid var(--line);
}
.service:first-child {
  border-left: 0;
}
.service-icon {
  font-size: 34px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1;
}
.service h3 {
  font-size: 17px;
  margin-bottom: 4px;
  padding-bottom: 12px;
  position: relative;
}
.service h3::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 26px;
  height: 2px;
  background: var(--accent);
}
.service p {
  color: var(--muted);
  font-size: 14px;
}

/* ===== Proyectos ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.project h4 {
  font-size: 15px;
  margin: 14px 0 2px;
}
.project span {
  font-family: var(--heading);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.project-thumb {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: var(--thumb-bg);
  overflow: hidden;
  transition: transform 0.25s ease;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.project:hover .project-thumb {
  transform: translateY(-4px);
}
.project:hover .project-thumb img {
  transform: scale(1.05);
}

/* ===== Nosotros ===== */
.about {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-copy h2 {
  font-size: clamp(32px, 4.5vw, 50px);
  margin-bottom: 22px;
}
.about-copy p {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 34px;
}
.about-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 26px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: 1px;
}
.badge-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px;
}
.about-media {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, var(--hero-c), var(--hero-a)),
    repeating-linear-gradient(
      45deg,
      var(--hero-grid) 0 12px,
      transparent 12px 24px
    );
}

/* ===== Cotizador ===== */
.quote-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 40px);
}
.quote-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 14px auto 46px;
}
.quote-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}
.quote-form {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 30px;
  display: grid;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label,
.extras legend {
  font-family: var(--heading);
  letter-spacing: 1px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text);
}
.unit-note {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--body);
  font-size: 12px;
}
.field input[type="number"],
.field input[type="text"],
.field select {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--body);
  font-size: 15px;
  border-radius: 2px;
  width: 100%;
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.extras {
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 2px;
}
.extras legend {
  padding: 0 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  padding: 5px 0;
}
.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.quote-result {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 30px;
  position: sticky;
  top: 96px;
}
.result-label {
  font-family: var(--heading);
  letter-spacing: 3px;
  font-size: 13px;
  color: var(--muted);
}
.result-range {
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  color: var(--heading-strong);
  margin: 6px 0 4px;
}
.result-point {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.result-point strong {
  color: var(--text);
}
.result-breakdown {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}
.result-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.result-breakdown li span:last-child {
  color: var(--text);
  white-space: nowrap;
}
.result-breakdown li.total {
  border-top: 1px dashed var(--line);
  padding-top: 9px;
  font-family: var(--heading);
  letter-spacing: 1px;
  color: var(--text);
}
.result-cta p {
  font-size: 14px;
  margin-bottom: 12px;
}
.disclaimer {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 14px;
}

/* ===== Reseñas ===== */
.reviews {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px;
}
.stars {
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.review p {
  font-size: 15px;
  margin-bottom: 14px;
}
.review cite {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--heading);
  letter-spacing: 1px;
}

/* ===== Contacto ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 18px;
}
.contact-copy p {
  color: var(--muted);
  margin-bottom: 26px;
}
.contact-list {
  list-style: none;
  display: grid;
  gap: 14px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.contact-list span {
  color: var(--accent);
  font-size: 18px;
}
.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 30px;
  display: grid;
  gap: 16px;
}
.form-title {
  font-family: var(--heading);
  letter-spacing: 2px;
  font-size: 20px;
}
.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 13px 14px;
  font-family: var(--body);
  font-size: 15px;
  border-radius: 2px;
  width: 100%;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
}
.form-status {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 2px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 46px 0 26px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.footer-contact p,
.footer-social p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer-contact span {
  color: var(--accent);
  margin-right: 8px;
}
.footer-social p {
  font-family: var(--heading);
  letter-spacing: 2px;
  color: var(--text);
}
.footer-social div {
  display: flex;
  gap: 10px;
}
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 24px;
    transform: translateY(-140%);
    transition: transform 0.28s ease;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta {
    text-align: center;
    margin-top: 12px;
    border-bottom: 0 !important;
  }
  .nav-toggle {
    display: flex;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 26px 16px;
  }
  .service:first-child {
    border-top: 0;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
  .quote-layout {
    grid-template-columns: 1fr;
  }
  .quote-result {
    position: static;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-kicker::before {
    right: calc(50% + 110px);
  }
  .section-kicker::after {
    left: calc(50% + 110px);
  }
}

@media (max-width: 520px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .about-badges {
    grid-template-columns: 1fr;
  }
  .contact-form .row {
    grid-template-columns: 1fr;
  }
  .section-kicker::before,
  .section-kicker::after {
    display: none;
  }
  .hero-inner {
    padding: 64px 24px 60px;
  }
}

/* ============================================================
   Página de proyectos (proyectos.html)
   ============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 82% 0%, var(--hero-tint), transparent 55%),
    linear-gradient(
      115deg,
      var(--hero-a) 0%,
      var(--hero-a) 46%,
      var(--hero-b) 46%,
      var(--hero-c) 100%
    );
}
.page-hero .container {
  position: relative;
  padding-top: 66px;
  padding-bottom: 58px;
}
.page-hero h1 {
  font-size: clamp(38px, 6.5vw, 68px);
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-hero p {
  color: var(--muted);
  max-width: 56ch;
}
.breadcrumb {
  font-family: var(--heading);
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}

.proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  font-family: var(--heading);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.chip:hover {
  color: var(--text);
  border-color: var(--accent);
}
.chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.projects-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.projects-page-grid .project-thumb {
  aspect-ratio: 4 / 3;
}
.projects-page-grid .project h4 {
  font-size: 16px;
}
.project.is-hidden {
  display: none;
}

.cta-band {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 22px;
}

@media (max-width: 960px) {
  .projects-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .projects-page-grid {
    grid-template-columns: 1fr;
  }
}
