/* DDA design system — header, mobile menu and footer of the redesigned public site (src/components/site/SiteHeader.tsx,
   SiteFooter.tsx). Tokens and shared components: dda-ds.css. */

/* ===== Header ============================================================================================================ */
.ds-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  font-family: var(--ds-font);
  transition: padding .55s var(--ds-ease);
}
.ds-header-bar {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  height: var(--ds-header-h);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--ds-gutter);
  border: 1px solid transparent;
  border-bottom-color: var(--ds-line);
  border-radius: 0;
  background: var(--ds-bg);
  color: var(--ds-ink);
  box-shadow: 0 8px 30px rgba(17, 17, 17, .06);
  transition:
    max-width .55s var(--ds-ease),
    height .55s var(--ds-ease),
    padding .55s var(--ds-ease),
    border-radius .55s var(--ds-ease),
    background-color .45s ease,
    border-color .45s ease,
    box-shadow .45s ease,
    color .3s ease;
}
.ds-header.is-over-hero { padding: 16px var(--ds-gutter) 0; }
.ds-header.is-over-hero .ds-header-bar {
  max-width: calc(var(--ds-container) + 80px);
  height: 68px;
  padding: 0 12px 0 26px;
  border-color: rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

/* Logo: a white copy for the hero and the brand-colour copy cross-fade. */
.ds-header-logo { position: relative; display: block; flex: none; width: clamp(118px, 11vw, 148px); height: 40px; }
.ds-logo { position: absolute; inset: 0; display: flex; align-items: center; transition: opacity .45s ease; }
.ds-logo > *,
.ds-logo .site-logo-raster,
.ds-logo .site-logo-svg,
.ds-logo img { display: block; width: 100%; height: 100%; max-height: 40px; object-fit: contain; object-position: left center; }
.ds-logo .site-logo-raster { -webkit-mask-position: left center !important; mask-position: left center !important; }
.ds-logo--light { opacity: 0; }
.is-over-hero .ds-logo--light { opacity: 1; }
.is-over-hero .ds-logo--brand { opacity: 0; }
html[data-site-theme="dark"] .ds-logo--brand { filter: invert(1) hue-rotate(180deg); }

/* Navigation */
.ds-nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); margin-left: clamp(4px, 1.6vw, 24px); }
.ds-nav-link {
  position: relative;
  padding: 8px 0;
  color: inherit;
  font: 500 14px/1 var(--ds-font);
  text-decoration: none;
  white-space: nowrap;
  opacity: .82;
  transition: opacity .25s ease;
}
.ds-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ds-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ds-ease);
}
.ds-nav-link:hover,
.ds-nav-link.active { opacity: 1; }
.ds-nav-link:hover::after,
.ds-nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.ds-nav-link .nav-external-icon { margin-left: 5px; font-size: .7em; }

/* Right side */
.ds-header-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.ds-locale {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 12px/1 var(--ds-font);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease;
}
.is-over-hero .ds-locale { border-color: rgba(255, 255, 255, .3); }
.ds-locale:hover,
.ds-locale.is-open { border-color: var(--ds-gold); }
.ds-locale .locale-flag--trigger { width: 18px; height: 13px; border-radius: 2px; }
.ds-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.ds-header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font: 600 13px/1 var(--ds-font);
  text-decoration: none;
  white-space: nowrap;
}
.ds-header-phone i { color: var(--ds-gold); }
.ds-header-phone:hover span { text-decoration: underline; text-underline-offset: 4px; }
.ds-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ds-line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.is-over-hero .ds-burger { border-color: rgba(255, 255, 255, .3); }
.ds-burger span { display: block; width: 18px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ds-ease); }
.is-menu-open .ds-burger span:first-child { transform: translateY(3.3px) rotate(45deg); }
.is-menu-open .ds-burger span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

@media (max-width: 1280px) { .ds-header-phone span { display: none; } }
@media (max-width: 1100px) {
  .ds-nav,
  .ds-header-phone,
  .ds-header-register { display: none; }
  .ds-burger { display: inline-flex; }
}
@media (max-width: 640px) {
  .ds-header.is-over-hero { padding: 10px 12px 0; }
  .ds-header.is-over-hero .ds-header-bar { height: 60px; padding: 0 8px 0 18px; }
  .ds-locale { padding: 0 10px; }
}
/* Small phones (320–380 px): the logo, the locale pill and the menu button must still fit on one row. */
@media (max-width: 380px) {
  .ds-header-end { gap: 8px; }
  .ds-locale { gap: 5px; padding: 0 9px; }
  .ds-locale .locale-flag--trigger { display: none; }
}

