/* ============================================================
   Summit Internet — Stylesheet
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --navy:        #0c1a2e;
  --navy-mid:    #122340;
  --navy-light:  #1a3356;
  --sky:         #0ea5e9;
  --sky-light:   #38bdf8;
  --sky-pale:    #e0f2fe;
  --gold:        #f59e0b;
  --gold-light:  #fcd34d;
  --pine:        #16a34a;
  --pine-light:  #4ade80;
  --slate-900:   #0f172a;
  --slate-800:   #1e293b;
  --slate-700:   #334155;
  --slate-600:   #475569;
  --slate-400:   #94a3b8;
  --slate-200:   #e2e8f0;
  --slate-100:   #f1f5f9;
  --slate-50:    #f8fafc;
  --white:       #ffffff;

  /* Typography */
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:  'DM Serif Display', Georgia, serif;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem);
  --radius:      12px;
  --radius-lg:   20px;

  /* Shadow */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg:   0 20px 48px rgba(0,0,0,.16), 0 8px 20px rgba(0,0,0,.10);
  --shadow-sky:  0 8px 32px rgba(14,165,233,.30);

  /* Transitions */
  --ease:        cubic-bezier(.4, 0, .2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--slate-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ── Utilities ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background .15s var(--ease), color .15s var(--ease),
              box-shadow .15s var(--ease), transform .1s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--sky);
  color: var(--white);
}
.btn-primary:hover { background: var(--sky-light); box-shadow: var(--shadow-sky); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--slate-200);
}
.btn-outline:hover { border-color: var(--sky); color: var(--sky); }

.btn-outdoors {
  background: linear-gradient(135deg, var(--pine) 0%, #15803d 100%);
  color: var(--white);
}
.btn-outdoors:hover { box-shadow: 0 8px 24px rgba(22,163,74,.35); }

.btn-sm { padding: .5rem 1.125rem; font-size: .875rem; }
.btn-full { width: 100%; }
.btn-search { padding: .75rem 1.75rem; }


/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 26, 46, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--white);
  flex-shrink: 0;
}
.logo-mark { width: 28px; height: auto; }
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  letter-spacing: -.01em;
}
.logo-light { color: rgba(255,255,255,.9); }

.nav-links {
  display: flex;
  gap: .25rem;
  margin-left: .5rem;
  flex: 1;
}
.nav-links a {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  font-weight: 500;
  padding: .375rem .75rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.08); }


/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-block: clamp(5rem, 10vw, 8rem);
}

/* Mountain silhouette background */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-mountain {
  position: absolute;
  bottom: 0;
}

.hero-mountain-1 {
  left: -5%;
  width: 65%;
  height: 60%;
  background: linear-gradient(160deg, #0d2040 30%, #122847 100%);
  clip-path: polygon(0% 100%, 30% 15%, 55% 55%, 70% 30%, 100% 100%);
  opacity: .7;
}

.hero-mountain-2 {
  right: -5%;
  width: 60%;
  height: 70%;
  background: linear-gradient(200deg, #0a1929 20%, #0d2244 100%);
  clip-path: polygon(0% 100%, 20% 40%, 45% 70%, 65% 20%, 85% 55%, 100% 100%);
  opacity: .55;
}

.hero-mountain-3 {
  left: 30%;
  width: 50%;
  height: 50%;
  background: linear-gradient(180deg, #0e2345 0%, #152d55 100%);
  clip-path: polygon(0% 100%, 35% 5%, 65% 45%, 100% 100%);
  opacity: .4;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(14,165,233,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-eyebrow {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.hero-heading em {
  font-style: italic;
  color: var(--sky-light);
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: rgba(255,255,255,.7);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 3rem;
}


/* ── Search Card ──────────────────────────────────────────── */
.search-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2rem);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 700px;
}

.search-label {
  display: block;
  font-size: .9375rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 1rem;
}

.search-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--slate-400);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: .8125rem 1rem .8125rem 2.75rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: .9375rem;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search-input::placeholder { color: rgba(255,255,255,.4); }
.search-input:focus {
  border-color: var(--sky);
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 3px rgba(14,165,233,.2);
}

.search-input-light {
  background: var(--white);
  border-color: var(--slate-200);
  color: var(--slate-800);
}
.search-input-light::placeholder { color: var(--slate-400); }
.search-input-light:focus {
  border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

.search-hint {
  font-size: .8125rem;
  color: rgba(255,255,255,.45);
  margin-top: .875rem;
}


/* ── Autocomplete Suggestions ─────────────────────────────── */
.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.suggestions[hidden] { display: none; }

.suggestion-item {
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: .625rem;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item[aria-selected="true"] {
  background: var(--sky-pale);
  color: var(--navy);
}

.suggestion-item .sug-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--sky);
}

.suggestions-light { /* same styles apply */ }

/* ── Address Result ───────────────────────────────────────── */
.result-section {
  padding-block: 2rem 0;
}
.result-section[hidden] { display: none; }

.result-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--sky-pale);
  border: 1.5px solid var(--sky-light);
  animation: slideDown .3s var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.result-address-block h3 { font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.result-address-block p  { font-size: .9rem; color: var(--slate-600); margin-top: .25rem; }

.result-prop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.prop-chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .8125rem;
  font-weight: 600;
}
.prop-chip-blue  { background: var(--sky-pale); color: var(--navy); border: 1px solid #bae6fd; }
.prop-chip-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.prop-chip-gold  { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

.result-recommendation {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1.5px solid var(--sky);
  margin-bottom: 1rem;
}
.result-rec-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: .5rem;
}
.result-rec-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: .375rem;
}
.result-rec-reason {
  font-size: .9rem;
  color: var(--slate-600);
  line-height: 1.5;
}
.result-rec-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }

.result-other-plans { margin-top: 1rem; }
.result-other-label {
  font-size: .8125rem;
  color: var(--slate-500);
  margin-bottom: .5rem;
}
.result-other-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.result-other-links a {
  padding: .375rem .875rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  transition: border-color .15s, color .15s;
}
.result-other-links a:hover { border-color: var(--sky); color: var(--sky); }

/* not-found state */
.result-not-found {
  text-align: center;
  padding: 2rem;
  color: var(--slate-600);
}
.result-not-found strong { display: block; font-size: 1rem; color: var(--slate-800); margin-bottom: .5rem; }


/* ── Why Summit ───────────────────────────────────────────── */
.why-section {
  background: var(--slate-50);
  padding-block: var(--section-pad);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-eyebrow {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: .75rem;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--slate-600);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.65;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pillar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  transition: box-shadow .2s, transform .2s;
}
.pillar:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.pillar-icon {
  width: 48px;
  height: 48px;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

.pillar h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .625rem;
}
.pillar p {
  font-size: .9375rem;
  color: var(--slate-600);
  line-height: 1.6;
}


/* ── Plans ────────────────────────────────────────────────── */
.plans-section {
  padding-block: var(--section-pad);
  background: var(--white);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.plan-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  box-shadow: var(--shadow-sm);
}
.plan-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--sky-light);
}

