/* Ouvir — CSS puro. Identidade: cobalto + amarelo-sol, o disco de vinil como elemento marcante. */

:root {
  color-scheme: light dark;
  --paper: #f6f5fb;
  --surface: #ffffff;
  --ink: #16151f;
  --mute: #636277;
  --line: #dddbeb;
  --accent: #2b2fd9;      /* texto/links sobre o fundo da página */
  --tint: #e9e9fc;        /* faixa da música tocando */
  --cobalt: #2b2fd9;
  --cobalt-deep: #1a1d9a;
  --sun: #ffb81c;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0e17;
    --surface: #171724;
    --ink: #f2f1fb;
    --mute: #a5a4bb;
    --line: #2b2b40;
    --accent: #a9acff;
    --tint: #1d1f5c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
body.has-player { padding-bottom: 8.5rem; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-header :focus-visible, .band :focus-visible, .player :focus-visible, .site-footer :focus-visible {
  outline-color: var(--sun);
}

.skip {
  position: absolute; left: -999px; top: 0.5rem; z-index: 100;
  background: var(--sun); color: var(--ink); padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 1rem; }

/* ---------- Cabeçalho ---------- */
.site-header { background: var(--cobalt); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none;
  font-size: 1.75rem; font-weight: 800; font-stretch: 80%; letter-spacing: -0.01em;
}
.brand-mark { width: 1.9rem; height: 1.9rem; }
.header-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-link { color: #fff; text-decoration: none; font-weight: 500; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.lang-switch a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.875rem;
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.lang-switch a:hover { background: rgba(255, 255, 255, 0.18); }
.lang-switch a[aria-current] { background: var(--sun); color: var(--ink); }

/* ---------- Faixa de busca (hero) ---------- */
.band { position: relative; background: var(--cobalt); color: #fff; isolation: isolate; }
.record-clip { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.band-inner { position: relative; z-index: 1; }
.band--hero .band-inner { padding-block: 3.5rem 5.5rem; }
.band--compact .band-inner { padding-block: 1.5rem 2.75rem; }

.band h1 { font-weight: 800; font-stretch: 78%; letter-spacing: -0.02em; line-height: 1; text-wrap: balance; }
.band--hero h1 { font-size: clamp(2.8rem, 8vw, 5.75rem); max-width: 12ch; }
.band--compact h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: 1.25rem; max-width: 22ch; }
.lead { margin-top: 1.25rem; max-width: 34rem; font-size: 1.2rem; color: rgba(255, 255, 255, 0.88); }
.notice {
  margin-top: 1.25rem; display: inline-block; padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--sun); color: var(--ink); font-weight: 500;
}
.band--hero .search { margin-top: 2rem; max-width: 40rem; }
.band--compact .search { max-width: 36rem; }

/* O disco de vinil: gira enquanto uma música toca */
.record {
  position: absolute; z-index: 0; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, var(--cobalt) 0 2%, var(--sun) 2.6% 16%, transparent 16.6%),
    conic-gradient(rgba(255,255,255,0) 0 18%, rgba(255,255,255,0.16) 25%, rgba(255,255,255,0) 32% 68%, rgba(255,255,255,0.16) 75%, rgba(255,255,255,0) 82%),
    repeating-radial-gradient(circle, #16151f 0 3px, #24265f 3px 4px);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.06);
}
.band--hero .record { width: min(34rem, 80vw); right: -9rem; top: 50%; translate: 0 -50%; }
.band--compact .record { width: 15rem; right: 2rem; top: 50%; translate: 0 -50%; }
@media (max-width: 720px) {
  .band--hero .record { right: -14rem; opacity: 0.45; }
  .band--compact .record { right: -6rem; opacity: 0.45; }
}
@keyframes spin { to { rotate: 360deg; } }
body[data-player="playing"] .record { animation: spin 6s linear infinite; }

/* ---------- Campo de busca ---------- */
.search { position: relative; }
.search-field {
  display: flex; align-items: center; background: #fff; color: #16151f;
  border-radius: 999px; padding: 0.35rem; box-shadow: 0 10px 30px rgba(10, 10, 80, 0.35);
}
.search-field:focus-within { outline: 3px solid var(--sun); outline-offset: 3px; }
.search-field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: #16151f; outline: none;
  height: 3.6rem; padding: 0 1.4rem; font-size: clamp(1.1rem, 2.6vw, 1.45rem); font-weight: 500;
  -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder { color: #6b6a80; opacity: 1; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-btn {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border: 0; border-radius: 50%;
  background: var(--sun); color: #16151f; font-size: 1.4rem; transition: background 0.15s;
}
.search-btn:hover { background: #ffc94d; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.6rem); z-index: 30; margin: 0; padding: 0.4rem;
  list-style: none; background: #fff; color: #16151f; border-radius: 20px;
  box-shadow: 0 14px 40px rgba(10, 10, 60, 0.4); max-height: 20rem; overflow: auto;
}
.suggest[hidden] { display: none; }
.suggest li { padding: 0.6rem 1rem; border-radius: 12px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: #e9e9fc; }
.suggest b { font-weight: 700; }

/* ---------- Seções ---------- */
.section { margin-top: 3rem; }
.section h2 { font-size: 1.5rem; font-weight: 700; font-stretch: 85%; letter-spacing: -0.01em; margin-bottom: 1rem; }
.prose { max-width: 62ch; color: var(--mute); }
.prose p + p { margin-top: 1em; }
.prose h2 { color: var(--ink); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 500;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

/* ---------- Lista de músicas ---------- */
.results-count { margin-top: 2rem; color: var(--mute); }
.results-empty { margin-top: 2rem; font-size: 1.2rem; }
.tracks { list-style: none; padding: 0; margin-top: 0.75rem; }
.track {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 1rem;
  padding: 0.8rem 0.75rem; border-bottom: 1px solid var(--line); border-radius: var(--radius);
}
.track:hover { background: var(--surface); }
.track[data-state="loading"], .track[data-state="playing"], .track[data-state="paused"] {
  background: var(--tint); border-bottom-color: transparent;
}
.track[data-error] .track-title { opacity: 0.5; text-decoration: line-through; }

.track-cover {
  position: relative; width: 4rem; height: 4rem; border-radius: 10px; overflow: hidden;
  background: var(--cobalt); cursor: pointer;
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-glyph {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: rgba(22, 21, 31, 0.38); font-size: 1.5rem;
}
.track-glyph .icon-pause, .track-glyph .spin { display: none; }
.track[data-state="playing"] .track-glyph .icon-play,
.track[data-state="loading"] .track-glyph .icon-play { display: none; }
.track[data-state="playing"] .track-glyph .icon-pause { display: block; }
.track[data-state="loading"] .track-glyph .spin { display: block; }
.spin {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite;
}

.track-info { min-width: 0; }
.track-title {
  font-size: 1.05rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.track-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 1.1rem; margin-top: 0.15rem; font-size: 0.875rem; color: var(--mute); }
.track-time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.track-time:empty { display: none; }

.eq { display: none; align-items: flex-end; gap: 2px; height: 0.95rem; }
.track[data-state="playing"] .eq { display: inline-flex; }
.eq i { width: 3px; height: 100%; background: var(--accent); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.track-actions { display: flex; gap: 0.5rem; }
.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 0.55rem 1.15rem;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; text-align: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.btn-play { background: var(--cobalt); color: #fff; }
.btn-play:hover { background: var(--cobalt-deep); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:disabled { opacity: 0.6; cursor: default; }

.lyrics {
  grid-column: 1 / -1; margin-top: 0.6rem; padding: 1.1rem 1.25rem; text-align: center; font-size: 0.95rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  max-height: 26rem; overflow: auto; color: var(--ink);
}
.lyrics-text { line-height: 1.8; }
.lyrics-empty { color: var(--mute); }

@media (max-width: 640px) {
  .track { grid-template-columns: 4rem minmax(0, 1fr); }
  .track-actions { grid-column: 1 / -1; padding-left: 0; }
  .header-nav { gap: 0.75rem; }
}

/* ---------- Player fixo ---------- */
.player {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; align-items: center; gap: 0.5rem 1.5rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr);
  padding: 0.8rem max(1.25rem, env(safe-area-inset-left)) calc(0.8rem + env(safe-area-inset-bottom));
  background: var(--cobalt-deep); color: #fff; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}
.player[hidden] { display: none; }
.player-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); min-height: 1.2em; }
.player-controls { display: flex; align-items: center; gap: 0.35rem; }
.icon-btn {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: transparent; color: #fff; font-size: 1.4rem;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn--main { width: 3.3rem; height: 3.3rem; background: var(--sun); color: #16151f; font-size: 1.6rem; }
.icon-btn--main:hover { background: #ffc94d; }
.player .icon-pause { display: none; }
.player[data-state="playing"] .icon-play { display: none; }
.player[data-state="playing"] .icon-pause { display: block; }
.player-seek { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.player-seek input { flex: 1; min-width: 0; accent-color: var(--sun); }
.yt-host { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

@media (max-width: 720px) {
  .player { grid-template-columns: minmax(0, 1fr) auto; }
  .player-seek { grid-column: 1 / -1; }
}

/* ---------- Páginas de texto e contato ---------- */
.page { padding-block: 3rem 1rem; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; font-stretch: 80%; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 1rem; }
.lead-text { margin-bottom: 2rem; }
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; }
.form input[type="email"], .form textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 400;
}
.form textarea { resize: vertical; min-height: 9rem; }
.form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.form-status { color: var(--mute); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 4.5rem; background: #16151f; color: #f2f1fb; padding-block: 2.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { color: #f2f1fb; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-copy { font-size: 0.875rem; color: #a5a4bb; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
