/* Genera Estructuras Metálicas — Metodología Tekla Structures */
:root {
  --gem-navy: #05394E;
  --gem-navy-deep: #111111;
  --gem-red: #0B6E64;
  --gem-steel: #cfcfcf;
  --gem-metal: #4A5C62;
  --gem-white: #ffffff;
  --gem-ink: #111111;
  --gem-muted: #4A5C62;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gem-ink);
  background: var(--gem-white);
  line-height: 1.55;
}

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

a { color: var(--gem-red); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 4vw;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  max-width: min(58vw, 520px);
}

.brand img {
  width: 72px;
  height: 72px;
  margin-right: 0.7rem;
  flex-shrink: 0;
}

.brand-text {
  line-height: 1.15;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.brand span,
.brand-text span { color: var(--gem-red); }

.brand--full .brand-text { display: inline; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

.site-nav a {
  color: #111;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active { color: var(--gem-red); }

.nav-cta {
  color: #fff !important;
  background: var(--gem-red);
  padding: 0.7rem 1rem;
}

.nav-cta:hover { color: #fff !important; }

/* HERO */
.hero-tekla {
  position: relative;
  min-height: 0;
  display: block;
  padding: 3.5rem 5% 0.5rem;
  color: var(--gem-ink);
  background: #fff;
}

.hero-tekla::before { content: none; }

@keyframes grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-bottom: 1rem;
}

.hero-brand { display: none; }

.hero-brand span { color: var(--gem-red); }

.hero-inner h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
  color: #111;
}

.hero-inner .lead {
  margin: 0 0 1.75rem;
  color: var(--gem-muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gem-red);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: #111;
  border-color: #d9d9d9;
}

.section {
  padding: 4.5rem 5%;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gem-red);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--gem-navy);
  max-width: 22ch;
}

.section > .section-inner > .intro,
.prose-lead {
  color: var(--gem-muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0 0 2.5rem;
}

.section-dark {
  background: var(--gem-navy-deep);
  color: var(--gem-metal);
}

.section-dark h2 { color: #fff; }

.section-alt { background: #eef1f5; }

/* Modelo único */
.model-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 860px) {
  .model-grid { grid-template-columns: 1fr; }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.feature-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.5rem;
  border-bottom: 1px solid rgba(26, 34, 56, 0.1);
  color: var(--gem-muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--gem-red);
}

.media-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(145deg, #1a2238, #2f3b52),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.03) 8px, rgba(255,255,255,0.03) 16px);
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(15, 20, 36, 0.9));
  color: var(--gem-metal);
  font-size: 0.8rem;
}

.placeholder-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--gem-steel);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Timeline pasos */
.timeline {
  display: grid;
  gap: 0;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(26, 34, 56, 0.12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.step.is-visible {
  opacity: 1;
  transform: none;
}

.section-dark .step {
  border-top-color: rgba(197, 206, 216, 0.12);
}

.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.65rem;
  color: var(--gem-red);
  line-height: 1;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--gem-navy);
}

.section-dark .step h3 { color: #fff; }

.step p { margin: 0 0 0.75rem; color: inherit; }

.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(228, 31, 39, 0.1);
  color: var(--gem-red);
  border: 1px solid rgba(228, 31, 39, 0.25);
}

.section-dark .chip {
  background: rgba(228, 31, 39, 0.18);
  color: #ffb4b7;
  border-color: rgba(228, 31, 39, 0.35);
}

.step-tools {
  font-size: 0.85rem;
  color: var(--gem-muted);
}

.section-dark .step-tools { color: var(--gem-steel); }

.step-tools a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Hours table */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 1rem;
  border: 1px solid rgba(26, 34, 56, 0.12);
  background: #fff;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.hours-table th,
.hours-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(26, 34, 56, 0.08);
}

.hours-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gem-navy);
  color: #fff;
}

.hours-table tr:last-child td { border-bottom: 0; font-weight: 700; }

.note {
  font-size: 0.88rem;
  color: var(--gem-muted);
  max-width: 70ch;
}

/* Despieces grid */
.despiece-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .despiece-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .despiece-grid { grid-template-columns: 1fr; }
}

.despiece-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0.85rem 0 0.35rem;
  color: var(--gem-navy);
}

.despiece-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gem-muted);
}

.despiece-item .media-frame { aspect-ratio: 16 / 10; }

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 800px) {
  .video-grid { grid-template-columns: 1fr; }
}

.video-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--gem-navy);
}

.section-dark .video-block h3 { color: #fff; }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-block p {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--gem-muted);
}

.section-dark .video-block p { color: var(--gem-steel); }

/* Tipologías */
.tipo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.tipo-list li {
  padding: 0.85rem 1rem;
  background: #fff;
  border-left: 3px solid var(--gem-red);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gem-navy);
}

/* FAQ */
.faq details {
  border-top: 1px solid rgba(26, 34, 56, 0.12);
  padding: 1rem 0;
}

.faq details:last-child { border-bottom: 1px solid rgba(26, 34, 56, 0.12); }

.faq summary {
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  color: var(--gem-navy);
}

.faq details p {
  margin: 0.75rem 0 0;
  color: var(--gem-muted);
  max-width: 70ch;
}

/* CTA */
.cta-band {
  padding: 4rem 5%;
  background: #111;
  color: #fff;
  text-align: left;
}

.cta-band .section-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band h2 {
  color: #fff;
  margin: 0 0 0.5rem;
  max-width: 18ch;
}

.cta-band p {
  margin: 0;
  color: #dfdfdf;
  max-width: 42ch;
}

.site-footer {
  padding: 2rem 5%;
  background: var(--gem-navy-deep);
  color: var(--gem-steel);
  font-size: 0.85rem;
}

.site-footer .section-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a { color: #fff; }

.consulta-form {
  display: grid;
  gap: 0.85rem;
  max-width: 40rem;
}

.consulta-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.consulta-form input,
.consulta-form select,
.consulta-form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--gem-metal);
  background: #fff;
  color: var(--gem-ink);
}

.mapa-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.mapa-list a { display: block; margin: 0.25rem 0; }

.refs {
  font-size: 0.8rem;
  color: var(--gem-muted);
}

.refs a { color: var(--gem-muted); }

.refs ul {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
}

.out-resolve {
  margin: 1.25rem 0 0;
  max-width: 46rem;
}
.out-answer {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.out-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.out-table th,
.out-table td {
  border: 1px solid var(--gem-steel);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  text-align: left;
}
.out-table th {
  background: var(--gem-navy);
  color: #fff;
  font-weight: 700;
}
.out-bridge { margin: 0 0 1rem; }
.out-resolve .btn { display: inline-block; margin-top: 0.25rem; }
