/* Casa Allamanda — Hacienda Pinilla, Guanacaste
   Palette taken from the house at blue hour: dusk sky, lamplight, white stucco,
   terracotta roof, sage dry-forest. */

:root {
  --dusk: #1b2a38;
  --dusk-deep: #12202c;
  --dusk-soft: #2c3f50;
  --bone: #f4f0e8;
  --bone-warm: #ece5d9;
  --paper: #fbf9f5;
  --sage: #7e8a6c;
  --sage-deep: #4f5a43;
  --clay: #c0714a;
  --clay-deep: #9a5433;
  --lamp: #e8b06a;
  --ink: #2b2b28;
  --ink-soft: #5d5d55;
  --rule: rgba(43, 43, 40, 0.14);
  --rule-light: rgba(244, 240, 232, 0.22);

  --display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 66ch;
  --wide: 1240px;
  --mid: 960px;
  --narrow: 720px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; }

p:last-child { margin-bottom: 0; }

.display {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.lede {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.measure { max-width: var(--measure); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dusk);
  color: var(--bone);
  padding: 12px 18px;
  z-index: 200;
}

.skip:focus { left: 8px; top: 8px; }

/* ---------- layout ---------- */

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.wrap-mid { width: min(100% - 2.5rem, var(--mid)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--narrow)); margin-inline: auto; }

.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }

.section-dusk {
  background: var(--dusk);
  color: var(--bone);
}

.section-dusk .lede,
.section-dusk .muted { color: rgba(244, 240, 232, 0.76); }

.section-bone { background: var(--bone); }

.muted { color: var(--ink-soft); }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 100;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-header--solid {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
}

.brand {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.32rem;
  text-decoration: none;
  color: var(--bone);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.site-header--solid .brand { color: var(--ink); }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 400;
  color: rgba(244, 240, 232, 0.88);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.2s ease;
}

.site-header--solid .nav a { color: var(--ink-soft); }

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.site-header--solid .nav a:hover,
.site-header--solid .nav a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(244, 240, 232, 0.5);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 7px 13px;
  border-radius: 2px;
  cursor: pointer;
}

.site-header--solid .nav-toggle { border-color: var(--rule); color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
}

.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(244, 240, 232, 0.55);
}

.btn-ghost:hover { background: rgba(244, 240, 232, 0.12); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-quiet:hover { border-color: var(--ink); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.header-cta { margin-left: 0.25rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--bone);
  background: var(--dusk-deep);
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 32, 44, 0.55) 0%,
    rgba(18, 32, 44, 0.15) 35%,
    rgba(18, 32, 44, 0.72) 82%,
    rgba(18, 32, 44, 0.9) 100%
  );
}

.hero-body {
  position: relative;
  z-index: 2;
  padding: 0 0 4.5rem;
  width: 100%;
}

.hero h1 {
  font-size: clamp(3.1rem, 9vw, 6.4rem);
  margin: 0 0 0.35em;
  max-width: 14ch;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.22rem);
  max-width: 44ch;
  color: rgba(244, 240, 232, 0.9);
  margin-bottom: 1.8rem;
}

.hero-page {
  min-height: 56vh;
  align-items: flex-end;
}

.hero-page h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  max-width: 18ch;
}

