/* ==============================================================
   MATRIZ DO TEMPO - Stylesheet principal
   Redesign 2026 - Long-form místico
============================================================== */

/* ---------- 1. Variáveis e Reset ---------- */
:root {
  --bg-deep: #0a0a14;
  --bg-surface: #16181E;
  --bg-card: rgba(26, 22, 46, 0.55);
  --bg-card-hover: rgba(42, 31, 74, 0.75);

  --violet-deep: #2a1f4a;
  --violet-primary: #4e3f76;
  --violet-glow: #8b6dd0;
  --violet-soft: rgba(139, 109, 208, 0.15);

  --gold-primary: #d4af37;
  --gold-light: #ffd700;
  --gold-soft: rgba(255, 215, 0, 0.12);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.55);

  --border-violet: rgba(139, 109, 208, 0.25);
  --border-gold: rgba(212, 175, 55, 0.35);

  --shadow-glow-violet: 0 0 40px rgba(139, 109, 208, 0.25);
  --shadow-glow-gold: 0 0 30px rgba(255, 215, 0, 0.35);

  --font-mystic: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --space-section: clamp(4rem, 9vw, 7rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Cosmic background - pequenas estrelas no body inteiro */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 35% 85%, rgba(212,175,55,0.4), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 75% 40%, rgba(139,109,208,0.5), transparent);
  background-size: 350px 350px;
  background-repeat: repeat;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-primary); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--gold-light); }

h1, h2, h3, h4 {
  font-family: var(--font-mystic);
  font-weight: 600;
  margin: 0 0 .6em;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1rem; color: var(--text-secondary); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* ---------- 2. Preloader ---------- */
#preload {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#preload.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preload-inner {
  text-align: center;
}
.preload-inner img {
  width: 80px;
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 0 18px var(--gold-light));
  animation: pulse 2.4s ease-in-out infinite;
}
.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

/* ---------- 3. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: 5rem 1.5rem 7rem;
}

#universe {
  position: absolute;
  inset: 0;
  z-index: -1;
}
#universe canvas { display: block; width: 100% !important; height: 100% !important; }

/* Transição suave apenas na borda inferior - universo permanece vibrante */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent 0%, var(--bg-deep) 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 480px;
  max-width: 85vw;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.5));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: .6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(212, 175, 55, 0.35), 0 0 60px rgba(139, 109, 208, 0.25);
}

.hero .tagline {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 2.1vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  letter-spacing: 0.04em;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---------- 4. Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 200px;
  padding: 0.95rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  color: #1a1208;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 215, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.4);
  color: #000;
}

.btn-outline {
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold-light);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-large {
  min-width: 280px;
  padding: 1.2rem 2.4rem;
  font-size: 1rem;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  animation: bounce 2.6s ease-in-out infinite;
  z-index: 1;
}
.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 32px;
  margin: .6rem auto 0;
  background: linear-gradient(180deg, var(--gold-light), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: .6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---------- 5. Seções ---------- */
.section {
  padding: var(--space-section) 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  padding: .35rem 1rem;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: var(--gold-soft);
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff, var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-family: var(--font-mystic);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  margin-top: .5rem;
}

/* Decoração: ornamento entre títulos */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gold-primary);
  font-size: 1.2rem;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 0 0 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

/* ---------- 6. Seção "Sobre" ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
  max-width: 920px;
  margin: 0 auto;
}

.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border-violet);
  border-radius: 18px;
  padding: 2.2rem 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.about-block:hover {
  transform: translateY(-4px);
  border-color: var(--violet-glow);
  box-shadow: var(--shadow-glow-violet);
}

.about-block h3 {
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-bottom: .8rem;
  font-weight: 500;
}

.about-block p {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* ---------- 7. Grid "O que você recebe" (10 itens) ---------- */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 980px;
  margin: 0 auto;
}

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

.item-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-violet);
  border-radius: 18px;
  padding: 2.2rem 1.6rem 1.8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .4s cubic-bezier(.4,0,.2,1), border-color .4s, box-shadow .4s;
  overflow: hidden;
}
.item-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--violet-soft), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.item-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow-gold);
}
.item-card:hover::before { opacity: 1; }

.item-number {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-family: var(--font-mystic);
  font-size: 3rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-primary);
  opacity: 0.55;
  line-height: 1;
}

.item-symbol {
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
  line-height: 1;
}

.item-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: .8rem;
  color: var(--text-primary);
  padding-right: 2.5rem;
  letter-spacing: 0.02em;
}

.item-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  color: var(--text-secondary);
}

/* ---------- 8. Como Funciona ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.step {
  text-align: center;
  padding: 1rem;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-primary), var(--violet-deep));
  border: 2px solid var(--gold-primary);
  font-family: var(--font-mystic);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

.step h3 {
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: .6rem;
  font-weight: 500;
}

.step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- 9. CTA Final ---------- */
.cta-final {
  text-align: center;
  background: linear-gradient(135deg, rgba(78, 63, 118, 0.35), rgba(42, 31, 74, 0.55));
  border: 1px solid var(--border-gold);
  border-radius: 28px;
  padding: clamp(3rem, 6vw, 5rem) 2rem;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.cta-final::before {
  content: '✦';
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-primary);
  font-size: 1.2rem;
  opacity: 0.6;
}

.cta-final h2 {
  margin-bottom: 1rem;
}

.cta-final p {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
}

/* ---------- 10. Footer ---------- */
.site-footer {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-violet);
  background: rgba(10, 10, 20, 0.6);
  position: relative;
  z-index: 1;
}

.social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-violet);
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: all .3s ease;
}
.social a:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: var(--gold-soft);
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color .3s ease;
  padding: .2rem 0;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-primary);
}

.footer-links-sep {
  color: var(--text-muted);
  user-select: none;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 .6rem;
}

.footer-heart {
  display: inline-block;
  filter: drop-shadow(0 0 6px rgba(255, 80, 120, 0.55));
  animation: heart-pulse 2s ease-in-out infinite;
}

@keyframes heart-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.footer-legal {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: .25rem 0 0;
  line-height: 1.55;
}

/* ---------- 11. Animações de entrada (scroll) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: se JS falhar, garantir visibilidade após 800ms */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero-logo { animation: none; }
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 12. Responsivo ---------- */
@media (max-width: 768px) {
  .hero { padding-top: 3rem; padding-bottom: 5rem; }
  .hero-logo { width: 340px; }
  .btn { min-width: 0; width: 100%; }
  .cta-group { flex-direction: column; gap: .8rem; }
  .scroll-hint { display: none; }
  .section { padding: 4rem 0; }
  .about-block { padding: 1.8rem 1.4rem; }
  .item-card { padding: 1.8rem 1.4rem; }
  .item-number { font-size: 2.4rem; }
}

@media (max-width: 480px) {
  .hero h1 { letter-spacing: 0.08em; }
  .section-header { margin-bottom: 2.5rem; }
}

/* ---------- 13. Safari/iOS specific fixes ---------- */
@supports (-webkit-touch-callout: none) {
  .hero { min-height: -webkit-fill-available; }
}

/* No-JS fallback - torna conteúdo visível mesmo sem JS */
.no-js .reveal { opacity: 1; transform: none; }
.no-js #preload { display: none; }
