/* Finca Colibrí public site. Colours and radii come from tokens.css; no inline styles anywhere (CSP). */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/work-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
  hyphens: auto;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 4vw, 3.6rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.15em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.muted { color: var(--text-muted); }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: 0; transform: translateY(-200%);
  background: var(--brand); color: var(--on-brand); padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-s) var(--radius-s); z-index: 10;
}
.skip:focus { transform: none; }

/* ---------- header ---------- */
.stripe { height: 6px; background: linear-gradient(90deg, var(--fc-coral), var(--fc-gold), var(--fc-teal)); }
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; min-height: 2.75rem; }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 1.3rem; }
.mark { width: 2.25rem; height: 2.25rem; flex: none; color: var(--brand); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.nav a, .lang {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.nav a:hover, .lang:hover { color: var(--link); text-decoration: underline; }
.nav a[aria-current="page"], .brand[aria-current="page"] .brand-name { text-decoration: underline; text-decoration-thickness: 0.12em; }
.lang {
  margin-inline-start: auto; padding-inline: 0.9rem; border: 2px solid var(--line);
  border-radius: 999px; font-weight: 600;
}
.ext { font-size: 0.85em; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(1.75rem, 5vw, 3.5rem); }
.eyebrow {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral-text); margin-bottom: 0.75rem;
}
.lead { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem); line-height: 1.5; max-width: 38rem; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 1.25rem 0 0; }
.status-line { color: var(--text-muted); }
.chip {
  display: inline-block; padding: 0.2rem 0.85rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  background: var(--accent-soft, var(--line)); color: var(--accent, var(--text)); border: 1px solid currentColor;
}

