/* Tenedomus Real Estate — design system
   Palette derived from the real Tenedomus logo (navy / gold / sky). */

:root {
  --basalt: #46458f;
  --basalt-ink: #322f66;
  --cal: #f3f6fa;
  --paper: #ffffff;
  --atlantico: #6c6ab0;
  --buganvilla: #d4b02a;
  --arena: #e3ac6a;
  --piedra: #5b6483;

  --bg: var(--cal);
  --surface: var(--paper);
  --surface-2: #eef1f7;
  --text: var(--basalt-ink);
  --text-muted: var(--piedra);
  --border: rgba(28, 37, 96, 0.13);
  --accent: var(--atlantico);
  --accent-ink: #ffffff;
  --accent-2: var(--buganvilla);
  --shadow: 0 16px 40px rgba(18, 23, 63, 0.10);
  --shadow-sm: 0 4px 14px rgba(18, 23, 63, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1180px;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #3c3c78;
    --surface: #46458f;
    --surface-2: #514fa0;
    --text: #ffffff;
    --text-muted: #cfcdef;
    --border: rgba(255, 255, 255, 0.16);
    --accent: #f5d43e;
    --accent-ink: #2c2a5e;
    --accent-2: #f5d43e;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  --bg: #3c3c78;
  --surface: #46458f;
  --surface-2: #514fa0;
  --text: #ffffff;
  --text-muted: #cfcdef;
  --border: rgba(255, 255, 255, 0.16);
  --accent: #f5d43e;
  --accent-ink: #2c2a5e;
  --accent-2: #f5d43e;
}
:root[data-theme="light"] {
  --bg: var(--cal);
  --surface: var(--paper);
  --surface-2: #eef1f7;
  --text: var(--basalt-ink);
  --text-muted: var(--piedra);
  --border: rgba(28, 37, 96, 0.13);
  --accent: var(--atlantico);
  --accent-ink: #ffffff;
  --accent-2: var(--buganvilla);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text); }
.lede { color: var(--text-muted); font-size: 1.1rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6em;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.overflow-x { overflow-x: auto; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--accent-2); color: var(--basalt-ink); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp { background: #25d366; color: #06280f; }
.btn-block { width: 100%; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); padding: 3px; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text); line-height: 1.1; }
.brand-word small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
nav.primary { display: flex; gap: 1.5rem; margin-left: 1rem; flex: 1; }
nav.primary a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.94rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
nav.primary a:hover, nav.primary a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.phone-pill { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; }
.phone-pill svg { width: 16px; height: 16px; stroke: var(--accent); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
#mobile-nav { display: none; }

/* language dropdown */
.lang-dropdown { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.5rem 0.8rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; color: var(--text);
  min-height: 44px;
}
.lang-toggle .globe, .lang-toggle .chevron { width: 15px; height: 15px; stroke: var(--text-muted); fill: none; stroke-width: 1.8; }
.lang-menu {
  list-style: none; margin: 0; padding: 0.4rem;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 168px;
  display: none; flex-direction: column; gap: 2px; z-index: 50;
}
.lang-menu.open { display: flex; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 0.6rem 0.7rem; border-radius: 8px; font-family: var(--font-body);
  font-size: 0.92rem; color: var(--text); text-decoration: none;
}
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--accent); opacity: 0; }
.lang-menu a[aria-current="true"] svg { opacity: 1; }

@media (max-width: 860px) {
  nav.primary, .phone-pill, .header-actions .header-contact-btn { display: none; }
  .menu-btn { display: flex; }
  #mobile-nav.open { display: flex; flex-direction: column; background: var(--surface); border-top: 1px solid var(--border); }
  #mobile-nav a { padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem); text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); font-size: 0.98rem; font-weight: 500; }
  #mobile-nav .mobile-contact { padding: 1rem clamp(1.25rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 0.6rem; }
}

/* sections */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.4rem; }
.card .card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.card .card-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.6; }

/* property listing cards (homepage featured + category/zone listing grids) —
   scoped to .listing-card rather than the bare .card rule so this hover
   treatment doesn't bleed into unrelated cards (FAQ, team, service cards)
   that also use the shared .card component. */
