:root {
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --olive: #46513a;
  --olive-dark: #303a2b;
  --sage: #dce1d2;
  --terracotta: #bd6d4d;
  --ink: #292b25;
  --muted: #74776d;
  --line: #e7e2d7;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 1000; top: 12px; left: 12px; background: white; padding: 10px 14px; border-radius: 8px; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 244, 236, .95); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(70, 81, 58, .09); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--olive-dark); font-family: var(--serif); font-size: 25px; font-weight: 700; white-space: nowrap; }
.brand em { color: var(--terracotta); font-weight: 500; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--terracotta); border: 1px solid #d8b8a8; border-radius: 50%; font-family: var(--sans); font-size: 20px; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.main-nav a { color: #54584d; font-size: 13px; font-weight: 600; transition: color .2s; }
.main-nav a:hover, .social-links a:hover { color: var(--terracotta); }
.header-search { display: flex; align-items: center; width: 205px; height: 40px; padding: 0 11px; border: 1px solid #dedbcf; border-radius: 999px; background: var(--paper); }
.header-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.header-search input::placeholder { color: #97988e; }
.header-search button { padding: 0 2px 3px 7px; border: 0; background: transparent; color: var(--olive); font-size: 25px; line-height: 1; }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; min-height: 590px; display: flex; align-items: center; overflow: hidden; color: white; background: #4b4b3a url("imagenes/IMG-20240220-WA0017.jpg") center 48% / cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28, 34, 25, .78) 0%, rgba(34, 39, 29, .52) 48%, rgba(34, 39, 29, .1) 100%); }
.hero-content { position: relative; z-index: 1; padding-block: 95px 110px; }
.eyebrow { margin: 0 0 17px; color: var(--terracotta); font-size: 10px; font-weight: 700; letter-spacing: .19em; }
.hero-eyebrow { color: #e7c4af; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { max-width: 660px; margin: 0 0 18px; font-family: var(--serif); font-size: clamp(48px, 6.7vw, 82px); font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
.hero h1 em, .section-heading h2 em, .about-copy h2 em, .newsletter-inner h2 em { color: #d99b7d; font-weight: 500; }
.hero-copy { max-width: 440px; margin-bottom: 30px; color: rgba(255,255,255,.83); font-size: 15px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 22px; padding: 0 22px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 700; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--terracotta); color: white; }
.button-primary:hover { background: #a75c3e; }
.hero-note { position: absolute; right: max(24px, calc((100vw - 1160px) / 2)); bottom: 30px; z-index: 1; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.82); font-size: 9px; letter-spacing: .16em; }
.note-line { width: 42px; height: 1px; background: #d99b7d; }

/* Franja de valores */
.intro-strip { border-bottom: 1px solid var(--line); background: #eeeee5; }
.intro-inner { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: clamp(25px, 8vw, 110px); }
.intro-inner p { display: flex; align-items: center; gap: 10px; margin: 0; color: #555c4a; font-family: var(--serif); font-size: 15px; }
.intro-icon { color: var(--terracotta); font-family: var(--sans); font-size: 18px; }

/* Recetas y filtros */
.section { padding-block: 100px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading h2, .about-copy h2, .newsletter-inner h2 { margin: 0; color: var(--olive-dark); font-family: var(--serif); font-size: clamp(36px, 4.2vw, 52px); font-weight: 500; line-height: 1.12; letter-spacing: -.025em; }
.section-heading h2 em, .about-copy h2 em { color: var(--terracotta); }
.section-description { max-width: 290px; margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.filter-area { padding: 25px 28px 27px; border: 1px solid var(--line); background: rgba(255,253,248,.55); }
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.filter-heading h3 { margin: 0; color: var(--olive-dark); font-family: var(--serif); font-size: 21px; font-weight: 500; }
.text-button { border: 0; background: transparent; color: var(--terracotta); font-size: 11px; font-weight: 700; }
.text-button span { margin-left: 7px; }
.category-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-chip { padding: 9px 17px; border: 1px solid #dedbcf; border-radius: 999px; background: transparent; color: #686b60; font-size: 11px; font-weight: 600; transition: all .2s; }
.filter-chip:hover { border-color: var(--olive); color: var(--olive); }
.filter-chip.is-active { border-color: var(--olive); background: var(--olive); color: white; }
.results-line { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 18px; }
.results-line p { margin: 0; color: #777a70; font-size: 12px; }
.results-line span { color: #9a9c91; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; }
.recipe-card { min-width: 0; background: var(--paper); border: 1px solid #eee9df; transition: transform .25s, box-shadow .25s; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 16px 35px rgba(44, 48, 35, .08); }
.card-image { position: relative; height: 230px; overflow: hidden; background: #e5e2d8; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.recipe-card:hover .card-image img { transform: scale(1.04); }
.card-category { position: absolute; top: 15px; left: 15px; padding: 7px 11px; background: rgba(255,253,248,.94); color: var(--olive); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card-body { padding: 20px 20px 19px; }
.card-body h3 { min-height: 52px; margin: 0 0 12px; color: var(--olive-dark); font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.2; }
.card-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 17px; color: #777a70; font-size: 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta b { color: var(--terracotta); font-size: 12px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid #efebe2; }
.card-footer small { color: #96978c; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.read-button { padding: 0; border: 0; background: transparent; color: var(--terracotta); font-size: 11px; font-weight: 700; }
.read-button:hover { color: var(--olive); }
.empty-state { padding: 35px 15px; color: var(--muted); text-align: center; }

/* Ruta gastronómica: restaurantes visitados */
.restaurants-section { background: var(--paper); }
.restaurant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.restaurant-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--cream); transition: transform .25s, box-shadow .25s; }
.restaurant-card:hover { transform: translateY(-4px); box-shadow: 0 16px 35px rgba(44, 48, 35, .08); }
.restaurant-cover { position: relative; height: 270px; overflow: hidden; background: #e5e2d8; }
.restaurant-cover-image { width: 100%; height: 100%; object-fit: cover; }
.restaurant-visited { position: absolute; top: 15px; left: 15px; padding: 7px 11px; background: rgba(255,253,248,.94); color: var(--olive); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.restaurant-photo-placeholder, .restaurant-dialog-placeholder { display: grid; min-height: 100%; place-content: center; justify-items: center; gap: 8px; background: #e9e9df; color: var(--olive); }
.restaurant-photo-placeholder span, .restaurant-dialog-placeholder { font-family: var(--serif); font-size: 54px; }
.restaurant-photo-placeholder small { font-family: var(--sans); font-size: 11px; }
.restaurant-card-body { padding: 22px; }
.restaurant-location, .restaurant-dialog-address { margin: 0 0 8px; color: var(--terracotta); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.restaurant-location span, .restaurant-dialog-address span { margin-right: 5px; font-size: 14px; }
.restaurant-card-body h3 { margin: 0 0 10px; color: var(--olive-dark); font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.2; }
.restaurant-description { min-height: 42px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.restaurant-preview-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 16px 0 18px; }
.restaurant-preview-gallery > div { position: relative; height: 105px; overflow: hidden; background: #e5e2d8; }
.restaurant-preview-gallery img { width: 100%; height: 100%; object-fit: cover; }
.restaurant-preview-gallery span { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; padding: 13px 6px 5px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: white; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.restaurant-card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.restaurant-card-actions .read-button { font-size: 11px; }
.restaurant-map-link { color: var(--olive); font-size: 10px; font-weight: 700; }
.restaurant-map-link:hover { color: var(--terracotta); }
.restaurant-empty { margin-top: 20px; padding: 28px; border: 1px dashed #c9cdbd; background: rgba(255,253,248,.7); }
.restaurant-empty code { color: var(--terracotta); }
.restaurant-dialog { width: min(820px, calc(100% - 30px)); }
.restaurant-dialog-placeholder { height: 230px; }
.restaurant-dialog-address { margin: 14px 0 4px; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.restaurant-directions { margin-top: 8px; }
.restaurant-gallery-title { margin: 30px 0 15px; color: var(--olive-dark); font-family: var(--serif); font-size: 23px; font-weight: 500; }
.restaurant-dialog-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.restaurant-dialog-gallery figure { margin: 0; overflow: hidden; background: var(--cream); }
.restaurant-dialog-gallery img { width: 100%; height: 230px; object-fit: cover; }
.restaurant-dialog-gallery figcaption { padding: 10px 12px; color: var(--olive-dark); font-family: var(--serif); font-size: 15px; }

/* Sobre mí */
.about-section { padding-block: 90px; background: #eeeee5; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(45px, 8vw, 105px); }
.about-image-wrap { position: relative; padding: 0 28px 28px 0; }
.about-image-wrap::after { position: absolute; right: 0; bottom: 0; z-index: 0; width: 75%; height: 75%; border: 1px solid #c9cdbd; content: ""; }
.about-image-wrap img { position: relative; z-index: 1; width: 100%; height: 440px; object-fit: cover; }
.image-stamp { position: absolute; right: -15px; bottom: 25px; z-index: 2; display: grid; place-items: center; width: 108px; height: 108px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: var(--terracotta); color: white; font-family: var(--serif); font-size: 12px; line-height: 1.5; text-align: center; transform: rotate(8deg); }
.about-copy h2 { max-width: 520px; margin-bottom: 22px; }
.about-copy p:not(.eyebrow) { max-width: 510px; margin-bottom: 14px; color: #6e7267; font-size: 13px; }
.button-outline { margin-top: 15px; border-color: #b9bfad; color: var(--olive); }
.button-outline:hover { background: var(--olive); color: white; }

/* Contacto y pie */
.newsletter-section { padding-block: 64px; background: var(--olive); color: white; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.newsletter-inner .eyebrow { color: #d7ad98; }
.newsletter-inner h2 { color: white; font-size: clamp(32px, 4vw, 45px); }
.newsletter-inner > div > p:last-child { margin: 12px 0 0; color: rgba(255,255,255,.72); font-size: 12px; }
.button-light { flex-shrink: 0; background: var(--cream); color: var(--olive-dark); }
.button-light:hover { background: white; }
.site-footer { background: #292f25; color: rgba(255,255,255,.76); }
.footer-main { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-brand { color: white; font-size: 22px; }
.footer-main > p { margin: 0; color: rgba(255,255,255,.55); font-family: var(--serif); font-size: 14px; font-style: italic; }
.social-links { display: flex; flex-wrap: wrap; gap: 18px; }
.social-links a, .footer-bottom a { color: rgba(255,255,255,.76); font-size: 10px; transition: color .2s; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.48); font-size: 9px; }
.footer-bottom > div { display: flex; align-items: center; gap: 10px; }
.footer-dot { color: var(--terracotta); }
.legal-note { padding-block: 18px; background: #20251d; color: rgba(255,255,255,.65); font-size: 11px; }

/* Ventana de receta */
.recipe-dialog { position: fixed; width: min(680px, calc(100% - 30px)); max-height: min(88vh, 850px); padding: 0; overflow: auto; border: 0; border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 0 25px 90px rgba(0,0,0,.3); }
.recipe-dialog::backdrop { background: rgba(24, 29, 22, .72); backdrop-filter: blur(3px); }
.dialog-close { position: sticky; top: 12px; float: right; z-index: 2; width: 36px; height: 36px; margin: 12px 12px -48px 0; border: 0; border-radius: 50%; background: rgba(255,253,248,.94); color: var(--olive-dark); font-size: 25px; line-height: 1; }
.dialog-image { width: 100%; height: 280px; object-fit: cover; }
.dialog-body { padding: 28px clamp(22px, 5vw, 42px) 38px; }
.dialog-body h2 { margin: 0 0 10px; color: var(--olive-dark); font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1.12; }
.dialog-description { color: var(--muted); font-size: 13px; }
.dialog-columns { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; margin-top: 25px; }
.dialog-columns h3 { margin-bottom: 10px; color: var(--terracotta); font-family: var(--serif); font-size: 20px; font-weight: 500; }
.dialog-columns ul, .dialog-columns ol { padding-left: 19px; margin: 0; color: #65695f; font-size: 12px; }
.dialog-columns li { margin-bottom: 8px; }

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: 14px 20px; padding-block: 16px; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .header-search { margin-left: auto; }
  .hero { min-height: 540px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-image { height: 250px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 34px, 500px); }
  .header-inner { min-height: 70px; flex-wrap: nowrap; }
  .brand { font-size: 22px; }
  .menu-toggle { display: flex; width: 38px; height: 38px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin-left: auto; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
  .menu-toggle span { width: 15px; height: 1.5px; background: var(--olive); }
  .main-nav { position: absolute; top: 69px; left: 0; display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 22px 16px; border-bottom: 1px solid var(--line); background: var(--cream); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border-bottom: 0; }
  .header-search { position: absolute; top: 80px; right: 17px; z-index: 1; display: none; }
  .hero { min-height: 570px; background-position: 58% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(28,34,25,.82), rgba(28,34,25,.35)); }
  .hero-content { padding-block: 90px; }
  .hero h1 { font-size: clamp(45px, 13vw, 65px); }
  .hero-copy { max-width: 330px; font-size: 13px; }
  .hero-note { right: 17px; bottom: 20px; font-size: 7px; }
  .intro-inner { min-height: 0; flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 20px; }
  .intro-inner p { font-size: 14px; }
  .section { padding-block: 70px; }
  .section-heading { display: block; margin-bottom: 27px; }
  .section-description { margin-top: 14px; }
  .filter-area { padding: 20px 17px; }
  .filter-heading { align-items: flex-start; }
  .filter-heading h3 { font-size: 19px; }
  .filter-chip { padding: 8px 13px; }
  .results-line span { display: none; }
  .recipe-grid { grid-template-columns: 1fr; gap: 22px; }
  .card-image { height: 245px; }
  .card-body h3 { min-height: 0; }
  .about-section { padding-block: 65px; }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .about-image-wrap img { height: 330px; }
  .image-stamp { right: -7px; width: 94px; height: 94px; font-size: 10px; }
  .newsletter-inner { align-items: flex-start; flex-direction: column; }
  .newsletter-section { padding-block: 50px; }
  .footer-main { align-items: flex-start; flex-direction: column; justify-content: center; gap: 11px; padding-block: 27px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; padding-block: 16px; }
  .dialog-image { height: 210px; }
  .dialog-columns { grid-template-columns: 1fr; gap: 17px; }
  .dialog-body h2 { font-size: 30px; }
}

@media (max-width: 980px) {
  .restaurant-cover { height: 235px; }
  .restaurant-preview-gallery > div { height: 90px; }
}
@media (max-width: 640px) {
  .restaurant-grid { grid-template-columns: 1fr; gap: 22px; }
  .restaurant-cover { height: 245px; }
  .restaurant-card-body { padding: 19px; }
  .restaurant-card-body h3 { font-size: 25px; }
  .restaurant-preview-gallery > div { height: 100px; }
  .restaurant-dialog-gallery { grid-template-columns: 1fr; }
  .restaurant-dialog-gallery img { height: 220px; }
  .restaurant-card-actions { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
