:root {
    --bg-color: #f5eee4;
    --text-color: #2f2a26;
    --navtext-color: #2f2a26;
    --paper-bg: #fdf8f1;
    --plats-header : #2f2a26;
    --card-bg: #fdf8f1;
    --accent-color: #c0392b;
    --header-bg: rgba(255, 255, 255, 0.9);
    --bg: #f5eee4;
    --bg-paper: #fdf8f1;
    --primary: #b7412f;
    --primary-dark: #9b3524;
    --text: #2f2a26;
    --muted: #7a6f66;
    --border: #e0d4c5;
    --radius: 14px;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
    --logo-src: url("img/logo-light.png");
    --hero-bg-light: rgba(255, 255, 255, 0.6);
    --hero-bg-dark: rgba(50, 50, 50, 0.6);
    
  }

  /* Dark theme */
  html[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e6e6e6;
    --navtext-color: #e6e6e6;
    --paper-bg: #1e1e1e;
    --plats-header : #e6e6e6;
    --card-bg: #616161;
    --accent-color: #ff6b5a;
    --header-bg: rgba(18, 18, 18, 0.9);
    --shadow-soft: 0 10px 25px rgba(153, 153, 153, 0.473);    
    --logo-src: url("img/logo-dark.png");
    --hero-bg-dark: rgba(210, 210, 210, 0.6);
    --hero-bg-light: rgba(79, 79, 79, 0.6);
  }

  .theme-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: 1rem;
    color: var(--text-color);
  }

  * {
  transition: background-color 0.25s ease, color 0.25s ease;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
  }
  
  /* Layout */
  
  .container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  
  /* Header */
  
  .header {
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(224, 212, 197, 0.7);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
  }
  
  .logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 20; /* higher than nav toggle */
    cursor: pointer;
  }
  
  .logo-img {
    height: 78px;        /* adjust to match your design */
    width: auto;
    display: block;
    cursor: pointer;
  }  
  
  .nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--navtext-color);
    font-size: 0.95rem;
    position: relative;
  }
  
  .nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
  }
  
  .nav a:hover::after {
    width: 100%;
  }

  .nav-toggle {
  position: relative;
  z-index: 10;
  }

  
  /* Hero */
  
  .hero {
    position: relative;
    padding: 4.5rem 0 3.5rem;
  }
  
  .hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left,var(--hero-bg-light), transparent),
                radial-gradient(circle at bottom right,var(--hero-bg-dark), transparent);
    pointer-events: none;
  }
  
  .hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
  }
  
  .hero-text h1 {
    font-family: "Playfair Display", serif;
    font-size: 2.6rem;
    line-height: 1.1;
    margin: 0 0 0.75rem;
  }
  
  .hero-text p {
    max-width: 460px;
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 1.02rem;
  }
  
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .hero-image-wrapper {
    justify-self: end;
    min-height: 420px;
  }
  
  .hero-image {
    width: 100%;
    height: auto;
    min-height: 420px;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: block;
    transition: opacity 0.8s ease-in-out;
  }
  

  /* Buttons */
  
  .btn-primary,
  .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
  }
  
  .btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(183, 65, 47, 0.35);
  }
  
  .btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 22px rgba(183, 65, 47, 0.4);
    transform: translateY(-1px);
  }
  
  .btn-ghost {
    background: rgba(253, 248, 241, 0.9);
    color: var(--primary);
    border-color: rgba(183, 65, 47, 0.25);
  }
  
  .btn-ghost:hover {
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  }
  
  /* Sections */
  
  .section {
    padding: 3rem 0;
    scroll-margin-top: 100px; /* adjust to match your header height */
  }
  
  .section-paper {
    background: var(--paper-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
                inset 0 -1px 0 rgba(224, 212, 197, 0.6);
  }
  
  .section-header {
    text-align: left;
    margin-bottom: 1.75rem;
  }
  
  .section-header h2 {
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    margin: 0 0 0.25rem;
  }

  #plats .section-header h2 {
    color: var(--plats-header)
  }
  
  .section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
  }
  
  /* Menu del dia */

  .menu-image-wrapper {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  #menu-image {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    display: block;
    margin: 0 auto;
  }
  
  .menu-date {
    color: var(--muted);
    font-size: 0.95rem;
  }
  
  .menu-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
  
  .menu-column h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
  }
  
  .menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .menu-column li {
    padding: 0.25rem 0;
    font-size: 0.96rem;
  }
  
  .menu-error {
    color: var(--primary);
    margin-top: 1rem;
    font-size: 0.9rem;
  }
  
  /* Plats cards */
  
  .grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
  
  .card {
    background: var(--card-bg);
    transition: background-color 0.25s ease;
    border-radius: var(--radius);
    border: 1px solid rgba(224, 212, 197, 0.8);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
  }
  
  .card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.9rem;
    transition: opacity 0.8s ease-in-out;
  }
  
  .card-img.fade-out {
    opacity: 0;
  }
  
  .card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
  }
  
  .card ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .card li {
    padding: 0.2rem 0;
    font-size: 0.95rem;
  }
  
  /* Contacte */
  
  .contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }
  
  .contact-note {
    color: var(--muted);
    font-size: 0.95rem;
  }

  .map-wrapper {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
  }

  #google-map {
    width: 100%;
    height: 300px;
    border: 0;
  }  
  
  /* Footer */
  
  .footer {
    position: relative;
    background: #2b2521 url("img/footer-texture.jpg") center/cover no-repeat;
    color: #f7f0e7;
    padding: 1.5rem 0;
    margin-top: 1rem;
  }
  
  .footer-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
  }
  
  .footer-inner {
    position: relative;
    text-align: center;
    font-size: 0.9rem;
  }

  
  /* Responsive */
  
  @media (max-width: 900px) {
    .hero-inner {
      grid-template-columns: minmax(0, 1fr);
    }
  
    .hero-image-wrapper {
      justify-self: flex-start;
    }
  
    .hero-image {
        width: 320px;
        max-width: 100%;
        border-radius: 26px;
        box-shadow: var(--shadow-soft);
        display: block;
        transition: opacity 0.8s ease-in-out;
        opacity: 1;
      }
      
      .hero-image.fade-out {
        opacity: 0;
      }
      
    .menu-columns,
    .grid,
    .contact {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 640px) {
    .header-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.4rem;
      padding-left: 1rem;
      padding-right: 1rem;
    }
  
    .nav a {
      margin-left: 0.9rem;
    }
  
    .hero {
      padding-top: 3.5rem;
    }
  
    .hero-text h1 {
      font-size: 2.1rem;
    }
  }

@media (min-width: 768px) {
  #google-map {
    height: 400px;
  }
}



  