/**
 * Dealforge — Layout: aviso, cabecera con orientación, secciones, contacto y pie.
 */

/* ---------- Aviso superior ---------- */
.ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--graphite-900);
  font-size: 0.8125rem;
  color: var(--paper-200);
  text-align: center;
}

.ticker__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--pine-300);
  font-weight: 600;
  text-decoration: none;
}

.ticker__link:hover {
  text-decoration: underline;
}

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 246, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  max-width: 1200px;
  min-height: 4.5rem;
  margin-inline: auto;
  padding: var(--space-2) clamp(1rem, 4vw, 2rem);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.brand__logo {
  /* Ancho 0 + min-width 100%: el logo ocupa exactamente el ancho del tagline sin deformarse. */
  width: 0;
  min-width: 100%;
  height: auto;
  aspect-ratio: 1200 / 169;
}

.brand__tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
}

.header__toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--pine-700);
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
}

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) clamp(1rem, 4vw, 2rem);
  background: var(--paper-50);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.nav--open {
  display: flex;
}

.nav__list {
  display: flex;
  flex-direction: column;
}

.nav__link {
  display: block;
  padding: var(--space-3) 0;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.nav__link:hover {
  color: var(--pine-700);
}

.nav__link[aria-current="true"] {
  color: var(--pine-700);
  box-shadow: inset 3px 0 0 var(--stone-400);
  padding-left: var(--space-3);
}

@media (min-width: 1024px) {
  .header__toggle {
    display: none;
  }

  .nav {
    position: static;
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-6);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav__list {
    flex-direction: row;
    gap: var(--space-5);
  }

  .nav__link {
    position: relative;
    padding: var(--space-2) 0;
    font-size: 0.9rem;
  }

  .nav__link[aria-current="true"] {
    padding-left: 0;
    box-shadow: none;
  }

  .nav__link[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.15rem;
    height: 3px;
    border-radius: 2px;
    background: var(--stone-400);
  }
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.section--paper {
  background-color: var(--paper-100);
}

.section--graphite {
  background-color: var(--graphite-900);
  border-top-color: var(--graphite-900);
  color: var(--paper-50);
}

.section__head {
  max-width: 44rem;
  margin-bottom: var(--space-7);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--center .eyebrow {
  justify-content: center;
}

.section__split {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.section__split .section__head {
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .section__split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section__title {
  margin-block: var(--space-2) var(--space-3);
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
}

.section__title:focus-visible {
  border-radius: var(--radius-sm);
}

.section__lead {
  color: var(--muted);
}

.section--graphite .section__title {
  color: var(--paper-50);
}

.section--graphite .section__lead {
  color: var(--paper-200);
}

.section--graphite .eyebrow {
  color: var(--pine-300);
}

.section--graphite .eyebrow__num {
  background: rgba(143, 191, 175, 0.18);
  color: var(--pine-300);
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 1024px) {
  .contact {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-8);
    align-items: start;
  }
}

.contact__points {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.contact__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.contact__points .icon {
  margin-top: 0.2rem;
  color: var(--pine-600);
}

.contact__points strong {
  color: var(--ink);
}

/* ---------- Volver arriba ---------- */
.to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--pine-700);
  color: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}

.to-top:hover {
  background: var(--pine-600);
  transform: translateY(-2px);
}

.to-top[hidden] {
  display: none;
}

/* ---------- Pie ---------- */
.footer {
  padding-block: var(--space-7);
  background: var(--graphite-900);
  font-size: 0.85rem;
  color: var(--paper-200);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.footer__logo {
  width: auto;
  height: 1.7rem;
}

.footer__tag {
  margin-top: var(--space-2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--pine-300);
}

.footer__copy {
  margin-top: var(--space-3);
  font-size: 0.75rem;
  color: var(--paper-200);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.footer__link {
  padding-block: var(--space-2);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__region {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--paper-200);
}

@media (min-width: 900px) {
  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
