/**
 * components.css
 * Shared UI components used across all pages.
 * Depends on: css/design-system.css
 */

/* ============================================================
   1. HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 16px 48px;
  transition: background 200ms var(--ease-out),
              backdrop-filter 200ms var(--ease-out),
              border-color 200ms var(--ease-out);
  background: rgba(5, 5, 5, 0.25);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid transparent;
}

.header--scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(32px) saturate(160%);
  border-bottom-color: var(--line);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color 140ms var(--ease-out),
              background 140ms var(--ease-out),
              color 140ms var(--ease-out);
}

.hamburger:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.06);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 200ms var(--ease-out),
              opacity 200ms var(--ease-out);
}

.hamburger.is-active span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

@media (max-width: 800px) {
  .header {
    padding: 12px 24px;
  }

  .hamburger {
    display: inline-flex;
  }

  .header__actions .btn {
    display: none;
  }
}

/* ============================================================
   2. BRAND LOCKUP
   ============================================================ */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-lockup img {
  height: 64px;
  width: auto;
  display: block;
}

/* ============================================================
   3. STATUS PILL
   ============================================================ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 23, 28, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(var(--brand-rgb), 0.7);
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================================
   4. NAV LINKS
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-decoration: none;
  transition: color 140ms var(--ease-out);
}

.nav__link:hover {
  color: var(--brand);
}

/* Mobile overlay */
.nav--mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(7, 8, 10, 0.96);
  backdrop-filter: blur(24px) saturate(140%);
}

.nav--mobile.is-open {
  display: flex;
}

.nav--mobile .nav__link {
  font-size: 18px;
  letter-spacing: 0.24em;
  color: var(--fg-2);
}

.nav--mobile .nav__link:hover {
  color: var(--brand);
}

@media (max-width: 800px) {
  .nav--desktop {
    display: none;
  }
}

/* ============================================================
   FOOTER LINKS (quick access to business units)
   ============================================================ */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 32px;
  border-top: 1px solid var(--line);
}

.footer-links__item {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-decoration: none;
  transition: color 140ms var(--ease-out);
}

.footer-links__item:hover {
  color: var(--brand);
}

.footer-email {
  color: var(--fg-3);
  text-decoration: none;
  transition: color 140ms var(--ease-out);
}

.footer-email:hover {
  color: var(--brand);
}

/* ============================================================
   5. NAV-BTN (slideshow controls)
   ============================================================ */
.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 140ms var(--ease-out),
              background 140ms var(--ease-out),
              color 140ms var(--ease-out);
}

.nav-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.06);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   6. CTA BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms var(--ease-out),
              box-shadow 140ms var(--ease-out),
              background 140ms var(--ease-out),
              color 140ms var(--ease-out),
              border-color 140ms var(--ease-out);
}

.btn--primary {
  background: var(--brand);
  color: var(--ink-1000);
  border: 1px solid var(--brand);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-green);
}

.btn--secondary {
  background: transparent;
  color: var(--fg-1);
  border: 1px solid var(--line-strong);
}

.btn--secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.06);
}

/* ============================================================
   7. DIVIDER LINE
   ============================================================ */
.divider-line {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--silver-700);
}

.divider-line::before,
.divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.divider-line span {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--silver-400);
  text-transform: uppercase;
}

/* ============================================================
   8. CARD
   ============================================================ */
.card {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 240ms var(--ease-out),
              border-color 240ms var(--ease-out),
              transform 240ms var(--ease-out);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--brand) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}

