/* ============================================================
   DREAMWALKER — Fonte única de verdade
============================================================ */

/* ---------- FONTES ---------- */
@font-face {
  font-family: 'Amatic SC';
  src: url('../fonts/AmaticSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  src: url('../fonts/RobotoMono-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  src: url('../fonts/RobotoMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Mono';
  src: url('../fonts/RobotoMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- VARIÁVEIS ---------- */
:root {
  /* Cores */
  --dw-black:        #000000;
  --dw-blue-deep:    #0603B4;
  --dw-blue:         #3A36FF;
  --dw-blue-bright:  #6B68FF;
  --dw-blue-glow:    #8B88FF;
  --dw-white:        #FFFFFF;
  --dw-gray:         #9CA3AF;
  --dw-gray-light:   #D3D3D3;
  --dw-red:          #BB0A1E;
  --dw-section-bg:   rgba(0, 0, 0, 0.5);
  /* Fontes */
  --font-orbitron: 'Orbitron', sans-serif;
  --font-amatic:   'Amatic SC', cursive;
  --font-mono:     'Roboto Mono', monospace;
}

/* ---------- BASE ---------- */
html {
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  #inicio,
  #projeto,
  #contos,
  #autor,
  #comprar,
  #contacto {
    scroll-margin-top: 115px;   
  }
}

body {
  background: var(--dw-black);
  color: var(--dw-white);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image: url('../img/background.png');   
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Escurecimento para o texto por cima ficar legível */
  filter: brightness(0.55) saturate(1.1);
}


/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dw-black); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--dw-blue), var(--dw-blue-deep));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--dw-blue-bright), var(--dw-blue));
}

/* ============================================================
   UTILITÁRIOS DE TEMA (para usar no HTML)
============================================================ */
.text-gray-dw    { color: var(--dw-gray); }
.text-light-dw   { color: var(--dw-gray-light); }
.text-bright-dw  { color: var(--dw-blue-bright); }

.border-deep     { border-color: rgba(6, 3, 180, 0.4); }
.border-deep-30  { border-color: rgba(6, 3, 180, 0.3); }

.bg-glass {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section-bg {
  background: var(--dw-section-bg);
  backdrop-filter: blur(4px);              
  -webkit-backdrop-filter: blur(4px);
}


/* ============================================================
   MENU MOBILE — hambúrguer
============================================================ */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
@media (max-width: 767px) {
  .menu-toggle { display: flex; }
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dw-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   CUBO 3D
============================================================ */

.cube-wrapper {
  perspective: 400px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cube-container {
  box-sizing: border-box;
  transform-style: preserve-3d;
  position: relative;
  width: 50px;
  height: 50px;
  animation: cube-spin 5s infinite linear;
}

.face {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 1px solid var(--dw-blue-deep);          
  background: transparent;
  background-image: url('../img/pngegg.png');      
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 10px var(--dw-blue-deep);      
  filter: drop-shadow(0 0 8px var(--dw-blue-deep));
}

/* Posicionamento 3D — 50/2 = 25px de translateZ */
.face.front  { transform: translateZ(25px); }
.face.back   { transform: rotateY(180deg) translateZ(25px); }
.face.right  { transform: rotateY(90deg)  translateZ(25px); }
.face.left   { transform: rotateY(-90deg) translateZ(25px); }
.face.top    { transform: rotateX(90deg)  translateZ(25px); }
.face.bottom { transform: rotateX(-90deg) translateZ(25px); }

@keyframes cube-spin {
  from { transform: rotateX(0deg)   rotateY(0deg);   }
  to   { transform: rotateX(360deg) rotateY(360deg); }
}


/* ============================================================
    ANIMAÇÕES (data-anime)
   ============================================================ */
[data-anime] {
    opacity: 0;
    transition: 1s;
}

[data-anime="down"] { transform: translate3d(0, -100%, 0); }
[data-anime="up"]   { transform: translate3d(0, 100%, 0); }
[data-anime="left"] { transform: translate3d(-100%, 0, 0); }
[data-anime="right"]{ transform: translate3d(50%, 0, 0); }
[data-anime="fade"] { transition: 2s; }

[data-anime].animate {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
}

.navbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 20px;                          
  font-family: var(--font-orbitron);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--dw-white);
  text-decoration: none;
  transition: color 0.25s ease;
}

.navbar-logo:hover { color: var(--dw-blue-deep); }

.nav-link {
  position: relative;
  color: var(--dw-gray);
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--dw-blue-deep), var(--dw-blue-deep));
  transition: width 0.3s ease;
}

