/* =========================================================
   Daga del Mayab — Comercializadora de Metales
   Palette drawn from the metallic logo:
   charcoal, antique gold, brushed silver.
   ========================================================= */

:root {
  --ink:        #15181c;
  --ink-2:      #23272d;
  --ink-soft:   #3a4049;
  --muted:      #5c636b;

  --gold:       #c6973f;
  --gold-light: #e7cd8c;
  --gold-dark:  #8a6420;

  --silver:     #c7ccd1;
  --silver-lt:  #eef0f2;

  --bg:         #ffffff;
  --bg-alt:     #f5f6f7;
  --line:       #e4e6e9;

  --wa:         #25d366;
  --wa-dark:    #1da851;

  --maxw: 1160px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 2px 10px rgba(21, 24, 28, .06);
  --shadow:    0 14px 40px rgba(21, 24, 28, .12);

  --serif: "Cinzel", "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ----------------------------- Reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --------------------------- Layout ------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }

.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: .01em;
}

.section-intro { color: var(--muted); font-size: 1.05rem; margin-top: 16px; }
.lead { color: var(--ink-soft); font-size: 1.08rem; margin-top: 18px; }

/* Gold underline accent under centered titles */
.section-head .section-title::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-dark));
  border-radius: 3px;
}

/* ---------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(37, 211, 102, .32); }
.btn-wa:hover { background: var(--wa-dark); }

.btn-outline { border-color: rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--ink);
  border: none;
  padding: 11px 20px;
  box-shadow: 0 4px 12px rgba(138, 100, 32, .22);
}
.btn-gold.btn-sm { padding: 11px 20px; }
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(138, 100, 32, .32);
}

/* ---------------------------- Header ----------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 58px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-weight: 500;
  font-size: .96rem;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .25s var(--ease);
}
.nav-link:hover { color: var(--gold-dark); }
.nav-link:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 18px; }

.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: .86rem;
  color: var(--muted); padding: 4px 6px; border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-btn .flag { font-size: 1.02rem; line-height: 1; }
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--gold-dark); }
.lang-sep { color: var(--line); font-weight: 400; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 26px; height: 2.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) 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.5px) rotate(-45deg); }

/* ----------------------------- Hero ------------------------------ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 78px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/hero.jpg") center/cover no-repeat;
  transform: scale(1.05);
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10, 12, 15, .9) 0%, rgba(14, 17, 21, .72) 45%, rgba(18, 21, 26, .45) 100%),
    linear-gradient(0deg, rgba(10, 12, 15, .6), rgba(10, 12, 15, 0) 55%);
}
.hero-content { position: relative; z-index: 2; max-width: 720px; padding-top: 40px; padding-bottom: 60px; }

.hero-eyebrow {
  font-family: var(--sans);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.4vw, 3.7rem);
  line-height: 1.1;
  color: #fff;
  letter-spacing: .005em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}
.hero-sub {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  margin-top: 22px;
  max-width: 580px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* --------------------------- Nosotros ---------------------------- */
#nosotros .lead:first-of-type { margin-top: 22px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.stat {
  text-align: center;
  padding: 26px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-dark));
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}
.stat-label { display: block; color: var(--muted); font-size: .92rem; margin-top: 4px; }

/* -------------------------- Materiales --------------------------- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.material-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.material-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.material-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--silver-lt); }
.material-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.material-card:hover .material-img img { transform: scale(1.06); }

.material-body { padding: 22px 22px 26px; }
.material-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.material-body h3::before {
  content: "";
  width: 20px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}
.material-body p { color: var(--muted); font-size: .96rem; }

/* --------------------------- Servicios --------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service {
  text-align: center;
  padding: 36px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.service:hover { transform: translateY(-5px); border-color: var(--gold-light); box-shadow: var(--shadow-sm); }
.service-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, var(--silver-lt));
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 2px 6px rgba(255,255,255,.9), 0 4px 12px rgba(21,24,28,.08);
}
.service h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.14rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.service p { color: var(--muted); font-size: .94rem; }

/* --------------------------- Ubicación --------------------------- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 36px;
  align-items: stretch;
}
.location-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
}
.info-item { display: flex; flex-direction: column; gap: 3px; border-left: 3px solid var(--gold); padding-left: 16px; }
.info-label { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.info-value { font-size: 1.06rem; color: var(--ink-2); }
.location-info .btn { align-self: flex-start; margin-top: 8px; }

.location-map { min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.location-map iframe { display: block; width: 100%; height: 100%; min-height: 340px; }
.map-placeholder {
  height: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 30px;
  color: var(--muted);
  background:
    repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 14px, #eff1f3 14px, #eff1f3 28px);
}
.map-icon { font-size: 2.4rem; }

/* --------------------------- Contacto ---------------------------- */
.section-contact { background: var(--bg-alt); }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold-light); }
.contact-ico { font-size: 1.9rem; margin-bottom: 6px; }
.contact-k { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.contact-v { font-size: 1.02rem; color: var(--ink-2); font-weight: 500; word-break: break-word; }

/* ---------------------------- Footer ----------------------------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 48px 0 32px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.footer-logo {
  height: 72px; width: auto;
  background: #fff;
  padding: 10px 14px;
  border-radius: 12px;
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.footer-nav a { font-size: .94rem; color: rgba(255, 255, 255, .78); transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-copy { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: .86rem; color: rgba(255, 255, 255, .55); }

/* ------------------------ Floating WhatsApp ---------------------- */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 34px rgba(37, 211, 102, .55); }

/* --------------------------- Reveal anim ------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------- Responsive -------------------------- */
@media (max-width: 960px) {
  .materials-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 78px; right: 0;
    width: min(320px, 86vw);
    height: calc(100vh - 78px);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 28px 26px;
    box-shadow: -12px 0 40px rgba(21, 24, 28, .14);
    transform: translateX(105%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
  }
  .nav.open { transform: translateX(0); }
  .nav-link { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-link::after { display: none; }
  .nav-actions { flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; margin-top: 10px; }
  .nav-actions .btn { width: 100%; }
  .lang-switch { align-self: flex-start; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .container { padding: 0 18px; }
  .brand-logo { height: 48px; }
  .stats { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

/* ------------------------ Reduced motion ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