.card:hover {
  box-shadow: var(--glow-green);
  border-color: rgba(var(--brand-rgb), 0.4);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

/* ============================================================
   9. INFO-CELL (footer style)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.6fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

@media (max-width: 800px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.info-cell {
  background: var(--ink-900);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 168px;
}

.info-cell--accent {
  background: linear-gradient(135deg, var(--ink-850), var(--ink-900) 60%);
}

.info-cell .label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-400);
}

.info-cell .label svg {
  width: 16px;
  height: 16px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-cell .value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 200;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  margin-top: 4px;
  text-wrap: balance;
}

.info-cell .value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 140ms var(--ease-out),
              border-color 140ms var(--ease-out);
}

.info-cell .value a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.info-cell .sub {
  font-size: 13px;
  color: var(--fg-3);
  font-weight: 300;
}

.info-cell--ornament {
  align-items: center;
  justify-content: center;
  min-height: 168px;
  color: var(--silver-700);
}

.info-cell--ornament .footer-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(var(--brand-rgb), 0.25));
  transition: filter 240ms var(--ease-out),
              transform 240ms var(--ease-out);
}

.info-cell--ornament:hover .footer-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 0 26px rgba(var(--brand-rgb), 0.45));
}

.info-cell--ornament .caption {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--silver-500);
  text-transform: uppercase;
  margin-top: 12px;
  text-align: center;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  padding-top: 48px;
}

.signature {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-500);
}

.signature .infinity-glyph {
  color: var(--brand);
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 300;
}

/* ============================================================
   11. EYEBROW / LABEL PATTERN
   ============================================================ */
.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--brand);
}

.label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-400);
}

/* ============================================================
   12. SLIDESHOW
   ============================================================ */

.obras {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.obras__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.obras__head .eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-300);
  margin: 0 0 14px;
}

.obras__head h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  margin: 0;
}

.obras__nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.obras__counter {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-right: 8px;
  min-width: 56px;
  text-align: right;
}

.obras__counter .now { color: var(--brand); }

.slideshow {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: var(--ink-850);
  border: 1px solid var(--line-strong);
}

/* On smaller screens, lean the frame toward 4:5 so portrait media — the
   majority of this collection — gets a real stage. Landscape videos will
   letterbox, which is the expected mobile pattern. */
@media (max-width: 760px) {
  .slideshow { aspect-ratio: 4 / 5; }
  .slide__meta { left: 20px; right: 20px; bottom: 22px; gap: 14px; }
  .slide__meta .lead { font-size: 18px; max-width: 70%; }
  .slide__index { top: 18px; left: 20px; }
  .slide__type { top: 18px; right: 20px; }
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 720ms var(--ease-out),
              transform 1400ms var(--ease-out);
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Media host — supports portrait + landscape via blurred backdrop + contain */
.slide .media-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink-1000);
}

/* Blurred backdrop — same media, scaled up + blurred to fill letterbox bars */
.slide .media-backdrop {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(36px) brightness(0.45) saturate(115%);
  transform: scale(1.08);
  opacity: 0.9;
  pointer-events: none;
}

/* Foreground media — never crops; sits centered on top of backdrop */
.slide .media-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Portrait media gets a thin vertical frame hint */
.slide[data-orientation="portrait"] .media-front {
  filter: drop-shadow(0 18px 48px rgba(0,0,0,0.55));
}

/* Media-type chip top-right */
.slide__type {
  position: absolute;
  top: 24px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(7,8,10,0.55);
  backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-300);
  z-index: 2;
}

.slide__type svg {
  width: 12px; height: 12px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slide__type .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(123,193,66,0.7);
  animation: pulse 2.4s var(--ease-out) infinite;
}

/* Lower-third overlay */
.slide__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(7,8,10,0.45) 70%, rgba(7,8,10,0.85) 100%);
  pointer-events: none;
}

.slide__meta {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: var(--fg-1);
  z-index: 2;
}

.slide__meta .lead {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  max-width: 60%;
  text-wrap: balance;
}

.slide__meta .tag {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--silver-300);
  text-transform: uppercase;
}

.slide__meta .tag em {
  color: var(--brand);
  font-style: normal;
  display: block;
  margin-top: 4px;
}

.slide__index {
  position: absolute;
  top: 24px;
  left: 32px;
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--silver-400);
  z-index: 2;
}

.slide__index strong {
  color: var(--brand);
  font-weight: 300;
}

/* Progress bars at bottom */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 6px;
  padding: 0 20px 20px;
  z-index: 3;
}

.progress__bar {
  flex: 1;
  height: 2px;
  background: rgba(192,195,207,0.18);
  border-radius: 1px;
  overflow: hidden;
  cursor: pointer;
  transition: background 140ms var(--ease-out);
}

.progress__bar:hover { background: rgba(192,195,207,0.32); }

.progress__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(123,193,66,0.5);
  transition: width 80ms linear;
}

.progress__bar.is-played span { width: 100%; }
