/* 4Elementos — Nueva Web 2026 */
:root {
  --ground:       #1c1f1d;
  --ground-light: #272b27;
  --ground-card:  #232623;
  --text:         #e8e4dc;
  --text-muted:   #b8b4ac;
  --text-dim:     #7a7e76;
  --accent:       #c87533;
  --accent-h:     #d4894a;
  --green:        #3d6b4f;
  --border:       #363a34;
  --border-hi:    #4f534b;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 56px;
  background: rgba(28,31,29,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-weight: 900; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--accent); text-decoration: none; text-transform: uppercase; }
.nav-logo span { color: var(--text); }
.nav-links { display: flex; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0 1rem; height: 56px; display: flex; align-items: center;
  border-bottom: 2px solid transparent; transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }
.nav-links a.hist { color: var(--text-dim); border-left: 1px solid var(--border); margin-left: 0.5rem; }
.nav-links a.hist:hover { color: var(--accent); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.8rem; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: none; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--ground); }
.btn-primary:hover { background: var(--accent-h); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-hi); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

/* HERO */
.hero {
  min-height: calc(100vh - 56px); display: flex; flex-direction: column;
  justify-content: center; padding: 4rem 2rem 8rem; position: relative; overflow: hidden;
  background-image: url('fotos/inicio.jpg');
  background-size: cover; background-position: center 40%;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(28,31,29,0.72) 0%, rgba(28,31,29,0.55) 50%, rgba(28,31,29,0.82) 100%),
    radial-gradient(circle at 20% 80%, rgba(200,117,51,0.12) 0%, transparent 55%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.8rem; display: flex; align-items: center; gap: 0.8rem;
}
.hero-eyebrow::after { content: ''; display: block; width: 48px; height: 1px; background: var(--accent); }
.hero-headline {
  font-family: "Arial Black", "Impact", system-ui;
  font-weight: 900; font-size: clamp(1.8rem, 4.2vw, 3.8rem); line-height: 1.05;
  letter-spacing: -0.03em; text-transform: uppercase; color: var(--text);
  max-width: 900px; margin-bottom: 1.5rem;
}
.hero-headline em { font-style: normal; color: var(--accent); }
.hero-sub {
  max-width: 520px; color: var(--text-muted); font-size: 1rem; line-height: 1.7;
  margin-bottom: 2.5rem; border-left: 2px solid var(--accent); padding-left: 1.2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-strip {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; border-top: 1px solid var(--border);
}
.hero-strip-item {
  flex: 1; padding: 1rem 1.4rem; border-right: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-dim);
}
.hero-strip-item:last-child { border-right: none; }
.hero-strip-item strong { display: block; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.15rem; }

/* SECTIONS */
.section { padding: 5rem 2rem; }
.section-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
.section-title {
  font-family: "Arial Black", Impact, system-ui;
  font-weight: 900; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 0.95;
  letter-spacing: -0.025em; text-transform: uppercase; color: var(--text);
}
.section-desc { margin-top: 1.2rem; color: var(--text-muted); max-width: 560px; font-size: 0.95rem; }
.section-header { margin-bottom: 3.5rem; }
.mat-line { width: 100%; height: 2px; background: linear-gradient(to right, var(--accent) 0%, var(--accent) 120px, var(--border) 120px); }
.mat-line.green { background: linear-gradient(to right, var(--green) 0%, var(--green) 120px, var(--border) 120px); }

