/* =========================================================
   ALLAS · Fabricación de productos metálicos
   ========================================================= */
:root {
  --ink: #111214;
  --dark: #17181b;
  --dark-2: #1e1f23;
  --paper: #f1f1ef;
  --paper-2: #e6e6e3;
  --white: #fff;
  --muted: #6d6d6d;
  --line-dark: rgba(255, 255, 255, .22);
  --line-light: rgba(0, 0, 0, .14);
  --gap: 8px;
  --pad: clamp(16px, 4.5vw, 72px);
  --f-display: "Archivo Black", "Arial Black", sans-serif;
  --f-body: "Montserrat", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--f-body);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.ico { width: 18px; height: 18px; flex: none; }
.ico--lg { width: 30px; height: 30px; }

.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.eyebrow--dark { color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 18px; min-height: 46px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico:last-child { transform: translateX(4px); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); }
.btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #33353a; }
.btn--outline { border-color: rgba(0, 0, 0, .35); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid #9ab; outline-offset: 3px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; isolation: isolate; z-index: 5;
  min-height: min(100svh, 860px);
  display: flex; flex-direction: column;
  color: #fff; background: var(--ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center; z-index: -2;
  animation: heroZoom 18s ease-out both;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,10,12,.92) 0%, rgba(10,10,12,.7) 38%, rgba(10,10,12,.1) 70%),
    linear-gradient(0deg, rgba(10,10,12,.6), transparent 35%);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.nav {
  position: relative; z-index: 10;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad) 0;
}
.nav__logo img { width: clamp(84px, 13vw, 150px); filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); }
.nav__menu { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding-top: 22px; }
.nav__menu ul { display: flex; gap: clamp(18px, 2.6vw, 34px); }
.nav__menu ul a {
  position: relative; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 0;
}
.nav__menu ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__menu ul a:hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }

