/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #faf6f0;
  --bg-2:      #f0e8dc;
  --bg-warm:   #f5ede0;
  --paper:     #ffffff;
  --ink:       #2c2418;
  --ink-soft:  #4a3f32;
  --ink-mute:  #8a7e6e;
  --accent:    #c94b32;
  --accent-2:  #6b8f5e;
  --accent-dim: rgba(201,75,50,0.08);
  --gold:      #c49a5b;
  --line:      rgba(44,36,24,0.1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --serif:    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --gutter:   1.5rem;
  --nav-h:    64px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; overscroll-behavior-y: none;
  background: var(--bg); color: var(--ink);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: white; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 9999; border-radius: 8px; font-weight: 500; }
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Language toggle
   ============================================================= */
.lang-toggle {
  position: fixed; top: 1rem; right: 1rem; z-index: 200;
  display: flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.3rem 0.5rem; border-radius: 8px;
  border: 1px solid var(--line);
}
.lang-btn {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  padding: 0.2rem 0.4rem; border-radius: 4px;
  color: var(--ink-mute); transition: color .3s, background .3s;
  text-transform: uppercase;
}
.lang-btn.is-active { color: var(--ink); background: var(--accent-dim); }
.lang-sep { width: 1px; height: 12px; background: var(--line); }

/* (el idioma se gestiona por JS reescribiendo textContent, ver main.js initLang) */

/* =============================================================
   4. Container & utilities
   ============================================================= */
.container {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-inline: var(--gutter);
}

.kicker {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}

