/* ABEAR S.R.L. — one page
   Tipografía: Archivo (títulos y texto) + IBM Plex Mono (etiquetas y datos) */

:root {
  --ink: #16151a;
  --ink-soft: #4a474f;
  --ink-faint: #8a858f;
  --paper: #faf8f5;
  --paper-2: #f1ede7;
  --line: #ddd7cf;
  --deep: #241f4d;          /* indigo del logo */
  --deep-2: #1a1638;
  --accent: #c8102e;        /* rojo del logo, uso mínimo */
  --radius: 2px;
  --nav-h: 68px;
  --pad: clamp(20px, 5vw, 88px);
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--deep); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px;
  z-index: 200;
  background: #fff;
  padding: 10px 16px;
  border: 1px solid var(--line);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 248, 245, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(250, 248, 245, 0.95);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 26px; width: auto; }
.brand__sr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a {
  font-size: 14.5px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  padding: 6px 0;
  position: relative;
}
.menu a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.menu a:hover,
.menu a[aria-current='true'] { color: var(--ink); }
.menu a[aria-current='true']::after { transform: scaleX(1); }

.nav__cta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 1px solid var(--ink);
  padding: 9px 16px;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.2s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 25px; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: min(88vh, 820px);
  padding-top: var(--nav-h);
  border-bottom: 1px solid var(--line);
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: clamp(48px, 7vw, 104px) clamp(20px, 5vw, 88px);
  max-width: 780px;
  margin-left: auto;
  width: 100%;
}
.hero h1 {
  font-size: clamp(38px, 5.1vw, 68px);
  letter-spacing: -0.032em;
}
.hero h1 em {
  font-style: normal;
  color: var(--deep);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.hero__media {
  position: relative;
  background: var(--paper-2);
  overflow: hidden;
  min-height: 340px;
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.hero__caption {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(22, 21, 26, 0.78);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
}

/* ---------- Cifras ---------- */
.figures {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.figures ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}
.figures li {
  padding: clamp(26px, 3.4vw, 44px) clamp(18px, 2.4vw, 34px);
  border-left: 1px solid var(--line);
}
.figures li:first-child { border-left: 0; }
.figures b {
  display: block;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--deep);
}
.figures span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 132px) 0; }
.section--line { border-top: 1px solid var(--line); }
.section--tint { background: var(--paper-2); }
.section--dark {
  background: var(--deep-2);
  color: #efedf5;
}
.section--dark .eyebrow { color: #8f89b8; }
.section--dark .lead { color: #b8b3cd; }

.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.head h2 {
  font-size: clamp(30px, 3.6vw, 47px);
  margin-top: 14px;
}
.head p { margin: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.prose p { margin: 0 0 18px; color: var(--ink-soft); font-size: 17.5px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- Planta ---------- */
.plant-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.plant-grid figure { margin: 0; overflow: hidden; background: var(--paper-2); }
.plant-grid img { width: 100%; height: 100%; object-fit: cover; }
.plant-grid .tall { grid-row: span 2; }
.plant-grid .wide { grid-column: 1 / -1; height: clamp(150px, 20vw, 240px); }
.plant-grid .a { height: clamp(210px, 26vw, 330px); }

.datalist {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.datalist li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.datalist dt, .datalist .k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}
.datalist .v { color: var(--ink); }

/* ---------- Yacimientos (galería) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #2a2550;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.shot:nth-child(1) { grid-column: span 4; aspect-ratio: 16 / 9; }
.shot:nth-child(2) { grid-column: span 2; aspect-ratio: 3 / 4; }
.shot:nth-child(3) { grid-column: span 2; aspect-ratio: 3 / 4; }
.shot:nth-child(4) { grid-column: span 2; }
.shot:nth-child(5) { grid-column: span 2; }
.shot:nth-child(6) { grid-column: span 2; aspect-ratio: 16 / 9; }
.shot:nth-child(6) { grid-column: span 6; aspect-ratio: 21 / 6; }
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s;
  opacity: 0.92;
}
.shot:hover img { transform: scale(1.04); opacity: 1; }

/* ---------- Productos ---------- */
.prodgroup + .prodgroup { margin-top: clamp(36px, 4vw, 56px); }
.prodgroup h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.prods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.prods li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 1.5vw, 21px);
  letter-spacing: -0.015em;
}
.prods i {
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.prods small {
  display: block;
  font-size: 13.5px;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---------- Mercados ---------- */
.markets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 26px);
}
.market {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}
.section--tint .market { background: #fff; }
.market__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.market__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.market:hover .market__img img { transform: scale(1.045); }
.market__body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.market h3 { font-size: 21px; }
.market p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.market ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market li {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 5px 9px;
}
.note {
  margin-top: 26px;
  font-size: 15px;
  color: var(--ink-faint);
}

/* ---------- Representación ---------- */
.partner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 56px);
}
.partner__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.partner__logo img { width: 100%; max-width: 200px; height: auto; }
.partner h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 14px; }
.partner p { margin: 0 0 16px; color: var(--ink-soft); }
.link-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Contacto ---------- */
.contact {
  background: var(--deep-2);
  color: #efedf5;
  padding: clamp(64px, 9vw, 128px) 0 0;
}
.contact h2 {
  font-size: clamp(32px, 4.4vw, 58px);
  margin: 16px 0 clamp(36px, 4.5vw, 60px);
  max-width: 20ch;
}
.contact .eyebrow { color: #8f89b8; }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(24px, 3vw, 48px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 34px;
}
.contact__grid h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f89b8;
  margin-bottom: 12px;
}
.contact__grid p { margin: 0; font-size: 17px; line-height: 1.55; color: #efedf5; }
.contact__grid a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.contact__grid a:hover { color: #fff; border-bottom-color: #fff; }

.footer {
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 26px 0 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f89b8;
}
.footer img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: 0.85; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 10, 24, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  object-fit: contain;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 46px; height: 46px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .figures ul { grid-template-columns: repeat(2, 1fr); }
  .figures li:nth-child(3) { border-left: 0; }
  .figures li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .partner { grid-template-columns: 1fr; }
  .partner__logo { max-width: 280px; }
}

@media (max-width: 1060px) {
  body { font-size: 16.5px; }
  .menu, .nav__cta { display: none; }
  .burger { display: block; }
  .nav.is-open .menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px var(--pad) 28px;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav.is-open .menu a { font-size: 19px; padding: 11px 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { max-width: none; padding-block: clamp(44px, 9vw, 72px); }
  .hero__media { min-height: 0; aspect-ratio: 16 / 10; }
  .hero__media img { position: static; }
  .head { grid-template-columns: 1fr; align-items: start; }
  .split { grid-template-columns: 1fr; }
  .plant-grid { grid-template-columns: 1fr 1fr; }
  .plant-grid .tall { grid-row: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shot, .shot:nth-child(n) { grid-column: span 1; aspect-ratio: 4 / 3; }
  .shot:nth-child(1), .shot:nth-child(6) { grid-column: span 2; aspect-ratio: 16 / 9; }
  .brand__sr { display: none; }
}

@media (max-width: 560px) {
  .figures ul { grid-template-columns: 1fr; }
  .figures li { border-left: 0; }
  .figures li + li { border-top: 1px solid var(--line); }
  .datalist li { grid-template-columns: 1fr; gap: 4px; }
  .plant-grid { grid-template-columns: 1fr; }
  .plant-grid .a, .plant-grid .wide { height: auto; aspect-ratio: 3 / 2; }
  .prods li { font-size: 18px; }
  .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shot img, .market__img img { transition: none; }
}
