/* ---------------------------------------------------------------------------
   Design system — tokens, reset e primitivas compartilhadas
--------------------------------------------------------------------------- */

:root {
  --bg: #0a0a0c;
  --bg-2: #0e0e12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text-1: #f2f2f5;
  --text-2: #a6a6b0;
  --text-3: #64646e;
  --accent: #d8bd94;
  --accent-2: #b89968;
  --accent-dim: rgba(216, 189, 148, 0.13);
  --danger: #e5484d;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

/* Brilho ambiente + granulação sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(1100px 700px at 50% -12%, rgba(216, 189, 148, 0.06), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(216, 189, 148, 0.28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --- Tipografia utilitária ------------------------------------------------ */

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.hairline {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2), transparent);
}

/* --- Reveal (entrada suave com blur) -------------------------------------- */

.rv {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(7px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    filter 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.rv.in { opacity: 1; transform: none; filter: none; }

/* --- Botões ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s, opacity 0.25s, box-shadow 0.25s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }

.btn--primary { background: var(--text-1); color: #0b0b0d; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.btn--primary:active { transform: translateY(0) scale(0.99); }

.btn--ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn--ghost:hover { color: var(--text-1); border-color: var(--border-2); }

.btn .arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* Spinner discreto para estados de envio */
.btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(11, 11, 13, 0.25);
  border-top-color: #0b0b0d;
  animation: spin 0.7s linear infinite;
}
.btn--ghost.is-loading::after { border-color: rgba(255, 255, 255, 0.2); border-top-color: var(--text-1); }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Campos ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 8px; text-align: left; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

.field:focus-within label { color: var(--accent); }

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-1);
  caret-color: var(--accent);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-out);
  outline: none;
  appearance: none;
}

.input::placeholder { color: var(--text-3); }

.input:hover { border-color: var(--border-2); }

.input:focus {
  border-color: rgba(216, 189, 148, 0.55);
  box-shadow: 0 0 0 4px var(--accent-dim);
  background: var(--surface-2);
  transform: translateY(-1px);
}

/* --- Kbd chip --------------------------------------------------------------- */

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface);
}

/* --- Carrossel --------------------------------------------------------------- */

.car {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  user-select: none;
}

.car__track {
  display: flex;
  transition: transform 0.65s var(--ease-out);
  touch-action: pan-y;
}

.car__slide { flex: 0 0 100%; }

.car__slide img {
  width: 100%;
  height: min(46vh, 420px);
  object-fit: cover;
  pointer-events: none;
}

.car__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-1);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}

.car:hover .car__btn, .car__btn:focus-visible { opacity: 1; }
.car__btn:hover { background: rgba(20, 20, 24, 0.8); }
.car__btn:disabled { opacity: 0 !important; pointer-events: none; }
.car__btn--prev { left: 14px; }
.car__btn--next { right: 14px; }

.car__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.car__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s, transform 0.3s var(--ease-out);
}

.car__dot.is-on { background: #fff; transform: scale(1.2); }

@media (hover: none) {
  .car__btn { opacity: 1; }
}

/* --- Player de áudio --------------------------------------------------------- */

.pl {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.pl__btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.25s, background 0.25s, transform 0.2s var(--ease-out);
}

.pl__btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.pl__btn:active { transform: scale(0.94); }
.pl__btn svg { width: 15px; height: 15px; }

.pl__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }

.pl__title {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.pl__track {
  flex: 1;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.pl__rail { width: 100%; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }

.pl__fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; }

.pl__time {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Vídeo --------------------------------------------------------------------- */

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-file {
  width: 100%;
  max-height: 60vh;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-2);
}

/* --- Página silenciosa (404 / erro) ---------------------------------------------- */

.quiet {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.quiet__text {
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 300;
  color: var(--text-2);
  letter-spacing: 0.01em;
  text-align: center;
}

/* --- Acessibilidade ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rv { opacity: 1; transform: none; filter: none; }
}