.section-header { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-header h2 { font-family: var(--serif); font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 400; margin-bottom: 1.2rem; }
.section-header h2 em { font-style: italic; color: var(--accent); }
.section-desc { color: var(--ink-soft); font-size: 1.05rem; max-width: 580px; margin: 0 auto; line-height: 1.7; }

/* =============================================================
   5. Navigation
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  padding: 0 var(--gutter);
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav.is-scrolled { background: rgba(250,246,240,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo-img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-size: 0.85rem; font-weight: 500;
  position: relative; padding: 0.25rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 0.5rem; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }

@media (max-width: 719px) {
  .nav-links {
    position: fixed; inset: 0; z-index: 99;
    background: var(--bg); flex-direction: column;
    justify-content: center; align-items: center; gap: 2rem;
    clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--ease-soft);
  }
  .nav-links.is-open { clip-path: inset(0); }
  .nav-link { font-size: 1.3rem; }
  .nav-hamburger { display: flex; z-index: 101; }
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden; padding: 2rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img {
  width: 100%; height: 100%; object-fit: cover;
  will-change: transform;
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(44,36,24,0.5) 0%, rgba(44,36,24,0.7) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  color: white; max-width: 720px;
}
.hero-logo-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg, #faf6f0); border-radius: 16px;
  padding: 0.75rem 1.25rem; margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.hero-logo {
  height: 60px; width: auto; display: block;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 400; line-height: 1.05; margin-bottom: 0.75rem;
}
.hero-title em { font-style: italic; color: #f0c8a0; }
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem); opacity: 0.9;
  margin-bottom: 0.5rem; font-weight: 300;
}
.hero-location {
  font-size: 0.85rem; opacity: 0.7; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.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: 1;
  color: white; opacity: 0.6; animation: heroBounce 2s ease-in-out infinite;
}
@keyframes heroBounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* =============================================================
   7. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  white-space: nowrap;
  padding: 0.85rem 2rem; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600; transition: transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft), background .3s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.btn svg { flex-shrink: 0; margin: 0; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #b53d26; }

.btn-ghost { background: rgba(255,255,255,0.15); color: white; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.25); }

/* =============================================================
   8. About section
   ============================================================= */
.about { padding: 6rem 0; background: var(--bg); }
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
  align-items: center;
}
@media (min-width: 720px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.about-text h2 {
  font-family: var(--serif); font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 400; margin-bottom: 1.2rem;
}
.about-desc { color: var(--ink-soft); line-height: 1.8; margin-bottom: 2rem; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-feature {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; font-weight: 500;
}
.about-feature-icon { font-size: 1.3rem; }

.about-image { border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -20px rgba(0,0,0,0.2); }
.about-image img { width: 100%; height: 400px; object-fit: cover; transition: transform .8s var(--ease-soft), filter .55s; }
.about-image:hover img { transform: scale(1.06); filter: saturate(1.1); }

/* =============================================================
   9. Menu section
   ============================================================= */
.menu { padding: 6rem 0; background: var(--bg-2); }

.menu-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  max-width: 800px; margin: 0 auto;
}
@media (min-width: 540px) { .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 960px) { .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.menu-item {
  position: relative; border-radius: 12px; overflow: hidden;
  background: var(--paper); aspect-ratio: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.menu-item:hover { transform: translateY(-6px); box-shadow: 0 20px 50px -10px rgba(201,75,50,0.2); }
.menu-item-img {
  position: absolute; inset: 0;
}
.menu-item-img img { width: 100%; height: 100%; object-fit: cover; }

.menu-cta {
  text-align: center; margin-top: 3rem;
}
.menu-cta p { color: var(--ink-soft); margin-bottom: 1rem; font-size: 1.05rem; }

/* =============================================================
   10. Catering section
   ============================================================= */
.catering { padding: 6rem 0; background: var(--bg-warm); }
.catering-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
@media (min-width: 720px) {
  .catering-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.catering-content h2 {
  font-family: var(--serif); font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 400; margin-bottom: 1.2rem;
}
.catering-list {
  list-style: none; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.7rem;
}
.catering-list li {
  padding-left: 1.5rem; position: relative; color: var(--ink-soft);
}
.catering-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700;
}
.catering-cta { margin-top: 1.5rem; }

.catering-image { border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -20px rgba(0,0,0,0.2); }
.catering-image img { width: 100%; height: 400px; object-fit: cover; transition: transform .8s var(--ease-soft); }
.catering-image:hover img { transform: scale(1.06); }

/* =============================================================
   11. Contact section
   ============================================================= */
.contact { padding: 6rem 0; background: var(--bg); }
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  max-width: 800px; margin: 0 auto;
}
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-card {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem; background: var(--paper); border-radius: 12px;
  border: 1px solid var(--line); transition: box-shadow .3s;
}
.contact-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
.contact-card-icon { font-size: 1.5rem; line-height: 1.4; }
.contact-card h3 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; }
.contact-card p, .contact-card a { font-size: 0.9rem; color: var(--ink-soft); }
.contact-card a:hover { color: var(--accent); }
.contact-closed { color: var(--accent) !important; font-weight: 500; }

.hours-card {
  padding: 2rem; background: var(--paper); border-radius: 12px;
  border: 1px solid var(--line);
}
.hours-card h3 { font-size: 1rem; margin-bottom: 1.25rem; font-weight: 600; }
.hours-row {
  display: flex; justify-content: space-between; padding: 0.6rem 0;
  border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.hours-row:last-child { border-bottom: 0; }
.hours-closed { color: var(--accent); font-weight: 500; }

/* =============================================================
   12. Reviews
   ============================================================= */
.reviews {
  padding: 6rem 0; background: var(--bg-warm);
}
.reviews-badge {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; margin-bottom: 3rem; text-align: center;
}
.reviews-stars { color: var(--gold); font-size: 1.6rem; letter-spacing: 0.15em; }
.reviews-score { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.reviews-count { color: var(--ink-soft); font-size: 0.85rem; }
.reviews-google-btn { margin-top: 0.5rem; }

.reviews-map { max-width: 900px; margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px -16px rgba(0,0,0,0.12); }

/* =============================================================
   13. Footer
   ============================================================= */
.footer {
  padding: 3rem 0; background: var(--ink); color: rgba(255,255,255,0.7);
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-logo { height: 32px; width: auto; filter: brightness(0) invert(0.7); margin: 0 auto 0.25rem; }
.footer-tagline { font-size: 0.8rem; opacity: 0.6; font-style: italic; }
.footer-links { font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a:hover { color: white; }
.footer-sep { opacity: 0.3; }
.footer-copy { font-size: 0.75rem; opacity: 0.5; }

/* =============================================================
   14. Reveal animations
   ============================================================= */
[data-reveal] {
  opacity: 1; transform: none;
}
[data-reveal].reveal-armed {
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].reveal-armed.is-revealed { opacity: 1; transform: none; }

/* =============================================================
   15. Responsive
   ============================================================= */
@media (min-width: 540px) {
  :root { --gutter: 2rem; }
  .about-features { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  :root { --gutter: 2.5rem; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  :root { --gutter: 3rem; }
}

@media (min-width: 1280px) {
  :root { --gutter: 3rem; }
}

/* =============================================================
   16. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll { animation: none; display: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .menu-item { transition: none; }
  .menu-item:hover { transform: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .about-image img { transition: none; }
  .about-image:hover img { transform: none; }
  .catering-image img { transition: none; }
  .catering-image:hover img { transform: none; }
  .nav-link::after { transition: none; }
}

/* =============================================================
   17. Language visibility
   ============================================================= */
/* El cambio de idioma se hace reescribiendo el texto visible vía JS
   (ver initLang en main.js). No se oculta nada por CSS: así, si JS
   falla, el contenido en català (el texto real del HTML) sigue
   siendo visible siempre, en vez de desaparecer. */