/* ---------- decorative art ---------- */
.art {
  --sky-a: #fdf0dc; --sky-b: var(--bg);
  --r1: #cfe0d6; --r2: #93c0ac; --r3: #3f806a; --sun: var(--fc-gold); --mist: #ffffff;
  margin-top: 1.5rem; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-a), var(--sky-b));
}
.art--cabins, .art--card { --r3: var(--accent); --r2: color-mix(in srgb, var(--accent) 45%, #ffffff); --r1: color-mix(in srgb, var(--accent) 22%, #ffffff); }
.art-svg { display: block; width: 100%; height: 100%; }
.art-sun { fill: var(--sun); opacity: 0.9; }
.art-r1 { fill: var(--r1); }
.art-r2 { fill: var(--r2); }
.art-r3 { fill: var(--r3); }
.art-mist { fill: var(--mist); opacity: 0.55; }
@media (min-width: 40rem) { .art { aspect-ratio: 5 / 2; } }
@media (prefers-color-scheme: dark) {
  .art { --sky-a: #3a2c1f; --sky-b: var(--bg); --r1: #2c3b34; --r2: #2f4f42; --r3: #25614d; --sun: #d9a21b; --mist: #8aa397; }
  .art--cabins, .art--card { --r3: var(--accent); --r2: color-mix(in srgb, var(--accent) 45%, #1c1917); --r1: color-mix(in srgb, var(--accent) 22%, #1c1917); }
  .art-mist { opacity: 0.18; }
}

/* ---------- sections ---------- */
.block, .story, .doors, .prose { padding-block: clamp(1.75rem, 5vw, 3rem); }
.prose > * { max-width: 44rem; }
.story-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.story-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 1.25rem 1.4rem 0.4rem; border-top: 6px solid var(--fc-teal);
}
.story-item:nth-child(2) { border-top-color: var(--fc-gold); }
.story-item:nth-child(3) { border-top-color: var(--fc-coral); }
.story-item:nth-child(4) { border-top-color: var(--accent, var(--fc-teal)); }
.story-item h2 { font-size: 1.4rem; }
.story-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.story-links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.story-links .accent-link { color: var(--accent); }

.door-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: 1.25rem; }
.door {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 1.25rem 1.4rem 1.4rem; border-top: 6px solid var(--fc-teal);
}
.door p:not(.tag) { flex: 1; }
.door--cabins { border-top-color: var(--accent); }
.door--shop { border-top-color: var(--fc-coral); }
.door--recipes { border-top-color: var(--fc-gold); }
.tag { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; text-align: center;
  min-height: 2.75rem; max-width: 100%; padding: 0.55rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; line-height: 1.3;
}
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--accent { background: var(--accent, var(--brand)); color: var(--on-accent, var(--on-brand)); }
.btn--ghost { border-color: currentColor; color: var(--link); background: transparent; }
.btn--brand:hover, .btn--accent:hover { filter: brightness(1.08); }
.btn--soon { border: 2px dashed var(--line); color: var(--text-muted); cursor: default; }
.btn--static { cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.soon {
  display: inline-block; font-size: 0.85em; padding: 0.05rem 0.65rem; border-radius: 999px;
  border: 1px dashed currentColor; color: var(--text-muted); max-width: 100%; overflow-wrap: anywhere; font-weight: 500;
}
.soon-block { padding: 1rem 1.2rem; border-radius: var(--radius-m); background: var(--accent-soft, var(--surface)); border: 1px dashed var(--line); }

/* ---------- cabins ---------- */
.here-grid { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.here-grid li { border-inline-start: 4px solid var(--accent); padding-inline-start: 1rem; }
.here-grid h3 { font-size: 1.2rem; color: var(--accent); }
.cabin-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: 1.25rem; }
.cabin { background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cabin-photo { position: relative; }
.cabin-photo .art { margin: 0; aspect-ratio: 16 / 9; }
.cabin-photo-note { position: absolute; max-width: calc(100% - 1.5rem); inset-inline-start: 0.75rem; bottom: 0.75rem; background: var(--surface); padding: 0.15rem 0.8rem; }
.cabin-body { padding: 1.1rem 1.3rem 1.3rem; }
.cabin-body h3, .cabin-body h4 { color: var(--accent); }
.facts { display: grid; grid-template-columns: min(9.5rem, 40%) 1fr; gap: 0.4rem 1rem; margin: 0; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; min-width: 0; }
@media (max-width: 24rem) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 0.6rem; } }
.note { margin-top: 1rem; }
.amenities { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.amenities li { background: var(--accent-soft); color: var(--text); padding: 0.3rem 0.9rem; border-radius: 999px; }
.two > * { min-width: 0; }
.two { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.back { padding-bottom: 2.5rem; }
/* "Pedir fechas" form */
.ask { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 40rem; margin-top: 1rem; padding: 1.25rem 1.4rem; background: var(--accent-soft, var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-l); }
.ask[hidden], .ask-result[hidden], .form-error[hidden] { display: none; }
.ask > *, .field-row > * { min-width: 0; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
.field label { font-weight: 600; }
.field input, .field select {
  width: 100%; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; font: inherit; font-size: 1rem;
  color: var(--text); background: var(--surface); border: 2px solid var(--text-muted); border-radius: var(--radius-s);
}
.field input[aria-invalid="true"] { border-color: var(--coral-text); }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.form-error { margin: 0; color: var(--coral-text); font-weight: 600; }
.ask .actions { margin: 0; }
.ask-result { border-top: 1px solid var(--line); padding-top: 1rem; }
.ask-message { margin: 0 0 1rem; padding: 0.75rem 1rem; border-inline-start: 4px solid var(--accent, var(--brand)); background: var(--surface); }
button.btn { cursor: pointer; }

.faq { margin-top: 1rem; max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 0.8rem 0; min-height: 2.75rem; font-weight: 600; }
.faq details[open] summary { color: var(--accent); }
.faq details p { margin: 0 0 1rem; }

/* ---------- guest welcome (QR page) ---------- */
.welcome-top { padding-top: clamp(1.75rem, 5vw, 3rem); }
.welcome-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); padding-bottom: 1rem; }
.welcome-card {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 1.25rem 1.4rem 0.6rem; border-top: 6px solid var(--accent, var(--fc-teal));
}
.welcome-card h2 { font-size: 1.4rem; }
.welcome-card--emergency { border-top-color: var(--fc-coral); }
.big-fact { font-size: 1.25rem; }
.emergency-number { font-family: var(--font-display); font-size: 2.4rem; font-weight: 650; line-height: 1.1; }
.emergency-number a { display: inline-block; min-height: 2.75rem; color: var(--coral-text); }
.emergency-number .muted { font-family: var(--font-body); font-size: 1rem; font-weight: 400; }
.welcome-thanks { padding-top: 1.5rem; font-family: var(--font-display); font-size: 1.3rem; }

/* Printing the welcome page (and any page): plain black on white, no chrome, cards do not split. */
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --text-muted: #333; --line: #999; }
  body { font-size: 11pt; line-height: 1.45; background: #fff; color: #000; }
  .skip, .nav, .lang, .stripe, .art, .print-hide, .site-footer .foot-links, .btn, .actions { display: none !important; }
  .site-header { border: 0; }
  .wrap { width: 100%; }
  .welcome-grid { display: block; }
  .welcome-card { break-inside: avoid; border: 1px solid #999; border-top-width: 4px; border-radius: 0.5rem; margin-bottom: 0.8rem; padding-bottom: 0.2rem; }
  .welcome-card--emergency { border-width: 2px; border-color: #000; }
  .emergency-number a { color: #000; text-decoration: none; }
  .soon { border: 0; color: #000; font-style: italic; padding: 0; }
  .site-footer { margin-top: 1rem; padding-block: 0.5rem; }
  a { color: #000; text-decoration: none; }
}

/* ---------- brand preview (/marca/) ---------- */
.mark-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.mark-tile { width: 7rem; height: 7rem; border-radius: var(--radius-m); display: grid; place-items: center; }
.mark-tile .mark { width: 4.5rem; height: 4.5rem; color: inherit; }
.mark-tile--teal { background: var(--fc-teal-deep); color: var(--fc-cream); }
.mark-tile--ink { background: var(--fc-ink); color: var(--fc-gold); }
.mark-tile--gold { background: var(--fc-gold); color: var(--fc-ink); }
.logo-card { background: #fdf8f3; border-radius: var(--radius-m); padding: 0.5rem; width: min(100%, 14rem); }
.swatches { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.swatch { display: grid; gap: 0.15rem; font-size: 0.9rem; }
.chip-color { height: 3.5rem; border-radius: var(--radius-s); border: 1px solid var(--line); }
.sw-ink { background: #2f2b28; } .sw-cream { background: #fdf8f3; } .sw-coral { background: #f16745; }
.sw-teal { background: #1f8a70; } .sw-gold { background: #f7ba2a; } .sw-coral-deep { background: #b3401f; } .sw-teal-deep { background: #17705a; }
.sw-name { font-weight: 600; } .sw-hex { font-variant-numeric: tabular-nums; }
.sw-note { color: var(--text-muted); }
.accent-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: 1.25rem; }
.accent-option h3 { margin-bottom: 0.25rem; }
.contrast { width: 100%; table-layout: fixed; overflow-wrap: anywhere; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.contrast th, .contrast td { text-align: start; padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--line); }
.type-display { font-family: var(--font-display); font-size: clamp(1.8rem, 1rem + 3vw, 2.8rem); line-height: 1.2; margin-bottom: 0.25rem; }
.type-body { font-family: var(--font-body); }

/* ---------- misc ---------- */
.plain-list { padding-inline-start: 1.2rem; }
.plain-list li { margin-bottom: 0.6rem; }

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 1.5rem 2.5rem; font-size: 0.95rem; }
.foot p { margin-bottom: 0.4rem; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0.5rem 0 0; padding: 0; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (forced-colors: active) {
  .btn, .chip, .soon, .lang { border: 1px solid ButtonText; }
  .art { display: none; }
}