.nav-link:hover { color: var(--dw-blue-deep); }
.nav-link:hover::after { width: 100%; }

#mobile-menu li {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--dw-gray-light);
  transition: color 0.25s ease;
  text-align: center;
  padding: 14px 24px;
  border-radius: 4px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.mobile-link:hover,
.mobile-link:active {
  color: var(--dw-blue-bright);
  background: rgba(6, 3, 180, 0.15);  
}

/* Logo */
.navbar-logo img {
  height: 90px;
  width: auto;
  display: block;
  border-radius: 50%;
  border: 2px solid rgba(6, 3, 180, 0.3);
  box-shadow: 
    0 0 8px  rgba(6, 3, 180, 0.4),
    0 0 16px rgba(6, 3, 180, 0.3),
    inset 0 0 12px rgba(6, 3, 180, 0.2),
    0 6px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.navbar-logo img:hover {
  box-shadow: 
    0 0 12px rgba(58, 54, 255, 0.6),       /* --dw-blue mais vivo no hover */
    0 0 24px rgba(58, 54, 255, 0.4),
    inset 0 0 16px rgba(107, 104, 255, 0.3), /* --dw-blue-bright */
    0 10px 20px rgba(0, 0, 0, 0.6);
  transform: scale(1.05);
}

/* Botão "Comprar" no header (versão compacta do btn-primary) */
.nav-cta {
  padding: 10px 20px;
  font-size: 12px;
}

.nav-cta:hover {
  padding: 10px 20px;
  font-size: 12px;  
  /* O efeito do hover será herdado do btn-primary */
}

/* Header esconde ao descer / mostra ao subir */
.navbar {
  transition: transform 0.35s ease;
}
.navbar.is-hidden {
  transform: translateY(-100%);
}

/* Header esconde/mostra apenas em mobile */
@media (min-width: 768px) {
  .navbar,
  .navbar.is-hidden {
    transform: none !important;
  }
}

/* ============================================================
   TIPOGRAFIA
============================================================ */
.hero-title {
  font-family: var(--font-orbitron);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow:
    0 0 8px  rgba(6, 3, 180, 0.4),
    0 0 16px rgba(6, 3, 180, 0.3);
}

.hero-slogan {
  font-family: var(--font-amatic);
  font-weight: 700;
  color: var(--dw-red);
}

.section-title {
  font-family: var(--font-orbitron);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.cta-title {
  font-family: var(--font-amatic);
  font-weight: 700;
  color: var(--dw-blue-bright);
  text-shadow:
    0 0 20px rgba(107, 104, 255, 0.5),
    0 0 40px rgba(58, 54, 255, 0.3);
}

.body-text {
  color: var(--dw-gray);
  line-height: 1.8;
  text-align: left;             
}

@media (min-width: 768px) {
  .body-text {
    text-align: justify;
    /* hyphens: auto;
    -webkit-hyphens: auto; */
  }
}

.span-text {
  font-family: var(--font-orbitron);
  font-weight: 500;
  color: var(--dw-white);
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow:
    0 0 4px  rgba(255, 255, 255, 0.6),
    0 0 8px  rgba(139, 136, 255, 0.9),
    0 0 16px rgba(89, 87, 240, 0.8),
    0 0 28px rgba(58, 54, 255, 0.6),
    0 0 48px rgba(28, 25, 231, 0.4);
}

/* ============================================================
   BOTÃO PRIMÁRIO
============================================================ */
.btn-primary {
  position: relative;
  display: inline-block;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--dw-blue-deep);
  background-image: url('../img/star_button.webp');
  background-position: center;
  background-repeat: no-repeat;
  color: var(--dw-white);
  border: 1px solid rgba(107, 104, 255, 0.4);
  font-family: var(--font-orbitron);
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 136, 255, 0.4), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(58, 54, 255, 0.7), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
  filter: blur(15px);
}

