/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal-50:  #fff0f0;
  --teal-100: #ffd6d6;
  --teal-400: #0c479d;
  --teal-500: #0c479d;
  --teal-600: #fe000c;
  --teal-700: #cc000a;
  --teal-800: #333333;
  --red:       #fe000c;
  --red-dark:  #cc000a;
  --blue:      #0c479d;
  --blue-dark: #093a82;
  --gray-dark: #333333;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--slate-900);
  background: var(--slate-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ========== CONTAINER ========== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== TOPBAR ========== */
.topbar {
  background: var(--white);
  color: var(--gray-dark);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--slate-200);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--gray-dark);
}
.logo span { color: var(--red); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.phone-pill {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.phone-pill:hover { background: var(--blue); color: var(--white); }

.lang-select {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  color: var(--gray-dark);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.83rem;
  cursor: pointer;
  outline: none;
}
.lang-select option { background: var(--white); color: var(--gray-dark); }

.small-note {
  font-size: 0.76rem;
  color: var(--slate-600);
  line-height: 1.3;
}

/* ========== HERO (index) ========== */
.hero {
  background: var(--gray-dark);
  padding: 52px 0 68px;
  flex: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

/* ========== CARDS ========== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

/* ========== HERO COPY ========== */
.hero-copy {
  background: transparent;
  box-shadow: none;
  color: var(--white);
  padding: 16px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  color: var(--teal-100);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 16px;
  color: var(--white);
}

.hero-copy > p {
  font-size: 1rem;
  color: rgba(255,255,255,.82);
  margin-bottom: 26px;
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 32px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,.9);
  font-size: 0.95rem;
}

.badge-check {
  background: rgba(255,255,255,.25);
  color: var(--white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  line-height: 1;
  text-align: center;
  gap: 8px;
}

.btn-primary {
  background: var(--teal-600);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(13,148,136,.35);
}
.btn-primary:hover {
  background: var(--teal-700);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(13,148,136,.42);
}

.btn-secondary {
  background: var(--blue);
  color: var(--white);
  border: none;
}
.btn-secondary:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-white-red {
  background: var(--white);
  color: var(--red);
  border: none;
}
.btn-white-red:hover { background: var(--slate-100); transform: translateY(-1px); }

/* ========== FORM ========== */
.section-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 5px;
}

.section-subtitle {
  font-size: 0.87rem;
  color: var(--slate-600);
  margin-bottom: 22px;
}

form { display: flex; flex-direction: column; gap: 14px; }

form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--slate-200);
  border-radius: 7px;
  font-size: 0.93rem;
  font-family: var(--font);
  color: var(--slate-900);
  background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,.13);
}

form input::placeholder,
form textarea::placeholder { color: var(--slate-400); }

form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23475569' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
  cursor: pointer;
}

form textarea {
  resize: vertical;
  min-height: 90px;
}

form > .btn { width: 100%; padding: 14px; font-size: 1rem; margin-top: 4px; }

.form-note {
  font-size: 0.77rem;
  color: var(--slate-600);
  text-align: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ========== SUCCESS / ERROR ========== */
.form-success,
.form-error {
  display: none;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}
.form-success {
  background: var(--teal-50);
  border: 1.5px solid var(--teal-100);
  color: var(--teal-800);
}
.form-error {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}
.form-success.visible,
.form-error.visible { display: block; }

/* ========== SPINNER ========== */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
  flex-shrink: 0;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-text { opacity: 0.75; }
.btn:disabled { cursor: not-allowed; opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== PROPERTY PAGE ========== */
.property-hero {
  background: var(--slate-100);
  padding: 36px 0 52px;
  flex: 1;
}

.property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ========== SLIDER ========== */
.property-image {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  position: relative;
}

.slider {
  position: relative;
  width: 100%;
  min-height: 340px;
  overflow: hidden;
  background: var(--gray-dark);
}

.slider-track {
  display: flex;
  min-height: 340px;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #3a3a3a;
  min-height: 340px;
  text-align: center;
  padding: 40px 30px;
}
.slide-placeholder svg { opacity: 0.4; }
.slide-placeholder .ph-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
.slide-placeholder .ph-addr {
  font-size: 0.78rem;
  color: rgba(255,255,255,.5);
}

/* Prev / Next buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.48);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
  padding: 0;
}
.slider-btn:hover { background: rgba(0,0,0,.72); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Slide counter badge */
.slider-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: 0.3px;
}

/* Property panel */
.property-panel {
  position: sticky;
  top: 76px;
}

.property-panel .eyebrow {
  background: var(--teal-50);
  color: var(--teal-700);
  margin-bottom: 12px;
}

.property-panel h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.22;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.property-panel > p {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-pill {
  background: var(--teal-50);
  border: 1.5px solid var(--teal-100);
  color: var(--teal-700);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.feature-box {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  padding: 11px 14px;
}

.feature-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--slate-600);
  margin-bottom: 3px;
}

.feature-value {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* Property details section */
.property-details-section { margin-top: 28px; }

.details-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.details-card h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--teal-100);
}

.details-card p {
  font-size: 0.93rem;
  color: var(--slate-700);
  line-height: 1.7;
  margin-bottom: 10px;
}
.details-card p:last-child { margin-bottom: 0; }

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Walk Scores */
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.score-box {
  text-align: center;
  padding: 14px 8px;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
}

.score-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--teal-600);
  line-height: 1;
}

.score-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

.score-desc {
  font-size: 0.7rem;
  color: var(--slate-600);
  margin-top: 4px;
  line-height: 1.3;
}

/* Transit / Schools */
.info-list { display: flex; flex-direction: column; gap: 0; }

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--slate-100);
}
.info-item:last-child { border-bottom: none; padding-bottom: 0; }
.info-item:first-child { padding-top: 0; }

.info-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.info-body { flex: 1; min-width: 0; }
.info-name { font-size: 0.83rem; font-weight: 700; color: var(--slate-900); }
.info-sub { font-size: 0.74rem; color: var(--slate-600); line-height: 1.4; }

.info-dist {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal-700);
  white-space: nowrap;
  flex-shrink: 0;
}

.school-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-600);
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Full-width form section */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
}
.form-section .section-title { font-size: 1.3rem; }
.form-section .section-subtitle { margin-bottom: 24px; }

/* ========== FOOTER ========== */
.footer {
  background: var(--slate-900);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 22px 20px;
  font-size: 0.82rem;
  margin-top: auto;
}
.footer a { color: var(--teal-400); }
.footer a:hover { text-decoration: underline; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { padding: 28px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .property-grid { grid-template-columns: 1fr; }
  .property-panel { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .form-section { padding: 24px 20px; }
  .card { padding: 22px; }
  .hero-copy h1 { font-size: 1.6rem; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { text-align: center; justify-content: center; }
  .score-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .score-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 1.42rem; }
  .property-panel h1 { font-size: 1.3rem; }
}
