:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: 5rem;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #c6a15b;
  outline-offset: 3px;
}

/* Desktop Header Navigation */
header nav[aria-label="Main navigation"] a {
  color: #200037;
  transition: color 0.2s ease;
}

header nav[aria-label="Main navigation"] a:hover,
header nav[aria-label="Main navigation"] a:focus-visible {
  color: #8F691F;
}

.dark header nav[aria-label="Main navigation"] a {
  color: #F8F6FA;
}

.dark header nav[aria-label="Main navigation"] a:hover,
.dark header nav[aria-label="Main navigation"] a:focus-visible,
.dark header nav[aria-label="Main navigation"] a[aria-current="page"] {
  color: #D1AD66;
}

/* Footer Navigation */
footer nav a {
  color: #200037;
  transition: color 0.2s ease;
}

footer nav a:hover,
footer nav a:focus-visible {
  color: #8F691F;
}

.dark footer nav a {
  color: #F8F6FA;
}

.dark footer nav a:hover,
.dark footer nav a:focus-visible,
.dark footer nav a[aria-current="page"] {
  color: #D1AD66;
}

#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 50;
  border: 0;
  background: var(--header-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 28px rgba(36, 27, 41, 0.12);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#mobile-menu[hidden] {
  display: none;
}

#mobile-menu a {
  display: block;
  padding: 0.9rem 1.5rem;
  color: #3b0c5b;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#mobile-menu a:hover {
  background: rgba(59, 12, 91, 0.08);
}

.dark #mobile-menu {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.dark #mobile-menu a {
  color: #F8F6FA;
}

.dark #mobile-menu a:hover {
  background: rgba(209, 173, 102, 0.1);
  color: #D1AD66;
}

.contact-pending {
  cursor: not-allowed;
}

/* Shared Showcase Card Grid & Proportions for Properties and Projects */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.showcase-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.showcase-card:focus-visible {
  outline: 3px solid #c6a15b;
  outline-offset: 3px;
}

.showcase-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

@media (min-width: 640px) {
  .showcase-card-media {
    aspect-ratio: 16 / 9;
  }
}

.showcase-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 0%;
  gap: 1rem;
}

/* Property Carousel Card Styles */
.property-card {
  isolation: isolate;
}

.property-img-layer {
  will-change: opacity, transform;
}

#property-gallery-modal {
  touch-action: pan-y;
}

#property-gallery-stage {
  user-select: none;
  -webkit-user-select: none;
}

#property-gallery-prev:focus-visible,
#property-gallery-next:focus-visible,
#property-gallery-close:focus-visible,
#project-modal-close:focus-visible {
  outline: 3px solid #c6a15b;
  outline-offset: 3px;
}

/* Projects Before / After Visual Comparison */
.before-after-box {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.before-after-slider-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 30;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.before-after-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ffffff;
  pointer-events: none;
  z-index: 25;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.before-after-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #241B29;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .before-after-handle {
  background-color: #D1AD66;
  color: #241B29;
}

