/* ==========================================================================
   DFW Immigrant Law Center — Components
   Header, footer, buttons, chips, folders, accordions, cards, forms, checklist
   ========================================================================== */

/* ==========================================================================
   1. Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: var(--cream);
  transition: transform 0.4s var(--ease-soft), box-shadow 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-stuck {
  box-shadow: 0 12px 30px -22px rgba(33, 41, 52, 0.55), 0 1px 0 var(--ink-08);
}

.header-spacer {
  height: var(--header-h);
}

@media (min-width: 768px) {
  .header-spacer {
    height: calc(36px + 76px);
  }
}

@media (min-width: 1024px) {
  .header-spacer {
    height: var(--header-h-lg);
  }
}

/* Utility bar */
.utility-bar {
  background: var(--ink);
  color: rgba(251, 247, 240, 0.86);
  font-size: 0.8125rem;
  overflow: hidden;
  max-height: 36px;
  transition: max-height 0.32s var(--ease-soft), opacity 0.24s ease;
}

.site-header.is-stuck .utility-bar {
  max-height: 0;
  opacity: 0;
}

.utility-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.utility-credential {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.utility-credential svg {
  color: var(--sprout);
  flex: none;
}

.utility-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex: none;
  transition: color 0.2s ease;
}

.utility-phone:hover {
  color: var(--gold);
}

.utility-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.bilingual-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--sprout);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bilingual-pill--pulse {
  animation: pill-pulse 8s ease-in-out infinite;
}

@keyframes pill-pulse {
  0%, 84%, 100% { opacity: 1; }
  90% { opacity: 0.55; }
  96% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bilingual-pill--pulse {
    animation: none;
  }
}

.utility-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(251, 247, 240, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.utility-dismiss:hover {
  background: rgba(251, 247, 240, 0.14);
  color: var(--cream);
}

.utility-dismiss svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 767px) {
  .utility-bar {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .utility-credential {
    max-width: 42%;
    font-size: 0.75rem;
  }

  .utility-inner {
    gap: 10px;
  }

  .utility-right {
    gap: 10px;
  }

  .utility-phone {
    font-size: 0.78rem;
  }
}

/* Main bar */
.main-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--ink-08);
  transition: background 0.3s ease;
}

.site-header.is-stuck .main-bar {
  background: var(--cream);
}

.main-bar-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

@media (min-width: 768px) {
  .main-bar-inner {
    height: 76px;
  }
}

@media (min-width: 1024px) {
  .main-bar-inner {
    height: 80px;
    transition: height 0.32s var(--ease-soft);
  }

  .site-header.is-stuck .main-bar-inner {
    height: var(--header-h-stuck);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  border-radius: var(--r);
}

.brand img {
  width: 44px;
  height: 44px;
  transition: width 0.32s var(--ease-soft), height 0.32s var(--ease-soft);
}

@media (min-width: 768px) {
  .brand img {
    width: 52px;
    height: 52px;
  }
}

@media (min-width: 1024px) {
  .brand img {
    width: 56px;
    height: 56px;
  }

  .site-header.is-stuck .brand img {
    width: 46px;
    height: 46px;
  }
}

/* Primary nav */
.primary-nav {
  display: none;
}

@media (min-width: 1024px) {
  .primary-nav {
    display: block;
    margin-left: auto;
  }

  .primary-nav > ul {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.6vw, 28px);
    list-style: none;
  }

  .primary-nav > ul > li {
    position: relative;
  }

  .primary-nav a,
  .primary-nav .nav-parent {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
  }

  .primary-nav a::after,
  .primary-nav .nav-parent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--bridge);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.24s var(--ease-out);
  }

  .primary-nav a:hover,
  .primary-nav .nav-parent:hover,
  .primary-nav a:focus-visible,
  .primary-nav .nav-parent:focus-visible {
    color: var(--bridge);
  }

  .primary-nav a:hover::after,
  .primary-nav .nav-parent:hover::after,
  .primary-nav a:focus-visible::after,
  .primary-nav .nav-parent:focus-visible::after,
  .primary-nav a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .primary-nav a[aria-current="page"] {
    color: var(--bridge);
    font-weight: 600;
  }

  .nav-parent svg {
    width: 10px;
    height: 10px;
    transition: transform 0.2s ease;
  }

  .nav-sub {
    position: absolute;
    top: calc(100% + 6px);
    left: -16px;
    min-width: 190px;
    padding: 8px;
    margin: 0;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--ink-08);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s var(--ease-out), visibility 0.2s;
  }

  .nav-sub li + li {
    margin-top: 2px;
  }

  .nav-sub a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
  }

  .nav-sub a::after {
    display: none;
  }

  .nav-sub a:hover,
  .nav-sub a:focus-visible {
    background: var(--bridge-wash);
  }

  .has-sub:hover .nav-sub,
  .has-sub:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .has-sub:hover .nav-parent svg,
  .has-sub:focus-within .nav-parent svg {
    transform: rotate(180deg);
  }
}