.plan-card.plan-featured {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(14,165,233,.1), var(--shadow-md);
  transform: translateY(-4px);
}
.plan-card.plan-featured:hover {
  box-shadow: 0 0 0 3px rgba(14,165,233,.18), var(--shadow-lg);
  transform: translateY(-7px);
}

.plan-card.plan-outdoors {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--white) 60%);
}
.plan-card.plan-outdoors:hover {
  border-color: var(--pine);
  box-shadow: 0 8px 32px rgba(22,163,74,.15), var(--shadow-md);
}

.plan-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sky);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-tier-badge {
  display: none; /* used by recommendation JS */
}

.plan-outdoors-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--pine);
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: .25rem .75rem;
  border-radius: 100px;
  width: fit-content;
}
.plan-outdoors-badge svg { width: 14px; height: 14px; }

.plan-header { display: flex; flex-direction: column; gap: .375rem; }
.plan-name {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  color: var(--navy);
  letter-spacing: -.01em;
}
.plan-tagline {
  font-size: .9rem;
  color: var(--slate-500);
  font-style: italic;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  margin-top: .5rem;
}
.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.price-period {
  font-size: .9375rem;
  color: var(--slate-500);
  font-weight: 500;
}

.plan-description {
  font-size: .9375rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-size: .9rem;
  color: var(--slate-700);
  line-height: 1.45;
}
.plan-features li.feature-highlight {
  color: var(--pine);
  font-weight: 600;
}

.check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: .125rem;
  color: var(--sky);
}
.plan-outdoors .check { color: var(--pine); }
.plan-outdoors li.feature-highlight .check { color: var(--pine); }

.plan-cta { margin-top: auto; }

/* Highlight a recommended plan */
.plan-card.plan-recommended {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15), var(--shadow-md);
}
.plan-recommended-banner {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--slate-900);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
}


/* ── Check Address Section ────────────────────────────────── */
.check-section {
  background: var(--navy);
  padding-block: var(--section-pad);
}

.check-section .section-eyebrow { color: var(--sky-light); }
.check-section .section-heading { color: var(--white); }
.check-section .section-sub     { color: rgba(255,255,255,.65); }

.check-inner { max-width: 680px; margin-inline: auto; }

.check-header { text-align: center; }

.check-search {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  position: relative;
}
.check-search .search-input-wrap { flex: 1; min-width: 240px; }

.check-result {
  margin-top: 1.5rem;
}
.check-result:empty { display: none; }


