/* =========================================================================
   We Buy Homes in Bell — stylesheet
   Palette is intentionally tiny: white, near-black, two grays, one blue.
   No gradients, no shadows, no animation except hover/focus color changes.
   ========================================================================= */

:root {
  --ink:        #111111;   /* body text */
  --ink-soft:   #555555;   /* secondary text — 7.4:1 on white */
  --rule:       #dddddd;   /* decorative hairlines */
  --rule-dark:  #8a8a8a;   /* input + control borders — 3.4:1, clears WCAG 1.4.11 */
  --tint:       #f6f6f6;   /* the one off-white, for the form card */
  --blue:       #1b4f8a;   /* links, buttons, section rule — 7.5:1 on white */
  --blue-dark:  #133a67;   /* hover only */
  --error:      #a11212;   /* 7.0:1 on white */
  --wrap:       40rem;     /* 640px of readable width */

  /* Brand colors from the new City of Bell mailer/yard-sign design.
     Used only in the header banner in this variant. */
  --brand-navy:      #123a6b;
  --brand-navy-dark: #0c2b52;
  --brand-gold:      #f2b705;
}

/* ------------------------------- reset -------------------------------- */

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

html {
  /* Everything below is sized in rem, so this one line scales the whole page.
     120% of the visitor's own default, so their browser setting still counts. */
  font-size: 120%;
  -webkit-text-size-adjust: 100%;
  /* Keep anchor targets clear of the sticky header. */
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;   /* 21.6px at the 120% root */
  line-height: 1.65;
}

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

h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 700; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

/* --------------------------- focus + skip link ------------------------- */

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

/* Blue-on-blue would disappear, so dark outlines on filled controls. */
.btn:focus-visible,
.header-phone:focus-visible {
  outline-color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #ffffff;
  color: var(--blue);
  padding: 0.75rem 1rem;
  border: 2px solid var(--blue);
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* -------------------------------- layout ------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--rule);
}

/* The one decorative flourish: a short blue rule above every section title. */
.section h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  margin-bottom: 1rem;
}

.section h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* -------------------------------- header ------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand-navy);
  border-bottom: 3px solid var(--brand-gold);
}

