/**
 * Sobha Aranya - Design system
 * Use with Tailwind CDN for layout utilities
 */
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap");

:root {
  /* Primary: #19407d | Secondary: #ffffff */
  --primary: 217 67% 29%;
  --primary-foreground: 0 0% 100%;
  --transparent-primary: 217 67% 29% / 0.6;
  --secondary: 0 0% 100%;
  --secondary-foreground: 217 67% 29%;
  --background: 0 0% 100%;
  --foreground: 217 67% 29%;
  --card: 0 0% 100%;
  --card-foreground: 217 67% 29%;
  --muted: 0 0% 63%;
  --muted-foreground: 217 40% 35%;
  --accent: 217 50% 95%;
  --accent-foreground: 217 67% 29%;
  --destructive: 0 72% 50%;
  --border: 0 0% 90%;
  --input: 0 0% 90%;
  --ring: 217 67% 29%;
  --radius: 1.25rem;
  --font-sans: 'Lato', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'EB Garamond', ui-serif, Georgia, serif;
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 8px 10px -1px hsl(0 0% 0% / 0.1);
}

* {
  border-color: hsl(var(--border));
}

.bg-transparent-primary { background-color: hsl(var(--transparent-primary)); }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
}

/* Design token utilities */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-foreground { background-color: hsl(var(--foreground)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-accent { background-color: hsl(var(--accent)); }
.bg-muted\/20 { background-color: hsl(var(--muted) / 0.2); }
.bg-destructive\/10 { background-color: hsl(var(--destructive) / 0.1); }
.bg-primary\/10 { background-color: hsl(var(--primary) / 0.1); }
.bg-primary\/20 { background-color: hsl(var(--primary) / 0.2); }
.bg-accent\/30 { background-color: hsl(var(--accent) / 0.3); }
.bg-accent\/50 { background-color: hsl(var(--accent) / 0.5); }
.bg-foreground\/40 { background-color: hsl(var(--foreground) / 0.4); }
.bg-foreground\/80 { background-color: hsl(var(--foreground) / 0.8); }
.bg-foreground\/50 { background-color: hsl(var(--foreground) / 0.5); }
.bg-card\/95 { background-color: hsl(var(--card) / 0.95); }
.bg-card\/80 { background-color: hsl(var(--card) / 0.8); }
.bg-primary-foreground { background-color: hsl(var(--primary-foreground)); }
.bg-primary-foreground\/10 { background-color: hsl(var(--primary-foreground) / 0.1); }
.bg-primary-foreground\/20 { background-color: hsl(var(--primary-foreground) / 0.2); }

.text-foreground { color: hsl(var(--foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-card-foreground { color: hsl(var(--card-foreground)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.text-primary-foreground\/80 { color: hsl(var(--primary-foreground) / 0.8); }
.text-primary-foreground\/90 { color: hsl(var(--primary-foreground) / 0.9); }
.text-primary-foreground\/70 { color: hsl(var(--primary-foreground) / 0.7); }
.text-primary-foreground\/60 { color: hsl(var(--primary-foreground) / 0.6); }
.text-primary-foreground\/50 { color: hsl(var(--primary-foreground) / 0.5); }
.text-accent-foreground { color: hsl(var(--accent-foreground)); }
.text-destructive { color: hsl(var(--destructive)); }

.border-border { border-color: hsl(var(--border)); }
.border-primary\/50 { border-color: hsl(var(--primary) / 0.5); }
.border-primary-foreground\/10 { border-color: hsl(var(--primary-foreground) / 0.1); }
.border-primary-foreground\/20 { border-color: hsl(var(--primary-foreground) / 0.2); }

.placeholder\:text-primary-foreground\/50::placeholder { color: hsl(var(--primary-foreground) / 0.5); }

.rounded-lg { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }

.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.font-serif { font-family: var(--font-serif); }

/* Banner overlay: subtle black shadow on image */
.bg-black\/25 {
  background-color: rgba(0, 0, 0, 0.25);
}

/* Banner / hero text shadow for readability on image */
.banner-text-shadow,
.banner-text-shadow p,
.banner-text-shadow h1,
.banner-text-shadow span {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.55),
    0 4px 16px rgba(0, 0, 0, 0.48),
    0 0 32px rgba(0, 0, 0, 0.26);
}

/* Navbar (inverted: dark background, light text) */
nav.bg-primary a {
  color: hsl(var(--primary-foreground));
}
nav.bg-primary a:hover {
  color: hsl(var(--primary-foreground));
  opacity: 1;
}
nav.bg-primary .text-primary-foreground\/80 {
  color: hsl(var(--primary-foreground) / 0.85);
}
nav.bg-primary .text-primary-foreground\/80:hover {
  color: hsl(var(--primary-foreground));
}
nav.bg-primary button.bg-primary-foreground,
nav.bg-primary a.bg-primary-foreground {
  background-color: hsl(var(--primary-foreground));
  color: hsl(var(--primary));
  font-weight: 600;
}
nav.bg-primary button.bg-primary-foreground:hover,
nav.bg-primary a.bg-primary-foreground:hover {
  opacity: 0.9;
  color: hsl(var(--primary));
}

/* Dialog overlay */
.gallery-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: hsl(0 0% 0% / 0.5);
  padding: 1rem;
}
.gallery-dialog::backdrop {
  background: hsl(0 0% 0% / 0.5);
}
.gallery-dialog:not([open]) {
  display: none;
}

/* Floor plans section: blurred background image + backdrop shadow */
.floor-plan-bg {
  filter: blur(6px);
  transform: scale(1.08);
}
.floor-plan-card .backdrop-shadow {
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
}

/* Enquire modal: redesigned slider popup at top */
.enquire-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}
.enquire-modal.enquire-modal-open {
  pointer-events: auto;
}
.enquire-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.enquire-modal.enquire-modal-open .enquire-modal-overlay {
  opacity: 1;
}
/* Mobile: bottom sheet (position bottom 0, slide up from bottom) */
.enquire-modal-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  z-index: 1;
  background: hsl(var(--card));
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -20px 40px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px hsl(var(--border));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.enquire-modal.enquire-modal-open .enquire-modal-panel {
  transform: translateY(0);
  visibility: visible;
}

/* Desktop: top slide-down (position top 0, centered) */
@media (min-width: 768px) {
  .enquire-modal-panel {
    bottom: auto;
    top: 0;
    left: 50%;
    right: auto;
    width: calc(100% - 2rem);
    max-width: 26rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px hsl(var(--border));
    transform: translate(-50%, -100%);
  }
  .enquire-modal.enquire-modal-open .enquire-modal-panel {
    transform: translate(-50%, 0);
  }
}

.enquire-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.enquire-modal-header-inner {
  flex: 1;
  min-width: 0;
}
.enquire-modal-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}
.enquire-modal-tagline {
  font-size: 0.8125rem;
  opacity: 0.9;
  margin: 0;
  line-height: 1.4;
}
.enquire-modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.enquire-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.enquire-modal-close-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.enquire-modal-body {
  padding: 1.5rem 1.5rem 1.75rem;
  overflow-y: auto;
}
.enquire-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.enquire-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.enquire-modal-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}
.enquire-modal-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.enquire-modal-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.7);
}
.enquire-modal-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.enquire-modal-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}
.enquire-modal-textarea {
  height: auto;
  min-height: 5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  resize: vertical;
}
.enquire-modal-submit {
  margin-top: 0.25rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.enquire-modal-submit:hover {
  opacity: 0.92;
}
.enquire-modal-submit:active {
  transform: scale(0.99);
}