/* Header actions */
.header-actions {
  display: none;
}

@media (min-width: 768px) {
  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  .primary-nav + .header-actions {
    margin-left: 0;
  }
}

@media (min-width: 1024px) {
  .header-actions {
    margin-left: 0;
  }
}

.header-actions .btn {
  min-height: 44px;
  padding: 11px 18px;
  font-size: 0.875rem;
  white-space: nowrap;
}

.header-actions .btn--primary {
  padding-inline: 22px;
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .header-actions .btn--donate {
    background: transparent;
    color: var(--gold-deep);
    padding-inline: 6px;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .header-actions .btn--donate::before {
    display: none;
  }
}

/* Label swap: long label on wide desktop, short label on tablet and 1024–1199px */
.header-actions .btn--primary .btn-label-short {
  display: inline;
}

.header-actions .btn--primary .btn-label-long {
  display: none;
}

@media (min-width: 1200px) {
  .header-actions .btn--primary .btn-label-short {
    display: none;
  }

  .header-actions .btn--primary .btn-label-long {
    display: inline;
  }
}

/* Mobile header actions */
.header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-phone:hover {
  background: var(--bridge-wash);
  color: var(--bridge);
}

@media (min-width: 768px) {
  .header-phone {
    display: none;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ink-12);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: var(--white);
  border-color: var(--ink-12);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.28s var(--ease-soft), opacity 0.2s ease;
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

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

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   2. Mobile menu overlay
   ========================================================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--cream);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  /* Visibility flips only after the close animation, but instantly on open. */
  transition: opacity 0.32s ease, transform 0.38s var(--ease-out),
    visibility 0s linear 0.38s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.32s ease, transform 0.38s var(--ease-out),
    visibility 0s linear 0s;
}

.mobile-menu__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  background: var(--cream);
  border-bottom: 1px solid var(--ink-08);
}

.mobile-menu__head img {
  width: 44px;
  height: 44px;
}

.mobile-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink-12);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
}

.mobile-menu__body {
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.fork {
  display: grid;
  gap: 12px;
}

.fork__door {
  display: block;
  padding: 20px 22px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: transform 0.2s var(--ease-soft), box-shadow 0.2s ease;
}

.fork__door:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fork__door--help {
  background: var(--bridge);
  color: #fff;
}

.fork__door--give {
  background: var(--gold);
  color: var(--ink);
}

.fork__door-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.fork__door--help .fork__door-title {
  color: #fff;
}

.fork__door-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.fork__door--help .fork__door-links {
  color: rgba(255, 255, 255, 0.88);
}

.fork__door--give .fork__door-links {
  color: rgba(33, 41, 52, 0.78);
}

.fork__door-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-nav {
  list-style: none;
  border-top: 1px solid var(--ink-08);
}

.mobile-nav li {
  border-bottom: 1px solid var(--ink-08);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 2px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] {
  color: var(--bridge);
}

.mobile-nav .mobile-nav__sub {
  display: flex;
  gap: 18px;
  padding: 0 2px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.mobile-nav .mobile-nav__sub a {
  display: inline;
  min-height: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--ink-70);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-menu__foot {
  padding-top: 24px;
  border-top: 1px solid var(--ink-08);
  font-size: 0.9375rem;
  color: var(--ink-70);
}

.mobile-menu__foot a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.mobile-menu__foot .mobile-menu__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 16px;
  border-radius: var(--r);
  background: var(--bridge);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
}

.mobile-menu__foot .mobile-menu__phone:hover {
  color: #fff;
  background: var(--bridge-dark);
}

.mobile-menu__meta {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.mobile-menu__meta p {
  margin: 0;
}

.mobile-menu__trust {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-55);
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none;
  }
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s var(--ease-soft), background-color 0.2s ease,
    color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--bridge);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bridge-dark);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out);
}

.btn--primary:hover {
  color: #fff;
}

.btn--primary:hover::before {
  transform: scaleX(1);
}

.btn--donate {
  background: var(--gold);
  color: var(--ink);
}

.btn--donate:hover {
  background: var(--gold-deep);
  color: var(--ink);
}

.btn--call {
  background: transparent;
  border-color: rgba(251, 247, 240, 0.55);
  color: var(--cream);
}

.btn--call:hover {
  background: rgba(251, 247, 240, 0.12);
  border-color: var(--cream);
  color: var(--cream);
}

.btn--outline {
  background: transparent;
  border-color: var(--ink-12);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline-green {
  background: transparent;
  border-color: var(--bridge);
  color: var(--bridge);
}

.btn--outline-green:hover {
  background: var(--bridge);
  color: #fff;
}

.btn--ghost {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--bridge);
  overflow: visible;
}

.btn--ghost:hover {
  color: var(--bridge-dark);
}

.btn--ghost .btn-arrow {
  transition: transform 0.2s var(--ease-out);
}

.btn--ghost:hover .btn-arrow {
  transform: translateX(4px);
}

.btn--ghost::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.btn--ghost:hover::after {
  transform: scaleX(1);
}