/* Blue-on-blue outline would disappear on this dark bar. */
.site-header :focus-visible { outline-color: var(--brand-gold); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 60px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.wordmark {
  display: block;
  padding: 0.25rem 0;      /* keeps the hit area above the 24px AA minimum */
  /* Held down on phones only: at full body scale this wraps to three lines
     and turns the sticky bar into a screen-eater. Body copy is unaffected. */
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: #ffffff; opacity: 0.9; }
.wordmark-accent { color: var(--brand-gold); }

.habla {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.lang-toggle {
  min-width: 46px;
  min-height: 44px;
  padding: 0 0.5rem;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.lang-toggle:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.12); }

.header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  background: var(--brand-gold);
  color: var(--brand-navy);
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { background: #ffffff; color: var(--brand-navy); }
.header-phone:focus-visible { outline-color: var(--brand-navy-dark); }

/* --------------------------------- hero -------------------------------- */

/* Scales with the phone so the form still clears the fold on short screens.
   The image is decorative; reaching the form without scrolling is not. */
.hero-img {
  width: 100%;
  height: 18vh;
  min-height: 110px;
  max-height: 170px;
  object-fit: cover;
  background: var(--tint);   /* neutral block before the photo is added */
}

.hero-body { padding-top: 1.5rem; padding-bottom: 2.5rem; }

.hero h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.subhead {
  /* Matches body size rather than undershooting it — this sentence is doing
     the job of telling a first-time visitor who they're talking to. */
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

/* A tap-to-call path with the same visual weight as the form, for anyone
   who'd rather talk to a person than type into a web form. */
.btn-call {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  margin-bottom: 1.5rem;
  background: #ffffff;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 2px;
  font-size: 1.125rem;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}
.btn-call:hover { background: var(--blue); color: #ffffff; }

/* --------------------------------- form -------------------------------- */

.form-card {
  background: var(--tint);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.25rem;
}

.form-title { font-size: 1.25rem; margin-bottom: 1.125rem; }

.field { margin-bottom: 1.375rem; }

label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4375rem;
}

.optional { font-weight: 400; color: var(--ink-soft); }

input[type="text"],
input[type="tel"],
input[type="email"],
select {
  width: 100%;
  min-height: 56px;
  padding: 0.5rem 0.875rem;
  font: inherit;
  font-size: 1.0625rem;     /* comfortably above the 16px iOS zoom threshold */
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--rule-dark);
  border-radius: 2px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  /* Inline caret, so there's no external asset to fetch. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23555555' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}

input:hover, select:hover { border-color: var(--ink-soft); }

[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

.error {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--error);
  font-weight: 700;
}

.form-error {
  margin: 0 0 1.125rem;
  padding: 0.875rem;
  border: 2px solid var(--error);
  color: var(--error);
  font-size: 1rem;
  font-weight: 700;
  background: #ffffff;
}

.btn {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 0.75rem 1rem;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid var(--blue);
  border-radius: 2px;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn[disabled] { background: var(--ink-soft); border-color: var(--ink-soft); cursor: default; }

.form-note {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.form-alt {
  margin: 0.625rem 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
}
/* A call link, so it gets a full-size tap target rather than a text-height one. */
.form-alt a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  white-space: nowrap;
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success state that replaces the form. */
.success { padding: 0.25rem 0; }
.success h2 { font-size: 1.1875rem; margin-bottom: 0.625rem; }
.success h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  margin-bottom: 0.875rem;
}
.success p { font-size: 1rem; }
.success:focus { outline: none; }

/* ------------------------------ how it works --------------------------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.75rem;
}
.steps li:last-child { margin-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.125rem;
  height: 2.125rem;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 { font-size: 1.125rem; margin-bottom: 0.25rem; padding-top: 0.1875rem; }
.steps p  { color: var(--ink-soft); margin: 0; }

/* --------------------------------- about ------------------------------- */

.about-img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  background: var(--tint);
  border: 1px solid var(--rule);
  margin-bottom: 1.25rem;
}

.about-text p { color: var(--ink-soft); }
.about-text p:first-of-type { color: var(--ink); }

/* ---------------------------------- FAQ -------------------------------- */
/* Static question/answer pairs — always visible, no expand/collapse. */

.faq { border-top: 1px solid var(--rule); }

.faq-item { padding: 1.375rem 0; border-bottom: 1px solid var(--rule); }

.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.faq-item p { color: var(--ink-soft); font-size: 1.0625rem; margin: 0; }

/* -------------------------------- footer ------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
}

.footer-name { font-weight: 700; margin-bottom: 1rem; }

.footer-contact { list-style: none; margin: 0 0 1rem; padding: 0; }

.footer-contact li {
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.footer-label {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
}

.footer-habla { margin-bottom: 1.5rem; }

.disclaimer {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.copyright { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }

/* --------------------------- narrow phones only -------------------------- */

@media (max-width: 699px) {
  /* "Spanish"/"English" are wider than "ES"/"EN" were — reclaim a little
     margin so the phone button doesn't get pushed past the edge. */
  .site-header .wrap { padding: 0 0.875rem; }
}

/* ------------------------------- ≥ 700px ------------------------------- */

@media (min-width: 700px) {
  body { font-size: 1.1875rem; }   /* 22.8px */

  .wrap { padding: 0 2rem; }

  /* The bar spans wider than the reading column so the wordmark sits near
     the left edge instead of floating in from it. */
  .site-header .wrap { max-width: 52rem; }

  .header-inner { min-height: 72px; }
  .wordmark { font-size: 1.125rem; }
  .lang-toggle { font-size: 0.875rem; padding: 0 0.75rem; }
  .header-phone { font-size: 1rem; padding: 0 1.125rem; }

  .hero-img { height: 340px; max-height: none; }
  .hero-body { padding-top: 2.5rem; padding-bottom: 3.5rem; }
  .hero h1 { font-size: 2.375rem; }
  .subhead { font-size: 1.1875rem; margin-bottom: 2rem; }

  .form-card { padding: 1.75rem; }

  .section { padding: 3.75rem 0; }
  .section h2 { font-size: 1.75rem; margin-bottom: 1.75rem; }

  /* Photo beside the text, as specified. */
  .about { display: flex; gap: 2rem; align-items: flex-start; }
  .about-img { width: 200px; height: 250px; flex: 0 0 auto; margin-bottom: 0; }

  .site-footer { padding: 3.5rem 0 4rem; }
}

/* ------------------------------ ≥ 1000px ------------------------------- */

@media (min-width: 1000px) {
  :root { --wrap: 44rem; }
  .hero-img { height: 420px; max-height: none; }
}

/* ---------------------------- print / reduced -------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
