/* ------------------------------------------------------------------
   Casa de Cobas — Catalan beach professional
   Palette: warm off-white sands, deep sea, terracotta, oak
   ------------------------------------------------------------------ */
:root {
  --sand-50: #faf7f1;
  --sand-100: #f3ede2;
  --sand-200: #e7dcc7;
  --sand-300: #d6c6a4;
  --ink-900: #1a2233;
  --ink-700: #303a4f;
  --ink-500: #5b6477;
  --ink-300: #99a0ad;
  --sea-700: #2c4f6b;
  --sea-500: #487796;
  --terra: #b66a4a;
  --line: rgba(26, 34, 51, 0.08);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1200px;
  --gap: 2rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--sea-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--terra); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink-900);
  letter-spacing: 0.005em;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1.05; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.15; margin-bottom: 1.2rem; }
h3 { font-size: 1.6rem; margin-bottom: 0.6rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 1rem;
}
.eyebrow.centered, h2.centered { text-align: center; }
.eyebrow.light, h2.light, p.light { color: var(--sand-50); }
.eyebrow.light { color: var(--sand-200); }

/* ----------- Nav ----------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem 2rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--ink-900); font-weight: 500;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--sea-700);
  border-radius: 50%;
  color: var(--sea-700);
}
.brand-mark svg { display: block; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.02em; }
.nav-links {
  display: flex; gap: 1.8rem;
  margin-left: auto;
  font-size: 0.92rem;
}
.nav-links a { color: var(--ink-700); }
.lang-switcher { display: flex; gap: 0.25rem; }
.lang-switcher button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-500);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
}
.lang-switcher button.active {
  background: var(--ink-900);
  color: var(--sand-50);
  border-color: var(--ink-900);
}
.lang-switcher button:hover:not(.active) { border-color: var(--ink-900); color: var(--ink-900); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}
.btn-primary { background: var(--ink-900); color: var(--sand-50); }
.btn-primary:hover { background: var(--terra); color: var(--sand-50); }
.btn-ghost { color: var(--sand-50); border-color: var(--sand-50); background: transparent; }
.btn-ghost:hover { background: var(--sand-50); color: var(--ink-900); }
.btn-outline { color: var(--ink-900); border-color: var(--ink-900); background: transparent; }
.btn-outline:hover { background: var(--ink-900); color: var(--sand-50); }
.btn.big { padding: 1.1rem 2.4rem; font-size: 0.92rem; }

/* ----------- Hero ----------- */
.hero {
  position: relative;
  height: min(92vh, 820px);
  min-height: 540px;
  overflow: hidden;
  color: var(--sand-50);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(105%) contrast(102%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,28,40,0.25) 0%, rgba(20,28,40,0.55) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.hero-content .eyebrow { color: var(--sand-200); }
.hero-content h1 { color: var(--sand-50); max-width: 14ch; }
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--sand-100);
  max-width: 36ch;
  margin: 1rem 0 2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ----------- Quickstats ----------- */
.quickstats {
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
}
.quickstats .container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding-top: 2.4rem; padding-bottom: 2.4rem;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--ink-900);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 0.6rem;
}
@media (max-width: 760px) {
  .quickstats .container { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
}

/* ----------- Sections ----------- */
section { padding: clamp(4rem, 9vh, 7rem) 0; }
.intro-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.intro-text p { margin: 1rem 0 0; }
.intro-figure img { aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }

.highlights { background: #fff; }
.highlight-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; margin-top: 3rem;
}
.card { background: var(--sand-50); }
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: 1.6rem 1.4rem 1.8rem; }
.card-body p { margin: 0; font-size: 0.96rem; }
@media (max-width: 860px) { .highlight-grid { grid-template-columns: 1fr; } }