.btn--lg {
  min-height: 54px;
  padding: 16px 30px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 479px) {
  .btn-row .btn {
    width: 100%;
  }
}

/* ==========================================================================
   4. Chips, pills, badges
   ========================================================================== */

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: rgba(251, 247, 240, 0.94);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  box-shadow: 0 1px 0 rgba(33, 41, 52, 0.06);
  transition: transform 0.2s var(--ease-soft);
}

.trust-chip:hover {
  transform: translateY(-2px);
}

.trust-chip svg {
  width: 14px;
  height: 14px;
  color: var(--bridge);
  flex: none;
}

.trust-chip--dark {
  background: rgba(251, 247, 240, 0.08);
  color: var(--cream);
  box-shadow: none;
}

.trust-chip--dark svg {
  color: var(--sprout);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--gold-wash);
  color: #7a5312;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.tag--green {
  background: var(--bridge-wash);
  color: var(--bridge-dark);
}

.tag--sky {
  background: var(--sky-wash);
  color: #2f5a8a;
}

/* ==========================================================================
   5. Cards & generic panels
   ========================================================================== */

.card {
  background: var(--white);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-xs);
}

.card--soft {
  box-shadow: var(--shadow-sm);
}

.card--lift {
  transition: transform 0.25s var(--ease-soft), box-shadow 0.25s ease;
}

.card--lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-70);
  font-size: 1rem;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--bridge-wash);
  color: var(--bridge);
}

.icon-badge svg {
  width: 22px;
  height: 22px;
}

.icon-badge--gold {
  background: var(--gold-wash);
  color: var(--gold-deep);
}

.icon-badge--sky {
  background: var(--sky-wash);
  color: var(--sky);
}

.icon-badge--sprout {
  background: var(--sprout-wash);
  color: var(--bridge);
}

/* ==========================================================================
   6. Trust band (divided certificate columns)
   ========================================================================== */

.trust-band {
  background: var(--white);
  border-top: 1px solid var(--ink-08);
  border-bottom: 1px solid var(--ink-08);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-item {
  padding: 26px 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--ink-08);
}

.trust-item:first-child {
  border-top: 0;
}

.trust-item svg {
  width: 30px;
  height: 30px;
  color: var(--bridge);
  margin-top: 2px;
}

.trust-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.trust-item p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item {
    padding: 32px 28px;
    border-top: 0;
    border-left: 1px solid var(--ink-08);
  }

  .trust-item:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .trust-item:nth-child(n + 3) {
    border-top: 1px solid var(--ink-08);
  }
}

@media (min-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .trust-item {
    padding: 40px 28px;
    border-top: 0;
  }

  .trust-item:nth-child(n + 3) {
    border-top: 0;
  }

  .trust-item:first-child {
    padding-left: 0;
  }

  .trust-item:last-child {
    padding-right: 0;
  }
}

/* ==========================================================================
   7. Persona chips (Who we serve)
   ========================================================================== */

.persona-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.persona {
  background: var(--white);
  border: 1px solid var(--ink-08);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.22s var(--ease-soft), box-shadow 0.22s ease;
}

.persona:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.persona__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.persona__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--ink);
}

.persona__icon svg {
  width: 19px;
  height: 19px;
}

.persona__label {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.persona__plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--bridge);
}

.persona__plus::before,
.persona__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.24s var(--ease-soft), opacity 0.2s ease;
}

.persona__plus::before {
  width: 14px;
  height: 2px;
}

.persona__plus::after {
  width: 2px;
  height: 14px;
}

.persona__btn[aria-expanded="true"] .persona__plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.persona__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s var(--ease-soft);
}

.persona__panel > div {
  overflow: hidden;
}

.persona__panel p {
  margin: 0;
  padding: 0 18px 18px 70px;
  font-size: 0.9375rem;
  color: var(--ink-70);
}

.persona.is-open .persona__panel {
  grid-template-rows: 1fr;
}

@media (min-width: 600px) {
  .persona-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .persona-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .persona:nth-child(2) {
    transform: translateY(14px);
  }

  .persona:nth-child(2):hover {
    transform: translateY(10px);
  }

  .persona:nth-child(5) {
    transform: translateY(14px);
  }

  .persona:nth-child(5):hover {
    transform: translateY(10px);
  }
}

.eligibility-note {
  max-width: 720px;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1rem;
  line-height: 1.6;
}

.eligibility-note p {
  margin: 0;
}

/* ==========================================================================
   8. Case-file folders
   ========================================================================== */

.folders {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.folder {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.26s var(--ease-soft);
}

.folder__tab {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: 0 0 -1px;
  max-width: 100%;
}

.folder__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--ink-12);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--gold-wash);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.26s var(--ease-soft);
}

.folder__toggle svg {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.26s var(--ease-soft);
}

.folder__toggle:hover {
  background: #f7e6c4;
}

