/* ==========================================================================
   The K9 Boutique Hotel — styles
   Calm, static layout. No scroll animation.
   ========================================================================== */

:root {
  /* Brand colors */
  --cream: #f8f5ef;
  --white: #ffffff;
  --forest: #1d2e24;
  --forest-2: #2a4134;
  --clay: #c45f37;        /* small accents and icons */
  --clay-btn: #ad512c;    /* button fill: a touch deeper than --clay so white text passes WCAG AA */
  --clay-btn-hover: #8f4222;
  --muted: #4f5b54;       /* secondary text, 6:1 on cream */
  --line: #e2ddd3;        /* 1px borders */
  --focus: #ad512c;

  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale: 8, 16, 24, 32, 48, 64, 96 */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;

  --max: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --r-btn: 10px;
  --r-card: 14px;
  --shadow: 0 1px 2px rgba(29, 46, 36, .04), 0 4px 16px rgba(29, 46, 36, .04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s3)); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--cream);
  color: var(--forest);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 var(--s2); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
[hidden] { display: none !important; }
figure { margin: 0; }

/* Language: every string exists as .es and .en; <html lang> decides which shows */
html[lang="es"] .en, html[lang="en"] .es { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus: always visible for keyboard users */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.hero, .site-footer, .lightbox { --focus: #ffffff; }

.skip-link {
  position: absolute; left: var(--s2); top: -100px; z-index: 100;
  background: var(--forest); color: var(--white); padding: var(--s1) var(--s2); border-radius: var(--r-btn);
}
.skip-link:focus { top: var(--s1); }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.grid > * { grid-column: span 4; }

.section { padding-block: var(--s7); }
.section-white { background: var(--white); }
.section-head { max-width: 65ch; margin-bottom: var(--s5); }
.section-head p { color: var(--muted); margin-top: var(--s2); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; color: inherit; }
h2, .slogan { font-family: var(--f-head); font-weight: 400; letter-spacing: -.01em; }
.slogan { font-size: 64px; line-height: 1.1; margin: 0; }
h2 { font-size: 40px; line-height: 1.2; }
h3 { font-family: var(--f-body); font-size: 22px; font-weight: 600; line-height: 1.3; }

/* ---------- Buttons: one primary, one secondary ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 12px var(--s3);
  border: 2px solid transparent; border-radius: var(--r-btn);
  font: 600 17px/1.2 var(--f-body); text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn .icon { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--clay-btn); color: var(--white); }
.btn-primary:hover { background: var(--clay-btn-hover); }
.btn-secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-secondary:hover { background: var(--forest); color: var(--white); }
.btn-light { color: var(--white); border-color: var(--white); }
.btn-light:hover { background: var(--white); color: var(--forest); }
.btn-block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.actions-center { justify-content: center; margin-top: var(--s5); }

.icon { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: var(--white); border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s3); }
.brand {
  display: flex; align-items: center; gap: 12px; flex: none;
  text-decoration: none; font-weight: 700; font-size: 17px; line-height: 1.2;
}
.brand img { width: 48px; height: 48px; }
.nav { display: flex; gap: var(--s3); margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; font-size: 16px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--clay-btn); text-decoration: underline; text-underline-offset: 6px; }
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.header-book { min-height: 44px; padding-block: 8px; font-size: 16px; }

.lang { display: flex; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 2px; }
.lang a {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 8px;
  font: 600 15px/1 var(--f-body); color: var(--muted); text-decoration: none;
}
.lang a:hover { color: var(--forest); background: var(--cream); }
.lang a[aria-current="page"] { background: var(--forest); color: var(--white); }

/* Mobile menu: native <details>, works without JavaScript */
.menu { display: none; }
.menu-btn {
  display: flex; align-items: center; gap: var(--s1); min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-btn);
  font-weight: 600; font-size: 16px; cursor: pointer; list-style: none;
}
.menu-btn::-webkit-details-marker { display: none; }
.menu[open] .menu-btn { background: var(--forest); color: var(--white); border-color: var(--forest); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(29, 46, 36, .08);
  padding: var(--s1) var(--gutter) var(--s3);
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.menu-panel a:not(.btn) {
  display: block; padding: 12px 0; min-height: 48px; font-size: 18px; font-weight: 500;
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.menu-panel .btn { margin-top: var(--s3); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100vh - var(--header-h)), 760px);
  display: flex; align-items: center;
  padding-block: var(--s7);
  background: var(--forest) url("../video/hero-poster.webp") center / cover no-repeat;
  color: var(--white);
}
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 23, 18, .78) 0%, rgba(14, 23, 18, .6) 55%, rgba(14, 23, 18, .45) 100%);
}
.hero-content { max-width: var(--max); }
.hero-kicker { max-width: 34em; margin-bottom: var(--s2); font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: .01em; }
.hero-text { font-size: 20px; max-width: 34em; margin: var(--s3) 0 var(--s4); }
.trust { margin-top: var(--s4); font-size: 16px; font-weight: 500; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow); padding: var(--s4);
}
.service { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.services > .service { grid-column: span 6; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card-body p { margin: 0; color: var(--muted); }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.card-body .checklist { margin-bottom: var(--s2); }

.checklist { display: grid; gap: var(--s1); }
.checklist li { position: relative; padding-left: var(--s4); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px;
  background: var(--clay);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Photos ---------- */
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); background: var(--line); }
.figure figcaption { margin-top: 12px; font-weight: 600; }

/* ---------- How it works ---------- */
.steps { counter-reset: none; }
.step { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--cream); }
.step-num {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--s3);
  border-radius: 50%; background: var(--forest); color: var(--white);
  font: 600 22px/1 var(--f-body);
}
.step h3 { margin-bottom: var(--s1); }
.step p { color: var(--muted); }

