/* ════════════════════════════════════════
   LOS ROSALES METALS — styles
   Fuentes: Playfair Display (serif) · Inter (sans) · JetBrains Mono (mono)
   ════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:       #1b1c1e;
  --bg-alt:   #1f2023;
  --gold:     #c4a265;
  --gold-dk:  #b8955a;
  --white:    #f5f2ec;
  --text:     #b9b4aa;
  --muted:    #8e8a83;
  --line:     rgba(255,255,255,.1);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;
  --ease:  cubic-bezier(.4,0,.2,1);

  --nav-h: 64px;
  --wrap:  1360px;
  --gutter: 2rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════
   BASE
════════════════════════════════════════ */
.container {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Cada sección se separa con una línea delgada, igual que el nav */
.section {
  padding-block: 6rem;
  border-bottom: 1px solid var(--line);
}
.section--tall { padding-block: 9rem; }

/* Dos columnas */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split--top { align-items: start; }

.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--text);
}
.lead--wide { max-width: 700px; }

.num {
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--gold);
}

/* Contenedor de imagen con borde fino */
.frame {
  border: 1px solid var(--line);
  overflow: hidden;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ════════════════════════════════════════
   COTIZACIÓN SPOT
════════════════════════════════════════ */
.ticker {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text);
  padding-block: .7rem;
}

.ticker-row { display: flex; }

.ticker-group {
  display: flex;
  align-items: baseline;
  gap: .5rem 1.6rem;
  flex-wrap: wrap;
}

/* Copia para el carrusel (solo tablet/mobile) */
.ticker-group[aria-hidden] { display: none; }

.ticker-row strong { color: var(--white); font-weight: 500; }

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  letter-spacing: .15em;
  color: var(--gold);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf7a;
}

.ticker-row .ticker-price { font-size: 1.05rem; }

.ticker-note {
  margin-top: .3rem;
  font-size: .62rem;
  letter-spacing: .15em;
  text-align: right;
  color: var(--muted);
}

/* ════════════════════════════════════════
   NAVBAR (fijo al hacer scroll; la barra spot sube)
════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(27,28,30,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}

.brand-sub {
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: .92rem;
  color: var(--text);
  transition: color .2s;
}
.nav-links a:hover { color: var(--gold); }

/* Selector de idioma */
.lang-switch {
  display: flex;
  gap: .15rem;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch button {
  font-family: var(--mono);
  font-size: .72rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  color: var(--text);
  transition: background .2s, color .2s;
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--bg);
}

/* Botón menú (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.nav-toggle span {
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.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); }

/* ════════════════════════════════════════
   BOTONES
════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }

.btn--gold {
  background: var(--gold);
  color: var(--bg);
}
.btn--gold:hover { background: var(--white); }

.btn--outline {
  border-color: var(--line);
  color: var(--white);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero { padding-block: 7rem 5rem; }
.hero .split { align-items: stretch; }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 5.6vw, 5.4rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--white);
  margin-bottom: 2rem;
}
.hero-title span {
  display: block;
  color: var(--gold-dk);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block: 2.5rem 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.hero-stats div {
  padding: 1.6rem 1rem 1rem;
  border-left: 1px solid var(--line);
}
.hero-stats div:first-child { border-left: none; }

.hero-stats dt {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold);
}
.hero-stats dd {
  font-size: .9rem;
  line-height: 1.4;
  color: var(--text);
}

.hero-media {
  position: relative;
  min-height: 420px;
}
.hero-media img {
  position: absolute;
  inset: 0;
  object-position: right center;
}

.hero-tag {
  position: absolute;
  inset: auto 1rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--text);
  background: rgba(20,20,22,.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-tag svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--gold); }

/* ════════════════════════════════════════
   TARJETAS (Qué hacemos · Destino)
════════════════════════════════════════ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
  border: 1px solid var(--line);
}

.card {
  padding: 3rem 2.25rem;
  border-left: 1px solid var(--line);
}
.card:first-child { border-left: none; }

.card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-block: 2.5rem 1.25rem;
}
.card h3 + p { font-size: .95rem; line-height: 1.75; }

.card--stat .icon {
  width: 26px;
  height: 26px;
  color: var(--gold);
  margin-bottom: 2.25rem;
}

.card-label {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .15em;
  line-height: 1.7;
  color: var(--text);
}

.card-value {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}

/* ════════════════════════════════════════
   TRAZABILIDAD — izquierda fija, pasos hacen scroll
════════════════════════════════════════ */
.trace-intro {
  position: sticky;
  top: calc(var(--nav-h) + 2.5rem);
}

