/* ============================================================
   UV Audio System — Componentes Reutilizáveis
   Arquivo: home/css/components.css
   ============================================================ */

/* ---------- VARIÁVEIS GLOBAIS ---------- */
:root {
  /* Cores sólidas */
  --branco: #FFFFFF;
  --preto: #292929;
  --laranja: #F58435;
  --roxo: #9e25ff;

  /* Cores RGBA */
  --branco-rgba: rgba(255, 255, 255, 1);
  --preto-rgba: rgba(41, 41, 41, 1);
  --laranja-rgba: rgba(245, 132, 53, 1);
  --roxo-rgba: rgba(158, 37, 255, 1);

  /* Transparências úteis */
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-light: rgba(255, 255, 255, 0.4);
  --glass-shadow: rgba(0, 0, 0, 0.5);

  /* Tipografia */
  --font-titles: 'Orbitron', sans-serif;
  --font-body: 'Orbit', sans-serif;

  /* Espaçamento */
  --radius: 16px;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Box shadow glassmorphism */

  --glassmorphism-shadow: inset 1px 1px 1px 0px rgba(255, 255, 255, 0.25),
    inset -1px -1px 2px 0px rgba(0, 0, 0, 0.6),
    0px 20px 40px var(--glass-shadow);

}

/* ---------- RESET BÁSICO ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--preto);
  color: var(--branco);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titles);
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: var(--uv-fs-3xl); }
h2 { font-size: var(--uv-fs-2xl); }
h3 { font-size: var(--uv-fs-xl); }
h4 { font-size: var(--uv-fs-h4); }

p, a, span, li, label, input, textarea, button, .btn-neon {
  font-family: var(--font-body);
}

p {
  font-size: var(--uv-fs-md);
  margin: 0 0 1em;
}

a {
  color: var(--branco);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

a:hover {
  color: var(--laranja);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-size: var(--uv-fs-md);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- GLASSMORPHISM ---------- */
.glassbox,
.dark-glassbox,
.light-glassbox {
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-light);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(7px) saturate(120%);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  box-shadow:
    inset 1px 1px 1px 0px rgba(255, 255, 255, 0.25),
    inset -1px -1px 2px 0px rgba(0, 0, 0, 0.6),
    0px 20px 40px var(--glass-shadow);
  transition: all var(--transition-smooth);
}

/* Padrão translúcido */
.glassbox {
  backdrop-filter: blur(5px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(5px) saturate(120%) !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(10, 10, 12, 0.45) 100%
  );
}

/* Fundo mais escuro/preto */
.dark-glassbox {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(10, 10, 12, 0.85) 100%
  );
}

/* Fundo mais branco/claro */
.light-glassbox {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

/* Interação opcional */
.glassbox.interactive-glass:hover,
.dark-glassbox.interactive-glass:hover,
.light-glassbox.interactive-glass:hover {
  box-shadow:
    inset 1px 1px 1px 0px rgba(255, 255, 255, 0.35),
    inset -1px -1px 2px 0px rgba(0, 0, 0, 0.5),
    0px 25px 50px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.glassbox.interactive-glass:hover *,
.dark-glassbox.interactive-glass:hover *,
.light-glassbox.interactive-glass:hover * {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

/* ---------- METAL ---------- */
.metalbox,
.metalbox-natural {
  position: relative;
  border-radius: var(--radius);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.95),
    0 5px 15px rgba(0, 0, 0, 0.8);
}

.metalbox::before,
.metalbox-natural::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 17px;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(0, 0, 0, 0.8) 70%,
    rgba(255, 255, 255, 0.1) 100%
  );
  filter: blur(0.1px);
}

.metalbox::after,
.metalbox-natural::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

/* Metal cônico original */
.metalbox {
  background: conic-gradient(
    from 180deg at 50% 50%,
    #0a0a0b 0deg,
    #17181a 45deg,
    #2a2c30 90deg,
    #17181a 135deg,
    #0a0a0b 180deg,
    #17181a 225deg,
    #2a2c30 270deg,
    #0a0a0b 360deg
  );
}

/* Metal mais natural */
.metalbox-natural {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(
      160deg,
      #1a1a1c 0%,
      #2d2f33 25%,
      #1f2023 50%,
      #2a2c30 75%,
      #151517 100%
    );
}

/* ---------- PARAFUSOS ---------- */
.screw {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #555, #1a1a1a);
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, 0.3),
    inset -1px -1px 2px rgba(0, 0, 0, 0.9),
    1px 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.screw::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 1px;
  background: rgba(10, 10, 10, 0.4);
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 1px;
  filter:contrast(1);
}

.screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 1px;
  background: rgba(10, 10, 10, 0.4);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  filter:contrast(1);
}

.screw-tl { top: 10px; left: 10px; }
.screw-tr { top: 10px; right: 10px; }
.screw-bl { bottom: 10px; left: 10px; }
.screw-br { bottom: 10px; right: 10px; }

/* ---------- BOTÃO NEON ---------- */
.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(10px, 1.5vw, 14px) clamp(24px, 3vw, 40px);
  background-color: var(--preto);
  color: var(--branco);
  border: 1px solid var(--branco);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--uv-fs-md);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-neon:hover,
.btn-neon:focus {
  background-color: var(--branco);
  color: var(--preto);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.6),
    0 0 25px rgba(255, 255, 255, 0.4),
    0 0 45px rgba(255, 255, 255, 0.2);
  animation: neon-flicker 0.4s ease-out forwards, btn-shake 0.15s ease-in-out;
}

.btn-neon:active {
  transform: scale(0.98);
}

/* ---------- TÍTULO BRILHANTE ---------- */
.glow-title {
  font-family: var(--font-titles);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.glow-title-orange {
  color: var(--laranja);
  text-shadow:
    0 0 5px rgba(245, 132, 53, 0.6),
    0 0 15px rgba(245, 132, 53, 0.4),
    0 0 30px rgba(245, 132, 53, 0.2);
}

.glow-title-white {
  color: var(--branco);
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.6),
    0 0 15px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.2);
}

.glow-title-purple {
  color: var(--roxo);
  text-shadow:
    0 0 5px rgba(158, 37, 255, 0.6),
    0 0 15px rgba(158, 37, 255, 0.4),
    0 0 30px rgba(158, 37, 255, 0.2);
}

/* ---------- KNOB DECORATIVO ---------- */
.knob-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.knob-bg-scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: repeating-conic-gradient(
    rgba(255, 255, 255, 0.9) 0deg,
    rgba(255, 255, 255, 0.9) 1deg,
    transparent 1deg,
    transparent 10deg
  );
  -webkit-mask: radial-gradient(circle, transparent 58%, black 60%, black 95%, transparent 96%);
  mask: radial-gradient(circle, transparent 58%, black 60%, black 95%, transparent 96%);
  pointer-events: none;
}

.knob-rotate-hook {
  position: relative;
  aspect-ratio: 1 / 1;
  height: calc(100% - 24px);
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.knob-button {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, #333, #000000);
  border-radius: 50%;
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.8),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.knob-marker {
  width: 4px;
  height: 16px;
  background: var(--branco);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* ---------- UTILITÁRIOS ---------- */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
}

.full-wh {
  width: 100%;
  height: 100%;
}

.text-center { text-align: center; }

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