/* ============================================
   ESCALA CAFÉ — Folha de Estilos Principal
   Ficheiro: style.css
   ============================================ */

/* ---------- Variáveis de cor ---------- */
:root {
  --green: #0F3B33;
  --red: #7D1210;
  --brown: #4A2908;
  --cream: #DBCDB2;
  --cream-light: #F5F0E8;
  --white: #FDFAF5;
  --text-dark: #1a1a1a;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
  cursor: none;
}

/* ============================================
   CURSOR PERSONALIZADO
   ============================================ */
.cursor {
  width: 10px; height: 10px;
  background: var(--cream);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.15s ease;
  /* Sombra suave para manter a definição sobre fundos claros
     (branco / creme-claro), onde o creme sozinho teria pouco contraste */
  box-shadow: 0 0 0 1px rgba(15,59,51,0.25), 0 1px 4px rgba(15,59,51,0.3);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--cream);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(.17,.67,.83,.67), opacity 0.3s;
  opacity: 0.6;
  /* Mesmo princípio: contorno escuro subtil para o anel não
     desaparecer sobre os fundos claros do site */
  box-shadow: 0 0 0 1px rgba(15,59,51,0.15);
}
body:hover .cursor { transform: translate(-50%, -50%); }
body:hover .cursor-ring { transform: translate(-50%, -50%); }

/* Em ecrãs táteis ou sem rato não há "hover" real —
   mantém o cursor nativo em vez de escondê-lo sem substituto */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

/* ============================================
   LOADER
   ============================================ */
#loader {
  position: fixed; inset: 0;
  background: var(--green);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo-img {
  width: 150px;
  opacity: 0.95;
}
.loader-bar {
  width: 200px; height: 1px;
  background: rgba(219,205,178,0.2);
  position: relative; overflow: hidden;
}
.loader-bar::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--cream);
  animation: loadBar 1.8s ease forwards;
}
@keyframes loadBar { to { left: 0; } }

/* ============================================
   NAVEGAÇÃO
   ============================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 28px clamp(24px, 5vw, 120px);
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.4s ease;
}
nav.scrolled {
  background: rgba(253,250,245,0.92);
  backdrop-filter: blur(20px);
  padding: 18px clamp(24px, 5vw, 120px);
  border-bottom: 1px solid rgba(15,59,51,0.08);
}
.nav-logo-link {
  position: relative; display: block;
  height: 39px; width: 61px;
  text-decoration: none;
}
.nav-logo-img {
  position: absolute; top: 0; left: 0;
  height: 145%; width: auto;
  transition: opacity 0.4s ease;
}
.nav-logo-cream { opacity: 1; }
.nav-logo-green { opacity: 0; }
nav.scrolled .nav-logo-cream { opacity: 0; }
nav.scrolled .nav-logo-green { opacity: 1; }

.nav-links {
  display: flex; gap: 42px; list-style: none;
}
.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.8);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cream);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
nav.scrolled .nav-links a { color: var(--green); }
nav.scrolled .nav-links a::after { background: var(--green); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 5px;
  background: transparent; border: none;
}
.hamburger span {
  width: 24px; height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
  display: block;
}
nav.scrolled .hamburger span { background: var(--green); }

/* ============================================
   HERO
   ============================================ */
#home {
  height: 100vh; min-height: 700px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: var(--green);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(74,41,8,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(125,18,16,0.15) 0%, transparent 50%);
}
.hero-bg-pattern {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(219,205,178,0.03) 80px, rgba(219,205,178,0.03) 81px),
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(219,205,178,0.03) 80px, rgba(219,205,178,0.03) 81px);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 20px;
}
.hero-eyebrow {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.7;
  margin-bottom: 32px;
  display: block;
  animation: fadeUp 1s ease 1.8s both;
}
.hero-logo-img {
  width: min(320px, 65vw);
  margin: 0 auto 28px;
  animation: fadeUp 1.3s ease 1.4s both;
}
.hero-slogan {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  opacity: 0.75;
  letter-spacing: 0.05em;
  animation: fadeUp 1s ease 2.3s both;
}
.hero-scroll {
  position: absolute; bottom: 44px; /*left: 50%;*/
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: fadeUp 1s ease 2.6s both;
  cursor: pointer;
}
.hero-scroll span {
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream); opacity: 0.5; font-weight: 500;
  /* Compensa o espaço extra que o letter-spacing acrescenta
     depois da última letra, para o texto ficar centrado
     em relação à linha vertical abaixo */
  margin-right: -0.3em;
  text-align: center;
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--cream), transparent);
  animation: scrollPulse 2s ease infinite;
  opacity: 0.5;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(0.6); opacity: 0.2; }
}

