/* --- Reset e variáveis --- */
:root {
  --bg: #0d0f12;
  --bg-card: #16181d;
  --bg-card-hover: #1c1f26;
  --text: #e8eaed;
  --text-muted: #8b909a;
  --accent: #00c9a7;
  --accent-dim: rgba(0, 201, 167, 0.15);
  --border: #2a2d35;
  --radius: 12px;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  position: relative;
}

/* --- Vídeo de fundo --- */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.video-bg__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.video-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 18, 0.75);
  z-index: 1;
}

/* Conteúdo e loader acima do vídeo */
.noise,
.page-content,
.loader {
  position: relative;
  z-index: 2;
}

/* --- Loader / animação de entrada --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__inner {
  text-align: center;
}
.loader__logo {
  display: block;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--text);
  animation: loaderLogoIn 0.6s ease both;
}
.loader__bar {
  width: 120px;
  height: 3px;
  margin: 1.5rem auto 0;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  animation: loaderBarIn 0.4s ease 0.3s both;
}
.loader__bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  animation: loaderBarFill 1.2s ease 0.5s both;
}
@keyframes loaderLogoIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes loaderBarIn {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}
@keyframes loaderBarFill {
  from { width: 0; }
  to { width: 100%; }
}

/* Conteúdo inicialmente escondido, entra após o loader */
.page-content .header,
.page-content .main,
.page-content .footer,
.page-content .site-card {
  opacity: 0;
}
body.is-loaded .page-content .header {
  animation: contentFadeIn 0.5s ease 0.25s both;
}
body.is-loaded .page-content .main {
  animation: contentFadeIn 0.5s ease 0.4s both;
}
body.is-loaded .page-content .footer {
  animation: contentFadeIn 0.5s ease 0.55s both;
}
body.is-loaded .page-content .site-card:nth-child(1) {
  animation: cardSlideIn 0.5s ease 0.45s both;
}
body.is-loaded .page-content .site-card:nth-child(2) {
  animation: cardSlideIn 0.5s ease 0.6s both;
}
@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Camada de ruído sutil */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Header --- */
.header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}
.logo {
  display: inline-block;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.logo:hover { color: var(--accent); }
.tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --- Main --- */
.main {
  padding: 2rem 1.5rem 4rem;
  max-width: 960px;
  margin: 0 auto;
}
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

/* --- Cards --- */
.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.site-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.site-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.site-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg);
  overflow: hidden;
}
.site-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.site-card:hover .site-card__thumb img {
  transform: scale(1.05);
}
.site-card__thumb--curriculo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a1d24 0%, #0d0f12 100%);
}
.site-card__icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
  opacity: 0.8;
}
.site-card__icon svg {
  width: 100%;
  height: 100%;
}
.site-card__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
}
.site-card__content {
  padding: 1.25rem 1.25rem 1.5rem;
}
.site-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.site-card__url {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.site-card__desc {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.site-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s;
}
.site-card:hover .site-card__cta { opacity: 1; }

/* --- Footer --- */
.footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Responsivo --- */
@media (max-width: 640px) {
  .header { padding-top: 1.5rem; }
  .main { padding: 1.5rem 1rem 3rem; }
  .sites-grid { grid-template-columns: 1fr; }
}