/* ---------- Split sections (photo + text) ---------- */
.split { align-items: center; }
.split > .split-media { grid-column: span 6; }
.split > .split-text { grid-column: span 6; }
.split-text h2 { margin-bottom: var(--s3); }
.split-text > p { max-width: 65ch; }
.split-text .checklist { margin: var(--s3) 0 var(--s4); }
#caminatas .split-text, #fundador .split-text { padding-left: var(--s4); }
#dia .split-text { padding-right: var(--s4); }

/* ---------- Hotel ---------- */
.amenities { margin-top: var(--s5); display: grid; gap: var(--s3); grid-template-columns: 1fr; }
.checklist-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s4); }
.amenities .btn { justify-self: start; }

/* ---------- A typical day ---------- */
.schedule { margin-top: var(--s4); border-top: 1px solid var(--line); }
.schedule li {
  display: grid; grid-template-columns: 80px 1fr; gap: var(--s3);
  padding-block: var(--s3); border-bottom: 1px solid var(--line);
}
.schedule .time { font-weight: 700; font-size: 18px; color: var(--clay-btn); font-variant-numeric: tabular-nums; }
.schedule h3 { font-size: 19px; margin-bottom: 4px; }
.schedule p { color: var(--muted); font-size: 17px; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.filters button {
  min-height: 44px; padding: 8px var(--s2); border: 1px solid var(--line); border-radius: var(--r-btn);
  background: var(--white); color: var(--forest); font: 500 16px/1 var(--f-body); cursor: pointer;
}
.filters button:hover { border-color: var(--forest); }
.filters button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--white); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.gallery-grid a { display: block; border-radius: var(--r-card); overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); transition: opacity .15s; }
.gallery-grid a:hover img { opacity: .88; }
.gallery-grid a:focus-visible { outline-offset: 3px; }

/* ---------- Founder ---------- */
.stat { display: flex; align-items: baseline; gap: 12px; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); font-weight: 500; }
.stat strong { font-family: var(--f-head); font-weight: 400; font-size: 48px; line-height: 1; color: var(--clay-btn); }

/* ---------- FAQ ---------- */
.faq-head { grid-column: span 4; }
.faq-head p { color: var(--muted); margin: var(--s2) 0 var(--s3); }
.faq-list { grid-column: 6 / span 7; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  min-height: 48px; padding: var(--s3) 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 19px; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 22px; font-weight: 400; line-height: 1;
}
.faq-item[open] summary::after { content: "−"; background: var(--forest); border-color: var(--forest); color: var(--white); }
.faq-item summary:hover { color: var(--clay-btn); }
.faq-item p { max-width: 65ch; padding-bottom: var(--s3); color: var(--muted); }

/* ---------- Contact & booking ---------- */
.contact-grid { align-items: start; }
.form { grid-column: span 7; }
.contact-info { grid-column: span 5; display: grid; gap: var(--s3); }
.contact-info h3 { margin-bottom: var(--s3); }
.areas-intro { color: var(--muted); }
.area-list { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s2); }
.area-list li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); font-size: 16px; }

.service-pick { border: 0; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); }
.service-pick legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.service-pick label {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px var(--s2);
  border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer; font-weight: 500;
}
.service-pick label:hover { border-color: var(--forest); }
.service-pick input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--forest); }
.service-pick label:has(input:checked) { border-color: var(--forest); background: var(--cream); box-shadow: inset 0 0 0 1px var(--forest); }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s2); margin-bottom: var(--s3); }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 16px; margin-bottom: var(--s1); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px var(--s2);
  border: 1px solid #b9b3a7; border-radius: var(--r-btn); background: var(--white);
  font: 400 17px/1.4 var(--f-body); color: var(--forest);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--forest); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--forest); }