/* ============================================
   SECÇÃO SOBRE / ABOUT
   ============================================ */
.about-strip {
  background: var(--cream-light);
  padding: 100px clamp(40px, 6vw, 160px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text-block h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 28px;
}
.about-text-block p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: #555;
  font-weight: 300;
  max-width: 440px;
}
.about-detail {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 20px;
  display: block;
}
.about-stats {
  display: flex; gap: 50px;
  margin-top: 50px;
}
.stat h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem; font-weight: 300;
  color: var(--green); line-height: 1;
  margin-bottom: 6px;
}
.stat p {
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: #888;
  font-weight: 500;
}
.about-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 12px;
}
.about-img {
  border-radius: 4px;
  overflow: hidden;
  background: var(--cream);
  position: relative;
}
.about-img:first-child { grid-row: span 2; }
.about-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s ease;
}
.about-img:hover img { transform: scale(1.05); }

/* ============================================
   MENU
   ============================================ */
#menu {
  background: var(--green);
  padding: 110px clamp(40px, 6vw, 160px);
}
.section-header {
  text-align: center;
  margin-bottom: 72px;
}
.section-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.5;
  margin-bottom: 16px;
  display: block;
}
#menu .section-tag { opacity: 0.4; }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.05em;
}
.section-line {
  width: 60px; height: 1px;
  background: var(--cream);
  opacity: 0.2;
  margin: 20px auto 0;
}
.menu-tabs {
  display: flex; justify-content: center;
  gap: 0; margin-bottom: 60px;
  border: 1px solid rgba(219,205,178,0.15);
  border-radius: 3px;
  width: fit-content;
  margin-left: auto; margin-right: auto;
  overflow: hidden;
}
.menu-tab {
  padding: 13px 36px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(219,205,178,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
}
.menu-tab.active,
.menu-tab:hover {
  background: var(--cream);
  color: var(--green);
}
.menu-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  max-width: 1100px;
  margin: 0 auto;
}
.menu-grid.active { display: grid; }
.menu-item {
  background: rgba(255,255,255,0.04);
  padding: 36px 32px;
  border: 1px solid rgba(219,205,178,0.06);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.menu-item::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--cream);
  transition: height 0.4s ease;
}
.menu-item:hover { background: rgba(255,255,255,0.07); transform: translateY(-3px); }
.menu-item:hover::before { height: 100%; }
.menu-item-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px;
}
.menu-item h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 400;
  color: var(--cream); line-height: 1.3;
}
.menu-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--cream); opacity: 0.6;
  white-space: nowrap; padding-left: 16px;
}
.menu-item p {
  font-size: 0.78rem; line-height: 1.7;
  color: rgba(219,205,178,0.45);
  font-weight: 300;
}
.menu-badge {
  display: inline-block;
  font-size: 0.55rem; letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid rgba(219,205,178,0.2);
  color: rgba(219,205,178,0.4);
  margin-bottom: 14px;
  border-radius: 2px;
}

/* ============================================
   GALERIA
   ============================================ */
#galeria {
  padding: 110px 0;
  background: var(--cream-light);
}
#galeria .section-header { padding: 0 clamp(40px, 6vw, 160px); }
#galeria .section-title { color: var(--green); }
#galeria .section-tag { color: var(--green); opacity: 0.4; }
#galeria .section-line { background: var(--green); }

.gallery-track-wrapper {
  overflow: hidden;
  margin-top: 60px;
  position: relative;
}
.gallery-track-wrapper::before,
.gallery-track-wrapper::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
}
.gallery-track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--cream-light), transparent);
}
.gallery-track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--cream-light), transparent);
}
.gallery-track {
  display: flex; gap: 16px;
  animation: galleryScroll 30s linear infinite;
  width: max-content;
  padding: 0 clamp(40px, 6vw, 160px);
}
.gallery-track:hover { animation-play-state: paused; }
@keyframes galleryScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gallery-item {
  width: 340px; height: 420px;
  border-radius: 4px; overflow: hidden;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,59,51,0.7) 0%, transparent 50%);
  display: flex; align-items: flex-end; padding: 28px;
  opacity: 0; transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 300;
  color: var(--cream); letter-spacing: 0.05em;
}

/* ============================================
   CONTACTOS
   ============================================ */
#contactos {
  background: var(--white);
  padding: 110px clamp(40px, 6vw, 160px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}
