/* Five Boro Bridge Loans. Plain CSS, no build step. */

:root {
  --bg: #f7f4ee;          /* warm off-white */
  --bg-alt: #efeae0;      /* slightly deeper band */
  --surface: #fffdf9;     /* form inputs */
  --ink: #14233c;         /* deep navy, text and accent */
  --ink-soft: #3d4a60;    /* secondary text */
  --rule: #d9d1c2;        /* hairlines */
  --brass: #7d6026;       /* muted brass accent (AA on --bg) */
  --brass-line: #b39556;  /* decorative brass rules only */
  --error: #9b2c1f;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -0.01em; max-width: 24ch; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; max-width: 62ch; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.header-cta {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--brass-line);
  padding-bottom: 2px;
  white-space: nowrap;
}
.header-cta:hover { border-bottom-color: var(--ink); }

/* Hero */
.hero { padding: clamp(4rem, 11vw, 8rem) 0 var(--space); }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.25rem;
}
.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 1.25rem 0 2.25rem;
}

/* Buttons */
.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 0.85rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #0b1628; border-color: #0b1628; }
.button:disabled { opacity: 0.6; cursor: wait; }

/* Sections */
.section {
  padding: var(--space) 0;
  border-top: 1px solid var(--rule);
}
.section h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--brass-line);
  margin-bottom: 1.25rem;
}
.section-intro { color: var(--ink-soft); margin-bottom: 2.5rem; }

/* Terms */
.terms {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border-top: 1px solid var(--ink);
}
.terms > div {
  padding: 1.25rem 1.5rem 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.terms dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.4rem;
}
.terms dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
}
.fine {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 1.5rem;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--brass);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.steps p { color: var(--ink-soft); }

/* Why NYC / boroughs */
.two-col {
  display: grid;
  gap: 3rem 4rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.h-small { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.boroughs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.boroughs li {
  font-family: var(--serif);
  font-size: 1.3rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

/* FAQ */
.faq { max-width: 48rem; }
.faq h3 {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.faq h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.faq p { color: var(--ink-soft); }

/* Quote form */
.quote { background: var(--bg-alt); }
.quote-form {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 48rem;
}
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }
label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}
.optional { font-weight: 400; color: var(--ink-soft); }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 0.4rem 0 0; }
input, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #8f94a0;
  border-radius: 2px;
  padding: 0.75rem 0.85rem;
  width: 100%;
  min-height: 3rem;
}
textarea { resize: vertical; min-height: 8rem; }
input:hover, textarea:hover { border-color: var(--ink); }
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--ink);
}
input:user-invalid, textarea:user-invalid { border-color: var(--error); }

/* Address suggestions (combobox) */
.combo { position: relative; }
.suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(20, 35, 60, 0.12);
  max-height: 18rem;
  overflow-y: auto;
}
.suggestions li {
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  line-height: 1.35;
  border-left: 3px solid transparent;
}
.suggestions li + li { border-top: 1px solid var(--bg-alt); }
.suggestions li:hover { background: var(--bg-alt); }
.suggestions li[aria-selected="true"] {
  background: var(--bg-alt);
  border-left-color: var(--brass);
}
.attribution { font-size: 0.75rem; color: var(--ink-soft); margin: 0.35rem 0 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.form-actions .fine { margin-top: 1rem; }

.thanks {
  max-width: 48rem;
  border-left: 3px solid var(--brass-line);
  padding: 0.5rem 0 0.5rem 1.5rem;
}
.thanks:focus { outline: none; }
.thanks:focus-visible { outline: 3px solid var(--brass); }
.form-error { color: var(--error); font-weight: 600; margin-top: 1.5rem; }

[hidden] { display: none !important; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #dfe3ea;
  padding: 3.5rem 0 4rem;
}
.site-footer p { max-width: 60ch; }
.brand img { display: block; height: 2.75rem; width: auto; }
.footer-brand img { display: block; width: 15rem; height: auto; margin-bottom: 0.5rem; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #fff;
}
.site-footer .fine { color: #b9c1ce; }

/* Small screens */
@media (max-width: 44rem) {
  .two-col { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .terms > div { padding-right: 0; }
  .header-cta { font-size: 0.9rem; }
  .brand { font-size: 1.15rem; }
  .button { width: 100%; text-align: center; }
  .hero .button { width: auto; }
}

@media print {
  .skip-link, .header-cta, .hero .button, .quote { display: none; }
  body { background: #fff; }
}
