/* ================================================================
   BASE.CSS — Variáveis, Reset, Tipografia, Ambientes, Eyebrow
   AVRA Prime · avraprime.com.br
   ================================================================ */

/* ── Variáveis CSS ── */
:root {
  --space: #0b1220;
  --space-2: #0e1626;
  --midnight: #121c2d;
  --slate: #1b2638;
  --slate-2: #233048;
  --slate-3: #2a3850;

  --soft-white: #ffffff;
  --cool-gray: #d0d8e0;
  --cool-gray-2: #a8b4c4;
  --cool-gray-3: #6a7a8e;

  --cyan: #00d4ff;
  --aurora: #3b82f6;
  --champagne: #c8a96a;
  --champagne-light: #d4bc85;
  --champagne-dark: #a88b4f;

  --emerald: #00c48c;
  --red: #e5484d;

  --serif: "Cormorant Garamond", serif;
  --sans: "Inter", -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ── Body ── */
body {
  font-family: var(--sans);
  background: var(--space);
  color: var(--soft-white);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* ── Tipografia base ── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

section[id],
footer[id] {
  scroll-margin-top: 96px;
}

/* ── Ambientes decorativos ── */
.ambient {
  position: relative;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.ambient-cyan::after {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 212, 255, 0.03) 0%, transparent 60%);
}

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--champagne);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}

.eyebrow::before {
  content: "";
  order: -2;
  width: 56px;
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(90deg, currentColor, transparent);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, currentColor 0%, currentColor 35%, color-mix(in srgb, currentColor 18%, transparent) 100%);
  background-size: 20px 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -28px 0, 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  animation: ebDraw 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
             ebSpark 3.6s 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.eyebrow::after {
  content: "";
  order: -1;
  width: 5px;
  height: 5px;
  margin-left: -6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  animation: ebDot 600ms 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
             ebHalo 3.6s 1.4s ease-out infinite;
}

@keyframes ebDraw {
  to { transform: scaleX(1); }
}

@keyframes ebDot {
  to { opacity: 1; }
}

@keyframes ebSpark {
  0%   { background-position: -28px 0, 0 0; }
  45%  { background-position: 62px 0, 0 0; }
  100% { background-position: 62px 0, 0 0; }
}

@keyframes ebHalo {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  60%  { box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); }
}

.reveal .eyebrow::before,
.reveal .eyebrow::after {
  animation-play-state: paused;
}

.reveal.visible .eyebrow::before,
.reveal.visible .eyebrow::after {
  animation-play-state: running;
}

/* ── Texto auxiliar ── */
.fine {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--cool-gray-2);
  font-style: italic;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}