/* Design tokens and document foundations */
:root {
  --bg: #f4efe5;
  --paper: #fffdf7;
  --ink: #24231f;
  --muted: #555044;
  --line: #c7b9a4;
  --sage: #8a9a78;
  --sage-dark: #4d5a44;
  --sage-wash: #e2e9dc;
  --clay: #b96545;
  --canyon: #8f4738;
  --clay-wash: #f1dfd3;
  --sky: #d5e5e3;
  --sky-wash: #e4eeee;
  --shadow: 0 18px 48px rgba(68, 55, 39, 0.16);
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --viewport-width: 100%;
  --viewport-height: 100dvh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-bottom, 96px) + 16px);
}

:focus-visible {
  outline: 3px solid var(--canyon);
  outline-offset: 4px;
}

body {
  margin: 0;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background:
    linear-gradient(180deg, rgba(213, 229, 227, 0.56), rgba(244, 239, 229, 0) 34rem),
    var(--bg);
  color: var(--ink);
  font-size: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body.nav-open {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  border-radius: 999px;
  background: var(--ink);
  padding: 12px 18px;
  color: var(--paper);
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Allow content and grid items to reflow at narrow widths and enlarged text. */
main,
.site-footer {
  overflow-wrap: anywhere;
}

main :where(div, article, aside, form, label),
.site-footer > * {
  min-width: 0;
}

/* Shared header and navigation */
.site-header {
  position: fixed;
  top: var(--safe-top);
  right: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(var(--viewport-width) - var(--safe-left) - var(--safe-right) - 24px));
  /* Explicit centering also works inside the leading pane of a hinged display. */
  left: calc(var(--safe-left) + (var(--viewport-width) - var(--safe-left) - var(--safe-right) - min(var(--max), calc(var(--viewport-width) - var(--safe-left) - var(--safe-right) - 24px))) / 2);
  min-height: 86px;
  margin: 10px 0 0;
  border: 1px solid rgba(36, 35, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 10px 32px rgba(61, 47, 31, 0.1);
  padding: 10px 12px 10px 16px;
  color: var(--ink);
  backdrop-filter: blur(18px);
  transition:
    background 420ms var(--ease),
    box-shadow 420ms var(--ease),
    transform 420ms var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 14px 42px rgba(61, 47, 31, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  min-width: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 84px;
  height: 62px;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.brand-mark img {
  width: 106px;
  height: 106px;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-text {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.brand[aria-label="Pacific Security Financial home"] .brand-text {
  max-width: 210px;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  border-radius: 999px;
  padding: 12px 16px;
  color: rgba(36, 35, 31, 0.86);
  font-size: 0.98rem;
  font-weight: 650;
  transition:
    background 280ms var(--ease),
    color 280ms var(--ease),
    transform 280ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(138, 154, 120, 0.14);
  color: var(--ink);
  transform: translateY(-1px);
}

.site-nav a[aria-current="page"] {
  background: rgba(138, 154, 120, 0.2);
  color: var(--ink);
}

.nav-toggle {
  display: none;
}

/* Homepage hero, typography, and primary actions */
.hero {
  position: relative;
  display: grid;
  min-height: 70svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media picture,
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.hero-scrim {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(244, 239, 229, 0.9) 0%, rgba(244, 239, 229, 0.68) 38%, rgba(244, 239, 229, 0.08) 74%),
    linear-gradient(180deg, rgba(244, 239, 229, 0.44) 0%, rgba(244, 239, 229, 0.1) 52%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: max(clamp(112px, 11vw, 136px), calc(var(--header-bottom, 96px) + 24px)) 0 clamp(64px, 7vw, 88px);
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--canyon);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.03;
}

h1 {
  max-width: 920px;
  margin-right: auto;
  margin-bottom: 28px;
  margin-left: auto;
  font-size: clamp(3.7rem, 7vw, 6.4rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 4.6vw, 4.8rem);
}

h3 {
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 650;
}

p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 650px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(36, 35, 31, 0.88);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transition:
    background 280ms var(--ease),
    border-color 280ms var(--ease),
    color 280ms var(--ease),
    transform 280ms var(--ease),
    box-shadow 280ms var(--ease);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 14px 32px rgba(39, 37, 31, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--canyon);
}

.button-secondary {
  border-color: rgba(39, 37, 31, 0.18);
  background: rgba(255, 253, 248, 0.5);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 253, 248, 0.82);
  border-color: rgba(39, 37, 31, 0.32);
}

/* Shared content sections and cards */
.section-pad {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 7vw, 104px) 0;
}

.section-band {
  position: relative;
  isolation: isolate;
}

.section-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* Extend only paint; a 100vw box creates overflow beside visible scrollbars. */
  background: var(--band-color);
  box-shadow: 0 0 0 100vmax var(--band-color);
  clip-path: inset(0 -100vmax);
}

.section-band-paper::before {
  --band-color: var(--paper);
}

.section-band-sage::before {
  --band-color: var(--sage-wash);
}

.section-band-sky::before {
  --band-color: var(--sky-wash);
}

.section-band-clay::before {
  --band-color: var(--clay-wash);
}

.section-heading {
  max-width: 820px;
  margin-right: auto;
  margin-bottom: clamp(36px, 5vw, 56px);
  margin-left: auto;
  text-align: center;
}

.section-description {
  max-width: 680px;
  margin: 28px auto 0;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.trust-layout,
.profile {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.82fr);
  gap: clamp(38px, 7vw, 96px);
  align-items: start;
}

.feature-panel,
.contact-panel,
.quote-inner {
  border: 2px solid var(--line);
  background: var(--paper);
}

.feature-panel {
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow);
}

.contact-panel {
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow);
}