.hero__content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px var(--pad) 40px; max-width: 900px; }
.hero__content .eyebrow { font-size: clamp(11px, 1.2vw, 14px); letter-spacing: .2em; margin-bottom: 10px; }
.hero h1 { text-transform: uppercase; line-height: .98; margin-bottom: 26px; }
.hero__bold { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 4.7vw, 68px); letter-spacing: .01em; }
.hero__light { display: block; font-weight: 300; font-size: clamp(30px, 4.5vw, 64px); letter-spacing: .04em; margin-top: .12em; }
.hero__lead { max-width: 440px; font-size: clamp(14px, 1.3vw, 16px); color: rgba(255,255,255,.88); margin-bottom: 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__values {
  position: absolute; right: var(--pad); bottom: 40px;
  border-left: 1px solid var(--line-dark); padding-left: 22px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6;
}

/* =========================================================
   SERVICIOS  (5 arriba + 3 abajo en escritorio)
   ========================================================= */
.services {
  display: grid; gap: var(--gap); padding: var(--gap) 0;
  grid-template-columns: repeat(15, 1fr);
  background: var(--paper);
}
.card { grid-column: span 3; position: relative; overflow: hidden; aspect-ratio: 4 / 4.4; color: #fff; background: var(--dark); }
.card--wide { grid-column: span 5; aspect-ratio: 16 / 9.4; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 38%, transparent 62%);
  transition: opacity .4s;
}
.card__body { position: absolute; left: 0; right: 64px; bottom: 0; padding: 22px 20px 18px; z-index: 1; }
.card h3 { font-size: clamp(15px, 1.45vw, 20px); font-weight: 700; text-transform: uppercase; line-height: 1.1; letter-spacing: .02em; margin-bottom: 8px; }
.card p { font-size: 11.5px; font-weight: 500; text-transform: uppercase; line-height: 1.35; color: rgba(255,255,255,.85); }
.card__arrow {
  position: absolute; right: 16px; bottom: 18px; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85);
  display: grid; place-items: center; transition: background .3s, color .3s, transform .4s var(--ease);
}
.card:hover img { transform: scale(1.07); }
.card:hover .card__arrow { background: #fff; color: var(--ink); transform: translateX(3px); }

/* =========================================================
   CLIENTES
   ========================================================= */
.clients {
  display: flex; align-items: center; gap: 28px;
  padding: 18px var(--pad); background: var(--paper);
  border-bottom: 1px solid var(--line-light);
}
.clients__title {
  flex: none; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.35;
  padding-right: 28px; border-right: 1px solid var(--line-light);
}
.clients__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.clients__track { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: max-content; min-width: 100%; }
.clients__track li { flex: none; }
.clients__track img { width: auto; height: auto; max-height: 56px; max-width: 160px; filter: grayscale(1) contrast(1.1); opacity: .85; transition: filter .3s, opacity .3s; }
.clients__track img:hover { filter: none; opacity: 1; }
/* Con JS: cinta infinita cuando no caben */
.clients.is-marquee .clients__track { justify-content: flex-start; animation: marquee var(--marquee-time, 30s) linear infinite; }
.clients.is-marquee:hover .clients__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   EMPRESA
   ========================================================= */
.about {
  display: grid; grid-template-columns: 45fr 40fr 15fr;
  background: var(--paper); min-height: 420px;
}
.about__photo { overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about__text { padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 48px); align-self: center; }
.about__title { font-weight: 300; font-size: clamp(40px, 4.3vw, 66px); white-space: nowrap; line-height: 1; text-transform: uppercase; margin: 6px 0 10px; }
.about__title strong { font-family: var(--f-display); font-weight: 400; font-variant-numeric: tabular-nums; }
.about__sub { font-size: clamp(13px, 1.3vw, 16px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.about__text > p:not(.eyebrow):not(.about__sub) { color: #555; font-size: 14px; max-width: 520px; margin-bottom: 26px; }
.about__text > p strong { color: var(--ink); }
.about__texture { position: relative; overflow: hidden; }
.about__texture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about__texture ul {
  position: absolute; left: 20%; bottom: 14%;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; line-height: 1.75; color: #333;
}

/* =========================================================
   PROCESO
   ========================================================= */
.process {
  display: grid; grid-template-columns: 1.1fr 3fr .9fr; align-items: center;
  background: var(--dark); color: #fff; padding: 20px var(--pad);
}
.process__head { padding-right: 32px; border-right: 1px solid var(--line-dark); }
.process__head h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 400; text-transform: uppercase; line-height: 1.15; margin-top: 4px; }
.process__head h2 span { padding-left: 1.2em; }
.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0 32px; }
.process__steps li { position: relative; font-size: 12px; color: rgba(255,255,255,.75); line-height: 1.35; padding-right: 44px; }
.process__steps li span { display: block; font-size: 13px; color: #fff; margin-bottom: 6px; }
.process__steps li strong { display: block; font-size: 12.5px; color: #fff; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.process__steps li:not(:last-child)::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 24px; height: 1px; background: rgba(255,255,255,.7);
  box-shadow: 0 0 0 0 transparent;
}
.process__steps li:not(:last-child)::before {
  content: ""; position: absolute; right: 6px; top: calc(50% - 4px); width: 8px; height: 8px;
  border-top: 1px solid rgba(255,255,255,.7); border-right: 1px solid rgba(255,255,255,.7); transform: rotate(45deg);
}
.process__end { padding-left: 32px; border-left: 1px solid var(--line-dark); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }
.process__end .ico { display: block; width: 28px; height: 28px; margin-bottom: 4px; }

/* =========================================================
   INSTAGRAM
   ========================================================= */
.insta {
  display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 32px; align-items: center;
  padding: 20px var(--pad) 18px; background: var(--paper);
}
.insta h2 { font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; margin: 4px 0 8px; word-break: break-word; }
.insta__intro > p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.carousel { position: relative; min-width: 0; padding-bottom: 22px; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 10px) / 5); gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track li { scroll-snap-align: start; overflow: hidden; aspect-ratio: 1 / .92; background: var(--paper-2); }
.carousel__track img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.carousel__track a:hover img { transform: scale(1.06); }
.carousel__btn {
  position: absolute; top: calc(50% - 11px); transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: #fff; color: var(--ink); border: 1px solid var(--line-light); cursor: pointer;
  transition: opacity .25s, background .25s;
}
.carousel__btn:hover { background: var(--paper-2); }
.carousel__btn[disabled] { opacity: 0; pointer-events: none; }
.carousel__btn--prev { left: -12px; }
.carousel__btn--prev .ico { transform: scaleX(-1); }
.carousel__btn--next { right: -12px; }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; }
.carousel__dots i { width: 12px; height: 4px; border-radius: 4px; background: #c9c9c6; transition: width .3s, background .3s; }
.carousel__dots i.on { width: 22px; background: var(--ink); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact {
  display: grid; grid-template-columns: 1.15fr .8fr .8fr 1.35fr auto; align-items: center; gap: 28px;
  background: var(--dark); color: #fff; padding: 20px var(--pad);
}
.contact__head { padding-right: 28px; border-right: 1px solid var(--line-dark); }
.contact__head h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 400; text-transform: uppercase; line-height: 1.15; margin-top: 4px; }
.contact__item { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 500; transition: opacity .25s; }
.contact__item:hover { opacity: .75; }
.contact__item small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 2px; }
.contact__item--addr { font-size: 12.5px; line-height: 1.45; padding-right: 20px; border-right: 1px solid var(--line-dark); }
.contact__item--addr u { text-underline-offset: 3px; }

/* =========================================================
   TRABAJA CON NOSOTROS + FOOTER
   ========================================================= */
.jobs {
  display: grid; grid-template-columns: auto 1fr auto minmax(220px, 280px); align-items: center; gap: 28px;
  padding: 16px var(--pad); background: var(--paper); border-bottom: 1px solid var(--line-light);
}
.jobs h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.jobs > p { font-size: 12px; color: var(--muted); max-width: 440px; }
.jobs__btn.is-disabled { opacity: .45; pointer-events: none; }
.jobs__check { display: flex; gap: 12px; align-items: flex-start; font-size: 11px; line-height: 1.4; color: var(--muted); cursor: pointer; }
.jobs__check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.jobs__check a { color: var(--ink); text-decoration: underline; }

.footer {
  display: flex; align-items: center; gap: 22px;
  padding: 14px var(--pad); background: var(--paper);
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.footer strong { font-family: var(--f-display); font-weight: 400; font-size: 18px; color: var(--ink); letter-spacing: .04em; }
.footer__name { padding-left: 22px; border-left: 1px solid var(--line-light); }
.footer__legal { margin-left: auto; display: flex; gap: 18px; }
.footer__legal a + a { padding-left: 18px; border-left: 1px solid var(--line-light); }
.footer__legal a:hover, .footer__ig:hover { color: var(--ink); }
.footer__ig { color: var(--ink); }

/* =========================================================
   ANIMACIÓN DE ENTRADA
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .process { grid-template-columns: 1fr; gap: 22px; padding-block: 32px; }
  .process__head { border: 0; padding: 0; }
  .process__steps { padding: 0; }
  .process__end { border: 0; padding: 0; display: flex; align-items: center; gap: 14px; }
  .process__end br { display: none; }
  .process__end .ico { margin: 0; }

  .contact { grid-template-columns: repeat(3, auto); justify-content: space-between; row-gap: 26px; padding-block: 32px; }
  .contact__head { grid-column: 1 / -1; border: 0; padding: 0; }
  .contact__item--addr { border: 0; padding: 0; }
  .contact__cta { grid-column: 1 / -1; justify-self: start; }

  .jobs { grid-template-columns: 1fr auto; }
  .jobs > p { grid-column: 1; }
  .jobs__check { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  /* Menú móvil */
  .nav { align-items: center; padding-top: 12px; }
  .nav__toggle {
    display: grid; gap: 6px; place-content: center; z-index: 30;
    width: 48px; height: 48px; background: rgba(0,0,0,.35); border: 1px solid var(--line-dark); cursor: pointer;
  }
  .nav__toggle span { width: 22px; height: 1.6px; background: #fff; transition: transform .3s var(--ease), opacity .2s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }
  .nav__menu {
    position: fixed; inset: 0; z-index: 20;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 36px;
    padding: 90px var(--pad) 40px; background: rgba(14,14,16,.97);
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; }
  .nav__menu ul { flex-direction: column; gap: 6px; }
  .nav__menu ul a { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 7vw, 44px); letter-spacing: .01em; }
  body.menu-open { overflow: hidden; }

  .hero { min-height: 640px; }
  .hero__shade { background: linear-gradient(90deg, rgba(10,10,12,.88), rgba(10,10,12,.45)), linear-gradient(0deg, rgba(10,10,12,.7), transparent 50%); }
  .hero__values { position: static; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 var(--pad) 28px; }

  .services { grid-template-columns: repeat(2, 1fr); }
  .card, .card--wide { grid-column: span 1; aspect-ratio: 4 / 3.6; }
  .card:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 7; }

  .about { grid-template-columns: 1fr 1fr; }
  .about__photo { min-height: 320px; }
  .about__texture { display: none; }

  .insta { grid-template-columns: 1fr; gap: 20px; padding-block: 32px; }
  .carousel__track { grid-auto-columns: calc((100% - 2 * 10px) / 3); }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .hero { min-height: 600px; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }

  .services { grid-template-columns: 1fr; }
  .card, .card--wide, .card:last-child { grid-column: auto; aspect-ratio: 4 / 3; }

  .clients { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 20px; }
  .clients__title { border: 0; padding: 0; }
  .clients__title br { display: none; }
  .clients__viewport { width: 100%; }
  .clients__track img { max-height: 44px; max-width: 120px; }

  .about { grid-template-columns: 1fr; }
  .about__photo { min-height: 0; aspect-ratio: 4 / 3; }

  .process__steps { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .process__steps li { padding-right: 0; }
  .process__steps li::before, .process__steps li::after { display: none; }

  .carousel__track { grid-auto-columns: 72%; }
  .carousel__btn { display: none; }

  .contact { grid-template-columns: 1fr; }
  .contact__cta { justify-self: stretch; justify-content: center; }

  .jobs { grid-template-columns: 1fr; gap: 14px; padding-block: 28px; }
  .jobs__btn { justify-self: start; }

  .footer { flex-wrap: wrap; gap: 10px 16px; padding-block: 20px; }
  .footer__name { border: 0; padding: 0; flex-basis: 100%; order: 3; }
  .footer__legal { order: 4; margin-left: 0; }
  .footer__ig { margin-left: auto; }
}
