/* ========== Esmecal Forja — Stylesheet ========== */
:root {
  --orange: #F26522;
  --orange-2: #FF7A33;
  --navy: #1F2D5C;
  --navy-2: #2A3A75;
  --ink: #15203F;
  --bg: #FFFFFF;
  --bg-alt: #F4F6FB;
  --bg-dark: #0E1633;
  --line: #E3E7F2;
  --muted: #6B7494;
  --white: #FFFFFF;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(15,23,55,.08);
  --shadow-lg: 0 20px 60px rgba(15,23,55,.18);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-2); }
button { font-family: inherit; cursor: pointer; }

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

h1, h2, h3 { font-family: 'Barlow Condensed', 'Inter', sans-serif; color: var(--navy); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 700; }

p { margin: 0 0 1em; }
.muted { color: var(--muted); font-size: .94rem; }

.section { padding: clamp(60px, 9vw, 120px) 0; }
.section-dark { background: var(--bg-dark); color: #DBE1F0; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #C5CCDF; }

.section-accent {
  background: linear-gradient(120deg, #fff 0%, #FFF7F1 100%);
  position: relative;
  overflow: hidden;
}
.section-accent::before {
  content: ""; position: absolute;
  top: -120px; right: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(242,101,34,.18), transparent 70%);
  pointer-events: none;
}

.section-kicker {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--orange);
  margin-bottom: 8px;
  padding-left: 36px;
  position: relative;
}
.section-kicker::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 28px; height: 2px; background: var(--orange);
}
.section-lead { max-width: 700px; color: var(--muted); margin-bottom: 36px; font-size: 1.05rem; }
.section-dark .section-lead { color: #aab2cc; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 44px; width: auto; }
.nav { margin-left: auto; }
.nav-menu {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 8px; align-items: center;
}
.nav-menu a {
  display: inline-block; padding: 10px 14px;
  color: var(--navy); font-weight: 600; font-size: .96rem;
  border-radius: 8px;
}
.nav-menu a:hover { color: var(--orange); background: var(--bg-alt); }
.nav-toggle { display: none; }
.lang-switch {
  display: inline-flex; gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
  margin-left: 12px;
}
.lang-switch button {
  border: 0; background: transparent;
  padding: 8px 12px; font-size: .85rem; font-weight: 700;
  color: var(--navy);
}
.lang-switch button.active { background: var(--orange); color: #fff; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  font-weight: 700; font-size: .95rem;
  border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  cursor: pointer; text-align: center;
}
.btn-primary { background: var(--orange); color: #fff !important; }
.btn-primary:hover { background: var(--orange-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative; isolation: isolate;
  min-height: 92vh;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(14,22,51,.85) 0%, rgba(14,22,51,.55) 45%, rgba(14,22,51,.25) 100%),
    linear-gradient(0deg, rgba(0,0,0,.4), rgba(0,0,0,0));
}
.hero-inner { padding: 100px 24px; }
.kicker {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .25em; text-transform: uppercase;
  font-size: .9rem; font-weight: 700;
  padding: 6px 14px; border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px; margin-bottom: 24px;
  color: #fff;
}
.hero-title { color: #fff; max-width: 18ch; }
.hero-title .accent { color: var(--orange); display: block; }
.hero-sub { max-width: 56ch; font-size: 1.15rem; color: #DBE1F0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 36px; }
.hero-stats {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px; max-width: 720px;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 24px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800; color: var(--orange); line-height: 1;
}
.hero-stats span { font-size: .85rem; color: #C5CCDF; margin-top: 6px; }

/* ===== Two-col ===== */
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.media-stack { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.media-stack img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; }
.media-stack img:first-child { aspect-ratio: 4/5; transform: translateY(-12px); }
.media-stack img:last-child { transform: translateY(12px); }

/* ===== Capabilities ===== */
.cap-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; margin-top: 36px;
}
.cap-card {
  background: #fff; color: var(--ink);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cap-img { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.cap-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cap-card:hover .cap-img img { transform: scale(1.05); }
.cap-img::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 50%;
  background: linear-gradient(0deg, rgba(31,45,92,.55), transparent);
}
.cap-body { padding: 24px 26px 28px; }
.cap-body h3 { color: var(--navy); }
.cap-body ul {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px 8px;
}
.cap-body li {
  font-size: .85rem; font-weight: 600;
  background: var(--bg-alt); color: var(--navy);
  padding: 6px 12px; border-radius: 999px;
}

/* ===== Products ===== */
.process-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  margin: 36px 0 64px;
  padding: 36px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.pf-img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
}
.pf-steps { display: grid; gap: 28px; }
.pf-step { position: relative; padding-left: 64px; }
.pf-num {
  position: absolute; left: 0; top: -2px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -.02em;
}
.pf-step h3 { margin: 0 0 6px; font-size: 1.3rem; }
.pf-step p { margin: 0; color: var(--muted); font-size: .98rem; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.product:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
  box-shadow: var(--shadow);
}
.product img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12%;
  transition: transform .4s ease;
}
.product:hover img { transform: scale(1.05); }

@media (max-width: 980px) {
  .process-feature { grid-template-columns: 1fr; padding: 24px; gap: 32px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pf-num { font-size: 2rem; }
  .pf-step { padding-left: 50px; }
}

/* ===== Sectors ===== */
.sectors-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 36px;
}
.sector {
  text-align: center;
  padding: 36px 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
  transition: border-color .2s, transform .2s, background .2s;
}
.sector:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  background: rgba(255,255,255,.07);
}
.sector svg { width: 52px; height: 52px; color: var(--orange); margin-bottom: 12px; }
.sector h3 { margin: 0; font-size: 1.15rem; color: #fff; }

/* ===== Gallery ===== */
.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  margin-top: 36px;
}
.g-item {
  display: block; overflow: hidden;
  border-radius: var(--radius-sm); position: relative;
  background: #000;
}
.g-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
  opacity: .92;
}
.g-item:hover img { transform: scale(1.06); opacity: 1; }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ===== Quality / ISO ===== */
.quality { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.quality-badge { display: flex; justify-content: center; }
.iso-circle {
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #DEE5F2 70%, #B7C3DC 100%);
  border: 6px solid var(--orange);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--navy);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.iso-circle::before, .iso-circle::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 80%; height: 1px; background: var(--navy); opacity: .15;
}
.iso-circle::before { top: 26%; }
.iso-circle::after { bottom: 26%; }
.iso-top, .iso-bot { font-size: .85rem; letter-spacing: .3em; font-weight: 700; }
.iso-num { font-size: 2.4rem; font-weight: 800; line-height: 1; margin: 8px 0; }
.iso-num b { color: var(--orange); font-size: 3rem; display: block; }

