/* Castillo del Romeral — house to rent.
   One stylesheet for all eight language builds. */

:root {
  --bg: #fbf8f4;
  --bg-raised: #fff;
  --ink: #241f1a;
  --ink-soft: #6d6157;
  --line: #e7ddd0;
  --accent: #b8541a;
  --accent-soft: #f3e7dc;
  --radius: 10px;
  --measure: 34rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --bg-raised: #201c16;
    --ink: #f0e9e0;
    --ink-soft: #a89a8b;
    --line: #362f26;
    --accent: #e08a4e;
    --accent-soft: #2c2118;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  /* height: auto is load-bearing: every img carries width/height attributes to
     reserve layout space, and without it max-width caps the width while the
     height attribute still applies — which stretched the portrait floor plans. */
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

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

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

.site-header {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
}

.brand span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
  margin-left: 0.45rem;
}

.lang {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.8rem;
}

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

.lang ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.lang a:hover {
  color: var(--accent);
  border-bottom-color: currentcolor;
}

.lang [aria-current] {
  color: var(--ink);
  font-weight: 500;
}

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

.hero {
  position: relative;
  min-height: min(78vh, 40rem);
  display: flex;
  align-items: flex-end;
  color: #fff;
  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(
    180deg,
    rgb(20 14 8 / 30%) 0%,
    rgb(20 14 8 / 10%) 35%,
    rgb(20 14 8 / 78%) 100%
  );
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-block: 3rem 2.75rem;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  color: rgb(255 255 255 / 82%);
}

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

.hero .sub {
  margin: 0.9rem 0 0;
  max-width: 46ch;
  color: rgb(255 255 255 / 88%);
}

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

.facts {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}

.facts ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 1.6rem 0;
  list-style: none;
}

.fact-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.fact-value {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  text-wrap: balance;
}

/* ---------- sections ---------- */

section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

section + section {
  border-top: 1px solid var(--line);
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  margin-bottom: 1.4rem;
}

h3 {
  font-size: 1.1rem;
  margin: 2.2rem 0 0.7rem;
  color: var(--accent);
}

.lede {
  font-size: 1.15rem;
}

/* ---------- callout ---------- */

.callout {
  max-width: var(--measure);
  margin-top: 2.75rem;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--accent);
}

.callout h3 {
  margin-top: 0;
}

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

/* ---------- highlights ---------- */

.highlights ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.1rem 2rem;
}

.highlights li {
  padding: 0.7rem 0 0.7rem 1.6rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- spec table ---------- */

.spec {
  border-collapse: collapse;
  width: 100%;
  max-width: 44rem;
}

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

.spec th {
  font-weight: 400;
  color: var(--ink-soft);
  width: 42%;
  padding-right: 1.5rem;
}

/* ---------- video ---------- */

.tour {
  display: block;
  width: 100%;
  max-width: 60rem;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
}

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

.group + .group {
  margin-top: 3rem;
}

.group h3 {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.6rem;
}

.shot,
.plan button {
  padding: 0;
  border: 0;
  background: var(--accent-soft);
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.shot:hover img,
.shot:focus-visible img {
  transform: scale(1.035);
}

.shot:focus-visible,
.plan button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- plans ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.2rem;
}

.plan {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.plan button {
  background: none;
}

.plan figcaption {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #6d6157;
  text-align: center;
}

.note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 1.2rem;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgb(12 9 6 / 94%);
  padding: 3.5rem 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox figcaption {
  color: rgb(255 255 255 / 78%);
  font-size: 0.85rem;
  text-align: center;
}

.lb-btn {
  position: absolute;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lb-btn:hover {
  background: rgb(255 255 255 / 20%);
}

.lb-close {
  top: 1rem;
  right: 1rem;
}

.lb-full {
  top: 1rem;
  right: 4.25rem;
  font-size: 1rem;
}

.lightbox:fullscreen {
  padding: 0.75rem;
}

/* Phones, especially landscape: give the photograph almost everything. */
@media (max-width: 40rem), (max-height: 32rem) {
  .lightbox {
    padding: 0.5rem;
  }

  .lightbox img {
    max-height: calc(100dvh - 3.5rem);
  }

  .lb-btn {
    width: 2.25rem;
    height: 2.25rem;
    background: rgb(255 255 255 / 14%);
  }

  .lb-close,
  .lb-full {
    top: 0.5rem;
  }

  .lb-close {
    right: 0.5rem;
  }

  .lb-full {
    right: 3.25rem;
  }

  .lb-prev {
    left: 0.35rem;
  }

  .lb-next {
    right: 0.35rem;
  }
}

.lb-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

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

footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

footer p {
  max-width: 46rem;
}

footer .price {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .shot img {
    transition: none;
  }
}
