/* ==========================================================================
   Components — header, seletor de idioma, hero da home e faixa de stack
   ========================================================================== */

/* Header ------------------------------------------------------------------ */

.header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--card);
  font: 700 13px/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--btn-ghost-bg);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.nav a {
  opacity: 0.8;
  transition: opacity 0.15s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  opacity: 1;
}

.header__right {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.mobile-nav {
  display: none;
}

.header .btn {
  height: 33px;
  padding: 0 14px;
  font-size: 13px;
}

.header .btn svg {
  width: 15px;
  height: 15px;
  margin-right: 7px;
}

/* Seletor de idioma ------------------------------------------------------- */

.lang {
  display: flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.lang button {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--text-soft);
  background: none;
  font: 700 12px/1 var(--font-sans);
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  color: var(--btn-text);
  background: var(--btn-bg);
}

/* Hero (home) ------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  min-height: 480px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 40px;
  background:
    radial-gradient(90% 120% at 90% 100%, var(--surface-to), transparent 65%), var(--surface-from);
}

.hero__content {
  align-self: center;
  padding: 56px 0 56px 64px;
}

.hero h1 {
  font: 400 clamp(44px, 5.4vw, 62px) / 1.04 var(--font-serif);
  letter-spacing: -0.02em;
}

.hero h1 span {
  display: block;
}

.hero h1 .accent {
  font-style: italic;
  color: var(--text-faint);
}

.hero__lead {
  max-width: 380px;
  margin-top: 20px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.hero__cta {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.hero__cta .btn {
  height: 38px;
  font-size: 14.5px;
}

.stats {
  display: inline-flex;
  margin-top: 32px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.stats li {
  padding: 14px 24px;
}

.stats li + li {
  border-left: 1px solid var(--border);
}

.stats strong {
  display: block;
  font: 400 30px/1.1 var(--font-serif);
}

.stats span {
  font-size: 13.5px;
  color: var(--text-soft);
}

/* Foto em arco + selo de disponibilidade */

.hero__media {
  position: relative;
  align-self: end;
  justify-self: center;
  width: min(400px, 88%);
  height: 450px;
}

.arch {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--surface-to), var(--accent));
}

.arch img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 104%;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
  filter: var(--photo-filter);
}

.badge {
  position: absolute;
  bottom: 36px;
  left: -36px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  color: var(--glass-text);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.badge[data-draggable] {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.badge.is-dragging {
  cursor: grabbing;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.badge__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6fbf73;
  box-shadow: 0 0 0 4px rgba(111, 191, 115, 0.25);
}

.badge small {
  display: block;
  font-size: 12px;
  color: var(--glass-muted);
}

.badge b {
  font: 700 15px/1.25 var(--font-sans);
}

.badge__btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--glass-btn-icon);
  background: var(--glass-btn-bg);
  transition: transform 0.15s;
}

.badge__btn:hover {
  transform: translate(2px, -2px);
}

/* Faixa de stack (marquee) ------------------------------------------------ */

.brands {
  margin-top: 28px;
  padding: 14px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.brands__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: scroll 36s linear infinite;
}

.brands__set {
  display: flex;
  gap: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 15px/1 var(--font-sans);
  white-space: nowrap;
}

.brand__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #fff;
}

.brand__icon img {
  width: 18px;
  height: 18px;
}

@keyframes scroll {
  to {
    transform: translateX(calc(-50% - 24px));
  }
}

/* Responsivo -------------------------------------------------------------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 28px;
  }

  .hero__content {
    padding: 40px 24px 8px;
  }

  .stats li {
    padding: 12px 16px;
  }

  .hero__media {
    width: min(340px, 78%);
    height: clamp(280px, 62vw, 360px);
    margin-top: 16px;
  }

  .badge {
    right: 12px;
    left: 12px;
  }
}

@media (max-width: 760px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-block: 12px;
  }

  .nav--desktop {
    display: none;
  }

  .mobile-nav {
    position: relative;
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mobile-nav summary {
    width: fit-content;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary::after {
    content: " +";
    color: var(--text-faint);
  }

  .mobile-nav[open] summary::after {
    content: " −";
  }

  .mobile-nav .nav {
    display: grid;
    justify-content: stretch;
    gap: 0;
    margin-top: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    white-space: normal;
  }

  .mobile-nav .nav a {
    padding: 11px 10px;
    border-radius: 7px;
  }

  .mobile-nav .nav a:hover,
  .mobile-nav .nav a[aria-current="page"] {
    background: var(--btn-ghost-bg);
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 32px);
  }

  .header__right {
    gap: 6px;
  }

  .theme-toggle {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 12px;
  }

  .header .btn {
    padding-inline: 9px;
  }

  .header .btn svg {
    margin-right: 0;
  }

  .header .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero__content {
    padding: 34px 18px 8px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 52px);
  }

  .hero__cta {
    flex-wrap: wrap;
  }

  .stats {
    display: flex;
    width: 100%;
  }

  .stats li {
    flex: 1;
    min-width: 0;
    padding: 11px 8px;
  }

  .stats strong {
    font-size: 26px;
  }

  .stats span {
    font-size: 11px;
  }

  .badge {
    gap: 9px;
    padding: 10px;
  }

  .badge b {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brands__track {
    animation: none;
  }
}