.folder__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.folder__body {
  border: 1px solid var(--ink-12);
  border-radius: 0 var(--r-md) var(--r-md) var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

/* A closed folder shows only its tab. Leaving the body's 1px border visible
   drew a stray rule under every closed tab; removing the border (rather than
   collapsing the box) keeps the open/close height animation intact. */
.folder:not(.is-open) .folder__body {
  border-width: 0;
  background: transparent;
  box-shadow: none;
}

/* With the body gone, the tab is the whole folder and needs all four corners. */
.folder:not(.is-open) .folder__toggle {
  border: 1px solid var(--ink-12);
  border-radius: var(--r);
}

.folder--safety:not(.is-open) .folder__toggle {
  border-color: var(--bridge);
}

.folder__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease-soft);
}

.folder.is-open .folder__panel {
  grid-template-rows: 1fr;
}

.folder__panel > div {
  overflow: hidden;
}

.folder__inner {
  padding: 18px 18px 20px;
}

.folder__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder__list li {
  position: relative;
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--ink-04);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.folder__list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.folder__list li:last-child {
  padding-bottom: 0;
}

.folder__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--bridge);
  border-bottom: 2px solid var(--bridge);
  transform: rotate(-45deg);
}

.folder__list li:first-child::before {
  top: 6px;
}

.folder__list strong {
  display: block;
  font-weight: 600;
}

.folder__list span {
  display: block;
  color: var(--ink-70);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 2px;
}

.folder__note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bridge-wash);
  color: var(--bridge-dark);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
}

.folder--safety .folder__toggle {
  background: var(--bridge);
  color: #fff;
  border-color: var(--bridge);
}

.folder--safety .folder__toggle:hover {
  background: var(--bridge-dark);
}

.folder.is-open {
  transform: translateY(-2px);
}

@media (hover: hover) and (min-width: 1024px) {
  .folder:hover {
    transform: translateY(-5px);
  }

  .folder:hover .folder__toggle {
    transform: translateY(-2px);
  }
}

@media (min-width: 768px) {
  .folders {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1180px) {
  .folders {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .folder__toggle {
    font-size: 0.8125rem;
    padding: 10px 13px;
  }

  .folder__inner {
    padding: 16px 15px 18px;
  }

  .folder__list li {
    font-size: 0.875rem;
    padding-left: 22px;
  }
}

/* ==========================================================================
   9. Companion ribbon (horizontal scroll)
   ========================================================================== */

.ribbon-wrap {
  position: relative;
}

.ribbon {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 0 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--sprout) transparent;
}

.ribbon:focus-visible {
  outline: var(--focus);
  outline-offset: 4px;
  border-radius: var(--r);
}

.ribbon::-webkit-scrollbar {
  height: 6px;
}

.ribbon::-webkit-scrollbar-thumb {
  background: var(--sprout-line);
  border-radius: 3px;
}

.companion-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  padding: 20px;
  border: 1px solid var(--sprout-line);
  border-radius: var(--r-md);
  background: var(--white);
  transition: transform 0.24s var(--ease-soft), box-shadow 0.24s ease;
}

.companion-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.companion-card svg {
  width: 24px;
  height: 24px;
  color: var(--gold-deep);
  margin-bottom: 14px;
}

.companion-card h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.companion-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .companion-card {
    flex-basis: 260px;
  }
}

.ribbon-scroll-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.ribbon-scroll-hint svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 1024px) {
  .ribbon-scroll-hint {
    display: none;
  }
}

/* ==========================================================================
   10. Referral tiles
   ========================================================================== */

.referral-tiles {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.referral-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--ink-08);
  border-left: 3px solid var(--sky);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-soft),
    box-shadow 0.2s ease;
}

.referral-tile:hover {
  border-left-color: #2f5a8a;
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.referral-tile svg:first-child {
  width: 22px;
  height: 22px;
  color: var(--sky);
  flex: none;
}

.referral-tile__text {
  flex: 1;
}

.referral-tile__text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.referral-tile__text span {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-70);
  line-height: 1.45;
  margin-top: 2px;
}

.referral-tile .chev {
  width: 16px;
  height: 16px;
  color: var(--gold-deep);
  flex: none;
  transition: transform 0.2s var(--ease-out);
}

.referral-tile:hover .chev {
  transform: translateX(3px);
}

/* ==========================================================================
   11. Stepping stones / process
   ========================================================================== */

.process {
  position: relative;
}

.process__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48px;
  width: 100%;
  pointer-events: none;
  display: none;
}

.process__track path {
  fill: none;
  stroke-linecap: round;
}

.process__track .track-base {
  stroke: rgba(101, 188, 123, 0.28);
  stroke-width: 2;
  stroke-dasharray: 5 9;
}

.process__track .track-fill {
  stroke: var(--sprout);
  stroke-width: 3;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 0.25s linear;
}

.process__steps {
  position: relative;
  display: grid;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* PRD: on mobile the path becomes a vertical rail down the left edge, so the
   four steps still read as one connected journey instead of a plain list. */
@media (max-width: 899px) {
  .process__steps::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 21px;
    bottom: 21px;
    width: 2px;
    background: repeating-linear-gradient(
      to bottom,
      rgba(101, 188, 123, 0.34) 0 5px,
      transparent 5px 14px
    );
    pointer-events: none;
  }

  .stone__num {
    z-index: 1;
  }
}