.panel-label,
.team-card span {
  display: block;
  margin-bottom: 20px;
  color: var(--sage-dark);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-panel h3 {
  max-width: 480px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.04;
}

.benefit-stack {
  display: grid;
  border-top: 1px solid var(--line);
}

.benefit-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}

.benefit-item span {
  color: var(--canyon);
  font-size: 0.78rem;
  font-weight: 800;
}

.benefit-item h3,
.package-card h3,
.team-card h3 {
  margin-bottom: 12px;
}

.benefit-item p,
.after-item p,
.package-card p,
.team-card p {
  margin-bottom: 0;
}

.difference-group {
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 2px solid var(--line);
  padding-top: clamp(34px, 5vw, 52px);
}

.difference-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: clamp(28px, 6vw, 76px);
  align-items: end;
  margin-bottom: clamp(30px, 5vw, 54px);
  text-align: center;
}

.difference-heading h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 400;
  line-height: 1.04;
}

.difference-heading p:not(.section-kicker) {
  max-width: 520px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
}

.package-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.package-card,
.team-card {
  min-height: 100%;
  border: 2px solid var(--line);
  background: var(--paper);
  padding: clamp(24px, 4vw, 36px);
  transition:
    background 320ms var(--ease),
    box-shadow 320ms var(--ease),
    transform 320ms var(--ease);
}

.package-card:hover,
.team-card:hover {
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(68, 55, 39, 0.1);
  transform: translateY(-3px);
}

.package-card ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.package-card .card-intro {
  max-width: 520px;
  margin-bottom: 22px;
}

.package-card li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.package-card li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.package.section-pad,
.after-signing.section-pad,
.team.section-pad {
  border-top: 0;
}

.after-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1fr);
  gap: clamp(38px, 7vw, 96px);
  align-items: start;
}

.after-summary {
  position: sticky;
  top: 120px;
}

.after-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.after-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  border-bottom: 2px solid var(--line);
  padding: 26px 0;
}

.after-item span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(143, 71, 56, 0.26);
  border-radius: 50%;
  color: var(--canyon);
  font-size: 0.78rem;
  font-weight: 800;
}

.after-item h3 {
  margin-bottom: 12px;
}

.notice-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin-top: clamp(44px, 7vw, 78px);
  border: 2px solid rgba(143, 71, 56, 0.42);
  background: rgba(255, 253, 247, 0.72);
  padding: clamp(26px, 5vw, 44px);
}

.notice-panel h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1.06;
}

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

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--line);
  background: var(--paper);
}

.service-card {
  min-height: 280px;
  padding: clamp(28px, 4vw, 44px);
  transition:
    background 320ms var(--ease),
    transform 320ms var(--ease);
}

.service-card + .service-card {
  border-left: 2px solid var(--line);
}

.service-card:nth-child(n + 4) {
  border-top: 2px solid var(--line);
}

.service-card:nth-child(3n + 1) {
  border-left: 0;
}

.service-card:hover {
  background: rgba(255, 253, 248, 0.56);
  transform: translateY(-4px);
}

