/* ===== Tipografías (alojadas en la propia web, sin Google Fonts) ===== */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

/* ===== Paleta: verde de la cruz, azul de la fachada, granate de las ventanas ===== */
:root {
  --green-900: #0b3a23;
  --green-800: #0f4d2e;
  --green-600: #1f7a43;
  --green-400: #4caf50;
  --wine: #7a1f2b;
  --blue: #3d6fd6;
  --cream: #faf8f3;
  --sand: #f2eee4;
  --ink: #1d2420;
  --muted: #5d665f;
  --line: #e4dfd2;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 40, 25, .05), 0 12px 32px -12px rgba(16, 40, 25, .18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-800); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--green-900); }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--green-600); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.note { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--wine); margin-bottom: .9rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; border-radius: 6px; }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .85em 1.5em; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease; font-family: inherit; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-800); color: var(--white); box-shadow: 0 8px 20px -8px rgba(15, 77, 46, .6); }
.btn-primary:hover { background: var(--green-600); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: var(--white); border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .25); }
.btn-outline { color: var(--green-800); border-color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: var(--white); }
.btn-sm { padding: .6em 1.1em; font-size: .9rem; }

/* ===== Cabecera ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.brand img { height: 62px; width: auto; mix-blend-mode: multiply; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; position: relative; padding: 4px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--green-600); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--green-900); border-radius: 2px; transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ===== Portada ===== */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; isolation: isolate; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 60% 40%; z-index: -2; animation: zoom 18s ease-out both; }
@keyframes zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(8, 36, 22, .88) 0%, rgba(8, 36, 22, .62) 40%, rgba(8, 36, 22, .05) 75%), linear-gradient(0deg, rgba(8, 36, 22, .55) 0%, transparent 40%); }
.hero-content { padding-block: 120px 96px; max-width: 1180px; }
.hero .eyebrow { color: #b9e4c0; }
.hero h1 { color: var(--white); font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); max-width: 14ch; margin-bottom: .35em; }
.hero h1 em { color: #a7e0b2; }
.lede { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); max-width: 40ch; color: rgba(255, 255, 255, .9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.since { position: absolute; right: clamp(16px, 5vw, 64px); bottom: clamp(24px, 6vw, 64px); width: 132px; height: 132px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); display: grid; place-content: center; text-align: center; backdrop-filter: blur(8px); background: rgba(255, 255, 255, .08); }
.since span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.since strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 400; line-height: 1; }

