/**
 * =====================================================================
 * Royal Douro - Folha de Estilos Principal
 * =====================================================================
 * 
 * Este ficheiro contém todos os estilos personalizados do site Royal Douro.
 * Trabalha em conjunto com o Tailwind CSS para estilos utilitários.
 * 
 * ESTRUTURA DO FICHEIRO:
 * 1. Variáveis CSS (cores, fontes)
 * 2. Definição de fonte personalizada
 * 3. Estilos base (html, body)
 * 4. Cursor personalizado
 * 5. Gradiente de fundo
 * 6. Navegação
 * 7. Ecrã de abertura (Overture)
 * 8. Classes utilitárias (gold-text, bottle-shadow, etc.)
 * 9. Estrutura de secções
 * 10. Ficha técnica
 * 11. Galeria horizontal
 * 12. Formulário de contacto
 * 13. Modal de verificação de idade
 * 14. Media queries para mobile
 * 15. Acessibilidade
 * 
 * Autor: Vinartis
 * Versão: 1.0.0
 * Última atualização: Janeiro 2026
 * =====================================================================
 */

/* =====================================================================
 * 1. VARIÁVEIS CSS - Cores e tokens de design
 * ===================================================================== */
:root {
  --gold-dark: #6f3c17;
  /* Tom de ouro escuro para sombras e fundos */
  --gold-light: #bd9168;
  /* Tom de ouro claro para textos e destaques */
  --ivory: #e9e3d3;
  --dark: #0a0a0a;
}

/* --- NOVA DEFINIÇÃO DE FONTE --- */
@font-face {
  font-family: 'Reross Quadratic';
  /* Oferecemos ao navegador vários formatos. Ele irá escolher o primeiro que conseguir ler. */
  src: url('fonts/Reross_Quadratic.woff') format('woff'),
    url('fonts/Reross_Quadratic.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--dark);
  color: var(--ivory);
  overflow-x: hidden;
  cursor: none;
  /* Esconde o cursor padrão */
  font-weight: 300;
  /* Tipografia mais fina e elegante */
}

/* --- NOVA CLASSE PARA OS TÍTULOS --- */
.font-title {
  font-family: 'Montserrat', sans-serif;
  /* Usa Montserrat para os títulos */
  font-weight: 500;
  /* Medium - peso 500 */
  text-transform: uppercase;
  /* TRANSFORMA O TEXTO EM MAIÚSCULAS */
}

/* Cursor Personalizado (COM COR ESCURA) */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--gold-light);
  transform: translate(-50%, -50%);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-dark);
  /* COR ESCURA AQUI */
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.cursor-outline.hover {
  width: 60px;
  height: 60px;
}

/* Gradiente de Fundo Dinâmico (COM COR ESCURA) */
#background-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #020202;
  background: -webkit-linear-gradient(35deg, rgba(2, 2, 2, 1) 0%, rgba(18, 18, 18, 1) 65%, rgba(111, 60, 23, 0.15) 100%);
  background: -moz-linear-gradient(35deg, rgba(2, 2, 2, 1) 0%, rgba(18, 18, 18, 1) 65%, rgba(111, 60, 23, 0.15) 100%);
  background: linear-gradient(35deg, rgba(2, 2, 2, 1) 0%, rgba(18, 18, 18, 1) 65%, rgba(111, 60, 23, 0.15) 100%);
  /* COR ESCURA AQUI */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#020202", endColorstr="#6f3c17", GradientType=0);
}

/* Efeito "Glass" e Ocultar Navegação */
#nav {
  transition: transform 0.4s ease-in-out, background-color 0.4s;
}

#nav.nav-hidden {
  transform: translateY(-100%);
}

#nav.nav-scrolled {
  background-color: rgba(10, 10, 10, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Estilos do Ecrã de Abertura (COM COR ESCURA) */
#overture {
  background-color: #000;
}

#bottle-silhouette {
  box-shadow: 0 0 80px 30px rgba(111, 60, 23, 0.25);
  /* COR ESCURA AQUI */
}

/* Classes de Utilitário e Efeitos Visuais (COM NOVO GRADIENTE) */
.gold-text {
  background: linear-gradient(153deg, var(--gold-light) 0%, var(--gold-dark) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bottle-shadow {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.75));
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), var(--gold-light), var(--gold-dark), transparent);
  /* NOVO GRADIENTE AQUI */
  opacity: 0.4;
}

/* Estrutura das Secções */
.section {
  min-height: 100svh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.journey-step {
  padding: 15vh 0;
}

.journey-step .image-content img {
  max-width: 36rem;
}

/* --- NOVA SECÇÃO: FICHA TÉCNICA (COM COR ESCURA) --- */
.tech-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(111, 60, 23, 0.2);
  /* COR ESCURA AQUI */
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease-in-out;
}

.tech-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--gold-light);
}

.tech-title {
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.tech-text {
  color: var(--ivory);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- ESTILOS DA GALERIA (DESKTOP) --- */
#galeria {
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--dark);
}

.gallery-track-container {
  height: 100vh;
  width: 100%;
}

.gallery-track {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10vw;
  padding: 0 15vw;
  width: max-content;
}

.gallery-item {
  flex-shrink: 0;
}

/* Estilos individuais para cada item da galeria (sem CSS inline) */
.gallery-item.item-1 {
  align-self: flex-start;
  margin-top: 10vh;
}

.gallery-item.item-2 img {
  width: auto;
  height: 40vw;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-top: 10vh;
}

.gallery-item.item-3 {
  align-self: flex-end;
  margin-bottom: 15vh;
}

.gallery-item.item-3 img {
  width: 40vw;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
}

