/* Pacific West Bonds and Insurance Services
   Static visual system. No frameworks, no build step, no web fonts.
   Apple-clean: system stack, white canvas, hairline dividers, soft shadow,
   rounded buttons, restrained blue, generous space.
   Left accent bars are banned. Do not add a left border property.
   Hallmark · ENERGY 1 / RHYTHM 2 / MOTION 1. Contractor brokerage. */

:root {
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --muted: #6e6e73;
  --paper: #f5f5f7;
  --white: #ffffff;
  --line: #d2d2d7;
  --line-strong: #c7c7cc;
  --blue: #0b5fff;
  --blue-dark: #0040dd;
  --sky: #f0f4ff;
  --green: #248a3d;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .04), 0 4px 12px rgb(0 0 0 / .04);
  --shadow: 0 8px 24px rgb(0 0 0 / .06);
  --radius: 12px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --bar-h: 0px;
  --focus-ink: #1d1d1f;
  --focus-halo: #ffdd00;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  padding-bottom: var(--bar-h);
  overflow-x: clip;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* Dual-ring focus. Ink ring on a solid halo clears 3:1 on white and on paper. */
:focus-visible { outline: 3px solid var(--focus-ink); outline-offset: 0; box-shadow: 0 0 0 6px var(--focus-halo); border-radius: 4px; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); letter-spacing: -.03em; line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1.0625rem; }
p { margin: 0; }

.container { width: min(1080px, calc(100% - 2.25rem)); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 200; padding: .8rem 1.1rem; background: var(--ink); color: #fff; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .18s var(--ease); }
.skip-link:focus { top: 1rem; }

/* ---------- Slim top bar ---------- */
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-soft);
}
.topbar-inner {
  width: min(1080px, calc(100% - 2.25rem));
  margin-inline: auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar a { font-weight: 600; text-decoration: none; }
.topbar a:hover { color: var(--blue-dark); }

/* ---------- Header: logo, brand, nav, call ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgb(255 255 255 / .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
  transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); background: rgb(255 255 255 / .98); }
.header-inner {
  width: min(1080px, calc(100% - 2.25rem));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}
.brand { display: flex; align-items: center; gap: .65rem; min-width: 0; text-decoration: none; margin-right: auto; }
.brand img { width: 148px; height: auto; }
.brand-text { display: none; min-width: 0; }
.brand-name { display: block; font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.brand-sub { display: block; color: var(--muted); font-size: 1rem; }
.call-number { display: inline; white-space: nowrap; }

.call-button, .button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 48px;
  padding: .7rem 1.15rem;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.call-button { display: inline-flex; min-height: 48px; padding: .6rem .95rem; }
.call-button:disabled, .button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.button:hover, .call-button:hover { background: var(--blue-dark); box-shadow: var(--shadow); }
.button:active, .call-button:active { transform: scale(.98); }
.button.secondary { background: var(--white); color: var(--blue-dark); border: 1px solid var(--line-strong); box-shadow: none; }
.button.secondary:hover { background: var(--sky); border-color: var(--blue); }
.button.ghost { background: var(--white); color: var(--blue-dark); border: 1px solid var(--line-strong); box-shadow: none; }
.button.ghost:hover { background: var(--sky); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .55rem;
  align-items: center;
  flex: 1 1 100%;
  order: 3;
}
.site-nav a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: .55rem .4rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue-dark); background: var(--sky); }
.nav-states { display: flex; flex-wrap: wrap; gap: .2rem .45rem; }
.nav-places-wide { display: none; }
.nav-places { position: relative; }
.nav-places summary {
  list-style: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: .55rem .4rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.nav-places summary::-webkit-details-marker { display: none; }
.nav-places summary::marker { content: ""; }
.nav-places[open] summary { color: var(--blue-dark); background: var(--sky); }
.nav-places:not([open]) > a { display: none; }
.nav-places[open] a { display: flex; }
.topbar-phones { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.hours { margin-top: 1rem; color: var(--ink-soft); }

@media (min-width: 1080px) {
  .site-nav { flex: 1 1 auto; order: 2; justify-content: flex-end; padding-right: .6rem; }
  .call-button { order: 3; }
  .nav-states { padding-left: .35rem; margin-left: .15rem; }
  .nav-places { display: none; }
  .nav-places-wide { display: flex; flex-wrap: nowrap; align-items: center; gap: .2rem .45rem; }
}

@media (max-width: 479px) {
  .header-inner, .topbar-inner { width: calc(100% - 1.25rem); gap: .5rem; }
  .brand img { width: 128px; }
  .call-button { padding: .55rem .65rem; font-size: 1rem; }
  .call-number { display: inline; }
  .site-nav { gap: 0 .2rem; }
  .site-nav a, .nav-places summary { padding: .35rem .28rem; min-height: 44px; font-size: 1rem; }
}

@media (max-width: 560px) {
  .call-number { display: inline; }
}

#quote-form-heading { scroll-margin-top: 6rem; }
@media (max-width: 1079px) {
  #quote-form-heading { scroll-margin-top: 18rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 2.8rem 0 3.2rem; background: var(--white); }
.hero-grid { position: relative; display: grid; gap: 2rem; align-items: center; }
.hero-sub, .hero-note { margin-top: 1rem; max-width: 36rem; color: var(--ink-soft); font-size: 1.25rem; line-height: 1.45; }
.hero h1 { max-width: 18ch; }

.answer {
  position: relative;
  max-width: 42rem;
  margin: 1.5rem 0 0;
  padding: 1.15rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 1.125rem;
  color: var(--ink-soft);
}
.answer strong { color: var(--ink); }
.hero-actions { display: grid; gap: .75rem; max-width: 24rem; margin-top: 1.5rem; }

.hero-card {
  position: relative;
  padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.card-kicker { font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-card .card-lead { margin: .8rem 0 .6rem; color: var(--ink); font-size: clamp(1.35rem, 3.4vw, 1.7rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.hero-card p { color: var(--ink-soft); font-size: 1.0625rem; }
.fact-list { margin: 1.1rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; font-size: 1rem; color: var(--ink-soft); }
.fact-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.fact-list li:last-child { border-bottom: 0; }
.card-foot { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1rem; color: var(--muted); }

/* ---------- Stat band ---------- */
.stat-band { padding: 2rem 0; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); }
.stat-grid { display: grid; gap: 1.4rem; }
.stat { padding: .2rem 0; }
.stat-value { display: block; font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: .5rem; color: var(--muted); font-size: 1rem; }
.stat-source { display: inline-flex; align-items: center; gap: .3rem; margin-top: .4rem; color: var(--blue-dark); font-size: 1rem; font-weight: 700; }
.stat-source:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 3.4rem 0; background: var(--white); }
.section.white { background: var(--white); }
.section.tint { background: var(--paper); border-top: 1px solid var(--line); }
.section-heading { max-width: 46rem; margin-bottom: 1.8rem; }
.section-heading p { margin-top: .8rem; color: var(--muted); font-size: 1.125rem; }
.lede { max-width: 44rem; color: var(--muted); font-size: 1.125rem; }

