/* =========================================================
   L'Heura — Apartament Turístic
   Sistema visual: editorial, càlid, mediterrani
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Paleta — extreta de la casa real */
  --ink:        #1a1a1a;        /* negre del logo */
  --ink-soft:   #3a3632;
  --charcoal:   #6b6560;
  --stone:      #9a928a;
  --cream:      #f6efe4;        /* parets, fons principal */
  --cream-2:    #fbf7f0;        /* fons més clar */
  --sand:       #e8dcc5;        /* seccions tintades */
  --sand-2:     #d9c9ab;
  --terracotta: #c97b5a;        /* accent principal (rajola terrassa) */
  --terra-deep: #a35a3d;
  --wood:       #b89775;        /* secundari càlid (fusta clara) */
  --moss:       #6b7a4f;        /* accent "heura" — ús molt puntual */
  --line:       rgba(26,26,26,0.12);
  --line-soft:  rgba(26,26,26,0.06);

  /* Tipografia */
  --serif:  'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Escala */
  --t-eyebrow: 0.72rem;         /* 11.5px, uppercase labels */
  --t-body:    1.0625rem;       /* 17px */
  --t-lead:    1.25rem;         /* 20px */
  --t-h3:      1.75rem;         /* 28px */
  --t-h2:      2.75rem;         /* 44px */
  --t-h1:      clamp(3rem, 7vw, 5.5rem);
  --t-display: clamp(4rem, 11vw, 9rem);

  /* Radis i ombres — molt subtils */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --shadow-soft: 0 12px 40px -18px rgba(26,26,26,0.18);
  --shadow-card: 0 24px 60px -30px rgba(26,26,26,0.28);

  /* Layout */
  --max:   1320px;
  --pad:   clamp(20px, 4vw, 56px);
  --gut:   clamp(16px, 2vw, 28px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Type ---------- */
.serif    { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.display  { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: 0.92; letter-spacing: -0.035em; }
.h1       { font-family: var(--serif); font-weight: 400; font-size: var(--t-h1); line-height: 1.0; letter-spacing: -0.03em; }
.h2       { font-family: var(--serif); font-weight: 400; font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.02em; }
.h3       { font-family: var(--serif); font-weight: 500; font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; }
.lead     { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.eyebrow  {
  font-family: var(--sans);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.italic   { font-style: italic; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section   { padding: clamp(72px, 10vw, 140px) 0; }
.section--sand   { background: var(--sand); }
.section--cream2 { background: var(--cream-2); }
.section--ink    { background: var(--ink); color: var(--cream); }
.section--ink .eyebrow { color: var(--sand-2); }
.section--ink .lead    { color: rgba(246,239,228,0.78); }

.grid        { display: grid; gap: var(--gut); }
.grid-2      { grid-template-columns: repeat(2, 1fr); }
.grid-3      { grid-template-columns: repeat(3, 1fr); }
.grid-4      { grid-template-columns: repeat(4, 1fr); }
.grid-12     { grid-template-columns: repeat(12, 1fr); }
.grid-auto   { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-12 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .35s ease, backdrop-filter .35s ease, padding .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(246,239,228,0.88);
  backdrop-filter: saturate(140%) blur(12px);
  padding: 12px var(--pad);
  border-bottom-color: var(--line);
}
.nav.is-dark { color: var(--cream); }
.nav.is-dark.is-scrolled { color: var(--ink); }

.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}
.nav__brand svg { width: 22px; height: 22px; }

.nav__links { display: flex; gap: 36px; align-items: center; }
.nav__link {
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 0;
  opacity: 0.82;
  transition: opacity .2s;
}
.nav__link:hover { opacity: 1; }
.nav__link.is-active { opacity: 1; }
.nav__link.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
}

.nav__right { display: flex; align-items: center; gap: 20px; }
.lang {
  display: flex; gap: 2px; align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lang button {
  padding: 6px 8px;
  opacity: 0.5;
  transition: opacity .2s;
}
.lang button.is-active { opacity: 1; font-weight: 500; }
.lang button:hover { opacity: 0.9; }
.lang .sep { opacity: 0.35; }

/* Mobile menu */
.nav__burger { display: none; width: 28px; height: 28px; flex-direction: column; justify-content: center; gap: 5px; }
.nav__burger span { display: block; height: 1.5px; background: currentColor; border-radius: 2px; }
.nav__mobile { display: none; }
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile {
    position: fixed; inset: 0; background: var(--cream);
    display: flex !important; flex-direction: column; justify-content: center; align-items: center;
    gap: 28px; font-family: var(--serif); font-size: 2rem;
    transform: translateY(-100%); transition: transform .4s ease; z-index: 60;
  }
  .nav__mobile.is-open { transform: translateY(0); }
  .nav__mobile .close { position: absolute; top: 20px; right: 24px; font-size: 2rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  transition: all .3s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--terra-deep); }
.btn--outline { border-color: currentColor; }
.btn--outline:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--ghost { padding: 12px 0; }
.btn--ghost::after {
  content: '→'; transition: transform .3s;
}
.btn--ghost:hover::after { transform: translateX(6px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: 0;
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,0.35) 0%, rgba(26,26,26,0.15) 40%, rgba(26,26,26,0.65) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  padding: 180px var(--pad) 60px;
  color: var(--cream);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100vh;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero__eyebrow {
  color: rgba(246,239,228,0.82);
  margin-bottom: 22px;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 0 0 28px;
  font-weight: 400;
}
.hero__title em { font-style: italic; color: var(--sand-2); font-weight: 300; }
.hero__meta {
  display: flex; gap: 36px; align-items: flex-end;
  flex-wrap: wrap;
  padding: 36px 0 0;
  border-top: 1px solid rgba(246,239,228,0.25);
  margin-top: 40px;
  max-width: 900px;
}
.hero__meta-item { }
.hero__meta-item .eyebrow { color: rgba(246,239,228,0.7); margin-bottom: 6px; display: block; }
.hero__meta-item .val { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--cream);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  opacity: 0.75;
}
.hero__scroll::after {
  content: ''; width: 1px; height: 40px; background: currentColor;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%,100% { transform: scaleY(1); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Section header ---------- */
.s-head { margin-bottom: clamp(40px, 5vw, 72px); max-width: 820px; }
.s-head .eyebrow { margin-bottom: 18px; display: block; }
.s-head .h2 { margin: 0 0 20px; }
.s-head__split {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 5vw, 80px);
  align-items: end;
}
@media (max-width: 860px) { .s-head__split { grid-template-columns: 1fr; } }

/* ---------- Feature cards ---------- */
.feature {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.feature__num {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--terracotta);
}
.feature h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Image blocks ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--sand);
}
.img-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s ease;
}
.img-frame:hover img { transform: scale(1.03); }
.img-frame--tall   { aspect-ratio: 3/4; }
.img-frame--wide   { aspect-ratio: 16/10; }
.img-frame--square { aspect-ratio: 1/1; }
.img-frame--portrait { aspect-ratio: 4/5; }

.img-cap {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(26,26,26,0.75); color: var(--cream);
  padding: 6px 12px;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}

/* ---------- Mosaic (home intro) ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(60px, 7vw, 100px);
  gap: var(--gut);
}
.mosaic > * { min-width: 0; }
.m-1 { grid-column: span 7; grid-row: span 5; }
.m-2 { grid-column: span 5; grid-row: span 3; }
.m-3 { grid-column: span 5; grid-row: span 2; }
.m-4 { grid-column: span 4; grid-row: span 3; }
.m-5 { grid-column: span 8; grid-row: span 3; }
@media (max-width: 860px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .m-1 { grid-column: span 2; grid-row: span 2; }
  .m-2,.m-3,.m-4,.m-5 { grid-column: span 1; grid-row: span 1; }
}

/* ---------- Gallery (loft page) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(80px, 8vw, 130px);
  gap: var(--gut);
}
.g-a { grid-column: span 8; grid-row: span 4; }
.g-b { grid-column: span 4; grid-row: span 4; }
.g-c { grid-column: span 4; grid-row: span 3; }
.g-d { grid-column: span 4; grid-row: span 3; }
.g-e { grid-column: span 4; grid-row: span 3; }
.g-f { grid-column: span 6; grid-row: span 4; }
.g-g { grid-column: span 6; grid-row: span 4; }
.g-h { grid-column: span 12; grid-row: span 4; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-a,.g-b,.g-c,.g-d,.g-e,.g-f,.g-g,.g-h { grid-column: span 1; grid-row: span 1; }
  .g-a, .g-h { grid-column: span 2; }
}

/* ---------- Amenity list ---------- */
.amen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.amen__item {
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 18px; align-items: flex-start;
}
.amen__item:not(:nth-child(3n)) { border-right: 1px solid var(--line); padding-right: 28px; }
.amen__item svg { flex-shrink: 0; width: 22px; height: 22px; stroke: var(--terracotta); stroke-width: 1.3; fill: none; }
.amen__item h4 { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin: 0 0 4px; }
.amen__item p  { font-size: 0.88rem; color: var(--charcoal); margin: 0; }
@media (max-width: 860px) {
  .amen { grid-template-columns: 1fr; }
  .amen__item:not(:nth-child(3n)) { border-right: 0; padding-right: 0; }
}

/* ---------- Quote / testimonial ---------- */
.quote {
  max-width: 860px; margin: 0 auto; text-align: center;
}
.quote__mark {
  font-family: var(--serif); font-style: italic; color: var(--terracotta);
  font-size: 5rem; line-height: 0.5; margin-bottom: 20px; display: block;
}
.quote__text {
  font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400; line-height: 1.35; letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.quote__attr {
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--charcoal);
}
.quote__attr strong { color: var(--ink); font-weight: 500; }

/* ---------- Pricing table ---------- */
.rates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}
.rate {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  background: var(--cream-2);
  position: relative;
}
.rate:last-child { border-right: 0; }
.rate--feature { background: var(--ink); color: var(--cream); }
.rate--feature .rate__label { color: var(--sand-2); }
.rate--feature .rate__note  { color: rgba(246,239,228,0.65); }
.rate__label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 18px; }
.rate__season { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 10px; font-weight: 400; }
.rate__dates  { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 28px; }
.rate--feature .rate__dates { color: rgba(246,239,228,0.75); }
.rate__price  { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.rate__price .amount { font-family: var(--serif); font-size: 2.8rem; font-weight: 400; }
.rate__price .per    { font-size: 0.82rem; color: var(--charcoal); letter-spacing: 0.05em; }
.rate--feature .rate__price .per { color: rgba(246,239,228,0.7); }
.rate__note   { font-size: 0.82rem; color: var(--charcoal); margin-top: 14px; }
@media (max-width: 860px) {
  .rates { grid-template-columns: 1fr; }
  .rate { border-right: 0; border-bottom: 1px solid var(--line); }
  .rate:last-child { border-bottom: 0; }
}

/* ---------- Map / location ---------- */
.poi-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.poi {
  padding: 22px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .25s;
}
.poi:hover { background: var(--cream-2); padding-left: 12px; padding-right: 12px; }
.poi__num { font-family: var(--serif); font-style: italic; color: var(--terracotta); font-size: 1.1rem; min-width: 30px; }
.poi__name { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; letter-spacing: -0.005em; }
.poi__name small { display: block; font-family: var(--sans); font-size: 0.82rem; color: var(--charcoal); margin-top: 3px; letter-spacing: 0.01em; }
.poi__dist { font-size: 0.88rem; color: var(--ink-soft); letter-spacing: 0.04em; white-space: nowrap; }

/* ---------- Contact form ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--charcoal); font-weight: 500;
}
.field input, .field textarea, .field select {
  font: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--ink);
  transition: border-color .25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-bottom-color: var(--terracotta);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(72px, 9vw, 120px) 0 40px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(246,239,228,0.14);
}
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
.footer__brand { font-family: var(--serif); font-size: 2.4rem; letter-spacing: -0.01em; margin: 0 0 14px; }
.footer__tag   { font-size: 0.92rem; color: rgba(246,239,228,0.65); max-width: 30ch; }
.footer h5     {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sand-2); margin: 0 0 20px; font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a  { font-size: 0.92rem; color: rgba(246,239,228,0.78); transition: color .2s; }
.footer a:hover { color: var(--terracotta); }
.footer__bot {
  padding-top: 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 0.78rem; letter-spacing: 0.05em;
  color: rgba(246,239,228,0.5);
  flex-wrap: wrap;
}

/* ---------- Utility ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

.divider {
  display: flex; align-items: center; gap: 20px;
  color: var(--terracotta); font-family: var(--serif); font-style: italic;
  margin: clamp(60px,8vw,100px) 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* ---------- Tweaks panel adjustments ---------- */
.tw-color-dot {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all .2s;
}
.tw-color-dot.is-active { border-color: var(--ink); transform: scale(1.1); }

/* ---------- Small ornamental heura mark ---------- */
.heura-mark {
  display: inline-block;
  width: 28px; height: 28px;
  /* color: inherited — adapts automatically to parent context */
}

/* ---------- Theme toggle button ---------- */
.nav__theme {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  opacity: 0.65; transition: opacity .2s;
}
.nav__theme:hover { opacity: 1; }
.nav__theme svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --cream:    #1b1917;
  --cream-2:  #221f1b;
  --sand:     #2a2620;
  --sand-2:   #332e27;
  --line:     rgba(246,239,228,0.1);
  --line-soft:rgba(246,239,228,0.05);
}
[data-theme="dark"] body { color: #d8ccba; }
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4 { color: #e8dcc5; }
[data-theme="dark"] p { color: inherit; }
[data-theme="dark"] .eyebrow { color: #6e6860; }
[data-theme="dark"] .lead { color: #b0a28e; }
[data-theme="dark"] .feature p { color: #9e9080; }
[data-theme="dark"] .serif { color: #e8dcc5; }

/* Nav dark */
[data-theme="dark"] .nav { color: #e8dcc5; }
[data-theme="dark"] .nav.is-scrolled {
  background: rgba(27,25,23,0.93);
  color: #e8dcc5;
  border-bottom-color: rgba(246,239,228,0.1);
}
[data-theme="dark"] .nav__mobile { background: #1b1917; color: #e8dcc5; }
[data-theme="dark"] .nav__link { color: #e8dcc5; }
[data-theme="dark"] .lang button { color: #e8dcc5; }

/* Buttons dark */
[data-theme="dark"] .btn--primary { background: #e8dcc5; color: #1b1917; }
[data-theme="dark"] .btn--primary:hover { background: var(--terracotta); color: #e8dcc5; }
[data-theme="dark"] .btn--outline { border-color: rgba(232,220,197,0.35); color: #e8dcc5; }
[data-theme="dark"] .btn--outline:hover { background: #e8dcc5; color: #1b1917; border-color: #e8dcc5; }

/* Dark accent sections stay very dark */
[data-theme="dark"] .section--ink { background: #0e0d0b; }
[data-theme="dark"] .footer { background: #0e0d0b; }
[data-theme="dark"] .footer a { color: rgba(232,220,197,0.72); }
[data-theme="dark"] .footer a:hover { color: var(--terracotta); }
[data-theme="dark"] .footer__bot { color: rgba(232,220,197,0.42); }
[data-theme="dark"] .footer h5 { color: var(--sand-2); }

/* Rates dark */
[data-theme="dark"] .rates { border-color: rgba(246,239,228,0.1); }
[data-theme="dark"] .rate { background: #221f1b; border-color: rgba(246,239,228,0.1); }
[data-theme="dark"] .rate--feature { background: #0e0d0b; }
[data-theme="dark"] .rate__label { color: #6e6860; }
[data-theme="dark"] .rate__season { color: #e8dcc5; }
[data-theme="dark"] .rate__price .per { color: #6e6860; }
[data-theme="dark"] .rate__note { color: #6e6860; }
[data-theme="dark"] .rate--feature .rate__note { color: rgba(232,220,197,0.55); }

/* Form dark */
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select { color: #e8dcc5; border-bottom-color: rgba(246,239,228,0.15); background: transparent; }
[data-theme="dark"] .field label { color: #6e6860; }
[data-theme="dark"] .field select option { background: #1b1917; color: #e8dcc5; }

/* Misc dark */
[data-theme="dark"] .img-frame { background: #2a2620; }
[data-theme="dark"] .quote__text { color: #e8dcc5; }
[data-theme="dark"] .quote__attr { color: #9e9080; }
[data-theme="dark"] .quote__attr strong { color: #e8dcc5; }
[data-theme="dark"] .feature__num { color: var(--terracotta); }
[data-theme="dark"] .amen__item h4 { color: #e8dcc5; }
[data-theme="dark"] .amen__item p { color: #9e9080; }
[data-theme="dark"] .divider { color: var(--terracotta); }
[data-theme="dark"] .s-head__split .lead { color: #b0a28e; }

/* Footer dark — keep text readable (footer bg is always dark) */
[data-theme="dark"] .footer { color: #e8dcc5; }
[data-theme="dark"] .footer h5 { color: rgba(232,220,197,0.48); }
[data-theme="dark"] .footer__tag { color: rgba(232,220,197,0.55); }

/* section--ink dark — section is very dark, eyebrow must stay light */
[data-theme="dark"] .section--ink { color: #e8dcc5; }
[data-theme="dark"] .section--ink .eyebrow { color: rgba(232,220,197,0.58); }
[data-theme="dark"] .section--ink .lead { color: rgba(232,220,197,0.75); }

/* ---------- Photo gallery grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.photo-grid__item {
  position: relative; overflow: hidden;
  aspect-ratio: 1/1; cursor: pointer;
  background: var(--sand);
}
.photo-grid__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
  display: block;
}
.photo-grid__item:hover img { transform: scale(1.05); }
.photo-grid__item--wide { grid-column: span 2; aspect-ratio: 2/1; }
@media (max-width: 860px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid__item--wide { grid-column: span 2; }
}
@media (max-width: 540px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.96);
  display: flex; align-items: center; justify-content: center;
  animation: lbFadeIn .18s ease;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; user-select: none;
  display: block;
}
.lightbox__btn {
  position: absolute; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.75); font-family: var(--serif);
  transition: color .2s, background .2s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__btn:hover { color: #fff; }
.lightbox__prev { left: 0; top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 24px 20px; }
.lightbox__next { right: 0; top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 24px 20px; }
.lightbox__close {
  top: 20px; right: 24px; font-size: 2rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.lightbox__close:hover { background: rgba(255,255,255,0.18); }
.lightbox__count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.4); font-size: 0.72rem; letter-spacing: 0.18em;
  user-select: none;
}

/* ---------- Escapa Empordà section ---------- */
.escapa-section {
  background: var(--sand);
  border-top: 1px solid var(--line);
}
.escapa-section .eyebrow { color: var(--terracotta); }
[data-theme="dark"] .escapa-section { background: var(--sand); }

/* =========================================================
   Booking Calendar
   ========================================================= */
.booking-cal {
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 40px);
  user-select: none;
}
.booking-cal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.booking-cal__title {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  letter-spacing: 0.01em; color: var(--ink);
}
.booking-cal__nav {
  background: none; border: 1px solid var(--line);
  width: 38px; height: 38px; cursor: pointer; color: var(--ink);
  font-family: var(--serif); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.booking-cal__nav:hover:not(:disabled) { background: var(--sand); }
.booking-cal__nav:disabled { opacity: 0.25; cursor: default; }
.booking-cal__day-labels {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px;
}
.booking-cal__day-label {
  text-align: center; font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--charcoal); padding: 6px 0;
}
.booking-cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.booking-cal__cell {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-family: var(--serif);
  transition: background .15s; border-radius: var(--r-sm);
}
.booking-cal__cell--past {
  color: var(--stone); opacity: 0.35;
}
.booking-cal__cell--free {
  color: var(--ink); cursor: default;
}
.booking-cal__cell--free:hover { background: var(--sand); }
.booking-cal__cell--blocked {
  background: var(--terracotta); color: #fff !important; cursor: not-allowed;
  font-weight: 500; opacity: 1 !important;
  position: relative;
}
.booking-cal__cell--today {
  outline: 2px solid var(--terracotta); outline-offset: -2px; font-weight: 600;
}
.booking-cal__cell--today.booking-cal__cell--free { color: var(--terracotta); }
.booking-cal__status {
  text-align: center; font-size: 0.82rem; color: var(--charcoal);
  padding: 18px 0 0; letter-spacing: 0.05em;
}
.booking-cal__status--err { color: var(--terracotta); }
.booking-cal__legend {
  display: flex; gap: 24px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--charcoal); letter-spacing: 0.04em;
}
.booking-cal__dot {
  display: inline-block; width: 12px; height: 12px;
  margin-right: 7px; vertical-align: middle; border-radius: 2px;
}
.booking-cal__dot--free  { background: var(--sand); border: 1px solid var(--line); }
.booking-cal__dot--blocked { background: var(--terracotta); }

/* Dark mode */
[data-theme="dark"] .booking-cal { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .booking-cal__title { color: #e8dcc5; }
[data-theme="dark"] .booking-cal__nav { border-color: rgba(255,255,255,0.15); color: #e8dcc5; }
[data-theme="dark"] .booking-cal__nav:hover:not(:disabled) { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .booking-cal__cell--free { color: #e8dcc5; }
[data-theme="dark"] .booking-cal__cell--free:hover { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .booking-cal__cell--past { color: rgba(232,220,197,0.3); }
[data-theme="dark"] .booking-cal__legend { border-color: rgba(255,255,255,0.1); color: rgba(232,220,197,0.5); }
[data-theme="dark"] .booking-cal__dot--free { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
[data-theme="dark"] .booking-cal__status { color: rgba(232,220,197,0.5); }
