:root {
  --ink: #0b1c24;
  --sea: #173643;
  --sea-soft: #2a5563;
  --sand: #e7dfd2;
  --ivory: #f6f2eb;
  --paper: #fbf8f3;
  --bronze: #9a7b4f;
  --bronze-deep: #7d6240;
  --text: #18252b;
  --muted: #5d6b72;
  --line: rgba(11, 28, 36, 0.12);
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(11, 28, 36, 0.14);
  --radius: 2px;
  --radius-media: 1.15rem;
  --container: 1180px;
  --header-h: 84px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --texture-med: url("/assets/web/lifestyle/mediterranean-terrace-costa-brava.jpg");
  --texture-opacity: 0.045;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(154, 123, 79, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(251, 248, 243, 0.94), rgba(246, 242, 235, 0.9) 42%, rgba(231, 223, 210, 0.88) 140%),
    var(--texture-med);
  background-position: center top, center, center top;
  background-size: auto, auto, cover;
  background-repeat: no-repeat;
  background-attachment: scroll, scroll, fixed;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--bronze-deep); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: 0.01em; margin: 0; }
p { margin: 0 0 1rem; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(246, 242, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.site-header__inner {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand img { width: 132px; height: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.site-nav ul {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-nav a[aria-current="page"] { color: var(--bronze-deep); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  text-decoration: none;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.62;
  padding: 0.2rem 0.15rem;
  border-radius: 2px;
  transition: opacity 0.2s var(--ease);
}
.lang-switch a img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border: 1px solid rgba(45, 40, 34, 0.12);
  border-radius: 1px;
  display: block;
}
.lang-switch__code {
  line-height: 1;
}
.lang-switch a[aria-current="true"],
.lang-switch a:hover {
  opacity: 1;
  color: var(--bronze-deep);
}
.lang-switch a[aria-current="true"] img,
.lang-switch a:hover img {
  border-color: rgba(140, 110, 70, 0.45);
  box-shadow: 0 0 0 1px rgba(140, 110, 70, 0.18);
}
.lang-switch--header {
  margin-left: 0.25rem;
}
.lang-switch--footer {
  margin-top: 1.1rem;
}
.lang-switch--footer a { color: rgba(231, 223, 210, 0.7); }
.lang-switch--footer a[aria-current="true"],
.lang-switch--footer a:hover { color: var(--white); }
.lang-switch--footer a img {
  border-color: rgba(231, 223, 210, 0.25);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--sea); border-color: var(--sea); color: var(--white); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--on-dark {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}
.btn--on-dark.btn--ghost {
  background: transparent;
  color: var(--white);
}
.btn--on-dark.btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--small { min-height: 40px; padding: 0.6rem 1rem; font-size: 0.68rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) infinite alternate;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 28, 36, 0.28) 0%, rgba(11, 28, 36, 0.18) 35%, rgba(11, 28, 36, 0.72) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) 0 4.5rem;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1rem;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  max-width: 10ch;
  margin-bottom: 1.1rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  display: block;
}
.hero__lead {
  max-width: 36rem;
  font-weight: 300;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}

.section,
.page-hero {
  position: relative;
  isolation: isolate;
}
.section::before,
.page-hero::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--texture-med) center / cover no-repeat;
  opacity: var(--texture-opacity);
  filter: saturate(0.75) brightness(1.08);
}
.section > *,
.page-hero > *,
.site-footer > * {
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.section--ink {
  background: var(--ink);
  color: var(--sand);
}
.section--sea {
  background: linear-gradient(160deg, var(--sea), var(--ink));
  color: var(--sand);
}
.section--ink::before,
.section--sea::before,
.site-footer::before {
  opacity: 0.07;
  filter: saturate(0.55) brightness(0.85);
  mix-blend-mode: soft-light;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  margin-bottom: 0.85rem;
}
.section-head p { color: var(--muted); }
.section--ink .section-head p,
.section--sea .section-head p { color: rgba(231, 223, 210, 0.78); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.stat {
  border-top: 1px solid rgba(231, 223, 210, 0.25);
  padding-top: 1.1rem;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--white);
}
.stat span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(231, 223, 210, 0.7);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split__media {
  overflow: hidden;
  min-height: 460px;
  border-radius: var(--radius-media);
}
.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 460px;
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.9rem;
  font-weight: 600;
}
.prose-list {
  margin: 1.4rem 0 2rem;
  display: grid;
  gap: 0.65rem;
}
.prose-list li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--muted);
}
.prose-list li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--bronze);
  position: absolute;
  left: 0;
  top: 0.55rem;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.property-item {
  display: grid;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}
