/* Layout principal: body, nav, hero, sections, rows, footer */

/* ── Body ─────────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1400px 700px at 50% -200px, rgba(240, 200, 137, 0.06), transparent 70%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px var(--shell-pad);
  background: linear-gradient(to bottom, rgba(10,9,8,0.90), rgba(10,9,8,0));
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

.nav.is-scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

/* Marca */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.brand:hover { opacity: 0.85; }

.brand__mark {
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--accent-strong) 0%, var(--accent) 40%, #6a4520 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 0 14px -2px var(--accent);
  transform: translateY(3px);
  flex-shrink: 0;
}

.brand__dot { color: var(--accent); font-style: italic; }

/* Links de navegação */
.nav__links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}

.nav__link { transition: color 0.15s ease; }
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--accent); }

.nav__spacer { flex: 1; }

/* Busca */
.nav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-width: 200px;
  border-radius: 999px;
  background: rgba(255,240,220,0.04);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: text;
}
.nav__search:focus-within {
  border-color: var(--line-2);
  background: rgba(255,240,220,0.07);
}
.nav__search input {
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13px;
}
.nav__search input::placeholder { color: var(--text-3); }
.nav__search input::-webkit-search-cancel-button { display: none; }

/* Botão ícone */
.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(255,240,220,0.06); color: var(--text); }

/* Avatar */
.nav__avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6a4520);
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: min(92vh, 880px);
  min-height: 560px;
  overflow: hidden;
}

.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }

.hero__backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  transition: transform 12s ease-out;
}
.hero__slide.is-active .hero__backdrop { transform: scale(1.0); }

.hero__grain {
  position: absolute; inset: 0;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
}

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(10,9,8,0.95) 0%, rgba(10,9,8,0.55) 40%, rgba(10,9,8,0.15) 70%, rgba(10,9,8,0) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(10,9,8,0.4) 30%, rgba(10,9,8,0) 65%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 var(--shell-pad);
  padding-top: clamp(100px, 16vh, 180px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 0 0 16px;
  color: var(--text);
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--accent); font-weight: 400; }

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-2);
  margin: 0 0 16px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
}
.hero__meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-3);
}
.hero__rating { color: var(--accent); font-weight: 600; }

.hero__chips {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hero__chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.hero__overview {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 0 28px;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost {
  background: rgba(255,240,220,0.08);
  color: var(--text);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,240,220,0.14); }
.btn:active { transform: translateY(1px); }

/* Controles do hero (dots + counter) */
.hero__controls {
  position: absolute;
  right: var(--shell-pad);
  bottom: 56px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero__dots { display: flex; gap: 8px; }
.hero__dot {
  width: 28px; height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}
.hero__dot.is-active { background: rgba(255,255,255,0.25); }
.hero__dot.is-active::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroProgress 7s linear forwards;
}
@keyframes heroProgress { to { transform: scaleX(1); } }

.hero__counter {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-2);
  font-style: italic;
  white-space: nowrap;
}
.hero__counter b { color: var(--text); font-style: normal; }

/* ── Main / Sections ──────────────────────────────────────────────────────── */

.main {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

.section {
  padding: 0 var(--shell-pad);
  margin-top: var(--row-gap);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 24px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.5px;
  font-weight: 400;
  margin: 0;
  color: var(--text);
}
.section__title em { font-style: italic; color: var(--accent); }

.section__count {
  font-size: 12px;
  color: var(--text-3);
}

/* ── Carrossel (Row) ──────────────────────────────────────────────────────── */

.row {
  position: relative;
  margin-left: calc(var(--shell-pad) * -1);
  margin-right: calc(var(--shell-pad) * -1);
}

.row__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px var(--shell-pad) 28px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__track > * { scroll-snap-align: start; flex: 0 0 auto; }

.row__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 4;
  width: 44px; height: 64px;
  display: grid;
  place-items: center;
  background: rgba(10,9,8,0.85);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s ease;
  cursor: pointer;
}
.row:hover .row__arrow { opacity: 1; }
.row__arrow:hover { background: var(--bg-3); }
.row__arrow--left { left: 8px; }
.row__arrow--right { right: 8px; }

/* ── Loading ──────────────────────────────────────────────────────────────── */

.loading {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

/* ── Genres bar ───────────────────────────────────────────────────────────── */

.genres-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.genre-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}
.genre-chip:hover { color: var(--text); border-color: var(--line-2); }
.genre-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Grid (Browse) ────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
  gap: 20px 14px;
}

/* ── Load more ────────────────────────────────────────────────────────────── */

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.btn-load-more {
  padding: 12px 40px;
  background-color: transparent;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: var(--font-size-sm);
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: var(--transition);
}
.btn-load-more:hover {
  background-color: var(--accent);
  color: var(--accent-ink);
}
.btn-load-more:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  margin-top: 100px;
  padding: 48px var(--shell-pad) 32px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-2);
}
.footer__brand em { color: var(--accent); font-style: italic; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { transition: color 0.15s ease; }
.footer__links a:hover { color: var(--text); }