.service-index {
  display: inline-block;
  margin-bottom: 38px;
  color: var(--sage-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.team-card a,
.text-link {
  color: var(--canyon);
  font-weight: 800;
}

.team-card .attorney-credential {
  margin-bottom: 12px;
  color: var(--sage-dark);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-card .team-email {
  margin-top: 12px;
}

.team-profile > div {
  min-width: 0;
}

.team-card .team-email a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.team-card .team-website {
  margin-top: 8px;
}

.team-profile {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.team-photo {
  display: block;
  width: 128px;
  height: 128px;
  border: 2px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
}

.team-attorney-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
}

.attorney-bio {
  padding-left: clamp(24px, 4vw, 52px);
  border-left: 2px solid var(--line);
}

.attorney-bio h4 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.1;
}

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

.text-link {
  display: inline-flex;
  margin-top: 22px;
}

.team-card-wide {
  grid-column: span 2;
}

/* Client process */
.approach {
  display: block;
}

.approach.section-pad {
  border-top: 0;
}

.approach-copy {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 68px);
  text-align: center;
}

.approach-copy p:last-child {
  max-width: 620px;
  margin-top: 28px;
  margin-right: auto;
  margin-left: auto;
}

.approach-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.approach-item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-height: 250px;
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 28px 24px;
}

.approach-item:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -24px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--canyon);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.approach-item span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage-dark);
  color: var(--paper);
  font-size: 0.86rem;
  font-weight: 800;
}

.approach-item h3 {
  margin: 4px 0 0;
  font-size: 1.18rem;
}

.approach-item p {
  margin-bottom: 0;
}

/* Location, contact, and secondary-page presentation */
.place {
  position: relative;
  min-height: 62svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(39, 37, 31, 0.72), rgba(39, 37, 31, 0.2) 54%, rgba(39, 37, 31, 0.06)),
    url("assets/winchester-valley-hero-1800.webp") center / cover;
  color: var(--paper);
}

.place::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(248, 245, 238, 0), var(--bg));
}

.place-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  width: min(var(--max), calc(100% - 40px));
  min-height: 62svh;
  margin: 0 auto;
  padding: 80px 0;
}

.place-copy {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.place .section-kicker {
  color: var(--sky);
}

.place h2 {
  margin-bottom: 28px;
}

.place p:not(.section-kicker) {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 253, 247, 0.94);
}

.place-address {
  margin-top: 24px;
  color: var(--paper);
  font-style: normal;
  font-weight: 800;
  line-height: 1.6;
}

.contact {
  padding-top: clamp(64px, 7vw, 104px);
}

.intake-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  margin: 0 auto;
}

.intake-intro {
  position: sticky;
  top: 120px;
}

.intake-intro h2 {
  margin-bottom: 24px;
}

.intake-intro > p:not(.section-kicker):not(.fine-print) {
  max-width: 560px;
  margin-bottom: 32px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fine-print {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.intake-form {
  border: 2px solid var(--line);
  background: var(--paper);
  padding: clamp(26px, 5vw, 48px);
  box-shadow: var(--shadow);
}

.form-heading {
  margin-bottom: 30px;
}

.form-heading h3 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.04;
}

.form-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 16px;
}

.form-field {
  display: grid;
  grid-column: span 3;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field-state {
  grid-column: span 1;
}

.form-field-zip {
  grid-column: span 2;
}

.form-field > span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.form-field input,
.form-field select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(77, 90, 68, 0.48);
  border-radius: 0;
  background: #ffffff;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
}

.form-field input:hover,
.form-field select:hover {
  border-color: var(--sage-dark);
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--canyon);
  outline: 3px solid rgba(143, 71, 56, 0.18);
  outline-offset: 1px;
}

.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent-field {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.consent-field input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--canyon);
}