/* ── Inline result (check section) ───────────────────────── */
.inline-result {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--white);
  animation: slideDown .3s var(--ease);
}
.inline-result .rec-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sky-light);
  margin-bottom: .5rem;
}
.inline-result .rec-name {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  color: var(--white);
  margin-bottom: .375rem;
}
.inline-result .rec-reason {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.inline-result .prop-chips { margin-bottom: 1rem; }
.inline-result .prop-chip-blue  { background: rgba(14,165,233,.15); color: var(--sky-light); border-color: rgba(14,165,233,.3); }
.inline-result .prop-chip-green { background: rgba(22,163,74,.15);  color: var(--pine-light); border-color: rgba(22,163,74,.3); }
.inline-result .prop-chip-gold  { background: rgba(245,158,11,.15); color: var(--gold-light); border-color: rgba(245,158,11,.3); }

.inline-not-found {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255,255,255,.6);
}
.inline-not-found strong {
  display: block;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: .5rem;
}


/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--slate-900);
  color: rgba(255,255,255,.6);
  padding-top: 4rem;
}

.footer-inner {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand {
  flex: 1;
  min-width: 180px;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; line-height: 1.6; }

.footer-nav {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  min-width: 130px;
}
.footer-col h4 {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: .25rem;
}
.footer-col a {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  transition: color .15s;
}
.footer-col a:hover { color: var(--sky-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.5rem;
  font-size: .8125rem;
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: rgba(255,255,255,.45); transition: color .15s; }
.footer-legal a:hover { color: rgba(255,255,255,.75); }


/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .plans-grid { grid-template-columns: 1fr; }
  .plan-card.plan-featured { transform: none; }
  .search-row { flex-direction: column; }
  .btn-search { width: 100%; }
  .check-search { flex-direction: column; }
  .check-search .btn-search { width: 100%; }
  .footer-inner { flex-direction: column; gap: 2rem; }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 2.25rem; }
  .result-rec-actions { flex-direction: column; }
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.plan-card { animation: fadeIn .4s var(--ease) both; }
.plan-card:nth-child(1) { animation-delay: .05s; }
.plan-card:nth-child(2) { animation-delay: .10s; }
.plan-card:nth-child(3) { animation-delay: .15s; }
.plan-card:nth-child(4) { animation-delay: .20s; }


/* ── AI Button (nav) ──────────────────────────────────────── */
.btn-ai {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: var(--white);
  margin-right: .5rem;
  gap: .4rem;
}
.btn-ai:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,.4);
  opacity: .92;
}

/* ── AI Modal ─────────────────────────────────────────────── */
.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ai-modal[hidden] { display: none; }

.ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 26, 46, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ai-modal-panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  padding: 2rem;
  animation: slideDown .22s var(--ease);
}

.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.375rem;
}

.ai-modal-title-row {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.ai-title-icon {
  color: #7c3aed;
  flex-shrink: 0;
}

.ai-modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy);
}

.ai-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-400);
  padding: .3rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
}
.ai-modal-close:hover { color: var(--slate-700); background: var(--slate-100); }

.ai-modal-sub {
  font-size: .9375rem;
  color: var(--slate-600);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.ai-step[hidden] { display: none; }

.ai-search-wrap { position: relative; margin-bottom: 1.25rem; }
.ai-search-wrap .search-input-wrap { width: 100%; }

.ai-modal-actions { display: flex; justify-content: flex-end; }

.btn-ai-submit {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: var(--white);
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .9375rem;
  border: none;
  cursor: pointer;
  transition: opacity .15s, box-shadow .15s, transform .1s;
}
.btn-ai-submit:hover:not(:disabled) {
  opacity: .9;
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
}
.btn-ai-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-ai-submit:disabled { opacity: .4; cursor: not-allowed; }

/* Thinking animation */
.ai-thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
  gap: 1rem;
}

.ai-thinking-dots { display: flex; gap: .5rem; }
.ai-thinking-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7c3aed;
  animation: aiPulse 1.2s ease-in-out infinite;
}
.ai-thinking-dots span:nth-child(2) { animation-delay: .2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes aiPulse {
  0%, 80%, 100% { transform: scale(.55); opacity: .35; }
  40%           { transform: scale(1);   opacity: 1; }
}

.ai-thinking-label {
  font-size: .9375rem;
  color: var(--slate-500);
  font-style: italic;
}

/* Result */
.ai-result-address {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: .875rem;
}

.ai-result-text {
  font-size: .9375rem;
  color: var(--slate-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  min-height: 4rem;
}
.ai-result-text.typing::after {
  content: '▋';
  animation: blink .6s step-end infinite;
  color: #7c3aed;
  font-size: .75em;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.ai-result-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }

.ai-powered-by {
  font-size: .75rem;
  color: var(--slate-400);
  text-align: right;
}

.ai-error-msg {
  color: #dc2626;
  font-size: .9375rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .ai-modal-panel { padding: 1.5rem; }
  .btn-ai span { display: none; }
}