.listing-card { position: relative; transition: box-shadow 0.25s ease, transform 0.25s ease; }
.listing-card img { transition: transform 0.35s ease; }
.listing-card-sold-badge {
  position: absolute; top: 0.8rem; left: 0.8rem; z-index: 2;
  background: var(--basalt-ink); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.listing-card .card-cta {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--border);
  margin-top: 0.4rem;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.listing-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.listing-card:hover img { transform: scale(1.06); }
.listing-card:hover .card-cta { background: var(--accent-2); border-color: var(--accent-2); color: #1a1a1a; }

@media (prefers-reduced-motion: reduce) {
  .listing-card, .listing-card img { transition: none; }
  .listing-card:hover, .listing-card:hover img { transform: none; }
}

.badge-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.badge { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.badge svg { width: 14px; height: 14px; stroke: var(--accent); }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--basalt) 0%, #223072 60%, var(--atlantico) 130%); color: #fff; padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(4rem, 10vw, 7rem); }
.hero-brandmark { position: absolute; right: 8%; top: 10%; width: 190px; height: 190px; z-index: 1; }
.hero-brandmark img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #fff; border-radius: 28px; padding: 20px; box-shadow: 0 18px 44px rgba(6, 10, 36, 0.35);
}
@media (max-width: 640px) {
  .hero-brandmark { position: static; right: auto; top: auto; width: 64px; height: 64px; margin: 0 0 1.5rem auto; }
  .hero-brandmark img { border-radius: 16px; padding: 9px; box-shadow: 0 8px 20px rgba(6, 10, 36, 0.3); }
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-content .eyebrow { color: #cfe7f4; }
.hero-content h1 { color: #fff; text-shadow: 0 1px 3px rgba(6,10,36,0.6), 0 6px 22px rgba(6,10,36,0.55), 0 0 34px rgba(6,10,36,0.4); }
.hero-content .lede { color: #dfe6fb; text-shadow: 0 2px 10px rgba(6,10,36,0.45); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.hero-badges { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.2rem; }
.hero-badges .badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #eef1fb; }
.hero-badges .badge svg { stroke: var(--arena); }

/* search stub */
.search-panel { position: relative; z-index: 2; margin-top: 2.2rem; background: var(--surface); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); max-width: 720px; }
.search-fields { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 0.6rem; }
.search-fields select { width: 100%; padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 0.92rem; min-height: 48px; }
@media (max-width: 640px) { .search-fields { grid-template-columns: 1fr; } }

/* zones */
.zone-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 160px; display: flex; align-items: flex-end; padding: 1.2rem; color: #fff; background: linear-gradient(160deg, var(--basalt), var(--atlantico)); }
.zone-card h3 { color: #fff; margin: 0; }
.zone-card span { font-size: 0.82rem; color: #dfe6fb; }

/* map / contact */
.map-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); position: relative; box-shadow: var(--shadow-sm); }
.map-caption { position: absolute; left: 1rem; bottom: 1rem; background: var(--surface); padding: 0.6rem 0.9rem; border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 0.85rem; font-weight: 600; }
.nap-block { display: flex; flex-direction: column; gap: 0.9rem; }
.nap-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.nap-item svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.7; flex-shrink: 0; margin-top: 2px; }
.nap-item strong { display: block; font-size: 0.95rem; }
.nap-item a { text-decoration: none; color: var(--text); }
.nap-item a:hover { color: var(--accent); }

/* forms */
form.enquiry { display: flex; flex-direction: column; gap: 0.9rem; }
form.enquiry label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 0.35rem; }
form.enquiry input, form.enquiry select, form.enquiry textarea {
  width: 100%; padding: 0.8rem 0.9rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 0.95rem; min-height: 48px;
}
form.enquiry textarea { min-height: 110px; resize: vertical; }
form.enquiry .consent { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.5rem; align-items: flex-start; }
form.enquiry .consent input { width: auto; min-height: auto; margin-top: 3px; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.6rem; }

/* placeholder / todo markers */
.owner-todo {
  background: repeating-linear-gradient(135deg, rgba(184,121,31,0.16), rgba(184,121,31,0.16) 8px, rgba(184,121,31,0.28) 8px, rgba(184,121,31,0.28) 16px);
  border: 1px dashed var(--accent-2); border-radius: 8px; padding: 0.1em 0.5em; font-weight: 600; font-size: 0.92em;
}

/* sticky mobile contact bar */
.sticky-contact { display: none; }
@media (max-width: 860px) {
  .sticky-contact {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
    padding: 0.55rem clamp(1rem, 4vw, 2rem); gap: 0.5rem;
  }
  .sticky-contact a { flex: 1; }
  body.has-sticky-bar { padding-bottom: 76px; }
}

/* floating WhatsApp button — only rendered when the page has no sticky
   mobile contact bar, so the two never compete for the same corner */
.whatsapp-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 46;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-2); color: var(--basalt-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(18, 23, 63, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.whatsapp-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(18, 23, 63, 0.34); }
@media (max-width: 640px) { .whatsapp-fab { width: 50px; height: 50px; right: 1rem; bottom: 1rem; } }

/* cookie consent banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -12px 32px rgba(18, 23, 63, 0.18);
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
}
.cookie-banner-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
}
.cookie-banner p { margin: 0; color: var(--text); font-size: 0.9rem; max-width: 640px; }
.cookie-banner a { color: var(--accent); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-banner-actions .btn { padding: 0.7rem 1.3rem; min-height: 40px; font-size: 0.9rem; }
@media (max-width: 640px) {
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* footer */
footer.site { background: var(--basalt); color: #dfe6fb; padding: 3.5rem 0 2rem; margin-top: 2rem; }
:root[data-theme="dark"] footer.site, @media (prefers-color-scheme: dark) { }
footer.site a:not(.btn) { color: #dfe6fb; text-decoration: none; }
footer.site a:not(.btn):hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.9rem; }
.footer-mark { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 2.6rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.8rem; color: #b9c2e8; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 0.7rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