.contact-left h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 28px;
}
.contact-left p {
  font-size: 0.85rem; line-height: 1.9;
  color: #666; font-weight: 300;
  margin-bottom: 50px; max-width: 400px;
}
.contact-info-item {
  display: flex; gap: 20px; align-items: flex-start;
  margin-bottom: 32px;
}
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--cream-light);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg {
  width: 18px; height: 18px;
  stroke: var(--green); fill: none; stroke-width: 1.5;
}
.contact-info-text strong {
  display: block; font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 5px; font-weight: 600;
}
.contact-info-text span {
  font-size: 0.88rem; color: #666; font-weight: 300;
  line-height: 1.6;
}
.contact-info-text a {
  color: inherit; text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}
.contact-info-text a:hover {
  color: var(--green); border-color: var(--green);
}
.contact-right { padding-top: 10px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { position: relative; }
.form-group label {
  position: absolute; top: 16px; left: 0;
  font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: #999;
  font-weight: 500;
  transition: all 0.3s ease;
  pointer-events: none;
}
.form-group input,
.form-group textarea {
  width: 100%; background: transparent;
  border: none; border-bottom: 1px solid #ddd;
  padding: 16px 0 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem; color: var(--text-dark);
  font-weight: 300; outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}
.form-group textarea { height: 100px; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); }
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: 0; font-size: 0.6rem; color: var(--green);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: transparent; }

.btn-submit {
  align-self: flex-start;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 40px;
  background: var(--green);
  color: var(--cream);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  border: none; cursor: pointer;
  border-radius: 2px;
  transition: all 0.35s ease;
  position: relative; overflow: hidden;
}
.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--brown);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-submit:hover::before { transform: translateX(0); }
.btn-submit span { position: relative; z-index: 1; }
.btn-submit svg {
  position: relative; z-index: 1;
  width: 14px; height: 14px;
  stroke: var(--cream); fill: none; stroke-width: 2;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--green);
  padding: 60px clamp(40px, 6vw, 160px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 30px;
}
.footer-logo-img {
  width: 110px;
  opacity: 0.9;
}
.footer-slogan {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 0.95rem;
  color: var(--cream); opacity: 0.35;
  letter-spacing: 0.05em;
}
.footer-copy {
  font-size: 0.62rem; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(219,205,178,0.3);
  font-weight: 500;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.25s; }
.reveal-delay-3 { transition-delay: 0.4s; }

/* ============================================
   MENU MOBILE (overlay)
   ============================================ */
.mobile-menu {
  display: none;
  position: fixed; inset: 0;
  background: var(--green);
  z-index: 800;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 40px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem; font-weight: 300;
  color: var(--cream); text-decoration: none;
  letter-spacing: 0.1em; opacity: 0.8;
  transition: opacity 0.3s;
}
.mobile-menu a:hover { opacity: 1; }
.close-menu {
  position: absolute; top: 36px; right: 60px;
  background: transparent; border: none;
  color: var(--cream); font-size: 2rem;
  cursor: pointer; opacity: 0.5;
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 900px) {
  nav { padding: 20px 28px; }
  nav.scrolled { padding: 14px 28px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .about-strip { grid-template-columns: 1fr; padding: 70px 28px; gap: 50px; }
  #menu { padding: 80px 28px; }
  #galeria { padding: 80px 0; }
  #galeria .section-header { padding: 0 28px; }
  .gallery-track { padding: 0 28px; }
  #contactos { grid-template-columns: 1fr; padding: 80px 28px; gap: 60px; }
  footer { padding: 40px 28px; }
  .close-menu { right: 28px; }
}

/* ============================================
   RESPONSIVE — Tablets pequenos / phablets
   ============================================ */
@media (max-width: 640px) {
  .menu-tabs {
    flex-wrap: wrap;
    width: 100%;
  }
  .menu-tab {
    flex: 1 1 45%;
    padding: 12px 10px;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }
  .about-stats { flex-wrap: wrap; gap: 28px 40px; }
  .gallery-item { width: min(300px, 80vw); height: min(380px, 56vw); }
}

/* ============================================
   RESPONSIVE — Telemóveis pequenos
   ============================================ */
@media (max-width: 420px) {
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 12px 20px; }
  .hero-slogan { padding: 0 12px; }

  .about-strip { padding: 56px 20px; gap: 40px; }
  .about-image-grid { grid-template-rows: 140px 140px; gap: 8px; }
  .about-stats { gap: 20px 32px; }

  #menu { padding: 60px 20px; }
  .menu-tab { flex: 1 1 100%; }
  .menu-item { padding: 28px 22px; }

  #galeria { padding: 60px 0; }
  #galeria .section-header { padding: 0 20px; }
  .gallery-track { padding: 0 20px; }

  #contactos { padding: 60px 20px; gap: 40px; }
  .contact-left h2, .about-text-block h2 { font-size: 2rem; }

  footer { padding: 32px 20px; justify-content: center; text-align: center; }
  .close-menu { right: 20px; }
}
