/* ============================================
   BORDA DEL TREMAT — Estils rústics-elegants
   Scroll vertical + paleta clara moderna
============================================ */

:root {
  --negre: #1C1917;
  --grafit: #44403C;
  --tauri: #78716C;
  --pedra: #A8A29E;
  --arena: #E7E5E4;
  --crema: #FAF8F5;
  --blanc-os: #F5F2ED;
  --fusta: #B08968;
  --fusta-clar: #D4A574;
  --daurat: #C9A96E;
  --daurat-fos: #8B7340;
  --blanc: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  --nav-h: 64px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--grafit);
  background: var(--crema);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================
   FONS DE NATURA — Fix, canvia per secció
============================================ */
.natura-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.natura-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.natura-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.04;
}

.natura-layer.active {
  opacity: 1;
}

/* ============================================
   NAVEGACIÓ SUPERIOR
============================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(28, 25, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 1000;
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
  transition: box-shadow 0.3s;
}

.top-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--crema);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-link {
  color: var(--arena);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 2px;
  transition: color 0.3s, background 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--daurat);
  background: rgba(201, 169, 110, 0.1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--crema);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Selector de llengua */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-link {
  color: var(--arena);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  transition: color 0.3s;
}

.lang-link:hover,
.lang-link.active {
  color: var(--daurat);
}

.lang-sep {
  color: var(--tauri);
  font-size: 0.7rem;
  opacity: 0.4;
}

.lang-switch-mobile {
  display: none;
}

/* ============================================
   NAVEGACIÓ LATERAL (dots)
============================================ */
.side-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 999;
}

.side-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--pedra);
  background: transparent;
  transition: all 0.4s ease;
}

.side-dot.active {
  background: var(--daurat);
  border-color: var(--daurat);
  transform: scale(1.4);
}

/* ============================================
   SECCIONS GENERALS
============================================ */
.section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--daurat-fos);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--negre);
  margin-bottom: 48px;
  line-height: 1.2;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--daurat);
  margin-top: 18px;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) saturate(0.8);
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero:hover .hero-bg {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(28, 25, 23, 0.2) 0%,
    rgba(28, 25, 23, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.hero-line {
  width: 50px;
  height: 1px;
  background: var(--daurat);
  margin: 0 auto 30px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  color: var(--crema);
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  color: var(--daurat);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.hero-location {
  font-size: 0.8rem;
  color: var(--arena);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 44px;
}

.hero-cta {
  display: inline-block;
  padding: 14px 44px;
  border: 1px solid var(--daurat);
  color: var(--daurat);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--daurat);
  color: var(--negre);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid var(--daurat);
  border-radius: 10px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--daurat);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 16px; }
}

/* ============================================
   NOSALTRES
============================================ */
.about {
  background: var(--crema);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 60px;
}

.about-text p {
  font-size: 1rem;
  color: var(--grafit);
  margin-bottom: 18px;
  line-height: 1.9;
}

.about-text strong {
  color: var(--negre);
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-img {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.about-img:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-img:hover img {
  transform: scale(1.05);
}

/* Fila extra d'imatges */
.extra-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.extra-photo {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.extra-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.9);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.extra-photo:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  text-align: center;
  padding: 36px 24px;
  background: var(--blanc);
  border-radius: 3px;
  border: 1px solid var(--arena);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--negre);
  margin-bottom: 10px;
}

.feature p {
  font-size: 0.88rem;
  color: var(--tauri);
  line-height: 1.6;
}

/* ============================================
   CARTA
============================================ */
.menu-section {
  background: var(--blanc-os);
}

.menu-content {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.menu-intro,
.btn-carta,
.alergen-info {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.menu-content .section-title {
  text-align: center;
}

.menu-content .section-title::after {
  margin: 18px auto 0;
}

.menu-intro {
  font-size: 1.05rem;
  color: var(--grafit);
  line-height: 1.9;
  margin-bottom: 40px;
}

/* Imatges decoratives de la carta */
.menu-photos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}

.menu-photo {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.menu-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.9);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.menu-photo:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}

.btn-carta {
  display: inline-block;
  padding: 18px 52px;
  background: var(--negre);
  color: var(--crema);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 3px;
  transition: all 0.3s ease;
  margin-bottom: 40px;
}

.btn-carta:hover {
  background: var(--daurat-fos);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.2);
}

.alergen-info {
  padding: 32px 40px;
  background: var(--blanc);
  border-radius: 3px;
  border: 1px solid var(--arena);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.alergen-info::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: var(--daurat);
}

.alergen-info p {
  font-size: 0.88rem;
  color: var(--tauri);
  line-height: 1.9;
  font-style: italic;
}

/* ============================================
   CONTACTE
============================================ */
.contact-section {
  background: var(--crema);
}

/* Imatges decoratives del contacte */
.contact-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 48px;
}

.contact-photo {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 3/2;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.9);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.contact-photo:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}

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

.info-block {
  margin-bottom: 32px;
}

.info-block h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--negre);
  margin-bottom: 10px;
}

.info-block p {
  color: var(--grafit);
  font-size: 0.95rem;
  line-height: 1.8;
}

.info-block a {
  color: var(--fusta);
  border-bottom: 1px solid var(--daurat);
  transition: color 0.2s;
}

.info-block a:hover {
  color: var(--daurat-fos);
}

.hours-note {
  font-size: 0.85rem;
  color: var(--tauri);
  font-style: italic;
  margin-bottom: 14px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 5px 0;
  font-size: 0.9rem;
  color: var(--grafit);
}

.hours-table td:first-child {
  font-weight: 700;
  color: var(--negre);
  width: 120px;
}

.hours-table .closed {
  color: var(--pedra);
  font-style: italic;
}

.contact-map {
  border-radius: 3px;
  overflow: hidden;
  height: 400px;
  border: 1px solid var(--arena);
}

/* ============================================
   FOOTER
============================================ */
.footer {
  background: var(--negre);
  padding: 24px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--pedra);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  color: var(--daurat);
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--crema);
}

.footer-links .separator {
  color: var(--pedra);
}

/* ============================================
   BACK TO TOP
============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 28px;
  width: 42px;
  height: 42px;
  background: var(--negre);
  color: var(--daurat);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--daurat);
  color: var(--negre);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .top-nav { padding: 0 20px; }
  .brand-name { font-size: 1.1rem; letter-spacing: 2px; }

  .menu-toggle { display: block; }

  .lang-switch { display: none; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(28, 25, 23, 0.98);
    flex-direction: column;
    padding: 16px;
    gap: 2px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { display: block; text-align: center; padding: 12px; }

  .nav-links.open .lang-switch-mobile {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(201, 169, 110, 0.15);
  }

  .lang-switch-mobile .lang-link {
    font-size: 0.85rem;
    padding: 6px 14px;
  }

  .side-nav { display: none; }

  .container { padding: 0 24px; }
  .section { padding: 80px 0; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; gap: 16px; }
  .extra-photos { grid-template-columns: 1fr; }
  .menu-photos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .contact-photos { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-map { height: 260px; }
}

@media (max-width: 480px) {
  .menu-photos { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2rem; letter-spacing: 3px; }
}
