/* Ally Buys Houses — shared styles */
:root {
  --navy: #263b4e;
  --navy-deep: #1a2a38;
  --teal: #234f61;
  --rust: #c24b23;
  --rust-hover: #a83f1d;
  --yellow: #ffff00;
  --ink: #111111;
  --muted: #3a4652;
  --line: #d0d0d0;
  --field: #c8c8c8;
  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --success-bg: #eef7f1;
  --success: #235f3d;
  --error-bg: #fff0ee;
  --error: #c24b23;
  --max: 1140px;
  --font: "Open Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --display: "Poppins", "Open Sans", system-ui, sans-serif;
  --radius: 3px;
  --shadow: 0 8px 28px rgba(26, 42, 56, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--rust);
}

:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
}

.site-header a {
  color: #fff;
  text-decoration: none;
}

.site-header a:hover {
  color: var(--yellow);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: grid;
  gap: 0.15rem;
}

.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand__tag {
  font-size: 0.875rem;
  opacity: 0.92;
  max-width: 36ch;
}

.header-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--rust {
  background: var(--rust);
  color: #fff;
}

.btn--rust:hover {
  background: var(--rust-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.phone-link {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.nav-bar {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.1rem;
  padding: 0.55rem 0;
}

.site-nav > a,
.nav-dropdown__toggle {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.35rem 0;
  color: #fff;
  text-decoration: none;
  background: none;
  border: 0;
  font-family: var(--font);
  cursor: pointer;
}

.site-nav > a:hover,
.nav-dropdown__toggle:hover {
  color: var(--yellow);
}

.site-nav a[aria-current="page"],
.nav-dropdown.is-current > .nav-dropdown__toggle {
  color: var(--yellow);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle::after {
  content: "";
  display: inline-block;
  margin-left: 0.4rem;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12.5rem;
  padding: 0.45rem 0;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a[aria-current="page"] {
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
  display: block;
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--navy) center / cover no-repeat;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(26, 42, 56, 0.88) 0%, rgba(35, 79, 97, 0.72) 48%, rgba(26, 42, 56, 0.55) 100%),
    linear-gradient(to top, rgba(26, 42, 56, 0.55), transparent 45%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.hero__copy h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.4vw, 2.35rem);
  line-height: 1.28;
  color: var(--yellow);
  text-wrap: balance;
}

.hero__copy h1 strong {
  font-weight: 800;
  display: block;
}

.hero__lead {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  max-width: 40ch;
}

.hero__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.hero__bullets li::before {
  content: "✓ ";
  color: var(--yellow);
  font-weight: 800;
}

/* Lead form */
.lead-form {
  width: min(100%, 480px);
  margin-inline: auto;
  padding: 1.65rem 1.65rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.lead-form h2 {
  margin: 0 0 1.2rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.lead-form label {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.lead-form .req {
  color: var(--rust);
  margin-left: 2px;
}

.lead-form .field {
  margin-bottom: 0.95rem;
}

.lead-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: #fff;
  color: #222;
  font-size: 0.95rem;
  font-family: var(--font);
  line-height: 1.3;
}

.lead-form input::placeholder {
  color: #9a9a9a;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(194, 75, 35, 0.15);
}

.lead-form button {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--rust);
  color: #fff;
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}

.lead-form button:hover {
  background: var(--rust-hover);
}

.lead-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-msg {
  display: none;
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
}

.form-msg.is-success {
  display: block;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #b7d9c4;
}

.form-msg.is-error {
  display: block;
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #e8b4a8;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden !important;
}

/* Content sections */
.section {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section--navy {
  background: var(--navy);
  color: #fff;
}

.section--navy a {
  color: var(--yellow);
}

.section__title {
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: var(--teal);
  line-height: 1.25;
  text-wrap: balance;
}

.section--navy .section__title {
  color: #fff;
}

.section__intro {
  margin: 0 0 1.25rem;
  max-width: 70ch;
  color: var(--muted);
  font-weight: 400;
}

.section--navy .section__intro {
  color: rgba(255, 255, 255, 0.9);
}

.prose p {
  margin: 0 0 1rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 75ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 400;
  color: var(--muted);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rust);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.steps strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

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

.market-card,
.info-card {
  display: block;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.market-card:hover,
a.info-card:hover {
  border-color: var(--rust);
  transform: translateY(-2px);
  color: inherit;
}

.market-card h3,
.info-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--teal);
}

.market-card p,
.info-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  list-style-position: outside;
}

.faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-weight: 400;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-band p {
  margin: 0;
  max-width: 50ch;
  font-weight: 600;
}

.breadcrumb {
  padding: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #9aa3ab;
}

.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
}

.page-hero p {
  margin: 0;
  max-width: 60ch;
  font-size: 1.05rem;
  opacity: 0.95;
}

.page-hero .breadcrumb,
.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.88);
}

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.sticky-form {
  position: sticky;
  top: 1rem;
}

.checklist {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.checklist li {
  padding-left: 1.5rem;
  position: relative;
  font-weight: 400;
  color: var(--muted);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--rust);
  font-weight: 800;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--yellow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #fff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sticky-form {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 0.85rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-bar .container {
    flex-wrap: wrap;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown__toggle {
    width: 100%;
    text-align: left;
    padding: 0.45rem 0;
  }

  .nav-dropdown__menu {
    position: static;
    display: none;
    min-width: 0;
    width: 100%;
    margin: 0.15rem 0 0.35rem;
    box-shadow: none;
    border: 0;
    background: rgba(0, 0, 0, 0.18);
  }

  .nav-dropdown:hover .nav-dropdown__menu,
  .nav-dropdown:focus-within .nav-dropdown__menu {
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown__menu {
    display: block;
  }

  .nav-dropdown__menu a {
    padding-left: 1rem;
  }
}

@media (max-width: 560px) {
  .lead-form .row-2 {
    grid-template-columns: 1fr;
  }

  .header-cta {
    width: 100%;
  }

  .header-cta .btn {
    flex: 1;
  }
}

/* Google Places dropdown above sticky UI */
.pac-container {
  z-index: 10000 !important;
  font-family: var(--font);
}