.trace-media {
  margin-top: 3rem;
  aspect-ratio: 4 / 3;
}

.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.step:first-child { padding-top: 0; }

.step .num {
  position: relative;
  height: 100%;
}
/* Línea vertical bajo el número */
.step .num::after {
  content: '';
  position: absolute;
  top: 2rem;
  bottom: 0;
  left: .7rem;
  width: 1px;
  background: var(--line);
}

.step h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}

.step .tags {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  color: var(--gold);
  margin-block: .5rem 1.1rem;
}

.step p { font-size: 1rem; line-height: 1.7; }

/* ════════════════════════════════════════
   RESPONSABILIDAD
════════════════════════════════════════ */
#responsabilidad .frame { aspect-ratio: 4 / 3; }

.boxed-list {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
}
.boxed-list li {
  padding: 1.75rem 2rem;
  border-top: 1px solid var(--line);
}
.boxed-list li:first-child { border-top: none; }

.boxed-list h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .6rem;
}
.boxed-list p { font-size: .95rem; line-height: 1.7; }

/* ════════════════════════════════════════
   EQUIPO
════════════════════════════════════════ */
#equipo { padding-block: 9rem; }
#equipo .frame { aspect-ratio: 3 / 2; }

.check-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--white);
}
.check-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4a265' stroke-width='3'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E");
}

/* ════════════════════════════════════════
   CONTACTO
════════════════════════════════════════ */
.contact-list { border: 1px solid var(--line); }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 2.5rem 2rem 2.25rem;
  border-top: 1px solid var(--line);
  transition: background .2s;
}
.contact-item:first-child { border-top: none; }
.contact-item:hover { background: var(--bg-alt); }

.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}
.contact-icon svg { width: 18px; height: 18px; }

.contact-text {
  flex: 1;
  min-width: 0;
}

.contact-value {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--white);
  overflow-wrap: anywhere;
}

.contact-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text);
  transition: color .2s, transform .2s;
}
.contact-item:hover .contact-arrow { color: var(--gold); transform: translate(2px, -2px); }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer { padding-top: 5rem; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 4rem;
}

.footer .brand-name { font-size: 1.3rem; }

.footer-quote {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--text);
}

.footer-heading {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .15em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-links a {
  color: var(--white);
  transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

.footer-group {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .15em;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .nav-links { gap: 1.25rem; }
  .split { gap: 3rem; }
  .card { padding: 2.5rem 1.75rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(3) { border-left: none; }
  .hero-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Menú hamburguesa + columnas apiladas + barra spot en carrusel */
@media (max-width: 900px) {
  .ticker-row { overflow-x: auto; scrollbar-width: none; }
  .ticker-row::-webkit-scrollbar { display: none; }
  .ticker-group {
    flex-wrap: nowrap;
    flex-shrink: 0;
    padding-right: 1.6rem;
    white-space: nowrap;
  }


  .nav-toggle { display: flex; }
  .lang-switch { margin-left: auto; }
  .nav-inner { gap: 1rem; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-.5rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a {
    padding: 1rem var(--gutter);
    border-top: 1px solid var(--line);
  }

  .split { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 3; }

  /* Sin columna fija en una sola columna */
  .trace-intro { position: static; }
  .steps { margin-top: 1rem; }

  /* La imagen va debajo del texto en Responsabilidad */
  #responsabilidad .frame { order: 1; }

  .grid-3 { grid-template-columns: 1fr; }
  .card { border-left: none; border-top: 1px solid var(--line); }
  .card:first-child { border-top: none; }
  .card h3 { margin-top: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Barra spot: desplazamiento continuo de derecha a izquierda */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .ticker-row { overflow: hidden; }
  .ticker-group,
  .ticker-group[aria-hidden] {
    display: flex;
    animation: ticker-scroll 22s linear infinite;
  }
}

@keyframes ticker-scroll {
  to { transform: translateX(-100%); }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --gutter: 1.25rem; }

  .section { padding-block: 4rem; }
  .section--tall, #equipo { padding-block: 5rem; }
  .hero { padding-block: 3.5rem 4rem; }

  .ticker-note {
    text-align: left;
    font-size: .5rem;
    letter-spacing: .06em;
  }

  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: .5rem; letter-spacing: .22em; }

  .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats div { padding-inline: .75rem; }

  .step { grid-template-columns: 2.75rem 1fr; padding-block: 2rem; }
  .step h3 { font-size: 1.3rem; }

  .boxed-list li { padding: 1.5rem 1.25rem; }
  .contact-item { padding: 1.5rem 1.25rem; gap: 1rem; }
  .contact-value { font-size: 1.1rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
