/* ==========================================================================
   The Captain Planet Realty - base styles (design tokens, reset, buttons, forms)
   No frameworks. Change the palette here and the whole site follows.
   ========================================================================== */
:root {
  color-scheme: dark;
  /* palette */
  --bg: #060716;
  --bg-2: #0b0d22;
  --surface: #0f1129;
  --surface-2: #151837;
  --line: rgba(139, 92, 246, .24);
  --line-soft: rgba(255, 255, 255, .08);
  --primary: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-300: #c4b5fd;
  --accent: #f59e0b;
  --text: #f5f5fb;
  --muted: #a3a9ca;
  --success: #22c55e;
  --danger: #fb7185;
  --grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #c084fc 100%);
  /* shape + motion */
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --glow: 0 0 0 1px rgba(139, 92, 246, .45), 0 10px 32px -8px rgba(139, 92, 246, .6);
  /* system font stack: zero font downloads */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ico-plot: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 21s7-6.1 7-11a7 7 0 1 0-14 0c0 4.9 7 11 7 11z%22/%3E%3Ccircle cx=%2212%22 cy=%2210%22 r=%222.5%22/%3E%3C/svg%3E");
  --ico-house: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 11.5 12 3l9 8.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z%22/%3E%3C/svg%3E");
  --ico-bldg: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16M14 10h5a1 1 0 0 1 1 1v10M9 8h3M9 12h3M9 16h3M2 21h20%22/%3E%3C/svg%3E");
  --ico-leaf: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 19c8-1 13-8 14-16-8 1-15 6-16 16z%22/%3E%3Cpath d=%22M5 19s4-6 10-10%22/%3E%3C/svg%3E");
  --ico-chart: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 17 10 10l4 4 7-7%22/%3E%3Cpath d=%22M14 7h7v7%22/%3E%3C/svg%3E");
  --ico-tag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M20 12l-8 8-8-8V4h8z%22/%3E%3Ccircle cx=%228.5%22 cy=%228.5%22 r=%221.3%22/%3E%3C/svg%3E");
  --ico-key: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%228%22 cy=%2215%22 r=%224%22/%3E%3Cpath d=%22M12 15h9v3M16 15v3%22/%3E%3C/svg%3E");
  --ico-spark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3 14 8.5 20 9.3 15.8 13.2 16.9 19 12 16.4 7.1 19 8.2 13.2 4 9.3 10 8.5z%22/%3E%3C/svg%3E");
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m5 12.5 4.5 4.5 9.5-10%22/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary-300); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--primary-600); padding: .6rem 1rem; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 1rem; }
.icon { flex: none; }
.logo-mark { flex: none; filter: drop-shadow(0 0 10px rgba(139, 92, 246, .55)); }
.grad-text {
  background: linear-gradient(100deg, #a78bfa, #c084fc, #818cf8, #a78bfa);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  background: transparent;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .55rem 1rem; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(139, 92, 246, .8); }
.btn-primary:hover { box-shadow: var(--glow); }
.btn-outline { border-color: rgba(196, 181, 253, .45); color: #fff; background: rgba(139, 92, 246, .06); }
.btn-outline:hover { border-color: var(--primary-300); background: rgba(139, 92, 246, .18); box-shadow: 0 0 22px -4px rgba(139, 92, 246, .55); }
.btn-ghost { color: var(--muted); border-color: var(--line-soft); }
.btn-ghost:hover { color: #fff; border-color: var(--line); background: rgba(255, 255, 255, .04); }
.btn-glow { animation: glow-pulse 3.2s ease-in-out infinite; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: #fff;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: rgba(139, 92, 246, .16); color: var(--primary-300); border-color: var(--line); transform: scale(1.06); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: #d9dbf0; }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), input[inputmode], select, textarea {
  width: 100%;
  padding: .75rem .9rem;
  font: inherit; color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
select option { background: var(--surface-2); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); background: rgba(255, 255, 255, .06); }
input::placeholder, textarea::placeholder { color: #6e7499; }
.field-error { color: var(--danger); font-size: .82rem; }
.hint { color: var(--muted); font-size: .8rem; }

/* ---------- alerts ---------- */
.alert { padding: .85rem 1rem; border-radius: 10px; border: 1px solid; margin-bottom: 1.25rem; font-size: .92rem; }
.alert-success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.alert-error { background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .4); color: #fda4af; }

/* ---------- ambient hero glow (shared by public + login) ---------- */
.hero-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-glow i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 14s ease-in-out infinite; }
.hero-glow i:nth-child(1) { width: 420px; height: 420px; background: #6d28d9; left: -6%; top: -30%; }
.hero-glow i:nth-child(2) { width: 360px; height: 360px; background: #4338ca; right: -4%; top: -10%; animation-delay: -5s; }
.hero-glow i:nth-child(3) { width: 260px; height: 260px; background: #c026d3; left: 45%; bottom: -40%; opacity: .3; animation-delay: -9s; }

/* ---------- animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .8s var(--ease) forwards; }
.reveal.d1 { animation-delay: .12s; }
.reveal.d2 { animation-delay: .24s; }
.reveal.d3 { animation-delay: .36s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: 250% 0; } }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(40px, 30px, 0); } }
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 8px 24px -10px rgba(139, 92, 246, .8); }
  50% { box-shadow: 0 0 0 1px rgba(168, 85, 247, .5), 0 10px 34px -6px rgba(168, 85, 247, .75); }
}
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }


/* ---------- custom select + shared menu panel ---------- */
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23c4b5fd%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m6 9 6 6 6-6%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 12px 12px;
}
select::-ms-expand { display: none; }

/* Styled native picker in browsers that support appearance: base-select (no-JS fallback). */
@supports (appearance: base-select) {
  select {
    appearance: base-select;
    background-image: none;
  }
  select::picker-icon {
    color: var(--primary-300);
    transform-origin: center;
    transition: transform .18s var(--ease);
  }
  select:open::picker-icon { transform: rotate(180deg); }
  select::picker(select) {
    appearance: base-select;
    margin-top: 6px;
    padding: .4rem;
    color: var(--text);
    background: rgba(15, 17, 41, .96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .8), 0 0 40px -16px rgba(139, 92, 246, .75);
  }
  select option {
    padding: .65rem .8rem;
    border-radius: 9px;
    background: transparent;
    color: #d7d9ee;
  }
  select option:is(:hover, :checked, :focus) {
    background: rgba(139, 92, 246, .2);
    color: #fff;
  }
}

.menu-panel {
  background: rgba(15, 17, 41, .92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .8), 0 0 40px -16px rgba(139, 92, 246, .75);
}

.c-select { position: relative; width: 100%; min-width: 0; }
.c-select-el {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  appearance: none !important;
  background: none !important;
  z-index: -1;
}
.c-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 2.15rem .75rem .9rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.c-select-btn:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .06);
}
.c-select.is-open .c-select-btn,
.c-select-btn:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .25);
  background: rgba(255, 255, 255, .06);
}
.c-select-btn::after {
  content: "";
  position: absolute;
  right: .85rem;
  width: 8px; height: 8px;
  border-right: 2px solid var(--primary-300);
  border-bottom: 2px solid var(--primary-300);
  transform: translateY(-20%) rotate(45deg);
  transition: transform .18s var(--ease);
  pointer-events: none;
  opacity: .85;
}
.c-select { /* ensure chevron anchors to the button */ }
.c-select-btn { position: relative; }
.c-select.is-open .c-select-btn::after {
  transform: translateY(30%) rotate(225deg);
}
.c-select-val {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c-select-val.is-ph { color: var(--muted); }
.c-select-btn:disabled { opacity: .5; cursor: not-allowed; }

.c-select-list {
  position: fixed;
  z-index: 200;
  margin: 0;
  padding: .4rem;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.96);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}
.c-select-list[data-dir="up"] {
  transform-origin: bottom center;
  transform: translateY(6px) scale(.96);
}
.c-select-list.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}
.c-select-opt {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .8rem;
  border-radius: 9px;
  font-size: .92rem;
  line-height: 1.3;
  color: #d7d9ee;
  cursor: pointer;
  min-height: 40px;
  touch-action: manipulation;
  transition: background .15s, color .15s;
}
.c-select-opt.is-ph { color: var(--muted); }
.c-select-opt.is-active {
  background: rgba(139, 92, 246, .2);
  color: #fff;
}
.c-select-opt[aria-selected="true"] { color: #fff; }
.c-select-opt[aria-selected="true"]::after {
  content: "";
  width: 16px; height: 16px;
  margin-left: auto;
  flex: none;
  background: var(--primary-300);
  -webkit-mask: var(--ico-check) center / contain no-repeat;
  mask: var(--ico-check) center / contain no-repeat;
}
.c-select-opt[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.c-ico {
  flex: none;
  width: 18px;
  height: 18px;
  display: none;
  background: currentColor;
  color: var(--primary-300);
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}
.c-ico[data-val="plot"], .c-ico[data-val="plots"] { display: block; --ico: var(--ico-plot); }
.c-ico[data-val="villa"], .c-ico[data-val="villas"],
.c-ico[data-val="house"], .c-ico[data-val="houses"] { display: block; --ico: var(--ico-house); }
.c-ico[data-val="apartment"], .c-ico[data-val="apartments"],
.c-ico[data-val="commercial"],
.c-ico[data-val="project"], .c-ico[data-val="projects"] { display: block; --ico: var(--ico-bldg); }
.c-ico[data-val="farmland"] { display: block; --ico: var(--ico-leaf); }
.c-ico[data-val="invest"], .c-ico[data-val="investment"] { display: block; --ico: var(--ico-chart); }
.c-ico[data-val="sale"] { display: block; --ico: var(--ico-tag); }
.c-ico[data-val="rent"] { display: block; --ico: var(--ico-key); }
.c-ico[data-val="New Launch"], .c-ico[data-val="Ready to Move"], .c-ico[data-val="Ongoing"] {
  display: block; --ico: var(--ico-spark);
}
.c-ico[data-val="draft"], .c-ico[data-val="published"], .c-ico[data-val="sold"], .c-ico[data-val="rented"] {
  display: block;
  width: 8px; height: 8px;
  margin: 0 5px;
  border-radius: 50%;
  -webkit-mask: none;
  mask: none;
  background: var(--muted);
}
.c-ico[data-val="draft"] { background: #fcd34d; }
.c-ico[data-val="published"] { background: #86efac; }
.c-ico[data-val="sold"], .c-ico[data-val="rented"] { background: var(--primary-300); }
.c-select-opt.is-ph .c-ico { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