/* ===== Contact ===== */
#contacto h2 { color: #fff; }
.contact-list {
  list-style: none; padding: 0; margin: 24px 0 28px;
  display: grid; gap: 16px;
}
.contact-list li {
  display: flex; align-items: flex-start; gap: 14px;
  color: #DBE1F0;
}
.contact-list svg {
  width: 22px; height: 22px; flex-shrink: 0; color: var(--orange);
  margin-top: 2px;
}
.contact-list a { color: #fff; }
.contact-list a:hover { color: var(--orange); }

.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: rgba(255,255,255,.06);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.1);
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: #C5CCDF; font-weight: 600; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  font: inherit;
  background: rgba(255,255,255,.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  background: rgba(255,255,255,.08);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ===== Footer ===== */
.site-footer {
  background: #07102B; color: #9AA4C2;
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 38px; filter: brightness(1.2); }
.footer-brand p { margin: 8px 0 0; font-size: .9rem; }
.footer-meta { text-align: right; font-size: .85rem; }
.footer-meta p { margin: 2px 0; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(7,16,43,.96);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 8px; box-shadow: var(--shadow-lg);
}
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox button:hover { background: var(--orange); border-color: var(--orange); }
.lb-close { top: 20px; right: 20px; font-size: 1.8rem; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .cap-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .quality { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .quality > div:last-child { text-align: left; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 150px; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    width: 44px; height: 44px;
    background: transparent; border: 0;
    align-items: center; justify-content: center;
    margin-left: 8px;
    order: 3;
  }
  .nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--navy); transition: transform .25s, opacity .25s;
  }
  .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); }

  .nav { margin-left: auto; order: 2; }
  .nav-menu {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    gap: 4px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { display: block; padding: 14px 16px; }

  .lang-switch { order: 1; margin-left: auto; }
  .brand-logo { height: 38px; }

  .hero { min-height: 86vh; }
  .hero-inner { padding: 70px 24px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .sectors-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sector { padding: 24px 12px; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .g-tall, .g-wide { grid-row: auto; grid-column: auto; }

  .media-stack img:first-child,
  .media-stack img:last-child { transform: none; }

  .iso-circle { width: 180px; height: 180px; }
}
@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .btn { padding: 12px 20px; font-size: .9rem; width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
}

/* ===== Reveal animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: translateY(0); }
}