.hero-page .hero-body { padding-bottom: 3rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-body > * {
    animation: rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  }
  .hero-body > *:nth-child(2) { animation-delay: 0.09s; }
  .hero-body > *:nth-child(3) { animation-delay: 0.18s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- facts strip ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.fact {
  background: var(--paper);
  padding: 1.9rem 1.4rem;
}

.fact b {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.fact span {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
  display: block;
}

/* ---------- split blocks ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-text h2 { font-size: clamp(2rem, 4vw, 2.9rem); }

.split img { border-radius: 2px; }

.split-reverse .split-media { order: 2; }

/* ---------- editorial heading ---------- */

.head {
  max-width: 34ch;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
}

.head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1.1rem;
}

.card h3 { font-size: 1.3rem; margin-bottom: 0.35em; }

.card p { font-size: 0.97rem; color: var(--ink-soft); }

.section-dusk .card p { color: rgba(244, 240, 232, 0.72); }

.card-plain {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.7rem;
}

.section-dusk .card-plain {
  background: rgba(244, 240, 232, 0.05);
  border-color: var(--rule-light);
}

/* ---------- rooms ---------- */

.rooms { border-top: 1px solid var(--rule); }

.room {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.room h3 {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.45rem;
  margin: 0;
}

.room p { font-size: 0.99rem; color: var(--ink-soft); margin: 0; }

.room .bed { font-size: 0.99rem; }

/* ---------- guide layout ---------- */

.guide {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.guide-nav {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.guide-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rule);
}

.guide-nav a {
  display: block;
  text-decoration: none;
  font-size: 0.93rem;
  color: var(--ink-soft);
  padding: 7px 0 7px 1rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
}

.guide-nav a:hover { color: var(--ink); }

.guide-nav a.is-active {
  color: var(--clay-deep);
  border-left-color: var(--clay);
}

.entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry:last-child { border-bottom: 0; }

.entry h3 {
  font-size: 1.45rem;
  margin-bottom: 0.3em;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.entry-meta li {
  font-size: 0.82rem;
  color: var(--sage-deep);
  background: rgba(126, 138, 108, 0.14);
  padding: 4px 11px;
  border-radius: 2px;
}

.entry-meta li.kids {
  color: var(--clay-deep);
  background: rgba(192, 113, 74, 0.13);
}

.group-title {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  margin: 3.5rem 0 0.4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}

.guide-section:first-of-type .group-title { margin-top: 0; }

/* ---------- gallery ---------- */

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}

.grid-gallery figure { margin: 0; }

.grid-gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.grid-gallery figcaption {
  font-size: 0.87rem;
  color: var(--ink-soft);
  padding-top: 0.55rem;
}

.span-2 { grid-column: span 2; }

.grid-gallery .span-2 img { aspect-ratio: 16 / 9; }

/* ---------- tables & lists ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.table th { font-weight: 400; width: 38%; }

.table td { color: var(--ink-soft); }

.section-dusk .table th,
.section-dusk .table td { border-color: var(--rule-light); }

.section-dusk .table td { color: rgba(244, 240, 232, 0.76); }

.tick {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}

.tick li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
  font-size: 0.98rem;
}

details {
  border-bottom: 1px solid var(--rule);
  padding: 1.15rem 0;
}

summary {
  cursor: pointer;
  font-size: 1.08rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--clay);
  line-height: 1;
}

details[open] summary::after { content: "–"; }

details > div { padding-top: 0.9rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- booking band ---------- */

.book-band { text-align: center; }

.book-band h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-inline: auto;
  max-width: 20ch;
}

.book-band .lede { margin-inline: auto; margin-bottom: 2rem; }

.book-band .btn-row { justify-content: center; }

.note {
  font-size: 0.86rem;
  color: rgba(244, 240, 232, 0.6);
  margin-top: 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--dusk-deep);
  color: rgba(244, 240, 232, 0.72);
  padding: 4rem 0 2.5rem;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-light);
}

.site-footer h4 {
  color: var(--bone);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.site-footer li { padding: 0.3rem 0; }

.site-footer a { text-decoration: none; }

.site-footer a:hover { color: var(--bone); text-decoration: underline; }

.footer-brand {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.9rem;
  color: var(--bone);
  display: block;
  margin-bottom: 0.7rem;
}

.colophon {
  padding-top: 1.7rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(244, 240, 232, 0.5);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .split,
  .guide { grid-template-columns: 1fr; gap: 2.5rem; }
  .split-reverse .split-media { order: 0; }
  .guide-nav { position: static; }
  .guide-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-left: 0;
  }
  .guide-nav a {
    border: 1px solid var(--rule);
    padding: 6px 13px;
    margin: 0;
    border-radius: 2px;
  }
  .guide-nav a.is-active { border-color: var(--clay); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: auto; }
  .room { grid-template-columns: 1fr; gap: 0.4rem; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 3.75rem 0; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(27, 42, 56, 0.1);
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a {
    color: var(--ink);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .nav a:hover,
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); }
  .header-cta { margin: 0.9rem 0 0; text-align: center; }
  .hero { min-height: 88vh; }
  .tick { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