.stone {
  position: relative;
  padding-left: 58px;
}

.stone__num {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(101, 188, 123, 0.45);
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  transition: transform 0.4s var(--ease-settle), border-color 0.3s ease,
    background 0.3s ease;
}

.stone.is-reached .stone__num {
  transform: scale(1.08);
  border-color: var(--sprout);
  background: #1a222c;
}

.stone h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cream);
  margin-bottom: 6px;
}

.stone p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(251, 247, 240, 0.76);
}

@media (min-width: 900px) {
  .process__track {
    display: block;
  }

  .process__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 74px;
  }

  .stone {
    padding-left: 0;
    padding-top: 0;
  }

  .stone__num {
    top: -74px;
    left: 0;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .stone p {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stone__num {
    transition: none;
  }

  .process__track .track-fill {
    stroke-dashoffset: 0 !important;
    transition: none;
  }
}

/* Vertical rail variant for other pages */
.rail {
  position: relative;
  display: grid;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each item draws the segment down to the next dot, so the rail always ends at
   the final dot instead of stopping short when the last item is tall. */
.rail__item::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 20px;
  /* Reach the next dot's centre: 24px of grid gap plus the 20px half-height of
     the dot that starts the following item. */
  bottom: -44px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--sprout-line) 0 6px,
    transparent 6px 12px
  );
  pointer-events: none;
}

.rail__item:last-child::before {
  display: none;
}

.rail__item {
  position: relative;
  padding-left: 56px;
}

.rail__dot {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--sprout);
  color: var(--bridge);
}

.rail__dot svg {
  width: 18px;
  height: 18px;
}

.rail__item h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.rail__item p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-70);
}

/* ==========================================================================
   12. Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;
  margin: 0;
  padding: 0;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
}

.stat__value {
  order: 1;
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.stat__label {
  order: 2;
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(251, 247, 240, 0.74);
  max-width: 22ch;
}

@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

/* ==========================================================================
   13. Story cards
   ========================================================================== */

.stories-grid {
  display: grid;
  gap: 18px;
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  background: var(--white);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transform: rotate(1.2deg);
  transition: transform 0.5s var(--ease-out), box-shadow 0.3s ease;
}

.story-card:nth-child(2) {
  transform: rotate(-1deg);
}

.story-card:nth-child(3) {
  transform: rotate(0.8deg);
}

.story-card.is-visible {
  transform: rotate(0deg);
}

.story-card:hover {
  box-shadow: var(--shadow-md);
}

.story-card__mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.7;
  color: var(--gold);
  margin-bottom: 14px;
}

.story-card blockquote {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.story-card figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.avatar-sun {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--gold) 0 34%, var(--gold-wash) 35% 100%);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  border: 1px solid rgba(201, 136, 42, 0.4);
}

.story-card figcaption strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Scope to the text wrapper only: a bare `span` selector also matched the
   avatar, whose display:block hid the initial behind the sunburst. */
.story-card figcaption > span:not(.avatar-sun) {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-55);
}

.story-card figcaption .avatar-sun {
  display: inline-flex;
}

.story-card__note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink-04);
  font-size: 0.75rem;
  color: var(--ink-55);
}

.story-card--featured {
  justify-content: center;
  padding: clamp(30px, 4vw, 52px);
  background:
    radial-gradient(circle at 88% 12%, rgba(233, 168, 62, 0.14), transparent 46%),
    var(--white);
  overflow: hidden;
}

.story-card--featured::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(201, 136, 42, 0.22);
  box-shadow: 0 0 0 34px rgba(201, 136, 42, 0.045),
    0 0 0 68px rgba(201, 136, 42, 0.03);
  pointer-events: none;
}

.story-card--featured > * {
  position: relative;
  z-index: 1;
}

.story-card--featured .story-card__mark {
  font-size: 4.5rem;
  margin-bottom: 22px;
}

.story-card--featured blockquote {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.15rem);
  line-height: 1.38;
  max-width: 22ch;
}

.story-card--featured figcaption {
  margin-top: 32px;
}

.story-card--featured figcaption .avatar-sun {
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
}

@media (min-width: 900px) {
  .stories-grid {
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    align-items: stretch;
  }

  .story-card--featured {
    grid-row: span 2;
  }

  .story-card--featured:hover {
    transform: translateY(-6px);
  }
}

/* ==========================================================================
   14. Accordion
   ========================================================================== */

.accordion {
  border-top: 1px solid var(--ink-12);
}

.acc-item {
  border-bottom: 1px solid var(--ink-12);
}

.acc-btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 56px;
  padding: 20px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  transition: color 0.2s ease;
}

.acc-btn:hover {
  color: var(--bridge);
}

.acc-marker {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  color: var(--bridge);
}

.acc-marker::before,
.acc-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.28s var(--ease-soft), opacity 0.2s ease;
}