.btn-primary:hover {
  border-color: var(--dw-blue-bright);
  transform: translateY(-2px);
  box-shadow:
    0 0 20px rgba(58, 54, 255, 0.6),
    0 0 40px rgba(58, 54, 255, 0.3),
    0 0 80px rgba(58, 54, 255, 0.15);
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover::after  { opacity: 1; }
.btn-primary:active        { transform: translateY(0); 
}


/* ============================================================
   CARD DE DOAÇÃO
============================================================ */
.donation-card {
  max-width: 560px;
  margin: 48px auto 0;
  padding: 40px 32px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(107, 104, 255, 0.35);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 20px rgba(58, 54, 255, 0.15),
    inset 0 0 30px rgba(6, 3, 180, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.donation-card:hover {
  border-color: rgba(107, 104, 255, 0.6);
  box-shadow:
    0 0 30px rgba(58, 54, 255, 0.25),
    inset 0 0 40px rgba(6, 3, 180, 0.12);
}

.donation-title {
  font-family: var(--font-orbitron);
  font-weight: 500;
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: 0.05em;
  color: var(--dw-white);
  margin-bottom: 16px;
  text-shadow:
    0 0 8px  rgba(139, 136, 255, 0.8),
    0 0 20px rgba(58, 54, 255, 0.5);
}

.donation-text {
  color: var(--dw-gray);
  font-size: 14px;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 28px;
}

.donation-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-orbitron);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--dw-white);
  background: #0070BA;                      /* azul PayPal */
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.donation-btn:hover {
  background: #005ea6;
  transform: translateY(-2px);
  box-shadow:
    0 0 20px rgba(0, 112, 186, 0.6),
    0 0 40px rgba(0, 112, 186, 0.3);
}

.donation-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.donation-secure {
  margin-top: 18px;
  font-size: 12px;
  color: var(--dw-gray);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.donation-secure .lock {
  font-size: 14px;
  filter: grayscale(0.3);
}

/* Mobile */
@media (max-width: 480px) {
  .donation-card {
    padding: 32px 20px;
    margin-top: 32px;
  }
  .donation-btn {
    padding: 13px 24px;
    font-size: 13px;
  }
}


/* ============================================================
   CARTA AO LEITOR — secção "O Autor"
============================================================ */
.letter {
  font-family: var(--font-mono);
  color: var(--dw-gray);
  font-size: 15px;
  line-height: 2;
  text-align: left;                   /* carta = alinhada à esquerda */
  position: relative;
  padding-left: 32px;
}

/* Barra vertical decorativa à esquerda — sugere uma carta/página */
.letter::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(107, 104, 255, 0.4) 20%,
    rgba(107, 104, 255, 0.4) 80%,
    transparent
  );
}

.letter p {
  margin-bottom: 20px;
}

/* Saudação — destaque com o azul do tema */
.letter-greeting {
  font-family: var(--font-orbitron);
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0.03em;
  color: var(--dw-white);
  margin-bottom: 32px;
  text-shadow:
    0 0 8px  rgba(139, 136, 255, 0.5),
    0 0 20px rgba(58, 54, 255, 0.3);
}

/* Última frase antes da assinatura — ganha peso */
.letter p:last-of-type {
  font-family: var(--font-orbitron);
  font-weight: 500;
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: 0.03em;
  color: var(--dw-white);
  margin-top: 32px;
  margin-bottom: 0;
  text-shadow:
    0 0 6px  rgba(139, 136, 255, 0.8),
    0 0 16px rgba(89, 87, 240, 0.5),
    0 0 30px rgba(58, 54, 255, 0.3);
}

/* Assinatura à direita */
.letter-signature {
  margin-top: 48px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
}

.letter-signature-mark {
  color: var(--dw-gray);
  font-size: 20px;
}

.letter-signature-name {
  font-family: var(--font-amatic);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 0.05em;
  color: var(--dw-red);
  line-height: 1;
}