.gallery-item.item-4 {
  text-align: right;
}

.gallery-item.item-5 {
  align-self: flex-start;
  margin-top: 20vh;
}

.gallery-item.item-5 img {
  width: 35vw;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
}

.gallery-item.item-6 {
  align-self: flex-start;
  margin-top: 5vh;
}

.gallery-item.item-6 img {
  width: 30vw;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
}

.gallery-item.item-7 {
  align-self: flex-end;
  margin-bottom: 5vh;
}

.gallery-item.item-7 img {
  width: 20vw;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
}

.gallery-item.item-8 img {
  width: auto;
  height: 80vh;
  object-fit: cover;
  border-radius: 0.5rem;
}

.gallery-item.item-9 {
  align-self: flex-end;
  margin-bottom: 10vh;
}

.gallery-item.item-10 {
  align-self: flex-start;
  margin-top: 10vh;
}

.gallery-item.item-10 img {
  width: 35vw;
  height: auto;
  max-height: 80vh;
  object-fit: cover;
  border-radius: 0.5rem;
}


/* --- ESTILOS DO FORMULÁRIO DE CONTACTO (COM COR ESCURA) --- */
.form-input {
  display: block;
  width: 100%;
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(111, 60, 23, 0.3);
  /* COR ESCURA AQUI */
  border-radius: 0.5rem;
  color: var(--ivory);
  transition: all 0.3s ease-in-out;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 1px var(--gold-light);
}

.form-label {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  color: rgba(233, 227, 211, 0.6);
  pointer-events: none;
  transition: all 0.2s ease-out;
  transform-origin: 0 0;
}

.form-input:focus+.form-label,
.form-input:not(:placeholder-shown)+.form-label {
  transform: translateY(-0.75rem) scale(0.8);
  color: var(--gold-light);
}

.form-button {
  display: inline-block;
  border: 1px solid transparent;
  /* BORDA TRANSPARENTE PARA O GRADIENTE */
  background-image: linear-gradient(var(--dark), var(--dark)), linear-gradient(153deg, var(--gold-light) 0%, var(--gold-dark) 50%, var(--gold-light) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: var(--gold-light);
  padding: 0.8rem 3rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.form-button:hover {
  background-image: linear-gradient(153deg, var(--gold-light) 0%, var(--gold-dark) 50%, var(--gold-light) 100%);
  color: var(--dark);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(111, 60, 23, 0.3);
  /* COR ESCURA AQUI */
}

/* --- ESTILOS DO MODAL DE IDADE --- */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.age-gate-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.age-gate-modal {
  background-color: #121212;
  border: 1px solid rgba(111, 60, 23, 0.3);
  /* COR ESCURA AQUI */
  border-radius: 0.75rem;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.form-button-secondary {
  display: inline-block;
  color: var(--ivory);
  background-color: transparent;
  padding: 0.8rem 3rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  transition: all 0.3s ease-in-out;
}

.form-button-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* --- REGRAS DE OTIMIZAÇÃO PARA MOBILE (ECRÃS ATÉ 768PX) --- */
@media (max-width: 768px) {
  body {
    cursor: auto;
    /* Devolve o cursor padrão em mobile */
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
    /* Esconde o cursor personalizado */
  }

  /* --- GERAL --- */
  .section {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  /* --- ECRÃ DE ABERTURA E SECÇÃO TOPO --- */
  #overture #slogan,
  #top .grid>div:first-child {
    text-align: center;
  }

  #top .flex {
    justify-content: center;
  }

  /* --- TIPOGRAFIA --- */
  h1.font-title,
  h1.text-4xl,
  #top h1,
  section#top h1.font-title {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    word-break: break-word;
  }

  h2.font-title {
    font-size: 2.0rem !important;
    /* Tamanho ajustado para a nova fonte */
    line-height: 1.2 !important;
  }

  h6.font-title {
    font-size: 1.8rem !important;
    /* Tamanho ajustado para a nova fonte */
  }

  p {
    font-size: 1rem !important;
  }

  /* --- LAYOUTS DE GRELHA --- */
  #top .grid,
  #vinho .grid,
  .journey-step .grid,
  #ficha-tecnica .grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Garante que a imagem fica por baixo do texto (GERAL) mas muda no #TOP */
  #vinho .relative,
  .journey-step .image-content {
    order: 2;
  }

  #vinho>div>div>div:last-child,
  .journey-step .text-content {
    order: 1;
  }

  /* NO HERO (#TOP), A IMAGEM VEM PRIMEIRO */
  /* Override grid to flex for mobile */
  section#top .grid,
  section#top>div>div,
  #top .grid.md\:grid-cols-2,
  #top>div>div.grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }

  /* Force image container to appear first */
  section#top .relative,
  #top .grid>.relative,
  #top>div>div>.relative {
    order: -1 !important;
    width: 100% !important;
    height: 40vh !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
  }

  /* Ensure text comes after and is centered */
  section#top .parallax-text,
  #top .grid>.parallax-text,
  #top>div>div>.parallax-text {
    order: 1 !important;
    margin-top: 0 !important;
    padding-bottom: 2rem;
    text-align: center !important;
  }

  /* Ajusta o alinhamento do texto que estava à direita */
  .journey-step .text-content {
    text-align: center !important;
    margin: 0 !important;
  }

  /* --- JORNADA --- */
  .journey-step {
    padding: 10vh 0;
  }

  /* --- FORMULÁRIO --- */
  #contacto form {
    grid-template-columns: 1fr;
  }
}


/* --- MELHORIA DE ACESSIBILIDADE --- */
/* Adiciona um contorno visível para quem navega com o teclado */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 2px;
}