/* ============================================================
   HOI AN RESTAURANTE — STYLESHEET
   ============================================================ */

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

:root {
  --bg:          #0d0906;
  --bg-2:        #1a140a;
  --bg-3:        #241c0f;
  --gold:        #c9a84c;
  --gold-light:  #e0c070;
  --cream:       #f0ebe0;
  --cream-muted: rgba(240,235,224,0.55);
  --font-display:'Cormorant Garamond', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --max-w:       1140px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; }

/* ── Utilities ─────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.btn-gold    { background: var(--gold); color: #0d0906; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--cream); border: 1px solid rgba(240,235,224,0.35); }
.btn-outline:hover { border-color: var(--cream); background: rgba(240,235,224,0.05); }

/* Scroll-reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── NAV ────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.6rem 0;
  transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(13,9,6,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.5));
}
.nav-logo-img:hover { opacity: 0.85; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  color: var(--cream-muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.nav-links a:hover { color: var(--cream); }

.nav-reserve {
  padding: 0.45rem 1.1rem !important;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  border-radius: 2px;
}
.nav-reserve:hover {
  background: var(--gold) !important;
  color: #0d0906 !important;
}

.nav-toggle { display: none; }

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

.hero-slides { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: transform, opacity;
  animation: kenBurns 18s infinite;
}
.slide-1 { background-image: url('../img/hero-restaurante.jpg'); animation-delay: 0s; }
.slide-2 { background-image: url('../img/hero-noodles.jpg');    animation-delay: 6s; }
.slide-3 { background-image: url('../img/hero-hoian.jpg');      animation-delay: 12s; }

@keyframes kenBurns {
  0%   { opacity: 0; transform: scale(1); }
  4%   { opacity: 1; }
  28%  { opacity: 1; transform: scale(1.07); }
  33%  { opacity: 0; transform: scale(1.07); }
  100% { opacity: 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(13,9,6,0.65) 0%, rgba(13,9,6,0) 18%),
    linear-gradient(to bottom, rgba(13,9,6,0.15) 0%, rgba(13,9,6,0.55) 55%, rgba(13,9,6,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 720px;
  animation: fadeUp 1.1s ease 0.4s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  color: var(--cream);
  font-weight: 300;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--cream-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--cream-muted);
  animation: bounce 2.2s ease-in-out infinite;
  transition: color 0.2s;
}
.hero-scroll:hover { color: var(--gold); }
.hero-scroll svg { width: 26px; height: 26px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(9px); }
}

/* ── ABOUT ──────────────────────────────────── */
.about {
  padding: 8rem 0;
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 5rem;
}

.about-text h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--cream);
  margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--cream-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.about-text p strong { color: var(--gold); font-weight: 500; }

.about-text blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--cream);
  line-height: 1.5;
}

.about-image {
  position: relative;
}
.about-image img {
  width: 100%;
  height: 560px;
  object-fit: cover;
}
.about-image::before {
  content: '';
  position: absolute;
  top: -1.5rem; right: -1.5rem;
  width: 100%; height: 100%;
  border: 1px solid rgba(201,168,76,0.22);
  z-index: -1;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.detail-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.detail-card:hover {
  border-color: rgba(201,168,76,0.3);
  transform: translateY(-5px);
}
.detail-icon { font-size: 2rem; margin-bottom: 1rem; }
.detail-card h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--cream); margin-bottom: 0.5rem; }
.detail-card p  { font-size: 0.82rem; color: var(--cream-muted); line-height: 1.65; }

/* ── GALLERY ────────────────────────────────── */
.gallery {
  padding: 8rem 0;
  background: var(--bg-2);
}

.section-header { margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--cream);
  margin-top: 0.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 290px 290px;
  gap: 8px;
  margin-bottom: 2.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(13,9,6,0.88));
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.35s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

/* item 1: tall (col 1, rows 1-2) */
.gallery-item.gi-tall { grid-row: span 2; }
/* item 5: wide (col 2+3, row 2) */
.gallery-item.gi-wide { grid-column: span 2; }

.gallery-cta { text-align: center; }

/* ── VIETNAM ────────────────────────────────── */
.vietnam {
  position: relative;
  overflow: hidden;
  padding: 9rem 0 0;
  background: var(--bg);
}