/* ===== Mobile menu ======================================================================================================= */
.ds-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: calc(var(--ds-header-h) + 28px) var(--ds-gutter) 36px;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-family: var(--ds-font);
  overflow-y: auto;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ds-ease), visibility 0s linear .6s;
}
.ds-menu.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .6s var(--ds-ease); }
.ds-menu-nav { display: flex; flex-direction: column; }
.ds-menu-link {
  padding: 16px 0;
  border-bottom: 1px solid var(--ds-line);
  color: var(--ds-ink);
  font: 700 clamp(26px, 7vw, 36px)/1.1 var(--ds-font);
  letter-spacing: -.02em;
  text-decoration: none;
}
.ds-menu-link.active { color: var(--ds-gold-strong); }
.ds-menu.is-open .ds-menu-link { animation: ds-rise .7s var(--ds-ease) both; }
.ds-menu.is-open .ds-menu-link:nth-child(2) { animation-delay: .05s; }
.ds-menu.is-open .ds-menu-link:nth-child(3) { animation-delay: .1s; }
.ds-menu.is-open .ds-menu-link:nth-child(4) { animation-delay: .15s; }
.ds-menu.is-open .ds-menu-link:nth-child(5) { animation-delay: .2s; }
.ds-menu.is-open .ds-menu-link:nth-child(6) { animation-delay: .25s; }
.ds-menu.is-open .ds-menu-link:nth-child(7) { animation-delay: .3s; }
.ds-menu.is-open .ds-menu-link:nth-child(n + 8) { animation-delay: .35s; }
.ds-menu-cta { display: grid; gap: 12px; }
@media (min-width: 1101px) { .ds-menu { display: none; } }
/* The floating call / WhatsApp / Telegram buttons would cover the menu's buttons. */
.ds-menu-open .floating-contact-dock { opacity: 0; visibility: hidden; }

/* ===== "Explore properties / rentals" band above the footer ============================================================= */
.ds-explore { border-top: 1px solid var(--ds-line); }