.property-item__media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sea);
  border-radius: var(--radius-media);
}
.property-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.property-item:hover .property-item__media img { transform: scale(1.05); }
.property-item h3 {
  font-size: 1.55rem;
  margin-bottom: 0.2rem;
}
.property-item__meta {
  color: var(--muted);
  font-size: 0.92rem;
}
.property-item__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.property-item__price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink);
}

.empty-state {
  border: 1px solid var(--line);
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.45);
  max-width: 40rem;
}
.empty-state h3 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.testimonial {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.4);
  border-top: 1px solid var(--bronze);
}
.testimonial blockquote {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  font-style: italic;
}
.testimonial cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.testimonial cite span {
  display: block;
  margin-top: 0.25rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
}

.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 3rem;
}
.page-hero::before {
  opacity: 0.035;
}
.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  max-width: 14ch;
  margin-bottom: 1rem;
}
.page-hero p {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-card {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.45rem;
}
.contact-card p,
.contact-card a {
  color: var(--muted);
  text-decoration: none;
}

.form {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}
.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 400;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(154, 123, 79, 0.35);
  border-color: var(--bronze);
}
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.form-success,
.form-error {
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
}
.form-success { background: rgba(42, 85, 99, 0.1); color: var(--sea); }
.form-error { background: rgba(140, 40, 40, 0.08); color: #7a2a2a; }

.legal,
.article {
  max-width: 46rem;
}
.legal h2,
.article h2 {
  font-size: 1.8rem;
  margin: 2rem 0 0.8rem;
}
.legal p,
.article p { color: var(--muted); }
.article__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.article__cover {
  margin: 0 0 2rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-media);
}
.article__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-card {
  display: grid;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.blog-card__media {
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-media);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.blog-card:hover .blog-card__media img { transform: scale(1.04); }
.blog-card h3 { font-size: 1.55rem; }
.blog-card p { color: var(--muted); margin: 0; }

.detail-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.detail-hero__media {
  overflow: hidden;
  min-height: 420px;
  border-radius: var(--radius-media);
}
.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 420px;
}
.detail-hero__price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 1rem 0;
}
.feature-list {
  display: grid;
  gap: 0.55rem;
  margin: 1.25rem 0 2rem;
}
.feature-list li {
  padding-left: 1rem;
  position: relative;
  color: var(--muted);
}
.feature-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--bronze);
}

.site-footer {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: rgba(231, 223, 210, 0.82);
  padding: 4rem 0 1.5rem;
  margin-top: 2rem;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(231, 223, 210, 0.15);
}
.footer-brand img { width: 140px; margin-bottom: 1rem; }
.footer-motto {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.footer-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1rem;
}
.footer-links,
.footer-contact { display: grid; gap: 0.55rem; }
.footer-links a,
.footer-contact a { text-decoration: none; }
.footer-links a:hover,
.footer-contact a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
}
.footer-bottom ul { display: flex; gap: 1rem; }
.footer-bottom a { text-decoration: none; }

.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 520px;
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
.cookie-bar p { font-size: 0.9rem; margin-bottom: 0.9rem; }
.cookie-bar__actions { display: flex; gap: 0.6rem; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

@media (max-width: 980px) {
  .stats,
  .property-grid,
  .blog-grid,
  .testimonials,
  .split,
  .contact-grid,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-toggle { display: inline-flex; }
  .site-header__inner { gap: 0.75rem; }
  .lang-switch--header { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; }
  .site-nav {
    order: 4;
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: rgba(246, 242, 235, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 1.25rem 1.25rem 1.5rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .lang-switch__code { display: none; }
  .site-header { background: rgba(246, 242, 235, 0.94); border-bottom-color: var(--line); }
  .split__media,
  .split__media img,
  .detail-hero__media,
  .detail-hero__media img { min-height: 320px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll, scroll, scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body {
    background-attachment: scroll, scroll, scroll;
  }
}