.form-disclaimer {
  margin: 20px 0 0;
  border-left: 3px solid var(--clay);
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.form-disclaimer a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.form-submit {
  margin-top: 26px;
  cursor: pointer;
  font-family: inherit;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.form-status {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: var(--sage-dark);
  font-size: 0.94rem;
  font-weight: 800;
}

.form-status.is-error {
  color: var(--canyon);
}

.partner-disclosure {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto clamp(44px, 7vw, 78px);
  border: 2px solid rgba(77, 90, 68, 0.48);
  background: var(--paper);
  padding: clamp(24px, 4vw, 40px);
}

.partner-disclosure h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

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

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.policy-stack {
  display: grid;
  gap: 18px;
}

.policy-card {
  border: 2px solid var(--line);
  background: var(--paper);
  padding: clamp(26px, 5vw, 48px);
}

.policy-card h2 {
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
}

.policy-card h3 {
  margin-top: 30px;
}

.policy-card p:last-child,
.policy-card ul:last-child {
  margin-bottom: 0;
}

.policy-card li {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.policy-card a {
  color: var(--canyon);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(248, 245, 238, 0.92) 0%, rgba(248, 245, 238, 0.74) 48%, rgba(248, 245, 238, 0.18) 100%),
    url("assets/winchester-valley-hero-1800.webp") center / cover;
}

.page-hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: max(clamp(138px, 14vw, 176px), calc(var(--header-bottom, 96px) + 24px)) 0 clamp(64px, 8vw, 94px);
  text-align: center;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(3.6rem, 7vw, 6.6rem);
}

.profile-heading {
  position: sticky;
  top: 120px;
  text-align: center;
}

.profile-copy p {
  max-width: 620px;
}

.quote-band {
  margin-bottom: 46px;
  background:
    linear-gradient(90deg, rgba(39, 37, 31, 0.74), rgba(39, 37, 31, 0.28)),
    url("assets/winchester-valley-hero-1800.webp") center / cover;
  color: var(--paper);
}

.quote-inner {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  border-color: rgba(255, 253, 248, 0.24);
  background: rgba(39, 37, 31, 0.2);
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  transform: translateY(46px);
}

.quote-inner .section-kicker {
  color: var(--sky);
}

.quote-inner h2 {
  margin-bottom: 24px;
}

.quote-inner p {
  max-width: 580px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 253, 247, 0.94);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 max(44px, var(--safe-bottom));
  color: var(--muted);
  font-size: 0.98rem;
}

.footer-identity span {
  color: var(--ink);
  font-weight: 800;
}

.footer-identity address {
  margin-top: 8px;
  font-style: normal;
  line-height: 1.5;
}

.site-footer a {
  transition: color 220ms var(--ease);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--canyon);
}

/* Progressive reveal enhancement; content remains visible when JavaScript fails */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
}

.reveal-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive navigation and layout */
@media (max-width: 1180px), (horizontal-viewport-segments: 2), (horizontal-viewport-segments: 3), (vertical-viewport-segments: 2), (vertical-viewport-segments: 3) {
  .site-header {
    min-height: 76px;
    gap: 12px;
    /* A filtered ancestor makes a fixed descendant relative to the header. */
    backdrop-filter: none;
  }

  .nav-enabled .nav-toggle {
    position: relative;
    z-index: 25;
    display: inline-grid;
    gap: 6px;
    place-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1px solid rgba(39, 37, 31, 0.14);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.74);
    color: var(--ink);
  }

  .nav-toggle span {
    display: block;
    width: 19px;
    height: 1px;
    background: currentColor;
    transition:
      transform 280ms var(--ease),
      opacity 280ms var(--ease);
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .nav-enabled .site-nav {
    position: fixed;
    inset: 0;
    z-index: 21;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 8px;
    background: rgba(244, 239, 229, 0.98);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    height: 100vh;
    height: var(--viewport-height);
    right: auto;
    width: var(--viewport-width);
    padding: calc(var(--header-bottom, 96px) + 16px) max(20px, var(--safe-right)) max(28px, var(--safe-bottom)) max(20px, var(--safe-left));
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 320ms var(--ease),
      transform 320ms var(--ease);
  }

  .nav-enabled .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-enabled .site-nav a {
    font-family: Georgia, "Times New Roman", serif;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .hero {
    min-height: 70svh;
  }

  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(244, 239, 229, 0.92) 0%, rgba(244, 239, 229, 0.7) 42%, rgba(244, 239, 229, 0.34) 74%, var(--bg) 100%),
      linear-gradient(90deg, rgba(244, 239, 229, 0.44), rgba(244, 239, 229, 0.1));
  }

  .hero-media img {
    object-position: 64% center;
  }

  .hero-content {
    width: min(100% - 32px, var(--max));
    padding-top: max(110px, calc(var(--header-bottom, 96px) + 24px));
    padding-bottom: 92px;
  }

  h1,
  .page-hero h1 {
    font-size: clamp(2.25rem, 1.3rem + 5.5vw, 5.85rem);
  }

  .approach,
  .trust-layout,
  .after-layout,
  .notice-panel,
  .profile,
  .difference-heading,
  .intake-layout {
    grid-template-columns: 1fr;
  }

  .approach-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approach-item {
    min-height: 210px;
  }

  .approach-item::after {
    display: none !important;
  }

  .approach-copy,
  .after-summary,
  .profile-heading,
  .intake-intro {
    position: static;
  }

  .package-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-profile {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
  }

  .team-attorney-card {
    grid-template-columns: 1fr;
  }

  .attorney-bio {
    padding-top: 26px;
    padding-left: 0;
    border-top: 2px solid var(--line);
    border-left: 0;
  }

  .team-photo {
    width: 112px;
    height: 112px;
  }

  .team-card-wide {
    grid-column: auto;
  }

  .form-field-state,
  .form-field-zip {
    grid-column: span 3;
  }

  .page-hero-inner {
    width: min(100% - 32px, var(--max));
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }

  .service-card + .service-card {
    border-top: 2px solid var(--line);
    border-left: 0;
  }

  .service-card:first-child {
    border-top: 0;
  }

  .service-index {
    margin-bottom: 24px;
  }

  html:not(.nav-enabled) .site-header {
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    margin-left: 12px;
    left: auto;
  }

  html:not(.nav-enabled) .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
}