/* Mobile */
@media (max-width: 640px) {
  .letter {
    font-size: 14px;
    line-height: 1.9;
    padding-left: 20px;
  }
  .letter-signature-name {
    font-size: 30px;
  }
  .letter-signature {
    margin-top: 32px;
  }
}


/* ============================================================
   CARROSSEL DE CONTOS
============================================================ */
.carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 0 4px;   /* espaço para a borda respirar */
}

/* ---------- Card do conto ---------- */
.conto-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px;
  background: rgba(6, 3, 180, 0.08);
  border: 1px solid rgba(107, 104, 255, 0.25);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.conto-card:hover {
  border-color: rgba(107, 104, 255, 0.5);
  box-shadow:
    0 0 20px rgba(58, 54, 255, 0.2),
    inset 0 0 30px rgba(6, 3, 180, 0.08);
}

/* Desktop: capa + info lado a lado */
@media (min-width: 768px) {
  .conto-card {
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 32px;
    align-items: center;
  }
}

.conto-cover {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(107, 104, 255, 0.3);
  box-shadow:
    0 0 20px rgba(58, 54, 255, 0.25),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

.conto-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.conto-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.conto-number {
  font-family: var(--font-orbitron);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--dw-blue-bright);
  margin-bottom: 8px;
  text-shadow:
    0 0 8px rgba(139, 136, 255, 0.6),
    0 0 16px rgba(58, 54, 255, 0.3);
}

.conto-title {
  font-family: var(--font-orbitron);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.04em;
  color: var(--dw-white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.conto-synopsis {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--dw-gray);
  margin-bottom: 24px;
  max-width: 520px;
}

.conto-btn {
  align-self: flex-start;
  font-size: 12px;
  padding: 14px 28px;
}

/* Em mobile, o botão estica */
@media (max-width: 640px) {
  .conto-btn {
    align-self: stretch;
    text-align: center;
  }
}

/* ---------- Controlos do carrossel ---------- */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.carousel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 16px;
  color: var(--dw-gray);
  background: rgba(6, 3, 180, 0.1);
  border: 1px solid rgba(107, 104, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-arrow:hover {
  color: var(--dw-white);
  border-color: var(--dw-blue-bright);
  background: rgba(58, 54, 255, 0.2);
  box-shadow: 0 0 16px rgba(58, 54, 255, 0.4);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

.carousel-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-orbitron);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--dw-gray);
}

.carousel-input {
  width: 44px;
  padding: 6px 8px;
  font-family: var(--font-orbitron);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  color: var(--dw-white);
  background: rgba(6, 3, 180, 0.1);
  border: 1px solid rgba(107, 104, 255, 0.3);
  border-radius: 4px;
  outline: none;
  transition: all 0.25s ease;
  -moz-appearance: textfield;
}

/* Esconde as setinhas default do number em Chrome/Safari */
.carousel-input::-webkit-outer-spin-button,
.carousel-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.carousel-input:focus {
  border-color: var(--dw-blue-bright);
  box-shadow: 0 0 10px rgba(107, 104, 255, 0.4);
}

.carousel-total {
  color: var(--dw-gray);
  opacity: 0.7;
}


/* ============================================================
   CARD DOS CONTOS
============================================================ */
.card {
  background: rgba(6, 3, 180, 0.08);
  border: 1px solid rgba(6, 3, 180, 0.4);
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--dw-blue-bright);
  box-shadow: 0 0 30px rgba(58, 54, 255, 0.3);
  transform: translateY(-4px);
}

/* ============================================================
   FORM
============================================================ */
.form-input {
  background: transparent;
  border: 1px solid rgba(6, 3, 180, 0.5);
  color: var(--dw-white);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input::placeholder { color: var(--dw-gray); }
.form-input:focus {
  border-color: var(--dw-blue-deep);
  box-shadow: 0 0 12px rgba(107, 104, 255, 0.3);
}


/* ============================================================
   FOOTER
============================================================ */
.footer-link { transition: color 0.25s ease; }
.footer-link:hover { color: var(--dw-blue-bright); }