/* ----------- Feature strip ----------- */
.feature-strip {
  position: relative;
  min-height: 480px;
  display: grid;
  align-items: center;
  color: var(--sand-50);
  padding: 0;
}
.feature-strip img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.feature-strip::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,28,40,0.7) 0%, rgba(20,28,40,0.3) 70%);
}
.feature-strip-text {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: 5rem 2rem; max-width: 600px;
  width: 100%;
}
.feature-strip-text { padding-left: max(2rem, calc((100vw - var(--maxw))/2 + 2rem)); }
.feature-strip h2 { margin-bottom: 1rem; }

/* ----------- Amenities ----------- */
.amenities { background: var(--sand-100); }
.amenity-list {
  list-style: none; padding: 0;
  margin: 3rem auto 0;
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2.5rem;
}
.amenity-list li {
  position: relative;
  padding: 0.9rem 0 0.9rem 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
}
.amenity-list li::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 14px; height: 1px; background: var(--terra);
  transform: translateY(-50%);
}
.amenity-list li.amen-feature {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--sea-700);
  border-bottom: 1px solid var(--sea-700);
  padding: 1.1rem 0 1.1rem 2.4rem;
}
.amenity-list li.amen-feature::before {
  width: 22px; height: 2px; background: var(--sea-700);
}
@media (max-width: 760px) { .amenity-list { grid-template-columns: 1fr; } }

/* ----------- Gallery ----------- */
.gallery { padding-bottom: 2rem; }
.gallery-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.gallery-grid img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity .25s, transform .4s;
}
.gallery-grid img:hover { opacity: 0.86; transform: scale(1.01); }
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ----------- Lightbox ----------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 20, 30, 0.95);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent; border: none;
  color: rgba(255,255,255,0.85);
  font-family: var(--serif);
  cursor: pointer;
  transition: color .2s;
}
.lb-close { top: 1.2rem; right: 1.5rem; font-size: 2.4rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3.6rem; line-height: 1; padding: 0.4rem 1rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }

/* ----------- Location ----------- */
.location { background: #fff; }
.location-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.location-list {
  list-style: none; padding: 0; margin: 1.6rem 0 2rem;
}
.location-list li {
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  font-size: 0.95rem;
}
.location-list strong { font-weight: 500; color: var(--ink-900); }
.location-list span { color: var(--ink-500); }
.map-frame {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--sand-100);
  overflow: hidden;
}
.map-frame img { display: block; width: 100%; height: auto; }
.map-cap {
  font-size: 0.85rem;
  color: var(--ink-500);
  padding: 0.6rem 0.8rem;
  border-top: 1px solid var(--line);
  background: var(--sand-50);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 860px) { .location-grid { grid-template-columns: 1fr; } }

/* ----------- Floor plans ----------- */
.floorplans { background: var(--sand-100); }
.plan-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem; margin-top: 3rem;
}
.plan-grid.single { grid-template-columns: minmax(0, 1100px); justify-content: center; }
.plan-grid figure { margin: 0; }
.plan-grid img { display: block; width: 100%; background: #fff; padding: 1rem; border: 1px solid var(--line); }
@media (max-width: 760px) { .plan-grid { grid-template-columns: 1fr; } }

/* ----------- Contact ----------- */
.contact {
  background: var(--ink-900);
  color: var(--sand-100);
  text-align: center;
}
.contact-inner { max-width: 700px; margin: 0 auto; }
.contact .eyebrow { color: var(--sand-300); }
.contact h2 { color: var(--sand-50); }
.contact p { color: var(--sand-200); margin: 1rem 0 2rem; }
.contact .btn-primary { background: var(--terra); }
.contact .btn-primary:hover { background: var(--sand-50); color: var(--ink-900); }
.contact-meta { font-size: 0.92rem; margin-top: 2rem; }
.contact-meta a { color: var(--sand-50); border-bottom: 1px solid var(--sand-300); }

/* ----------- Footer ----------- */
.footer {
  background: var(--ink-900);
  color: var(--sand-300);
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: end;
  gap: 2rem; flex-wrap: wrap;
}
.footer .brand-name.big { font-size: 1.6rem; color: var(--sand-50); margin: 0 0 0.3rem; }
.footer .small { font-size: 0.82rem; color: var(--ink-300); }