.acc-marker::before {
  width: 15px;
  height: 2px;
}

.acc-marker::after {
  width: 2px;
  height: 15px;
}

.acc-btn[aria-expanded="true"] .acc-marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s var(--ease-soft);
}

.acc-panel > div {
  overflow: hidden;
}

.acc-panel__inner {
  padding: 0 44px 24px 2px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-70);
}

.acc-panel__inner p {
  margin: 0 0 10px;
}

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

.acc-panel__inner a {
  font-weight: 600;
}

.acc-item.is-open .acc-panel {
  grid-template-rows: 1fr;
}

.acc-cols {
  display: grid;
  gap: 0 40px;
}

@media (min-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .acc-cols .accordion {
    border-top: 1px solid var(--ink-12);
  }
}

/* ==========================================================================
   15. Forms
   ========================================================================== */

.form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 18px;
}

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

.field {
  position: relative;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.field .req {
  color: var(--error);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 15px;
  border: 1px solid rgba(33, 41, 52, 0.22);
  border-radius: var(--r);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1.5 7 7.5l6-6' stroke='%23212934' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(33, 41, 52, 0.4);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--bridge);
  box-shadow: 0 0 0 3px rgba(42, 122, 75, 0.16);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-wash);
}

.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--ink-55);
  line-height: 1.45;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--error);
  line-height: 1.45;
}

.field__error::before {
  content: "! ";
  font-weight: 700;
}

.field.has-error .field__error {
  display: block;
}

/* Honeypot: removed from the visual layout and the accessibility tree, but
   still present in the DOM for bots that parse form fields. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form__privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--bridge-wash);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--bridge-dark);
}

.form__privacy svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}

.form__submit {
  margin-top: 4px;
}

.form__status {
  font-size: 0.875rem;
  line-height: 1.5;
}

.form__status:empty {
  display: none;
}

.form__status.is-error {
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--error-wash);
  color: var(--error);
  font-weight: 500;
}

/* Success panel */
.form-success {
  display: none;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--sprout-line);
  border-radius: var(--r-md);
  background: var(--sprout-wash);
  text-align: center;
}

.form-success.is-active {
  display: block;
  animation: success-rise 0.6s var(--ease-out) both;
}

.form-success h3 {
  margin: 18px 0 10px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.form-success p {
  max-width: 42ch;
  margin-inline: auto;
  color: var(--ink-70);
}

.form-success .bridge-success {
  width: min(280px, 80%);
  height: auto;
  margin-inline: auto;
  color: var(--bridge);
  overflow: visible;
}

.form-success .bridge-success .bridge-arc {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: bridge-draw 1.1s var(--ease-out) forwards;
}

.form-success .bridge-success .bridge-arc--arch {
  stroke-width: 2.6;
  animation-delay: 0.2s;
}

.form-success .bridge-success .bridge-arc--deck {
  stroke-width: 2;
  animation-delay: 0.6s;
}

.form-success .bridge-success .bridge-arc--rail {
  stroke-width: 1.2;
  opacity: 0.55;
  animation-delay: 0.9s;
}

.form-success .bridge-success .bridge-structure {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
  stroke-linecap: round;
  opacity: 0;
  animation: bridge-structure-in 0.5s var(--ease-out) 0.95s forwards;
}

.form-success .bridge-success .bridge-abutment {
  stroke-width: 2.4;
  animation-name: bridge-abutment-in;
}

.form-success .bridge-success .bridge-newel {
  stroke-width: 1.6;
  animation-name: bridge-newel-in;
}

@keyframes bridge-abutment-in {
  to {
    opacity: 0.75;
  }
}

@keyframes bridge-newel-in {
  to {
    opacity: 0.7;
  }
}

@keyframes success-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bridge-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bridge-structure-in {
  to {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-success.is-active {
    animation: none;
  }

  .form-success .bridge-success .bridge-arc {
    stroke-dashoffset: 0;
    animation: none;
  }

  .form-success .bridge-success .bridge-structure {
    opacity: 0.45;
    animation: none;
  }

  .form-success .bridge-success .bridge-abutment {
    opacity: 0.75;
  }

  .form-success .bridge-success .bridge-newel {
    opacity: 0.7;
  }
}

/* ==========================================================================
   16. Document checklist
   ========================================================================== */

.doc-checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-item {
  position: relative;
}

.doc-item label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--ink-12);
  border-radius: var(--r);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.doc-item label:hover {
  border-color: var(--sprout);
  background: #fdfcf8;
}

.doc-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.doc-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
  border: 2px solid rgba(33, 41, 52, 0.3);
  border-radius: var(--r-sm);
  background: var(--cream);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.doc-box svg {
  width: 16px;
  height: 16px;
  color: #fff;
  opacity: 0;
  transform: rotate(-6deg) scale(0.6);
  transition: opacity 0.18s ease, transform 0.3s var(--ease-settle);
}

.doc-item input:checked + .doc-box {
  border-color: var(--bridge);
  background: var(--bridge);
}

.doc-item input:checked + .doc-box svg {
  opacity: 1;
  transform: rotate(-6deg) scale(1);
}

.doc-item input:focus-visible + .doc-box {
  outline: var(--focus);
  outline-offset: 3px;
}

.doc-item input:checked ~ .doc-text {
  color: var(--ink-55);
}

.doc-progress {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 4px 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--gold-wash);
  font-size: 0.875rem;
  font-weight: 500;
  color: #6d4a11;
}

