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

:root {
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --dark: #ffffff;
  --dark-2: #f8f5f0;
  --dark-3: #f0ece4;
  --text: #1a1a1a;
  --text-muted: #6b5c4a;
  --radius: 12px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

nav.scrolled,
body.inner-page nav {
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: color var(--transition), opacity var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); opacity: 1; }

nav.scrolled .nav-links a,
body.inner-page nav .nav-links a { color: var(--text); opacity: 0.8; }

nav.scrolled .nav-links a:hover,
body.inner-page nav .nav-links a:hover,
nav.scrolled .nav-links a.active,
body.inner-page nav .nav-links a.active { color: var(--gold); opacity: 1; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  background: transparent;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
}

nav.scrolled .nav-toggle span,
body.inner-page nav .nav-toggle span { background: var(--text); }

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/espaco/marina de vilamoura 1.webp');
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 8s ease;
}

.hero.loaded .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10, 8, 5, 0.60) 0%,
    rgba(10, 8, 5, 0.40) 50%,
    rgba(10, 8, 5, 0.68) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.3s forwards;
}

.hero-title span { color: var(--gold); }

.hero-logo {
  display: block;
  margin: 1.4rem auto;
  height: 90px;
  width: auto;
  object-fit: contain;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.9s 0.5s forwards;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.9s 0.7s forwards;
}

.hero-subtitle {
  margin-top: 1.2rem;
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  color: rgba(240, 236, 228, 0.9);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.6;
  -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.88s forwards;
}

.hero-cta {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 1.05s forwards;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: #111;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s 1.4s forwards;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s infinite;
}

.scroll-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

/* ── INNER PAGES ── */
body.inner-page {
  background: var(--dark);
}

.page-section {
  padding: calc(var(--nav-h) + 5rem) 0 6rem;
  min-height: 100vh;
}

.page-section + .page-section {
  padding-top: 0;
  min-height: auto;
}

/* ── SHARED SECTION STYLES ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 1.2rem auto 0;
}

/* ── MENU SECTION ── */
.menu-bg { background: var(--dark-2); }

.menu-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 5rem;
}

.video-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.menu-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.4rem;
  color: var(--gold);
}

.menu-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ── FOOD GALLERY ── */
.gallery-title {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.food-group {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.food-group:last-child { margin-bottom: 0; }

/* 4:5 portrait row — 2 columns */
.food-group--portrait {
  grid-template-columns: repeat(2, 1fr);
}
.food-group--portrait .food-card { aspect-ratio: 4/5; }

/* 1:1 square row — 5 columns */
.food-group--square {
  grid-template-columns: repeat(5, 1fr);
}
.food-group--square .food-card { aspect-ratio: 1/1; }

/* 16:9 landscape row — 2 columns */
.food-group--landscape {
  grid-template-columns: repeat(2, 1fr);
}
.food-group--landscape .food-card { aspect-ratio: 16/9; }

.food-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-3);
  cursor: pointer;
}

.food-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.food-card:hover img { transform: scale(1.04); }

/* ── ESPAÇO SECTION ── */
.espaco-bg { background: var(--dark); }

.espaco-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.espaco-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
}

.espaco-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.espaco-quote-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.espaco-quote-mark {
  font-size: 5rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.3;
  font-family: Georgia, serif;
  margin-bottom: -1.5rem;
}

.espaco-quote {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.espaco-quote span { color: var(--gold); }

.espaco-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding-left: 1.4rem;
}

.espaco-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
}

/* ── VINHO SECTION ── */
.vinho-bg { background: var(--dark-2); }

.vinho-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.vinho-video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
  aspect-ratio: 3/4;
}

.vinho-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.vinho-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
  aspect-ratio: 3/4;
}

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

/* ── CONTACT / FOOTER ── */
.contacto-bg {
  background: var(--dark-3);
}

.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contacto-info h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
  line-height: 1.2;
  color: var(--text);
}

.contacto-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text);
}

.info-icon {
  color: var(--gold);
  font-size: 1.1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.map-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
}

.map-embed {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
  flex: 1;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  border: none;
}

.btn-maps {
  font-size: 1rem;
  padding: 1.1rem 2.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.map-address {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-align: center;
}

footer {
  background: var(--dark);
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  padding: 3.5rem 2rem 2rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 5rem;
}

footer > p {
  text-align: center;
  font-size: 0.82rem;
}

footer a { color: var(--gold); text-decoration: none; }

/* ── FOOTER RICH ── */
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-list a:hover { color: var(--gold); }

.footer-closed {
  color: var(--gold);
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overscroll-behavior: contain;
  touch-action: none;
}

.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: scale(0.94);
  transition: transform 0.3s;
  object-fit: contain;
}

.lightbox.active img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover { background: var(--gold); color: #111; }

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ── KEYFRAMES ── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .menu-intro { grid-template-columns: 1fr; }
  .espaco-split { grid-template-columns: 1fr; gap: 3rem; }
  .vinho-grid { grid-template-columns: 1fr; }
  .contacto-inner { grid-template-columns: 1fr; }
  .food-group--portrait { grid-template-columns: repeat(2, 1fr); }
  .food-group--square { grid-template-columns: repeat(3, 1fr); }
  .food-group--landscape { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .map-embed { min-height: 260px; }
  .map-embed iframe { min-height: 260px; }
}

@media (max-width: 640px) {
  nav { padding: 0 1.25rem; }
  .nav-logo img { height: 40px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.97);
    padding: 1.5rem;
    gap: 1.2rem;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links a { color: var(--text); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .page-section { padding: calc(var(--nav-h) + 3rem) 0 4rem; }
  .food-group--portrait { grid-template-columns: 1fr 1fr; }
  .food-group--square { grid-template-columns: repeat(2, 1fr); }
  .food-group--square .food-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.5rem);
    margin: 0 auto;
  }
  .food-group--landscape { grid-template-columns: 1fr; }
  .hero-logo { height: 68px; }
  .espaco-photo { order: -1; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .map-embed { min-height: 220px; }
  .map-embed iframe { min-height: 220px; }
  .btn { padding: 0.9rem 1.8rem; min-height: 44px; }
  .btn-maps { width: 100%; justify-content: center; }
  .contacto-inner { gap: 2rem; }
  footer { margin-top: 3rem; padding: 2.5rem 1.25rem 1.5rem; }
}
