:root {
  --bg: #f4f5f6;
  --bg-alt: #e9ebee;
  --surface: #ffffff;
  --ink: #14171b;
  --ink-soft: #4a525c;
  --line: #d3d7dc;
  --steel: #1d2228;
  --steel-2: #262c34;
  --accent: #f26b1d;
  --accent-ink: #ffffff;
  --radius: 6px;
  --wrap: 1180px;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
.skip-top { position: absolute; top: 0; display: block; height: 0; width: 0; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  padding: .85em 1.4em;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: #d95a10; border-color: #d95a10; transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn--small { padding: .5em 1em; font-size: 1rem; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20,23,27,.96);
  backdrop-filter: blur(6px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 62px; width: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .06em; }
.brand small { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: #9aa3ad; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; color: #cfd5db; }
.nav a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16,19,23,.94) 0%, rgba(16,19,23,.82) 45%, rgba(16,19,23,.45) 100%),
    url(../img/taller-interior.jpg) center / cover no-repeat,
    var(--steel);
  color: #fff;
  padding: clamp(64px, 11vw, 140px) 0 clamp(48px, 7vw, 88px);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
}
.hero__inner { position: relative; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); text-transform: uppercase; max-width: 14ch; }
.hero h1 span { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #c3cad2; max-width: 58ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 3rem; }
.stats {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.14);
}
.stats li { padding: 1.4rem 1.4rem 0 0; border-left: 1px solid rgba(255,255,255,.14); padding-left: 1.4rem; }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats strong { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1; }
.stats em { font-style: normal; font-size: .55em; color: var(--accent); margin-left: 2px; }
.stats span { display: block; margin-top: .35rem; font-size: .85rem; color: #9aa3ad; }

/* Sections */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--steel); color: #fff; }
.section__head { max-width: 680px; margin-bottom: 3rem; }
.section__head p:last-child { color: var(--ink-soft); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: var(--accent); transition: width .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,23,27,.08); }
.card:hover::before { width: 100%; }
.card__icon { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.card p { color: var(--ink-soft); margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.checklist li { padding: .5rem 0 .5rem 2rem; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .95rem;
  width: 12px; height: 7px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th { text-align: left; background: var(--steel); color: #fff; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; padding: .9rem 1.1rem; }
.spec td { padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.spec td:last-child { font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }
.spec tbody tr:hover { background: #fbf4ef; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: s; }
.steps li { border-top: 3px solid var(--ink); padding-top: 1.2rem; }
.steps span { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: var(--accent); line-height: 1; display: block; margin-bottom: .5rem; }
.steps p { color: var(--ink-soft); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project__img { aspect-ratio: 4 / 3; background-color: var(--steel-2); position: relative; }
/* Ilustraciones de marcador: sustituir por fotos reales (background-image: url(img/proyecto1.jpg)) */
.project__img.p1 {
  background:
    linear-gradient(90deg, transparent 12%, #8c96a1 12% 16%, #c9d0d7 16% 84%, #8c96a1 84% 88%, transparent 88%) center / 100% 22% no-repeat,
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255,255,255,.04) 18px 19px),
    linear-gradient(160deg, #2b323b, #171b20);
}
.project__img.p2 {
  background:
    linear-gradient(var(--accent), var(--accent)) 50% 38% / 46% 30% no-repeat,
    linear-gradient(#59626d, #59626d) 50% 72% / 70% 8% no-repeat,
    linear-gradient(#59626d, #59626d) 22% 88% / 5% 26% no-repeat,
    linear-gradient(#59626d, #59626d) 78% 88% / 5% 26% no-repeat,
    linear-gradient(160deg, #2b323b, #171b20);
}
.project__img.p3 {
  background:
    radial-gradient(circle at 42% 50%, #171b20 0 9%, #aab3bc 9.5% 22%, transparent 22.5%),
    repeating-conic-gradient(from 0deg at 42% 50%, #aab3bc 0 8deg, transparent 8deg 20deg),
    radial-gradient(circle at 70% 58%, #171b20 0 5%, var(--accent) 5.5% 14%, transparent 14.5%),
    linear-gradient(160deg, #2b323b, #171b20);
}
.project__body { padding: 1.4rem 1.4rem 1.6rem; }
.project__body p { color: var(--ink-soft); margin: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }

/* Sectors */
.sectors { padding: 56px 0; border-top: 1px solid var(--line); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { border: 1px solid var(--line); background: var(--surface); padding: .5rem 1rem; border-radius: 999px; font-weight: 500; font-size: .95rem; }

/* Contact */
.section--dark p { color: #c3cad2; }
.contact { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact strong { font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #9aa3ad; font-size: .95rem; }
.contact a { color: #fff; text-decoration: none; }
.contact a:hover { color: var(--accent); }

.form { background: var(--steel-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; color: #c3cad2; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 1rem; color: #fff;
  background: #161a1f; border: 1px solid #3a424c; border-radius: 4px;
  padding: .7rem .8rem; width: 100%;
}
.form textarea { resize: vertical; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #ff6b6b; }
.form .btn { justify-self: start; }
.form__note { margin: 0; font-size: .9rem; min-height: 1.4em; }

/* Footer */
.footer { background: #0e1114; color: #8a939d; font-size: .85rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.6rem 0; }
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .cards, .projects { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 80px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--steel); padding: .5rem 16px 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: .8rem; }
  .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); }
  .stats { grid-template-columns: 1fr; row-gap: 1rem; }
  .stats li { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 1rem; }
  .stats li:first-child { border-top: 0; padding-top: 1.4rem; }
  .cards, .projects, .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .contact li { grid-template-columns: 1fr; gap: .1rem; }
  .hero__cta .btn { width: 100%; }
}

/* Lista de maquinaria */
.machines { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.machines li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; padding: .55rem .8rem; font-weight: 500; font-size: .95rem; }

/* Fotos */
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo img, .gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.photo img { aspect-ratio: 16 / 10; }
.photo figcaption, .gallery__item figcaption { padding: .7rem 1rem; font-size: .88rem; color: var(--ink-soft); }
.gallery { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 1.2rem; }
.gallery__item { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gallery__item img { aspect-ratio: 4 / 3; }
.gallery__item--wide { grid-row: span 2; }
.gallery__item--wide img { aspect-ratio: auto; }

/* Mapa */
.map { margin-top: 1.6rem; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.12); aspect-ratio: 16 / 10; background: var(--steel-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.3); }

/* Pie */
.footer__inner { align-items: center; }
.footer__logo { height: 56px; width: auto; opacity: .85; }
.footer p a:hover { color: #fff; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-row: auto; }
  .gallery__item--wide img { aspect-ratio: 4 / 3; }
  .machines { grid-template-columns: 1fr; }
  .brand img { height: 48px; }
  .hero { background:
    linear-gradient(180deg, rgba(16,19,23,.9), rgba(16,19,23,.85)),
    url(../img/taller-interior.jpg) center / cover no-repeat, var(--steel); }
}