.card-grid { display: grid; gap: 1rem; }
.card {
  position: relative;
  padding: 1.3rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.card p { margin-top: .55rem; color: var(--muted); }
.card .card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .9rem; color: var(--blue-dark); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; }
.card .card-link:hover { border-bottom-color: var(--blue); }

.split { display: grid; gap: 1.6rem; align-items: start; }
.list-check { margin: 1.1rem 0 0; padding: 0; list-style: none; }
.list-check li { position: relative; margin: .65rem 0; padding-left: 1.7rem; color: var(--ink-soft); }
.list-check li::before {
  content: "";
  position: absolute;
  left: .4rem;
  top: .35rem;
  width: .35rem;
  height: .7rem;
  border-bottom: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(45deg);
}

.callout { padding: 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.callout p { margin: .7rem 0 1.1rem; color: var(--ink-soft); }
.callout.warm { background: #faf8f4; }

.steps { display: grid; gap: 1rem; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 1.3rem 1.3rem 1.3rem 4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.2rem; display: grid; width: 2.1rem; height: 2.1rem; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; font-size: 1rem; font-weight: 700; }
.step p { margin-top: .4rem; color: var(--muted); }
.plain-steps { margin: 0; padding-left: 1.4rem; max-width: 40rem; }
.plain-steps li { margin: .5rem 0; color: var(--ink-soft); font-size: 1.125rem; }

.bond-strip { display: grid; gap: .75rem; }
.bond-strip a { display: block; padding: .95rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.bond-strip a:hover { background: var(--sky); border-color: var(--blue); color: var(--blue-dark); }

.fact-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: none; }
.fact-table caption { padding: 0 0 .8rem; color: var(--muted); font-size: 1rem; text-align: left; }
.fact-table th, .fact-table td { padding: 1rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table thead th { background: var(--paper); color: var(--ink); font-size: 1rem; }
.fact-table tbody tr { transition: background .2s var(--ease); }
.fact-table tbody tr:hover { background: var(--sky); }
.fact-table tr:last-child td { border-bottom: 0; }

/* ---------- FAQ accordions ---------- */
.faq { max-width: 52rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); background: var(--white); }
.faq summary { display: flex; align-items: flex-start; gap: .9rem; padding: 1.15rem 1.05rem; cursor: pointer; font-size: 1.0625rem; font-weight: 700; list-style: none; transition: background .2s var(--ease), color .2s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--paper); color: var(--blue-dark); }
.faq summary::after { content: ""; flex: 0 0 auto; width: .7rem; height: .7rem; margin-left: auto; margin-top: .35rem; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] > summary::after { transform: rotate(-135deg); }
.faq .answer-body { overflow: hidden; transition: height .32s var(--ease); }
.faq .answer-body p { padding: 0 1.05rem 1.2rem; max-width: 48rem; color: var(--muted); }
.faq .answer-body p + p { padding-top: 0; }

/* ---------- CTA band ---------- */
.cta-band { padding: 3rem 0; background: var(--paper); border-top: 1px solid var(--line); color: var(--ink); }
.cta-inner { display: grid; gap: 1.3rem; align-items: center; }
.cta-inner h2 { max-width: 20ch; }
.cta-inner p { margin-top: .7rem; color: var(--muted); font-size: 1.125rem; }
.cta-actions { display: grid; gap: .75rem; max-width: 24rem; }

/* ---------- Quote form ---------- */
.quote-layout { display: grid; gap: 1.5rem; align-items: start; }
.quote-panel { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; gap: 1.1rem; margin-top: 1.2rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: 1rem; }
.field .hint { color: var(--muted); font-size: 1rem; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: .8rem .9rem; background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #8e8e93; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgb(11 95 255 / .14); }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: .55; cursor: not-allowed; background: var(--paper); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { margin-top: 1rem; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); font-size: 1rem; }
.form-status { min-height: 1.5em; margin-top: .9rem; font-weight: 700; color: var(--blue-dark); }

/* ---------- Footer ---------- */
.site-footer { padding: 2.6rem 0 2rem; background: var(--white); color: var(--ink); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 1.6rem; }
.footer-grid h3 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer-grid p, .footer-grid li { color: var(--ink-soft); }
.footer-grid a { color: var(--ink); }
.footer-grid a:hover { color: var(--blue-dark); }
.footer-identity img { width: 160px; height: auto; }
.footer-address { margin-top: 1rem; }
.footer-list { margin: .7rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.footer-list a { text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-list a:hover { border-bottom-color: var(--blue); }
.footer-contact { margin-top: .8rem; display: grid; gap: .35rem; }
.license-line { margin-top: .9rem; color: var(--ink-soft); font-weight: 600; }
.footer-legal { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; color: var(--muted); font-size: 1rem; }
.updated { color: var(--muted); font-size: 1rem; }
.updated time { font-weight: 700; color: var(--ink-soft); }
.source-note { margin-top: 1rem; color: var(--muted); font-size: 1rem; }
.source-note a { color: var(--blue-dark); font-weight: 700; }

/* ---------- Legal pages ---------- */
.legal { max-width: 44rem; }
.legal h2 { margin-top: 2.4rem; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.legal p { margin-top: .85rem; color: var(--ink-soft); }
.legal ul { margin: .8rem 0 0; padding-left: 1.35rem; }
.legal li { margin-top: .4rem; color: var(--ink-soft); }

/* ---------- Sticky mobile call bar ---------- */
.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .45rem;
  padding: .55rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgb(0 0 0 / .08);
  transform: translateY(110%);
  transition: transform .32s var(--ease);
}
.call-bar.is-visible { transform: translateY(0); }
.call-bar .button { min-height: 48px; width: 100%; padding-inline: .5rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 899px) {
  body { padding-bottom: 6rem; }
  .hero:not(.hero-quote) { min-height: calc(100dvh - 10rem); }
}
.hero-quote .quote-panel { margin-top: 1.25rem; }

@media (min-width: 620px) {
  .hero-actions, .cta-actions { grid-template-columns: auto auto; max-width: none; justify-content: start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .bond-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .hero { padding: 3.6rem 0 4.2rem; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 3rem; }
  .brand img { width: 168px; }
  .header-inner { min-height: 72px; }
  .section { padding: 4.4rem 0; }
  .card-grid.three { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .bond-strip { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.15fr .85fr; gap: 2.6rem; }
  .split.even { grid-template-columns: 1fr 1fr; }
  .quote-layout { grid-template-columns: .85fr 1.15fr; gap: 2.2rem; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .cta-inner { grid-template-columns: 1.2fr .8fr; gap: 2.2rem; }
  .cta-actions { justify-self: end; }
  .footer-grid { grid-template-columns: 1.4fr .8fr .8fr; }
  .call-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .call-bar { transform: translateY(0); }
}

@media print {
  .topbar, .site-header, .call-bar, .cta-band { display: none; }
  body { background: #fff; }
}