@media (max-width: 560px), (horizontal-viewport-segments: 2), (horizontal-viewport-segments: 3), (vertical-viewport-segments: 2), (vertical-viewport-segments: 3) {
  h2 {
    font-size: clamp(1.9rem, 1rem + 4.5vw, 2.4rem);
  }

  html:not(.nav-enabled) .hero-content,
  html:not(.nav-enabled) .page-hero-inner {
    padding-top: 40px;
  }

  .policy-card h2 {
    font-size: clamp(1.9rem, 1rem + 4.5vw, 2.4rem);
  }

  .approach-list {
    grid-template-columns: 1fr;
  }

  .approach-item {
    min-height: auto;
  }

  .place {
    background:
      linear-gradient(90deg, rgba(39, 37, 31, 0.72), rgba(39, 37, 31, 0.2) 54%, rgba(39, 37, 31, 0.06)),
      url("assets/winchester-valley-hero-960.webp") center / cover;
  }

  .page-hero {
    background:
      linear-gradient(90deg, rgba(248, 245, 238, 0.92) 0%, rgba(248, 245, 238, 0.74) 48%, rgba(248, 245, 238, 0.18) 100%),
      url("assets/winchester-valley-hero-960.webp") center / cover;
  }

  .quote-band {
    background:
      linear-gradient(90deg, rgba(39, 37, 31, 0.74), rgba(39, 37, 31, 0.28)),
      url("assets/winchester-valley-hero-960.webp") center / cover;
  }

  .brand[aria-label="Pacific Security Financial home"] .brand-text {
    display: block;
    max-width: 150px;
    font-size: 0.8rem;
    flex: 1;
  }

  .brand {
    gap: 9px;
    flex: 1;
    min-height: 52px;
  }

  .brand-mark {
    width: 68px;
    height: 52px;
  }

  .brand-mark img {
    width: 86px;
    height: 86px;
  }

  .team-profile {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .team-photo {
    width: 96px;
    height: 96px;
  }

  .section-pad,
  .place-inner,
  .partner-disclosure,
  .quote-inner,
  .site-footer {
    width: min(100% - 32px, var(--max));
  }

  .feature-panel,
  .notice-panel,
  .package-card,
  .team-card,
  .service-card,
  .policy-card,
  .partner-disclosure,
  .quote-inner {
    padding: clamp(20px, 5vw, 28px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .benefit-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .after-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-panel {
    border-right: 0;
    border-left: 0;
    padding-right: 0;
    padding-left: 0;
    box-shadow: none;
  }

  .form-field,
  .form-field-state,
  .form-field-zip {
    grid-column: 1 / -1;
  }

  .intake-form {
    border-right: 0;
    border-left: 0;
    padding-right: 0;
    padding-left: 0;
    box-shadow: none;
  }

  .site-footer {
    gap: 16px;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* Keep this linear reading/form flow in one unobstructed pane when a browser
   reports an actual segmented display. Continuous unfolded screens use the
   regular fluid layout above. Unsupported browsers ignore these media rules. */
@media (horizontal-viewport-segments: 2), (horizontal-viewport-segments: 3), (vertical-viewport-segments: 2), (vertical-viewport-segments: 3) {
  :root {
    --viewport-width: env(viewport-segment-width 0 0, 100vw);
    --viewport-height: env(viewport-segment-height 0 0, 100dvh);
  }

  body {
    width: var(--viewport-width);
  }

  h1,
  .page-hero h1 {
    font-size: clamp(2.25rem, calc(1.3rem + env(viewport-segment-width 0 0, 100vw) * 0.055), 5.85rem);
  }
}

@media (vertical-viewport-segments: 2), (vertical-viewport-segments: 3) {
  html {
    overflow: hidden;
  }

  body {
    height: var(--viewport-height);
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-bottom, 96px) + 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal,
  .reveal-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}