.doc-progress > svg {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--gold-deep);
}

.doc-progress__bar {
  grid-column: 2;
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgba(201, 136, 42, 0.24);
  overflow: hidden;
}

.doc-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--gold-deep);
  transition: width 0.35s var(--ease-out);
}

/* ==========================================================================
   17. Footer
   ========================================================================== */

.site-footer {
  position: relative;
  background: var(--ink);
  color: rgba(251, 247, 240, 0.78);
  overflow: hidden;
  isolation: isolate;
}

.footer-rays {
  position: absolute;
  left: 50%;
  bottom: -340px;
  width: 1100px;
  height: 1100px;
  transform: translateX(-50%);
  color: var(--gold);
  opacity: 0.04;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: -1;
}

.site-footer:hover .footer-rays {
  opacity: 0.08;
}

.footer-glow {
  position: absolute;
  left: 50%;
  bottom: -180px;
  width: 900px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(233, 168, 62, 0.16),
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: -1;
}

.site-footer:hover .footer-glow {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .footer-rays {
    opacity: 0.06;
  }

  .site-footer:hover .footer-rays {
    opacity: 0.06;
  }

  .footer-glow {
    display: none;
  }
}

.footer-top {
  padding: clamp(44px, 6vw, 72px) 0 32px;
  border-bottom: 1px solid rgba(251, 247, 240, 0.12);
}

.footer-mission {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-mission img {
  width: 56px;
  height: 56px;
  flex: none;
}

.footer-mission__text p {
  margin: 0;
}

.footer-mission__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--cream);
}

.footer-mission__line {
  margin-top: 4px !important;
  font-size: 0.875rem;
  color: rgba(251, 247, 240, 0.62);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: clamp(36px, 5vw, 56px) 0;
}

.footer-col h2 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

/* Footer links sit at 19px line boxes, under the 24px WCAG target minimum.
   Padding gives the whole row a finger-sized hit area without moving the text. */
.footer-col li {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.footer-col a {
  display: inline-block;
  padding-block: 3px;
  color: rgba(251, 247, 240, 0.82);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-col address {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(251, 247, 240, 0.82);
}

.footer-col address a {
  font-size: inherit;
}

.footer-col p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(251, 247, 240, 0.72);
}

.footer-es {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--sprout);
  background: rgba(101, 188, 123, 0.1);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(251, 247, 240, 0.9);
}

.footer-es a {
  color: var(--cream);
  font-weight: 600;
}

.footer-hours {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-hours div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(251, 247, 240, 0.14);
}

.footer-hours dt {
  color: rgba(251, 247, 240, 0.6);
}

.footer-hours dd {
  margin: 0;
  text-align: right;
  color: rgba(251, 247, 240, 0.86);
}

.footer-trust {
  display: grid;
  gap: 10px;
  padding: 26px 0;
  border-top: 1px solid rgba(251, 247, 240, 0.12);
  border-bottom: 1px solid rgba(251, 247, 240, 0.12);
}

.footer-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(251, 247, 240, 0.76);
}

.footer-trust__item svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--sprout);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 0 32px;
  font-size: 0.8125rem;
  color: rgba(251, 247, 240, 0.58);
}

.footer-bottom p {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(251, 247, 240, 0.18);
  border-radius: 50%;
  color: rgba(251, 247, 240, 0.8);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.footer-social svg {
  width: 17px;
  height: 17px;
}

.footer-notario {
  padding-top: 16px;
  border-top: 1px solid rgba(251, 247, 240, 0.1);
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(251, 247, 240, 0.5);
  max-width: 60ch;
}

.footer-phone-btn {
  display: none;
}

@media (max-width: 767px) {
  .footer-phone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    margin-bottom: 30px;
    border-radius: var(--r);
    background: var(--bridge);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
  }

  .footer-phone-btn:hover {
    color: #fff;
    background: var(--bridge-dark);
  }

  .footer-cols {
    gap: 30px;
  }
}