.vietnam-parallax {
  position: absolute;
  inset: 0 0 38% 0;
  background-image: url('../img/hero-hoian.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.vietnam-overlay {
  position: absolute;
  inset: 0 0 38% 0;
  background: linear-gradient(to bottom, rgba(13,9,6,0.55), rgba(13,9,6,0.75));
}

.vietnam-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-bottom: 6rem;
}
.vietnam-content h2 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  color: var(--cream);
  font-weight: 300;
  margin-bottom: 1.5rem;
}
.vietnam-content p {
  color: rgba(240,235,224,0.7);
  font-size: 1rem;
  line-height: 1.85;
}

.vietnam-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 380px;
  position: relative;
  z-index: 2;
}
.vn-item {
  background-size: cover;
  background-position: center;
  filter: brightness(0.72) saturate(0.8);
  transition: filter 0.5s, transform 0.5s;
  overflow: hidden;
}
.vn-item:hover {
  filter: brightness(1) saturate(1);
  transform: scaleY(1.02);
  z-index: 1;
}

/* ── MENU CTA ───────────────────────────────── */
.menu-cta {
  position: relative;
  padding: 9rem 0;
  text-align: center;
  overflow: hidden;
}
.menu-cta-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-restaurante.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.menu-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,9,6,0.78);
}
.menu-cta-content {
  position: relative;
  z-index: 2;
}
.menu-cta-content h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--cream);
  margin-bottom: 1rem;
}
.menu-cta-content p {
  color: var(--cream-muted);
  font-size: 1rem;
  margin: 0 auto 2.5rem;
  max-width: 480px;
  line-height: 1.7;
}

/* ── CONTACT ────────────────────────────────── */
.contact {
  padding: 8rem 0;
  background: var(--bg-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  color: var(--cream);
  margin-bottom: 2rem;
}

.hours {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 2rem;
}
.hour-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.875rem;
}
.hour-row span:first-child { color: var(--cream-muted); }
.hour-row span:last-child  { color: var(--cream); font-weight: 500; }

.contact-details { display: flex; flex-direction: column; gap: 1.1rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--cream-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  transition: color 0.2s;
}
.contact-item:hover { color: var(--gold); }
.contact-item svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.contact-map {
  height: 500px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(40%) invert(92%) hue-rotate(180deg);
}

/* ── FOOTER ─────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(201,168,76,0.13);
  padding: 3.5rem 0;
  text-align: center;
}
.footer-logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
}
.footer-sub {
  font-size: 0.72rem;
  color: var(--cream-muted);
  letter-spacing: 0.12em;
  margin-bottom: 1.8rem;
}
.footer-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.footer-links a {
  color: var(--cream-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-size: 0.7rem;
  color: rgba(240,235,224,0.2);
}

/* iOS Safari: background-attachment:fixed no funciona en dispositivos touch */
@supports (-webkit-touch-callout: none) {
  .vietnam-parallax,
  .vietnam-overlay,
  .menu-cta-bg,
  .slide { background-attachment: scroll; }
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .about-details { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 240px);
  }
  .gallery-item.gi-tall { grid-row: span 1; }
  .gallery-item.gi-wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(13,9,6,0.97);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1rem; letter-spacing: 0.15em; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 4px;
  }
  .nav-toggle span {
    display: block;
    width: 24px; height: 1.5px;
    background: var(--cream);
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image::before { display: none; }
  .about-image img { height: 320px; }
  .about-details { grid-template-columns: 1fr 1fr; }

  .vietnam-parallax,
  .vietnam-overlay  { background-attachment: scroll; }
  .vietnam-grid     { grid-template-columns: repeat(2, 1fr); height: 260px; }

  .menu-cta-bg      { background-attachment: scroll; }
  .slide            { background-attachment: scroll; }

  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-map  { height: 320px; }
}

@media (max-width: 520px) {
  .hero-title   { font-size: 2.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .about-details { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery-item {
    height: 260px;
    grid-row: span 1 !important;
    grid-column: span 1 !important;
  }

  .vietnam-grid { grid-template-columns: 1fr 1fr; height: 220px; }
}