/* Estado abierto/cerrado */
.status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); font-size: .92rem; margin-top: 8px; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: #bbb; }
.status.open .dot { background: #5ee07a; box-shadow: 0 0 0 0 rgba(94, 224, 122, .7); animation: pulse 2s infinite; }
.status.closed .dot { background: #ff8f8f; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(94, 224, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 224, 122, 0); } }

/* ===== Secciones ===== */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-tint { background: var(--sand); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* Horario */
.hours { padding: clamp(20px, 3vw, 36px); }
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; border-radius: 10px; }
.hours-list li:last-child { border-bottom: 0; }
.hours-list li span:first-child { font-weight: 600; }
.hours-list li.closed span:last-child { color: var(--muted); }
.hours-list li.today { background: #eaf5ec; border-color: transparent; }
.hours-list li.today span:first-child::after { content: "Hoy"; margin-left: 10px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--white); background: var(--green-600); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service .icon { width: 56px; height: 56px; border-radius: 16px; background: #eaf5ec; display: grid; place-items: center; margin-bottom: 20px; }
.service .icon svg { width: 30px; height: 30px; fill: none; stroke: var(--green-800); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.service p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Historia */
.story-figure { margin: 0; position: relative; }
.story-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.story-figure::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 1.5px solid var(--wine); border-radius: var(--radius); z-index: -1; opacity: .35; }
.story { isolation: isolate; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-size: 2.2rem; color: var(--green-800); line-height: 1; }
.facts dd { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* Mapa */
.map { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 7; background: var(--white); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.map-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: saturate(.7); }
.map-consent { position: relative; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); padding: 28px 32px; border-radius: var(--radius); text-align: center; max-width: 420px; margin: 16px; box-shadow: var(--shadow); }
.map-consent p { margin-bottom: .6em; }

/* Contacto */
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .3s, box-shadow .3s; min-width: 0; }
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-800); display: grid; place-items: center; margin-bottom: 14px; }
.contact-card .icon svg { width: 22px; height: 22px; fill: var(--white); }
.contact-card .label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-card .value { font-family: var(--serif); font-size: 1.25rem; color: var(--green-900); overflow-wrap: anywhere; }

/* Pie */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, .78); padding-block: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-name { font-family: var(--serif); color: var(--white); font-size: 1.2rem; margin: 0 0 4px; }
.site-footer .small { margin: 0; }
.footer-links { display: flex; gap: 20px; }
.footer-links button { background: none; border: 0; color: inherit; font: inherit; font-size: .9rem; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .3); }
.footer-links button:hover { color: var(--white); }
.copy { width: 100%; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* Ventanas legales */
.modal { width: min(640px, calc(100% - 32px)); max-height: 85vh; border: 0; border-radius: var(--radius); padding: 40px 36px 32px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); color: var(--ink); }
.modal::backdrop { background: rgba(8, 36, 22, .55); backdrop-filter: blur(4px); }
.modal h2 { font-size: 1.8rem; }
.modal ul { padding-left: 1.1em; }
.modal li { margin-bottom: .4em; }
.modal mark { background: #fff1c2; padding: 0 4px; border-radius: 4px; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sand); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }

/* ===== Guardias ===== */
.guard-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--wine); color: var(--white); text-decoration: none; font-size: .95rem; font-weight: 500; text-align: center; line-height: 1.4; }
.guard-banner[hidden] { display: none; }
.guard-banner.now { background: #1b8a3c; }
.guard-banner-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--white); color: #1b8a3c; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.guard-banner:not(.now) .guard-banner-icon { color: var(--wine); }
.guard-banner-more { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.status.guard { background: rgba(27, 138, 60, .55); border-color: rgba(167, 224, 178, .7); font-weight: 600; }

.section-dark { background: var(--green-900); color: rgba(255, 255, 255, .85); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: #b9e4c0; }
.section-dark .muted, .section-dark .note { color: rgba(255, 255, 255, .65); }
.guard-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; align-items: start; }
.guard-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.guard-card h3 { font-size: 1.35rem; margin-bottom: 18px; }
.guard-own-list, .guard-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guard-own-list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .07); border-left: 4px solid #a7e0b2; }
.guard-own-list li.current { background: rgba(27, 138, 60, .35); border-left-color: #5ee07a; }
.guard-own-list strong { color: var(--white); font-weight: 600; }
.badge { align-self: flex-start; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #5ee07a; color: var(--green-900); padding: 2px 9px; border-radius: 999px; }
.guard-item { display: grid; gap: 2px; padding: 16px 18px; border-radius: 14px; background: var(--white); color: var(--ink); }
.guard-item.ours { box-shadow: 0 0 0 3px #5ee07a; }
.guard-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.guard-place { color: var(--wine); }
.guard-hours { color: var(--muted); }
.guard-name { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--green-900); margin-top: 4px; }
.guard-addr { color: var(--muted); font-size: .92rem; }
.guard-tel { justify-self: start; margin-top: 6px; font-weight: 600; color: var(--green-800); text-decoration: none; padding: 6px 14px; border-radius: 999px; background: #eaf5ec; }
.guard-tel::before { content: "☎ "; }
.guard-now-card .note { margin-top: 16px; }
.btn-light { margin-top: 8px; background: var(--white); color: var(--green-900); }
.btn-light:hover { background: #eaf5ec; }

/* Aparición suave al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 84px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); padding: 8px 16px 24px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s ease; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav-call { margin-top: 16px; justify-content: center; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .guard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { height: 72px; }
  .nav { inset: 72px 0 auto 0; }
  .brand img { height: 50px; }
  html { scroll-padding-top: 76px; }
  .hero { display: block; min-height: 0; background: var(--green-900); }
  .hero-media { position: relative; display: block; height: auto; aspect-ratio: 16 / 10; }
  .hero-media img { object-position: 50% 50%; }
  .hero-shade { inset: 0 0 auto 0; aspect-ratio: 16 / 10; background: linear-gradient(0deg, var(--green-900) 0%, rgba(11, 58, 35, 0) 40%); }
  .hero-content { padding-block: 20px 48px; }
  .hero h1 { max-width: none; }
  .since { top: 12px; bottom: auto; right: 12px; width: 76px; height: 76px; background: rgba(11, 58, 35, .35); }
  .since span { font-size: .6rem; }
  .since strong { font-size: 1.35rem; }
  .grid-2, .services, .contact, .guard-grid { grid-template-columns: 1fr; }
  .guard-banner { font-size: .85rem; gap: 2px 10px; padding: 8px 14px; }
  .guard-banner-icon { display: none; }
  .story-figure::before { inset: 14px -10px -14px 10px; }
  .map { aspect-ratio: 4 / 5; }
  .hours-list li { flex-direction: column; gap: 2px; }
  .facts dt { font-size: 1.8rem; }
  .modal { padding: 36px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