@media (min-width: 700px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .footer-trust {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (min-width: 1024px) {
  .footer-cols {
    grid-template-columns: 1.15fr 1fr 1.15fr 1.1fr;
    gap: 40px;
  }

  .footer-trust {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* ==========================================================================
   18. Mobile sticky call bar
   ========================================================================== */

.mobile-callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 240, 0.97);
  border-top: 1px solid var(--ink-12);
  box-shadow: 0 -8px 24px -18px rgba(33, 41, 52, 0.5);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out);
}

.mobile-callbar.is-visible {
  transform: translateY(0);
}

.mobile-callbar .btn {
  flex: 1;
  min-height: 48px;
  padding: 11px 12px;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .mobile-callbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-callbar {
    transition: none;
  }
}

/* ==========================================================================
   19. Esperanza card (Easter egg)
   ========================================================================== */

.esperanza-card {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 260;
  width: min(340px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid rgba(201, 136, 42, 0.4);
  border-radius: var(--r-md);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out), visibility 0.45s;
}

.esperanza-card.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.esperanza-card__sun {
  width: 54px;
  height: 54px;
  color: var(--gold);
  margin-bottom: 12px;
}

.esperanza-card h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.esperanza-card p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-70);
}

.esperanza-card p:last-of-type {
  margin-bottom: 0;
}

.esperanza-card__sig {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink) !important;
}

.esperanza-card a {
  font-size: 0.875rem;
  font-weight: 600;
}

.esperanza-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-55);
  cursor: pointer;
}

.esperanza-card__close:hover {
  background: var(--ink-08);
  color: var(--ink);
}

@media (max-width: 767px) {
  .esperanza-card {
    bottom: 76px;
  }
}

/* ==========================================================================
   20. Misc shared blocks
   ========================================================================== */

.callout {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--r-md);
  background: var(--bridge-wash);
  border: 1px solid var(--sprout-line);
}

.callout--gold {
  background: var(--gold-wash);
  border-color: rgba(201, 136, 42, 0.28);
}

.callout--sky {
  background: var(--sky-wash);
  border-color: rgba(74, 126, 187, 0.24);
}

.callout h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-70);
}

.notario-plate {
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--cream);
  border: 1px solid rgba(233, 168, 62, 0.35);
  box-shadow: inset 0 0 0 1px rgba(251, 247, 240, 0.06);
}

.notario-plate h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}

.notario-plate h3 svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.notario-plate p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(251, 247, 240, 0.82);
}

.notario-plate ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.notario-plate li {
  position: relative;
  padding-left: 22px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(251, 247, 240, 0.78);
}

.notario-plate li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--bridge);
  border-bottom: 2px solid var(--bridge);
  transform: rotate(-45deg);
}

.check-list--dark li::before {
  border-color: var(--sprout);
}

.check-list--dark li {
  color: rgba(251, 247, 240, 0.82);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Vertical padding lifts the hit area above the 24px WCAG minimum; the text
     stays on its baseline because the box grows symmetrically. */
  padding-block: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bridge);
  text-decoration: none;
}

.arrow-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease-out);
}

.arrow-link:hover {
  color: var(--bridge-dark);
}

.arrow-link:hover svg {
  transform: translateX(4px);
}

.arrow-link--gold {
  color: var(--gold-deep);
}

.arrow-link--gold:hover {
  color: #a06a17;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--cream-deep);
}

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

.photo-frame--arch {
  border-radius: 50% 50% var(--r-md) var(--r-md) / 46% 46% var(--r-md) var(--r-md);
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
}

.photo-arch {
  border-radius: 999px 999px var(--r-md) var(--r-md);
  overflow: hidden;
  position: relative;
}

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

.photo-caption {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--ink-55);
  line-height: 1.5;
}

/* Horizontal rule with sunburst */
.rule-sun {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  opacity: 0.75;
}

.rule-sun::before,
.rule-sun::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

.rule-sun svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   21. Page hero variants
   ========================================================================== */

.page-hero {
  position: relative;
  background: var(--cream);
  padding-block: clamp(44px, 6vw, 76px) clamp(40px, 5vw, 64px);
  overflow: hidden;
}

.page-hero__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.5rem);
}

.page-hero .lede {
  margin-top: 16px;
}

.page-hero__media {
  position: relative;
}

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

@media (min-width: 900px) {
  .page-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 5vw, 72px);
  }

  .page-hero__media {
    min-height: 380px;
  }

  .page-hero__media .photo-arch {
    height: 100%;
    min-height: 380px;
  }
}

/* Compact hero with full-bleed image */
.image-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.image-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.image-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.image-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to top,
      rgba(20, 25, 32, 0.88) 0%,
      rgba(20, 25, 32, 0.5) 45%,
      rgba(20, 25, 32, 0.18) 100%
    ),
    linear-gradient(to right, rgba(20, 25, 32, 0.62), transparent 65%);
}

.image-hero__inner {
  width: 100%;
  padding-block: clamp(40px, 6vw, 72px);
}

.image-hero h1 {
  max-width: 22ch;
  color: var(--cream);
}

.image-hero .lede {
  color: rgba(251, 247, 240, 0.86);
  margin-top: 14px;
  max-width: 54ch;
}

.image-hero .eyebrow {
  color: var(--gold);
}

@media (min-width: 900px) {
  .image-hero {
    min-height: 460px;
  }
}

/* ==========================================================================
   22. Reduced-motion global overrides
   ========================================================================== */

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

  .story-card,
  .story-card:nth-child(2),
  .story-card:nth-child(3) {
    transform: none;
  }
}
