:root {
  --green-950: #333333;
  --green-900: #333333;
  --green-700: #333333;
  --gold: #ac1917;
  --rust: #ac1917;
  --paper: #ffffff;
  --white: #ffffff;
  --ink: #333333;
  --muted: rgba(51, 51, 51, 0.72);
  --line: rgba(51, 51, 51, 0.18);
  --bordo: #ac1917;
  --header-height: 118px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

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

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.top-strip {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: var(--bordo);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
}

.top-strip a {
  text-decoration: none;
}

.nav-bar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 34px;
  padding: 12px 28px;
}

.brand {
  width: clamp(160px, 18vw, 250px);
  min-width: 150px;
}

.brand img {
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 42px);
}

.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: clamp(0.95rem, 1.2vw, 1.12rem);
  font-weight: 800;
  color: var(--ink);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  justify-self: end;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 10px;
}

.menu-button span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 760px;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--header-height) + 42px) 28px 38px;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/hero-taller-ferroviario.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: grayscale(1) contrast(1.06);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(51, 51, 51, 0.52), rgba(51, 51, 51, 0.18) 36%, rgba(51, 51, 51, 0.9)),
    linear-gradient(90deg, rgba(51, 51, 51, 0.9), rgba(51, 51, 51, 0.42) 58%, rgba(51, 51, 51, 0.08));
}

.hero-inner {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  display: inline-block;
  padding: 7px 10px;
  background: var(--bordo);
  color: var(--white);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 930px;
  margin-bottom: clamp(28px, 5vw, 54px);
  font-size: clamp(3rem, 7.8vw, 7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 5vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  align-items: end;
  gap: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.38);
  padding-top: 28px;
}

.hero-bottom p {
  margin: 0;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  color: rgba(255, 255, 255, 0.9);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
}

.button.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

.button.ghost {
  background: transparent;
  color: var(--white);
}

.visit-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.visit-panel a {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.visit-panel a:last-child {
  border-right: 0;
}

.visit-panel span,
.program-grid span,
.gallery-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.visit-panel strong {
  font-size: clamp(1.35rem, 2.6vw, 2.35rem);
  line-height: 1.05;
  color: var(--green-950);
}

.section {
  display: grid;
  grid-template-columns: 90px minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  padding: clamp(78px, 11vw, 150px) 28px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 900;
}

.section-title {
  max-width: 820px;
}

.section-title h2 {
  color: var(--green-950);
}

.section-copy {
  align-self: end;
}

.section-copy p,
.feature-content p,
.gallery-heading p,
.contact-info p,
.contact-form p {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.section-copy p:last-child,
.feature-content p:last-child,
.gallery-heading p:last-child,
.contact-info p:last-child,
.contact-form p:last-child {
  margin-bottom: 0;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  min-height: 620px;
  background: var(--green-950);
  color: var(--white);
}

.feature-image {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(51, 51, 51, 0.16), rgba(51, 51, 51, 0.16)),
    url("assets/galeria-la-emperatriz.png") center / cover;
}

.feature-image::before {
  content: none;
}

.feature-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(51, 51, 51, 0.18), transparent 55%);
}

.engine-number {
  display: none;
}

.feature-content {
  display: grid;
  align-content: center;
  padding: clamp(48px, 8vw, 92px);
}

.feature-content h2 {
  color: var(--white);
}

.feature-content p {
  margin: 28px 0 24px;
  color: rgba(255, 255, 255, 0.78);
}

.arrow-link {
  justify-self: start;
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.arrow-link::after {
  content: " ->";
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.program-grid article {
  min-height: 350px;
  display: grid;
  align-content: space-between;
  padding: 32px 28px;
  border-right: 1px solid var(--line);
}

.program-grid article:last-child {
  border-right: 0;
}

.program-grid h3 {
  margin-top: 28px;
  color: var(--green-950);
}

.program-grid p {
  margin: 0;
  color: var(--muted);
}

.gallery {
  padding: clamp(78px, 11vw, 150px) 28px;
  border-bottom: 1px solid var(--line);
}

.gallery-heading {
  width: min(920px, 100%);
  margin-bottom: 34px;
}

.gallery-heading h2 {
  color: var(--green-950);
  margin-bottom: 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.filter-row span {
  border: 1px solid var(--line);
  padding: 9px 12px;
  background: var(--white);
  color: var(--green-950);
  font-size: 0.82rem;
  font-weight: 900;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.gallery-item {
  border-right: 1px solid var(--line);
}

.gallery-item:last-child {
  border-right: 0;
}

.gallery-item > div:last-child {
  padding: 24px;
}

.gallery-item p {
  color: var(--muted);
}

.gallery-art {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.photo-engine .gallery-art {
  background-image: url("assets/galeria-la-emperatriz.png");
}

.photo-workshop .gallery-art {
  background-image: url("assets/galeria-talleres-perez.png");
}

.photo-memory .gallery-art {
  background-image: url("assets/galeria-objetos-historicos.png");
}

.gallery-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(51, 51, 51, 0.36), transparent 62%);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 0;
  background: var(--green-950);
  color: var(--white);
}

.contact-info {
  padding: clamp(78px, 11vw, 140px) 28px;
}

.contact-info h2,
.contact-form h3 {
  color: var(--white);
}

.contact-info p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
}

.contact-info dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: min(860px, 100%);
  margin: 48px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.contact-info dl div {
  min-height: 120px;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.contact-info dt {
  color: var(--gold);
  font-weight: 900;
}

.contact-info dd {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.contact-form {
  padding: clamp(48px, 7vw, 84px) 28px;
  background: #333333;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-form p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-form label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--white);
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  background: transparent;
  padding: 13px 0;
  color: var(--white);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--gold);
}

.form-button {
  width: 100%;
  margin-top: 28px;
  font: inherit;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 32px 28px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 160px;
}

.site-footer p {
  margin: 0;
  font-weight: 900;
  color: var(--green-950);
}

.site-footer span {
  color: var(--muted);
}

@media (max-width: 980px) {
  :root {
    --header-height: 106px;
  }

  .top-strip {
    min-height: 30px;
    padding: 0 16px;
  }

  .top-strip a {
    display: none;
  }

  .nav-bar {
    min-height: 76px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 10px 16px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .hero {
    min-height: 700px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-bottom,
  .section,
  .feature-band,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-bottom {
    align-items: start;
  }

  .button-row {
    justify-content: flex-start;
  }

  .visit-panel,
  .program-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .visit-panel a,
  .program-grid article,
  .gallery-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    gap: 20px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .feature-content,
  .gallery,
  .contact-info,
  .contact-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .gallery-art,
  .photo-engine .gallery-art {
    min-height: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.9rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .brand {
    width: 160px;
  }

  .hero {
    min-height: 660px;
  }

  .button {
    width: 100%;
  }

  .contact-info dl {
    grid-template-columns: 1fr;
  }
}