/* ===== Footer ============================================================================================================ */
.ds-footer {
  position: relative;
  padding: clamp(64px, 8vw, 100px) 0 32px;
  background: var(--ds-night);
  color: rgba(255, 255, 255, .7);
  font-family: var(--ds-font);
  overflow: hidden;
  isolation: isolate;
}
.ds-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  left: 50%;
  width: 900px;
  height: 520px;
  margin-left: -450px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ds-gold) 22%, transparent), transparent);
  pointer-events: none;
}
.ds-footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ds-footer-logo { display: block; width: 170px; height: 46px; margin-bottom: 22px; }
.ds-footer-logo > *,
.ds-footer-logo .site-logo-raster,
.ds-footer-logo .site-logo-svg,
.ds-footer-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.ds-footer-logo .site-logo-raster { -webkit-mask-position: left center !important; mask-position: left center !important; }
.ds-footer-desc { max-width: 420px; margin: 0; font: 400 14px/1.8 var(--ds-font); color: rgba(255, 255, 255, .6); }
.ds-footer-social { display: flex; gap: 10px; margin-top: 26px; }
.ds-footer-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #fff;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .35s var(--ds-ease);
}
.ds-footer-social a:hover { background: var(--ds-gold); border-color: var(--ds-gold); color: var(--ds-on-gold); transform: translateY(-3px); }
.ds-footer .ds-footer-title {
  margin: 0 0 22px;
  font: 600 12px/1 var(--ds-font);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ds-gold-soft);
}
.ds-footer-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.ds-footer-list li { display: flex; gap: 14px; align-items: flex-start; font: 400 14px/1.6 var(--ds-font); color: rgba(255, 255, 255, .78); }
.ds-footer-list li > i { width: 16px; margin-top: 4px; color: var(--ds-gold); text-align: center; }
.ds-footer-list small { display: block; margin-bottom: 2px; font: 600 10.5px/1.4 var(--ds-font); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.ds-footer-list a { color: #fff; text-decoration: none; transition: color .2s ease; }
.ds-footer-list a:hover { color: var(--ds-gold-soft); }
.ds-footer-meta { margin: 20px 0 0; font: 400 12.5px/1.8 var(--ds-font); color: rgba(255, 255, 255, .42); }
.ds-footer-insta {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--ds-radius);
  color: #fff;
  text-decoration: none;
  transition: border-color .3s ease, background-color .3s ease, transform .4s var(--ds-ease);
}
.ds-footer-insta:hover { border-color: var(--ds-gold); background: rgba(255, 255, 255, .03); transform: translateY(-2px); }
.ds-footer-insta > i {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
  color: #fff;
  font-size: 21px;
}
.ds-footer-insta strong { display: block; font: 600 14px/1.4 var(--ds-font); }
.ds-footer-insta small { display: block; margin-top: 2px; font: 400 12.5px/1.5 var(--ds-font); color: rgba(255, 255, 255, .55); }

/* Developer logos strip: the CMS logos are white on transparent, made for dark backgrounds. */
.ds-footer-devs { padding: 44px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ds-footer-devs .ds-marquee-item { padding-right: 64px; }
.ds-footer-dev { display: grid; place-items: center; height: 56px; }
.ds-footer-dev img { width: auto; height: auto; max-width: 150px; max-height: 40px; object-fit: contain; opacity: .62; transition: opacity .3s ease, transform .4s var(--ds-ease); }
.ds-footer-dev:hover img { opacity: 1; transform: scale(1.06); }

/* Developer / community / property-type columns (FooterLinkColumns), recoloured for the dark footer. */
.ds-footer .footer-links-block { margin: 0; padding: 48px 0 0; border-top: 0; }
.ds-footer .footer-links-title {
  margin: 0 0 30px;
  font: 700 clamp(22px, 2.4vw, 28px)/1.2 var(--ds-font);
  letter-spacing: -.02em;
  color: #fff;
  text-align: left;
}
.ds-footer .footer-links-heading { border-bottom-color: rgba(255, 255, 255, .1); color: var(--ds-gold-soft); }
.ds-footer .footer-links-col a { color: rgba(255, 255, 255, .62); }
.ds-footer .footer-links-col a:hover { color: #fff; }

.ds-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font: 400 13px/1.6 var(--ds-font);
  color: rgba(255, 255, 255, .5);
}
.ds-footer-bottom p { margin: 0; }
.ds-footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ds-footer-legal a { color: rgba(255, 255, 255, .66); text-decoration: none; transition: color .2s ease; }
.ds-footer-legal a:hover { color: #fff; }

@media (max-width: 960px) {
  .ds-footer-top { grid-template-columns: 1fr 1fr; }
  .ds-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .ds-footer-top { grid-template-columns: 1fr; }
  .ds-footer-devs .ds-marquee-item { padding-right: 40px; }
  .ds-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== Navigation progress (NavigationProgress.tsx) and page loading (app/(site)/loading.tsx) ======================== */
.ds-progress { position: fixed; z-index: 2000; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.ds-progress-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ds-gold), var(--ds-gold-soft), var(--ds-gold));
  box-shadow: 0 0 10px color-mix(in srgb, var(--ds-gold) 70%, transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.ds-progress--loading .ds-progress-bar { opacity: 1; transform: scaleX(.85); transition: transform 8s cubic-bezier(.08, .7, .2, 1), opacity .1s; }
.ds-progress--done .ds-progress-bar { opacity: 0; transform: scaleX(1); transition: transform .25s ease, opacity .3s ease .2s; }
.ds-progress-spinner {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s, transform .3s;
}
.ds-progress-spinner::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2.5px solid color-mix(in srgb, var(--ds-gold) 25%, transparent);
  border-top-color: var(--ds-gold);
  border-radius: 50%;
  animation: ds-spin .7s linear infinite;
}
.ds-progress--loading .ds-progress-spinner { opacity: 1; transform: none; transition-delay: .35s; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

.ds-page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  /* At least a full screen, so the footer is never in view while the page streams in (it would otherwise jump down when
     the page arrives: a large layout shift). */
  min-height: 100vh;
  min-height: 100lvh;
  padding: calc(var(--ds-header-h) + 40px) 20px 60px;
  background: var(--ds-bg);
  color: var(--ds-ink-3);
  font: 600 12px/1 var(--ds-font);
  letter-spacing: .24em;
  text-transform: uppercase;
}
.ds-page-loading-ring {
  width: 46px;
  height: 46px;
  border: 3px solid color-mix(in srgb, var(--ds-gold) 22%, transparent);
  border-top-color: var(--ds-gold);
  border-radius: 50%;
  animation: ds-spin .8s linear infinite;
}

/* Busy form buttons (aria-busy while sending): spinner before the label. */
button[aria-busy="true"] { position: relative; cursor: progress !important; }
button[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: .55em;
  vertical-align: -.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ds-spin .7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ds-progress-spinner::after,
  .ds-page-loading-ring,
  button[aria-busy="true"]::before { animation-duration: 1.6s; }
}