@media (max-width: 767px) {
  .text-display-lg {
    font-size: 2.25rem !important;
    line-height: 1.12 !important;
  }

  #home > div.relative {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Both TV photos keep the same frame; only the upper layer is clipped. */
.tv-comparison .before-layer,
.tv-comparison .after-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-comparison img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.tv-comparison .before-after-slider-input { touch-action: none; }
.tv-comparison:focus-within .before-after-handle { outline: 3px solid #c6a15b; outline-offset: 4px; }
.tv-comparison .comparison-label { position: absolute; top: 1rem; z-index: 26; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; pointer-events: none; }
.tv-comparison .comparison-label-before { left: 1rem; background: rgba(0,0,0,0.7); color: #fff; }
.tv-comparison .comparison-label-after { right: 1rem; background: #D1AD66; color: #241B29; }
@media (min-width: 768px) {
  .project-tv-detail .overflow-y-auto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-content: start; }
  #project-details-modal.project-tv-detail .overflow-y-auto > * { margin-top: 0; min-width: 0; }
}

/* Brandkit owl with the approved Libre Bodoni wordmark. */
@font-face {
  font-family: 'Kuwago Libre Bodoni';
  src: url('../fonts/libre-bodoni/LibreBodoni-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.brand-lockup { display: inline-flex; align-items: center; flex-shrink: 0; gap: 12px; min-height: 48px; color: #3B0C5B; }
.brand-symbol { display: block; width: 27px; height: 48px; object-fit: contain; flex: none; }
.brand-wordmark { font-family: 'Kuwago Libre Bodoni', 'Bodoni MT', serif; font-size: 27px; line-height: 1; font-weight: 400; letter-spacing: 0.045em; }
.brand-logo-dark { display: none; }
.dark .brand-logo-light { display: none; }
.dark .brand-logo-dark { display: block; }
.dark .brand-lockup { color: #B98850; }
@media (max-width: 379px) { header .brand-lockup { gap: 8px; } header .brand-wordmark { font-size: 23px; } header .brand-symbol { width: 23px; height: 42px; } }

/* Uniform translucent glass across the full header. */
.site-header {
  --header-glass: rgba(255, 255, 255, 0.64);
  background: transparent;
  border-bottom: 0;
  isolation: isolate;
}
.dark .site-header { --header-glass: rgba(36, 23, 44, 0.58); }
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--header-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

@font-face {
  font-family: 'Kuwago Libre Bodoni';
  src: url('../fonts/libre-bodoni/LibreBodoni-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
header .brand-wordmark { font-weight: 700; }

/* On narrow screens the header contains only the brand and menu trigger. */
.mobile-action-label { display: none; }
#mobile-menu { max-height: calc(100dvh - 80px); overflow-y: auto; }
#mobile-header-actions { display: grid; gap: 16px; padding: 16px 24px 24px; border-top: 1px solid rgba(125, 116, 128, 0.2); }
#mobile-header-actions > [role="group"] { display: flex; justify-self: start; }
#mobile-header-actions > a { display: inline-flex; padding: 10px 24px; color: #fff; text-align: center; }
.dark #mobile-header-actions > a { color: #241B29; }
#mobile-header-actions .mobile-action-label { display: inline; }
#mobile-header-actions #theme-toggle,
#mobile-header-actions #account-button { display: flex; justify-content: space-between; width: 100%; height: auto; min-height: 44px; padding: 10px 12px; border-radius: 12px; }

#mobile-header-actions #account-button { color: #fff; }

/* Footer social links and honest, non-interactive pending states. */
footer .footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
footer .footer-socials { display: flex; align-items: flex-start; gap: 12px; }
footer .footer-social-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
footer .footer-social-control { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(59, 12, 91, .2); border-radius: 50%; color: #3B0C5B; }
footer span.footer-social-control { opacity: .5; }
footer .footer-social-link { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
footer .footer-social-link:hover { color: #775a1a; background: rgba(185, 136, 80, .1); border-color: #B98850; }
.dark footer .footer-social-control { color: #D1AD66; border-color: rgba(209, 173, 102, .35); }
.dark footer .footer-social-link:hover { color: #F6F1E9; background: rgba(209, 173, 102, .12); border-color: #D1AD66; }
footer .footer-social-status { font-size: 11px; line-height: 1.4; }
footer .footer-social-status[hidden] { display: none; }
footer .footer-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
footer .footer-layout > .footer-socials { justify-self: center; }
footer .footer-layout > nav { justify-self: center; }
footer .footer-copyright { text-align: center; justify-self: center; width: 100%; padding-top: 8px; }
@media (min-width: 768px) {
  footer .footer-layout { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  footer .footer-layout > .footer-brand { grid-column: 1; grid-row: 1; }
  footer .footer-layout > nav { grid-column: 2; grid-row: 1; }
  footer .footer-layout > .footer-socials { grid-column: 3; grid-row: 1; justify-self: end; }
  footer .footer-copyright { grid-column: 1 / -1; }
}

/* Reserved Concierge access: status text, never an inactive fake link. */
.concierge-access { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; line-height: 1.35; font-weight: 600; color: #4c444f; text-align: center; }
.concierge-access small { font-size: 11px; color: #775a1a; font-weight: 500; }
.dark .concierge-access { color: #F8F6FA; }
.dark .concierge-access small { color: #D1AD66; }
.site-header nav { gap: 16px; }
.site-header nav .concierge-access { max-width: 148px; }
#mobile-menu > .concierge-access { display: flex; align-items: flex-start; padding: .9rem 1.5rem; text-align: left; font-size: 16px; }
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header nav { display: none; }
  #mobile-menu-button { display: flex; }
}
@media (min-width: 768px) {
  footer .footer-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); }
}

/* Enabled service links follow the same typography as the other navigation links. */
a.concierge-access { font-size: inherit; line-height: inherit; font-weight: 700; color: #200037; white-space: nowrap; }
.site-header nav a.concierge-access { padding: 4px 0; }
.dark a.concierge-access { color: #F8F6FA; }
a.concierge-access:hover { color: #775a1a; }
.dark a.concierge-access:hover { color: #D1AD66; }

/* Account access: shared by desktop and the mobile navigation. */
.account-button { cursor: pointer; }
#account-panel {
  position: fixed;
  inset: 6rem 1.5rem auto auto;
  margin: 0;
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid #D1AD66;
  border-radius: 1.5rem;
  background: #fff7fc;
  color: #200037;
  box-shadow: 0 24px 64px rgb(32 0 55 / 22%);
}
#account-panel::backdrop { background: rgb(22 11 29 / 40%); }
.account-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.account-panel-heading h2 { font-size: 1.25rem; font-weight: 700; }
#account-panel-close { display: flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; border-radius: 50%; }
#account-panel-close:hover { background: rgb(59 12 91 / 8%); }
.account-cards { display: grid; gap: 0.75rem; }
.account-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid rgb(143 105 31 / 28%); border-radius: 1rem; background: #F8F6FA; color: inherit; }
a.account-card:hover { border-color: #8F691F; background: #fff7fc; }
.account-card[aria-disabled="true"] { opacity: 0.65; }
.account-card-icon { color: #8F691F; font-size: 1.75rem; }
.account-card-copy { display: grid; gap: 0.2rem; }
.account-card-copy strong { font-weight: 700; }
.account-card-copy > span { font-size: 0.875rem; }
.account-card-copy small { font-size: 0.75rem; font-weight: 600; color: #775a1a; }
.dark #account-panel { background: #24172C; color: #F8F6FA; box-shadow: 0 24px 64px rgb(0 0 0 / 40%); }
.dark .account-card { background: #160B1D; border-color: rgb(209 173 102 / 30%); }
.dark a.account-card:hover, .dark #account-panel-close:hover { background: #3b0c5b; }
.dark .account-card-icon, .dark .account-card-copy small { color: #D1AD66; }
@media (max-width: 1023px) {
  #account-panel { inset: 6rem auto auto 1rem; padding: 1.25rem; }
}