/* SERVICE CARDS */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.service-card { background: var(--ground-card); padding: 2rem; position: relative; overflow: hidden; transition: background 0.2s; }
.service-card:hover { background: var(--ground-light); }
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform 0.25s ease;
}
.service-card:hover::before { transform: scaleY(1); }
.service-card.green-accent::before { background: var(--green); }
.service-num { font-family: "Arial Black", Impact, system-ui; font-size: 2.5rem; font-weight: 900; color: var(--text-dim); line-height: 1; margin-bottom: 1rem; letter-spacing: -0.04em; }
.service-photo { width: 100%; height: 160px; object-fit: cover; display: block; margin-bottom: 1.2rem; border: 1px solid var(--border); filter: brightness(0.7) saturate(0.8); transition: filter 0.2s; }
.service-card:hover .service-photo { filter: brightness(0.85) saturate(0.9); }
.service-name { font-family: "Arial Black", Impact, system-ui; font-weight: 900; font-size: 1.2rem; text-transform: uppercase; letter-spacing: -0.02em; color: var(--text); margin-bottom: 0.6rem; }
.service-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.2rem; }
.service-items { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.service-items li { font-size: 0.8rem; color: var(--text-dim); padding-left: 1rem; position: relative; }
.service-items li::before { content: '—'; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem; }
.service-card.green-accent .service-items li::before { color: var(--green); }

/* PRODUCTS */
.almacen-intro {
  background: var(--ground-card); border: 1px solid var(--border); padding: 2rem;
  margin-bottom: 2rem; border-left: 3px solid var(--accent);
  max-width: 680px; font-size: 0.92rem; color: var(--text-muted); line-height: 1.7;
}
.almacen-intro strong { color: var(--text); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 2rem; }
.product-card { background: var(--ground-card); padding: 1.5rem; transition: background 0.15s; }
.product-card:hover { background: var(--ground-light); }
.product-photo { width: 100%; height: 120px; object-fit: cover; display: block; margin-bottom: 1rem; border: 1px solid var(--border); filter: brightness(0.75) saturate(0.8); }
.product-name { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }
.product-origin { font-size: 0.75rem; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600; }
.product-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.trazabilidad-box { background: var(--ground-light); border: 1px solid var(--border); padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 860px; }
.traz-item { display: flex; gap: 1rem; align-items: flex-start; }
.traz-icon { width: 36px; height: 36px; background: var(--ground); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; color: var(--accent); font-weight: 700; }
.traz-text strong { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.traz-text span { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* HISTORIA */
.historia-hero { background: var(--ground-light); border: 1px solid var(--border); padding: 3rem 2rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.historia-hero::after { content: '1985'; position: absolute; right: 2rem; top: 50%; transform: translateY(-50%); font-family: "Arial Black", Impact, system-ui; font-size: 7rem; font-weight: 900; color: var(--border); line-height: 1; letter-spacing: -0.05em; pointer-events: none; }
.historia-title { font-family: "Arial Black", Impact, system-ui; font-weight: 900; font-size: clamp(1.5rem, 3.5vw, 2.5rem); text-transform: uppercase; letter-spacing: -0.025em; color: var(--text); margin-bottom: 1rem; }
.historia-sub { color: var(--text-muted); max-width: 580px; font-size: 0.92rem; line-height: 1.7; margin-bottom: 1.5rem; }
.historia-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 2.5rem; }
.hist-link { background: var(--ground-card); padding: 1.2rem 1.5rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem; transition: background 0.15s; }
.hist-link:hover { background: var(--ground-light); }
.hist-link-cat { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-dim); }
.hist-link-name { font-size: 0.9rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.02em; }
.hist-link-arrow { font-size: 0.75rem; color: var(--accent); margin-top: 0.3rem; }
.historia-note { font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 1.5rem; max-width: 680px; }

/* CONTACTO */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 860px; }
.contact-block { background: var(--ground-card); border: 1px solid var(--border); padding: 2rem; }
.contact-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.5rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); }
.contact-item { margin-bottom: 1rem; }
.contact-item dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.15rem; }
.contact-item dd { font-size: 0.9rem; color: var(--text); }
.contact-item dd a { color: var(--accent); text-decoration: none; }
.contact-item dd a:hover { text-decoration: underline; }

/* FOOTER */
.footer { border-top: 1px solid var(--border); padding: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-brand { font-family: "Arial Black", Impact, system-ui; font-weight: 900; font-size: 0.9rem; text-transform: uppercase; }
.footer-brand span { color: var(--accent); }
.footer-copy { font-size: 0.72rem; color: var(--text-dim); }
.footer-hist { font-size: 0.75rem; color: var(--text-dim); text-decoration: none; }
.footer-hist:hover { color: var(--accent); }

/* PHOTO GALLERY */
.gallery-section { margin-top: 3rem; }
.gallery-cat-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.8rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2px; margin-bottom: 2rem;
}
.gallery-img {
  width: 100%; height: 140px; object-fit: cover; display: block;
  filter: brightness(0.72) saturate(0.75);
  transition: filter 0.25s;
}
.gallery-img:hover { filter: brightness(1) saturate(1); }

/* ANIMATIONS */
@keyframes reveal-line { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero .line { display: block; opacity: 0; animation: reveal-line 0.65s cubic-bezier(0.16,1,0.3,1) forwards; }
.line-1 { animation-delay: 0.15s; }
.line-2 { animation-delay: 0.30s; }
.line-3 { animation-delay: 0.45s; }
.hero-eyebrow { opacity: 0; animation: reveal-line 0.5s ease forwards 0.05s; }
.hero-sub      { opacity: 0; animation: reveal-line 0.5s ease forwards 0.6s; }
.hero-actions  { opacity: 0; animation: reveal-line 0.5s ease forwards 0.75s; }
.hero-strip    { opacity: 0; animation: reveal-line 0.5s ease forwards 0.85s; }
@media (prefers-reduced-motion: reduce) {
  .line, .hero-eyebrow, .hero-sub, .hero-actions, .hero-strip { opacity: 1; animation: none; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-links a { padding: 0 0.6rem; font-size: 0.72rem; }
  .hero { padding: 2rem 1rem 8rem; }
  .hero-strip { flex-wrap: wrap; }
  .hero-strip-item { min-width: 50%; border-right: none; border-top: 1px solid var(--border); }
  .section { padding: 3rem 1rem; }
  .trazabilidad-box { grid-template-columns: 1fr; }
  .historia-hero::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}
