/* The existing dark presentation remains the default. */
:root { --gold-ink: var(--gold); }

html[data-theme="light"] {
  --ink: #302f2b;
  --ink-soft: #706d64;
  --night: #2c2c27;
  --night-deep: #20211d;
  --night-soft: #39382f;
  --ivory: #eee7da;
  --paper: #faf7f0;
  --white: #ffffff;
  --gold: #b68e38;
  --gold-pale: #d4b66b;
  --gold-ink: #8c6a27;
  --line: rgba(48, 47, 43, .16);
  --base: #f8f5ee;
  --surface: #f2ede4;
  --surface-2: #e9e1d3;
  --bronze: #ded0b8;
  --bronze-soft: #e8dfd0;
  --gold-wash: rgba(182, 142, 56, .11);
  color-scheme: light;
}

html[data-theme="light"] body { color-scheme: light; }

.theme-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 126px;
  min-width: 126px;
  height: 36px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(13,14,11,.42);
  backdrop-filter: blur(12px);
}

.theme-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.64);
  cursor: pointer;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}

.theme-toggle__button svg { width: 11px; flex: none; }
.theme-toggle__button:hover { color: var(--paper); }
.theme-toggle__button[aria-pressed="true"] { background: var(--gold); color: #171812; }
.theme-toggle__button:focus-visible { outline: 1px solid var(--paper); outline-offset: 2px; }

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  background: #1f9d58;
  color: #fff;
  box-shadow: 0 16px 38px rgba(10,53,31,.3);
  transition: transform .22s, background .22s, box-shadow .22s;
}
.whatsapp-float svg { width: 27px; height: 27px; }
.whatsapp-float:hover { transform: translateY(-4px); background: #25b865; box-shadow: 0 20px 44px rgba(10,53,31,.38); }
.whatsapp-float:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 4px; }
.menu-open .whatsapp-float { opacity: 0; pointer-events: none; }

/* Light surfaces */
html[data-theme="light"] .site-header.scrolled { color: var(--paper); }
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-title em,
html[data-theme="light"] .property-card__place,
html[data-theme="light"] .property-card__fact svg,
html[data-theme="light"] .property-card__footer svg,
html[data-theme="light"] .catalogue-empty > span,
html[data-theme="light"] .highlight__num,
html[data-theme="light"] .amenity__icon,
html[data-theme="light"] .location-row span:last-child,
html[data-theme="light"] .value-card__number,
html[data-theme="light"] .service-detail__number,
html[data-theme="light"] .article__meta,
html[data-theme="light"] .stat__value sup { color: var(--gold-ink); }
html[data-theme="light"] .catalogue { background: linear-gradient(180deg, var(--base) 0%, var(--ivory) 54%, var(--base) 100%); }
html[data-theme="light"] .search-panel {
  border-color: rgba(94,76,39,.2);
  background: linear-gradient(135deg, rgba(238,231,218,.98), rgba(248,245,238,.98));
  box-shadow: 0 28px 75px rgba(67,56,36,.1);
}
html[data-theme="light"] .filter-control,
html[data-theme="light"] .search-panel__footer { border-color: rgba(48,47,43,.13); }
html[data-theme="light"] .filter-control > span:first-child { color: #8c6a27; }
html[data-theme="light"] .filter-control input::placeholder { color: rgba(48,47,43,.43); }
html[data-theme="light"] .filter-control input,
html[data-theme="light"] .filter-control select,
html[data-theme="light"] .sort-control select { color-scheme: light; }
html[data-theme="light"] .filter-control input:focus,
html[data-theme="light"] .filter-control select:focus { color: var(--ink); }
html[data-theme="light"] .sort-control select { background: var(--surface); }
html[data-theme="light"] .property-card {
  border-color: rgba(94,76,39,.18);
  background: linear-gradient(155deg, rgba(250,247,240,.99), rgba(238,231,218,.99));
  box-shadow: 0 14px 40px rgba(67,56,36,.06);
}
html[data-theme="light"] .property-card:hover {
  border-color: rgba(182,142,56,.62);
  box-shadow: 0 24px 52px rgba(67,56,36,.14);
}
html[data-theme="light"] .property-card__facts,
html[data-theme="light"] .property-card__fact + .property-card__fact { border-color: rgba(48,47,43,.13); }
html[data-theme="light"] .portfolio .property-card__meta {
  align-items: flex-start;
  margin-top: 0;
  padding: 25px 27px 29px;
}
html[data-theme="light"] .portfolio .property-card__meta > div { min-width: 0; }
html[data-theme="light"] .portfolio .property-card__number {
  min-width: 34px;
  flex: none;
  padding-top: 4px;
  text-align: right;
}
html[data-theme="light"] .catalogue-empty,
html[data-theme="light"] .plan-card,
html[data-theme="light"] .contact-form-panel { background: rgba(238,231,218,.86); }
html[data-theme="light"] .plan-card__visual { color: #716d64; }
html[data-theme="light"] .anchor-nav { background: rgba(248,245,238,.95); }
html[data-theme="light"] .lead-card,
html[data-theme="light"] .register-form {
  border-color: rgba(182,142,56,.25);
  background: rgba(248,245,238,.96);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(20,20,17,.24);
}
html[data-theme="light"] .field,
html[data-theme="light"] .contact-form-grid input,
html[data-theme="light"] .contact-form-grid select,
html[data-theme="light"] .contact-form-grid textarea,
html[data-theme="light"] .inquiry-form input,
html[data-theme="light"] .inquiry-form select,
html[data-theme="light"] .inquiry-form textarea {
  border-color: rgba(48,47,43,.28);
  color: var(--ink);
  color-scheme: light;
}
html[data-theme="light"] .lead-card .field,
html[data-theme="light"] .register-form .field { background: rgba(48,47,43,.035); }
html[data-theme="light"] .field::placeholder,
html[data-theme="light"] .contact-form-grid input::placeholder,
html[data-theme="light"] .contact-form-grid textarea::placeholder,
html[data-theme="light"] .inquiry-form input::placeholder,
html[data-theme="light"] .inquiry-form textarea::placeholder { color: #777267; opacity: 1; }
html[data-theme="light"] .article-share a { background: rgba(238,231,218,.55); }

/* Dark visual anchors stay dark in both versions. */
html[data-theme="light"] .site-header,
html[data-theme="light"] .mobile-nav,
html[data-theme="light"] .mobile-contact,
html[data-theme="light"] .catalogue-hero,
html[data-theme="light"] .page-hero,
html[data-theme="light"] .property-hero,
html[data-theme="light"] .property-section--night,
html[data-theme="light"] .content-section--night,
html[data-theme="light"] .advisory,
html[data-theme="light"] .cta-band,
html[data-theme="light"] .site-footer,
html[data-theme="light"] .footer {
  color: var(--paper);
}

@media (max-width: 760px) {
  .theme-toggle { width: 72px; min-width: 72px; height: 34px; }
  .theme-toggle__button { padding: 0; }
  .theme-toggle__button svg { width: 13px; }
  .theme-toggle__text { display: none; }
  .whatsapp-float { right: 17px; bottom: 17px; width: 52px; height: 52px; }
  .has-mobile-contact .whatsapp-float { bottom: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle__button,
  .whatsapp-float { transition: none; }
}

@media print { .theme-toggle, .whatsapp-float { display: none !important; } }