.field input[aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.field-error { color: #b3261e; font-size: 15px; font-weight: 500; margin: var(--s1) 0 0; }
.form-note { margin-top: var(--s2); font-size: 15px; color: var(--muted); text-align: center; }

.contact-list { display: grid; gap: var(--s3); margin-bottom: var(--s3); }
.contact-list li { display: flex; gap: var(--s2); align-items: flex-start; }
.contact-list .icon { color: var(--clay); flex: none; margin-top: 2px; }
.contact-list strong { display: block; font-size: 15px; color: var(--muted); font-weight: 600; }
.contact-list a { font-weight: 600; text-underline-offset: 4px; }

.map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #e9ece6; padding: var(--s6) 0 var(--s4); }
.site-footer .grid { row-gap: var(--s4); }
.site-footer a { color: var(--white); }
.footer-brand { grid-column: span 4; }
.footer-brand img { width: 96px; height: 96px; margin-bottom: var(--s2); }
.footer-brand p { max-width: 36ch; }
.footer-phone { margin-top: var(--s2); }
.footer-col { grid-column: span 3; }
.footer-col:nth-child(2) { grid-column: span 2; }
.footer-col:last-child { grid-column: span 3; }
.footer-col h2 { font-family: var(--f-body); font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #c9d1ca; margin-bottom: var(--s2); }
.footer-col ul { display: grid; }
.footer-col a { text-decoration: none; display: inline-block; padding-block: 10px; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.socials { display: flex; gap: var(--s1); }
.socials a { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--r-btn); }
.socials a:hover { background: var(--white); color: var(--forest); text-decoration: none; }
.socials .icon { width: 22px; height: 22px; }
.footer-bottom { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .2); font-size: 15px; color: #c9d1ca; }

/* ---------- Lightbox (native <dialog>) ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: var(--s6) var(--s4);
  border: 0; background: rgba(12, 18, 14, .95); color: var(--white);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(12, 18, 14, .95); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; border-radius: var(--r-card); object-fit: contain; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; background: rgba(0, 0, 0, .35);
  color: var(--white); cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .15); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: var(--s2); right: var(--s2); }
.lb-prev { left: var(--s2); top: 50%; translate: 0 -50%; }
.lb-next { right: var(--s2); top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; bottom: var(--s2); left: 0; right: 0; text-align: center; margin: 0; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav, .header-book { display: none; }
  .menu { display: block; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 960px) {
  .grid > *, .split > .split-media, .split > .split-text,
  .faq-head, .faq-list, .form, .contact-info { grid-column: 1 / -1; }
  #caminatas .split-text, #fundador .split-text, #dia .split-text { padding: 0; }
  #dia .split-media { order: -1; }
  .steps > *, .service { grid-column: span 6; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col, .footer-col:nth-child(2), .footer-col:last-child { grid-column: span 4; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --header-h: 64px; }
  body { font-size: 17px; }
  .section { padding-block: var(--s6); }
  .section-head { margin-bottom: var(--s4); }
  .slogan { font-size: 40px; }
  .hero-kicker { font-size: 16px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
  .steps > *, .services > .service { grid-column: 1 / -1; }
  .brand { gap: var(--s1); font-size: 15px; }
  .brand img { width: 44px; height: 44px; }
  .brand span { max-width: 7.5em; }
  .header-inner { gap: var(--s1); }
  .header-actions { gap: var(--s1); }
  .hero { min-height: 0; padding-block: var(--s6); }
  .hero-text { font-size: 18px; }
  .hero .actions .btn { flex: 1 1 100%; }
  .card:not(.service), .step { padding: var(--s3); }
  .card-body { padding: var(--s3); }
  .service-pick { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .checklist-cols { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); }
  .gallery-grid a { border-radius: var(--r-btn); }
  .schedule li { grid-template-columns: 64px 1fr; gap: var(--s2); }
  .footer-col, .footer-col:nth-child(2), .footer-col:last-child { grid-column: 1 / -1; }
  .lightbox { padding: var(--s6) var(--s1); }
  .lb-prev, .lb-next { top: auto; bottom: var(--s1); translate: none; }
  .lb-count { bottom: var(--s4); }
}

@media (max-width: 400px) {
  .brand { font-size: 14px; }
  .brand img { width: 40px; height: 40px; }
  .brand span { max-width: 7em; }
  .menu-btn { padding: 0 var(--s1); }
}
