/*
 * EL MERCENARIO — DISEÑO
 * 1. Fuentes y variables  2. Cabecera  3. Portada  4. Historia
 * 5. Paellas y preguntas  6. Footer  7. Páginas legales  8. Responsive / accesibilidad
 * Cambia colores, tamaños y espaciados en :root para ajustar toda la web.
 */
@font-face { font-family: 'Mercenario Serif'; src: url('/assets/fonts/serif.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mercenario Serif'; src: url('/assets/fonts/serif-italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Mercenario Sans'; src: url('/assets/fonts/sans.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --wine: #4b1925;
  --wine-deep: #36131d;
  --cream: #f2eee5;
  --sand: #d9c9ad;
  --ink: #392c2a;
  --muted: #6a5a55;
  --line: rgba(75, 25, 37, .24);
  --serif: 'Mercenario Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Mercenario Sans', Arial, sans-serif;
  --gutter: clamp(24px, 4.2vw, 76px);
  --header-height: 96px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }
body { margin: 0; color: var(--ink); background: var(--cream); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--wine); color: var(--cream); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
h1, h2 { font-family: var(--serif); }
em { font-weight: 400; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.eyebrow { font-size: 0.875rem; line-height: 1.45; letter-spacing: .1em; }
.section-label { margin-bottom: 55px; }
.circle-icon { width: 52px; height: 52px; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .25s, background .25s; }
.circle-icon svg { width: 22px; height: 22px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 14px 20px; background: var(--cream); color: var(--wine); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* 2. Cabecera: el selector de idioma siempre permanece arriba a la derecha. */
.site-header { height: var(--header-height); padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 28px; position: sticky; top: 0; z-index: 20; background: var(--cream); color: var(--wine); transition: box-shadow .3s; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.wordmark { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wordmark-el { font: italic 2.375rem/.9 var(--serif); transform: translateY(-3px); }
.wordmark-name { font: 1.75rem/1 var(--serif); letter-spacing: -.025em; }
.main-nav { display: flex; gap: clamp(20px, 3vw, 50px); margin-left: auto; margin-right: auto; }
.main-nav a { font-size: 0.875rem; position: relative; padding: 12px 0; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
.header-end { display: flex; align-items: center; gap: 30px; }
.header-location { font-size: 0.75rem; letter-spacing: .08em; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 24px; }
.language-switch a { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 0.875rem; line-height: 1; border-radius: 24px; transition: background .2s; }
.language-switch a[aria-current] { background: var(--wine); color: var(--cream); }
.language-switch a:not([aria-current]):hover { background: #e4ddd1; }

/* 3. Portada: imagen cinematográfica + contacto en la esquina inferior derecha. */
.hero { min-height: calc(100svh - var(--header-height)); display: flex; flex-direction: column; position: relative; isolation: isolate; overflow: hidden; color: var(--cream); background: #2d281b; }
.hero-image { position: absolute; z-index: -3; inset: -4% 0 0; width: 100%; height: 108%; object-fit: cover; object-position: center 55%; transform: scale(1.04); }
.hero-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(17, 19, 12, .66), rgba(17, 19, 12, .23) 60%, rgba(17, 19, 12, .12)), linear-gradient(0deg, rgba(17, 19, 12, .77), transparent 48%); }
.hero-content { padding: clamp(48px, 7vh, 88px) var(--gutter) 30px; max-width: 1060px; }
.hero-eyebrow { margin-bottom: 24px; animation: soft-in .9s var(--ease) both; }
.hero h1 { font-size: clamp(4.75rem, 7.7vw, 8.25rem); line-height: .9; letter-spacing: -.04em; }
.hero h1 span, .hero h1 em { display: block; animation: title-in 1.2s var(--ease) both; }
.hero h1 em { color: #f1d4a3; padding-bottom: .05em; animation-delay: .1s; }
.hero h1 span:last-child { animation-delay: .2s; }
.hero-intro { margin-top: 27px; max-width: 500px; font-size: 1.0625rem; line-height: 1.6; animation: soft-in 1.2s .3s var(--ease) both; }
.hero-bottom { position: relative; margin: auto var(--gutter) 38px; padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 28px; }
.scroll-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border: 1px solid rgba(242,238,229,.65); border-radius: 40px; font-size: 1rem; width: fit-content; transition: background .25s, color .25s; }
.scroll-link:hover { background: var(--cream); color: var(--wine); }
.hero-contact { justify-self: end; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hero-contact .eyebrow { margin-bottom: 8px; font-size: 0.75rem; }
.hero-phone { font-size: clamp(1.5rem, 2.35vw, 2.25rem); line-height: 1.25; letter-spacing: -.02em; }
.email { display: inline-block; font-size: 0.9375rem; overflow-wrap: anywhere; }
a.email:hover, .hero-phone:hover { text-decoration: underline; text-underline-offset: 5px; }
.email-pending { opacity: .75; }

/* 4. Historia y zona de servicio. */
.story-section { padding: 76px var(--gutter) 82px; background: var(--wine); color: var(--cream); }
.story-grid { display: grid; grid-template-columns: 1.18fr 1fr; column-gap: clamp(48px, 8vw, 140px); align-items: center; }
.story-copy h2 { font-size: clamp(3.25rem, 5.5vw, 5.6875rem); line-height: 1.01; letter-spacing: -.035em; }
.story-copy h2 em { color: var(--sand); }
.story-lead { max-width: 520px; font-family: var(--serif); font-size: 1.8125rem; line-height: 1.25; margin-top: 38px; }
.body-copy { max-width: 510px; color: #e3d7d2; font-size: 1.0625rem; margin-top: 20px; }
.story-image-wrap { position: relative; max-width: 520px; margin: 0 10px 0 0; }
.story-image-wrap::before { content: ''; position: absolute; inset: 15px -15px 42px 15px; border: 1px solid #b69684; pointer-events: none; }
.story-image-wrap img { position: relative; width: 100%; height: clamp(340px, 32vw, 510px); object-fit: cover; object-position: center; }
.story-image-wrap figcaption { position: relative; margin-top: 28px; color: #d2bdae; font-size: 0.75rem; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 84px; border-top: 1px solid rgba(242, 238, 229, .28); }
.service { padding: 30px 34px 0 0; }
.service + .service { padding-left: 34px; border-left: 1px solid rgba(242, 238, 229, .2); }
.service h3 { font-family: var(--serif); font-size: 1.6875rem; line-height: 1.12; max-width: 300px; margin-bottom: 15px; }
.service p { font-size: 1.0rem; line-height: 1.55; color: #e3d7d2; max-width: 380px; }
.text-call { display: inline-flex; gap: 30px; align-items: center; font-size: 1.3125rem; padding-bottom: 5px; margin-top: 20px; border-bottom: 1px solid #b69684; }
.text-call:hover { border-color: currentColor; }

/* 5. Galería de paellas. Los tamaños de imagen quedan reservados para evitar saltos. */
.menu-section { padding: 78px var(--gutter) 48px; color: var(--wine); }
.menu-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 54px; }
.menu-heading h2 { font-size: clamp(3.25rem, 5.7vw, 6.0rem); line-height: .98; letter-spacing: -.035em; }
.menu-heading h2 em { color: #8b5548; }
.menu-heading p { font-size: 1.0rem; line-height: 1.65; color: var(--muted); padding-bottom: 6px; max-width: 370px; }
.paella-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.paella-item { min-width: 0; }
.paella-item:nth-child(even) { margin-top: 40px; }
.paella-photo { position: relative; aspect-ratio: .8; background: var(--wine); overflow: hidden; }
.paella-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.paella-item:nth-child(1) img { object-position: 62% center; }
.paella-item:nth-child(3) img { object-position: 54% center; }
.paella-description { padding: 24px 0 4px; }
.paella-description h3 { font: 400 clamp(1.75rem, 2.15vw, 2.5rem)/1.12 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.paella-description p { font-size: 1rem; line-height: 1.65; color: var(--muted); margin-top: 14px; }
@media (hover: hover) and (pointer: fine) {
  .paella-item:hover .paella-photo img { transform: scale(1.045); }
}
.menu-custom { border-top: 1px solid var(--line); margin-top: 60px; padding-top: 34px; display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 40px; align-items: start; }
.menu-custom h3 { font-family: var(--serif); font-size: 2.1875rem; line-height: 1.1; max-width: 280px; }
.menu-custom p { font-size: 1.0rem; max-width: 640px; }
.menu-custom .allergy-note { font-size: 0.875rem; margin-top: 15px; color: var(--muted); }
.custom-call { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--wine); border-radius: 32px; padding: 12px 22px; font-size: .9375rem; white-space: nowrap; transition: color .25s, background .25s; }
.custom-call:hover { color: var(--cream); background: var(--wine); }
.image-note { font-size: 0.75rem; color: var(--muted); margin-top: 38px; }

/* Preguntas accesibles: details/summary funcionan también sin JavaScript. */
.faq-section { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(36px, 6vw, 100px); padding: 65px var(--gutter) 90px; border-top: 1px solid var(--line); }
.faq-heading h2 { font: 400 clamp(2.5rem, 4.1vw, 4.5rem)/1.04 var(--serif); color: var(--wine); letter-spacing: -.025em; margin: 24px 0; }
.faq-heading > p:last-child { max-width: 380px; color: var(--muted); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 24px 38px 24px 0; position: relative; color: var(--wine); font-size: 1.125rem; line-height: 1.5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; position: absolute; right: 8px; top: 31px; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(225deg); top: 35px; }
.faq-item > p { color: var(--muted); font-size: 1rem; padding: 0 26px 25px 0; max-width: 680px; }

/* 6. Footer. */
.site-footer { background: var(--wine-deep); color: var(--cream); padding: 62px var(--gutter) 24px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.footer-top h2 { font-size: clamp(2.0625rem, 3.7vw, 3.875rem); letter-spacing: -.02em; line-height: 1.1; margin-top: 19px; }
.footer-call { display: flex; align-items: center; gap: 24px; font-family: var(--serif); font-size: clamp(1.9375rem, 3.4vw, 3.625rem); white-space: nowrap; line-height: 1; }
.footer-call:hover .circle-icon { color: var(--wine-deep); background: var(--cream); border-color: var(--cream); }
.footer-contact { display: flex; justify-content: space-between; gap: 20px; margin: 28px 0 48px; color: #d2bdad; }
.footer-contact > span { font-size: 0.75rem; letter-spacing: .1em; }
.footer-bottom { display: flex; gap: 25px; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(242, 238, 229, .25); font-size: 0.75rem; }
.footer-tagline { font-size: 0.75rem; letter-spacing: .1em; color: #d2bdad; }
.footer-bottom nav { display: flex; gap: 24px; align-items: center; }
.footer-bottom nav a { font-size: 0.875rem; padding-block: 10px; }
.footer-bottom nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* 7. Páginas legales: mismos colores y tipografía, lectura cómoda. */
.document-page { padding: 72px var(--gutter) 100px; }
.document-heading { max-width: 1080px; margin: 0 auto 55px; }
.document-heading h1 { font-size: clamp(4.0625rem, 8vw, 7.0rem); color: var(--wine); line-height: 1; letter-spacing: -.04em; margin: 30px 0; }
.document-heading > p:not(.eyebrow) { max-width: 660px; }
.document-heading .updated { font-size: 0.875rem; color: var(--muted); margin-top: 15px; }
.document-body { max-width: 800px; margin: 0 auto; }
.draft-note { border-left: 2px solid #a06640; background: #e9e1d4; padding: 20px 25px; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 48px; }
.document-body section { margin-top: 40px; }
.document-body h2 { font-size: 2.0rem; line-height: 1.2; color: var(--wine); margin-bottom: 18px; }
.document-body p { margin-top: 15px; }
.document-body p a { text-decoration: underline; text-underline-offset: 4px; }
.document-body a { overflow-wrap: anywhere; }
.source-link { display: inline-block; margin-top: 16px; color: var(--wine); border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.source-link:hover { border-color: var(--wine); }
.legal-details { margin: 0; }
.legal-details > div { display: grid; grid-template-columns: 1fr 1.7fr; gap: 24px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.legal-details dt { color: var(--muted); font-size: 0.9375rem; }
.legal-details dd { margin: 0; overflow-wrap: anywhere; }

/* 8. Movimiento y adaptación. Nada de scroll bloqueado ni pantallas de carga. */
[data-reveal] { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.will-reveal { opacity: 0; transform: translateY(32px); }
.paella-item:nth-child(2) { transition-delay: .08s; }
.paella-item:nth-child(3) { transition-delay: .16s; }
.paella-item:nth-child(4) { transition-delay: .24s; }
@keyframes title-in { from { opacity: 0; transform: translateY(35px); } to { opacity: 1; transform: none; } }
@keyframes soft-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) {
  .header-location { display: none; }
  .story-grid { gap: 50px; }
  .story-copy h2 { font-size: 3.8125rem; }
  .paella-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 28px; }
  .paella-photo { aspect-ratio: 1.15; }
  .paella-item:nth-child(even) { margin-top: 0; }
  .paella-description h3 { font-size: 2rem; }
  .menu-custom { grid-template-columns: 1fr 1.6fr; }
  .custom-call { grid-column: 2; justify-self: start; }
  .footer-top { align-items: start; flex-direction: column; gap: 28px; }
  .footer-tagline { display: none; }
}
@media (max-width: 900px) {
  :root { --header-height: 82px; }
  .site-header { gap: 20px; }
  .main-nav { gap: 24px; }
  .hero h1 { font-size: clamp(3.5rem, 9vw, 5.6875rem); }
  .story-section { padding-top: 60px; }
  .story-grid { grid-template-columns: 1fr 1fr; gap: 35px; }
  .story-copy h2 { font-size: 3.25rem; }
  .story-lead { font-size: 1.625rem; }
  .body-copy { font-size: 1.0rem; }
  .service { padding-right: 22px; }
  .service + .service { padding-left: 22px; }
  .service h3 { font-size: 1.5625rem; }
  .menu-heading { align-items: start; flex-direction: column; gap: 28px; }
  .menu-heading p br { display: none; }
  .menu-custom { grid-template-columns: 1fr 1.4fr; gap: 26px; }
  .faq-section { grid-template-columns: 1fr; gap: 35px; }
  .faq-heading > p:last-child { max-width: 560px; }
}
@media (max-width: 640px) {
  :root { --gutter: 24px; --header-height: 120px; }
  .site-header { padding: 12px 20px 0; gap: 8px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 52px 48px; }
  .wordmark-name { font-size: 1.375rem; }
  .wordmark-el { font-size: 1.9375rem; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
  .main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; }
  .header-end { gap: 0; }
  .language-switch { padding: 2px; }
  .language-switch a { min-width: 40px; min-height: 44px; }
  .hero-content { padding: 36px var(--gutter) 16px; }
  .hero-eyebrow { font-size: .8125rem; letter-spacing: .075em; margin-bottom: 25px; }
  .hero h1 { font-size: clamp(2.85rem, 11.5vw, 4.5rem); letter-spacing: -.035em; line-height: .96; }
  .hero-image { object-position: 61% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(17,19,12,.57), rgba(17,19,12,.2)), linear-gradient(0deg, rgba(17,19,12,.85), transparent 75%); }
  .hero-intro { font-size: 1.0rem; line-height: 1.6; max-width: 400px; margin-top: 25px; }
  .hero-intro br { display: none; }
  .hero-bottom { margin-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; align-items: end; }
  .scroll-link { font-size: .9375rem; padding: 11px 18px; }
  .hero-contact { max-width: 250px; gap: 7px; margin-left: auto; }
  .hero-contact .eyebrow { font-size: 0.75rem; max-width: 230px; line-height: 1.7; margin-bottom: 3px; }
  .hero-phone { font-size: 1.625rem; }
  .hero-contact .email { font-size: 0.875rem; }
  .section-label { margin-bottom: 37px; }
  .story-section { padding: 52px var(--gutter) 60px; }
  .story-grid { display: flex; flex-direction: column; align-items: stretch; gap: 43px; }
  .story-copy h2 { font-size: clamp(2.8125rem, 9.8vw, 4.0625rem); }
  .story-lead { font-size: 1.8125rem; margin-top: 28px; }
  .body-copy { margin-top: 20px; }
  .story-image-wrap { margin-right: 12px; }
  .story-image-wrap img { height: auto; aspect-ratio: 1.12; }
  .story-image-wrap figcaption { font-size: 0.75rem; line-height: 1.6; }
  .service-grid { grid-template-columns: 1fr; margin-top: 48px; }
  .service, .service + .service { padding: 26px 0; border-left: 0; }
  .service + .service { border-top: 1px solid rgba(242,238,229,.24); }
  .service:last-child { padding-bottom: 0; }
  .service h3 { font-size: 1.8125rem; max-width: none; }
  .service p { max-width: none; }
  .menu-section { padding: 53px var(--gutter) 35px; }
  .menu-heading h2 { font-size: clamp(2.8125rem, 10.5vw, 4.125rem); }
  .menu-heading { margin-bottom: 33px; }
  .paella-grid { grid-template-columns: 1fr; gap: 34px; }
  .paella-photo { aspect-ratio: 1.18; }
  .paella-description { padding-top: 20px; }
  .paella-description h3 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .paella-description p { margin-top: 10px; }
  .menu-custom { grid-template-columns: 1fr; gap: 22px; margin-top: 37px; padding-top: 26px; }
  .custom-call { grid-column: 1; }
  .menu-custom h3 { max-width: none; font-size: 2.125rem; }
  .image-note { margin-top: 28px; font-size: 0.75rem; }
  .faq-section { padding: 46px var(--gutter) 54px; }
  .faq-heading h2 { font-size: 2.75rem; }
  .faq-item summary { font-size: 1rem; }
  .site-footer { padding-top: 48px; }
  .footer-top h2 { font-size: 2.375rem; }
  .footer-call { font-size: clamp(1.875rem, 8.2vw, 2.5rem); gap: 15px; }
  .footer-call .circle-icon { width: 42px; height: 42px; }
  .footer-contact { flex-direction: column; gap: 10px; margin-bottom: 33px; }
  .footer-bottom { align-items: start; flex-direction: column; gap: 14px; }
  .footer-bottom nav { gap: 4px 22px; width: 100%; flex-wrap: wrap; }
  .footer-bottom .to-top { margin-left: auto; }
  .document-page { padding-top: 44px; padding-bottom: 65px; }
  .document-heading { margin-bottom: 35px; }
  .document-heading h1 { font-size: clamp(2.8rem, 11vw, 4.125rem); margin: 23px 0; overflow-wrap: anywhere; }
  .draft-note { padding: 18px; font-size: 0.9375rem; }
  .document-body h2 { font-size: 1.8125rem; }
  .legal-details > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 360px) {
  :root { --gutter: 19px; }
  .wordmark-name { font-size: 1.1875rem; }
  .wordmark-el { font-size: 1.625rem; }
  .site-header { padding: 0 16px; }
  .hero-bottom { gap: 15px; }
  .hero-phone { font-size: 1.5rem; }
  .footer-call { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .will-reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header { position: static; }
  .hero { height: auto; min-height: 650px; }
  .will-reveal { opacity: 1 !important; transform: none !important; }
  .to-top { display: none; }
  .document-page { padding: 20px; }
}
