/* La Finca Cambutal — one bold ground, one dark ink. Centered, all caps, quiet.
   To try a different palette, change the two colors below. */
:root {
  --ground: #ECDDBA;
  --ink: #9A3A16;
  --head: #E35F2C;
  --rule: #E35F2C;
  --btn: #FF7424;
  --btn-text: #5C2410;
  --paper: #F7ECDD;
  --frame: #FF7424;
  --font: "Rubik", "Avenir Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-weight: 500; letter-spacing: 0.04em;
  -webkit-text-size-adjust: 100%;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { opacity: .75; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.caps { text-transform: uppercase; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }
h1, h2, h3, .big, .h2 { font-family: var(--head-font, var(--font)); font-variation-settings: var(--head-fvs, normal); }
h1, h2, h3 { text-transform: uppercase; margin: 0; line-height: 1.08; text-wrap: balance; color: var(--head, inherit); }
body { border-left: var(--spine, 0px) solid var(--btn, transparent); }
.eyebrow { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; margin: 0; }
section { scroll-margin-top: 20px; }
.body { font-size: 17px; line-height: 1.7; margin: 0; }
.link { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

.logo {
  display: block; width: 128px; height: 100px; background: var(--head, var(--ink));
  -webkit-mask: url(/img/logo-mask.png) center/contain no-repeat;
  mask: url(/img/logo-mask.png) center/contain no-repeat;
}

/* Header */
header.top { padding: 26px 0 0; }
.top-grid { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 20px; }
.top nav { display: flex; flex-wrap: wrap; gap: 26px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }
.top nav a { text-decoration: none; }
.top nav.right { justify-content: flex-end; }
.tagline { margin: 20px 0 0; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; }

.bar {
  display: block; text-align: center; text-decoration: none; text-transform: uppercase;
  background: var(--btn, var(--ink)); color: var(--btn-text, var(--ground)); padding: 24px 16px; border-radius: 4px;
  font-size: 21px; font-weight: 600; letter-spacing: 0.18em;
}
.bar:hover { opacity: .9; }

/* Film-framed photos and video */
.film { background: var(--frame); padding: 5px; border-radius: 2px; }
.film img, .film video { width: 100%; object-fit: cover; filter: saturate(.92) contrast(1.04); }
.hero { margin-top: 48px; position: relative; }
.hero video, .hero img { height: clamp(280px, 56vw, 620px); }
.film-btn {
  position: absolute; right: 20px; bottom: 20px; font: inherit; cursor: pointer;
  background: rgba(17,17,17,.72); color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 999px;
  padding: 10px 16px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
.film-btn:hover { background: rgba(17,17,17,.9); }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-45 { aspect-ratio: 4 / 5; }
.film .ratio-43, .film .ratio-32, .film .ratio-45 { height: auto; }

.prose { display: flex; flex-direction: column; gap: 20px; font-size: 19px; line-height: 1.75; }
.prose p { margin: 0; }
.big { font-size: 60px; font-weight: 700; letter-spacing: 0.04em; }
.h2 { font-size: 46px; font-weight: 700; letter-spacing: 0.04em; }

.stamp { display: flex; justify-content: center; }
.stamp svg { width: 180px; height: 180px; color: var(--head, var(--ink)); }

/* One photo edge to edge across the page */
.wide img { width: 100%; height: clamp(300px, 52vw, 720px); object-fit: cover; filter: saturate(.92) contrast(1.04); }

/* Photo strip: three framed photos in a row */
.strip { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 18px; align-items: end; }
.strip .film:nth-child(2) { transform: translateY(-28px); }

/* Cabañas grid on the homepage */
.cabanas { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 64px 38px; margin-top: 50px; }
.cabana { display: flex; flex-direction: column; gap: 14px; }
.cabana > a.film { display: block; text-decoration: none; }
.cabana > a.film:hover { opacity: 1; }
.cabana > a.film img { transition: transform .5s ease; }
.cabana > a.film:hover img { transform: scale(1.015); }
.cabana-head { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.cabana-head svg { color: var(--head, inherit); width: 40px; height: 40px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cabana h3 { font-size: 26px; font-weight: 600; letter-spacing: 0.1em; }
.cabana h3 a { text-decoration: none; }
.cabana .sub { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.cabana p { margin: 0; font-size: 16px; line-height: 1.65; }
.cabana ul, .details { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; letter-spacing: 0.06em; }
.cabana li, .details li { border-top: 1px solid var(--ink); padding-top: 6px; }
.cabana-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }

/* Two-column bands with rules top and bottom */
.long { border-top: 2px solid var(--rule, var(--ink)); border-bottom: 2px solid var(--rule, var(--ink)); padding: 64px 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 44px; align-items: center; }
.long > div { display: flex; flex-direction: column; gap: 16px; }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; }
.facts li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ink); padding-bottom: 11px; }
.facts li:last-child { border-bottom: 0; }
.facts span:last-child { text-align: right; }

/* Work from here */
.work { display: grid; grid-template-columns: 1.1fr 1fr; gap: 54px; align-items: center; }
.work .text { display: flex; flex-direction: column; gap: 18px; }

/* Story with the poster print */
.story { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.print { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.print img { width: min(300px, 100%); height: auto; }
.print span { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); }
.story .prose { text-align: left; font-size: 18px; }

/* Cambutal mosaic */
.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); grid-auto-rows: 150px; gap: 14px; margin-top: 46px; }
.mosaic figure { margin: 0; background: var(--frame); padding: 4px; border-radius: 2px; position: relative; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.04); }
.mosaic figcaption {
  position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 26px 12px 10px; color: #ECDDBA;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.m-a { grid-column: span 4; grid-row: span 3; }
.m-b { grid-column: span 2; grid-row: span 3; }
.m-c { grid-column: span 2; grid-row: span 2; }
.m-d { grid-column: span 2; grid-row: span 2; }
.m-e { grid-column: span 2; grid-row: span 2; }
.m-f { grid-column: span 3; grid-row: span 2; }
.m-g { grid-column: span 3; grid-row: span 2; }

/* Cabaña pages */
.crumb { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.page-title { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 56px; text-align: center; }
.page-title svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 54px; align-items: start; }
.intro .text { display: flex; flex-direction: column; gap: 22px; }
.speed { border: 2px solid var(--ink); border-radius: 4px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; }
.speed b { font-size: 30px; letter-spacing: 0.04em; }
.gallery { columns: 3 260px; column-gap: 16px; margin-top: 50px; }
.gallery button {
  display: block; width: 100%; margin: 0 0 16px; padding: 4px; border: 0; border-radius: 2px;
  background: var(--frame); cursor: zoom-in; break-inside: avoid;
}
.gallery img { width: 100%; height: auto; filter: saturate(.92) contrast(1.04); }
.others { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px; margin-top: 36px; }
.others a { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.others .film { padding: 4px; }
.others img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
.others span { font-size: 17px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
dialog.lightbox::backdrop { background: rgba(10,10,10,.93); }
.lightbox .stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox video { max-width: 100%; max-height: 100%; }
.lb-btn {
  position: absolute; font: inherit; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; width: 48px; height: 48px; cursor: pointer; font-size: 20px; line-height: 1;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 12px; letter-spacing: 0.2em; }

/* Request form */
.form { display: flex; flex-direction: column; gap: 38px; margin-top: 52px; text-align: left; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.field .hint { font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.in {
  font: inherit; font-size: 17px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  padding: 10px 2px; width: 100%; min-height: 46px; -webkit-appearance: none; appearance: none;
}
.in::placeholder { color: var(--ink); opacity: .6; }
select.in { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 30px; }
textarea.in { resize: vertical; min-height: 90px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
legend { padding: 0; margin-bottom: 14px; font-size: 21px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 2px solid var(--ink);
  border-radius: 999px; font-size: 15px; letter-spacing: 0.04em; cursor: pointer;
}
.chip input:checked + span { background: var(--ink); color: var(--ground); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.note { margin: -22px 0 0; font-size: 14px; letter-spacing: 0.03em; }
.send {
  font: inherit; cursor: pointer; border: 0; background: var(--btn, var(--ink)); color: var(--btn-text, var(--ground));
  padding: 22px; border-radius: 4px; font-size: 19px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.msg { margin: 0; font-size: 16px; font-weight: 600; min-height: 1em; }
.thanks { border: 2px solid var(--ink); border-radius: 4px; padding: 44px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }

footer { padding: 34px 0 40px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 20px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }
footer .links { display: flex; flex-wrap: wrap; gap: 20px; }
footer .links.right { justify-content: flex-end; }
footer svg { width: 110px; height: 110px; color: var(--head, var(--ink)); }

.mt-xl { margin-top: 120px; }
.mt-l { margin-top: 90px; }
.mt-m { margin-top: 56px; }

@media (max-width: 860px) {
  .work, .story, .intro { grid-template-columns: 1fr; gap: 36px; }
  .story .print { order: 2; }
  .mosaic { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 120px; }
  .m-a { grid-column: span 2; grid-row: span 2; }
  .m-b, .m-c, .m-d, .m-e { grid-column: span 1; grid-row: span 2; }
  .m-f, .m-g { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 760px) {
  .top-grid { grid-template-columns: 1fr; justify-items: center; }
  .top nav, .top nav.right { justify-content: center; gap: 16px 22px; font-size: 13px; }
  .top nav.left { order: 2; } .top .logo { order: 1; } .top nav.right { order: 3; }
  .big { font-size: 44px; } .h2 { font-size: 34px; }
  .prose { font-size: 17px; }
  .bar { font-size: 17px; padding: 20px 12px; }
  .film { padding: 4px; }
  .hero { margin-top: 32px; }
  .film-btn { right: 14px; bottom: 14px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip .film:nth-child(2) { transform: none; grid-column: span 2; order: -1; }
  .cabanas, .long, .row2, .others { grid-template-columns: 1fr; }
  .cabanas { gap: 56px; }
  .long { padding: 48px 0; gap: 30px; }
  .mt-xl { margin-top: 84px; } .mt-l { margin-top: 64px; }
  .lightbox .stage { padding: 64px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  footer .links, footer .links.right { justify-content: center; }
}

/* Homepage: photos without borders, with rounded corners */
.home .film, .home .mosaic figure { padding: 0; background: none; border-radius: var(--round); overflow: hidden; }
.home .film img, .home .film video, .home .mosaic img { border-radius: var(--round); }
.home .mosaic figcaption { left: 0; right: 0; bottom: 0; border-radius: 0 0 var(--round) var(--round); }

/* "La Finca" hand lettering, colored by the palette */
.lettering {
  display: block; width: min(440px, 80vw); aspect-ratio: 1104 / 268; margin: 4px auto 18px; align-self: center;
  background: var(--head, var(--ink));
  -webkit-mask: url(/img/la-finca-lettering.png) center/contain no-repeat;
  mask: url(/img/la-finca-lettering.png) center/contain no-repeat;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home .bar { border-radius: var(--round); color: #ECDDBA; }
.home { --round: 18px; }

/* Film grain on the background only: never on text or photos (turned on with the "grain" class on <html>) */
html.grain { background: var(--ground); }
html.grain body { background: transparent; }
html.grain body::before {
  content: ""; pointer-events: none; position: fixed; inset: 0; z-index: -1;
  background: url(/img/grain.png) repeat; background-size: 240px 240px;
  opacity: var(--grain, .55); mix-blend-mode: overlay;
}
.stamp.mt-l { margin-top: 32px; }
.stamp svg.sym { width: 180px; height: 131px; }
.stamp + #cabanas { margin-top: 26px; }
@media (max-width: 760px) { .stamp.mt-l { margin-top: 30px; } .stamp + #cabanas { margin-top: 24px; } }

/* Long stays page */
.units { grid-template-columns: repeat(4, minmax(0,1fr)); }
.units p { margin: 0; font-size: 15px; line-height: 1.6; text-align: center; color: var(--ink); }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 30px; }
.quotes blockquote { margin: 0; border-top: 2px solid var(--rule, var(--ink)); border-bottom: 2px solid var(--rule, var(--ink)); padding: 28px 6px; display: flex; flex-direction: column; gap: 14px; }
.quotes p { margin: 0; font-size: 20px; line-height: 1.55; color: var(--head, var(--ink)); }
.quotes cite { font-style: normal; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.page-title .body { margin: 6px auto 0; }
@media (max-width: 860px) { .units { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) { .units, .quotes { grid-template-columns: 1fr; } }
