:root {
  color-scheme: light;
  --navy: oklch(24% 0.055 250);
  --navy-2: oklch(18% 0.05 250);
  --blue: oklch(38% 0.105 245);
  --blue-soft: oklch(94% 0.035 235);
  --gold: oklch(78% 0.145 78);
  --gold-deep: oklch(58% 0.13 74);
  --ink: oklch(18% 0.025 252);
  --muted: oklch(42% 0.03 248);
  --surface: oklch(99% 0.004 250);
  --surface-2: oklch(96% 0.015 246);
  --line: oklch(86% 0.018 246);
  --shadow: 0 18px 48px oklch(18% 0.04 250 / 14%);
  --tight: clamp(1rem, 1.4vw, 1.4rem);
  --section: clamp(3.5rem, 7vw, 7.5rem);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-soft), #fff 34rem);
  font-size: clamp(1rem, 0.96rem + 0.24vw, 1.15rem);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-deep); }
img { max-width: 100%; height: auto; display: block; border-radius: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
  padding: 0.85rem clamp(1rem, 4vw, 3.5rem);
  color: #fff;
  background: color-mix(in oklch, var(--navy) 94%, black 6%);
  border-bottom: 1px solid oklch(100% 0 0 / 12%);
  box-shadow: 0 10px 30px oklch(15% 0.05 250 / 24%);
}
.brand {
  max-width: 25rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.08;
  text-decoration: none;
}
.brand::after {
  content: "USCIS Designated Regional Center";
  display: block;
  margin-top: 0.25rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.35rem; }
.site-nav a, .site-footer nav a {
  color: inherit;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); background: var(--gold); }
.site-nav a[href="/contact/"] { border: 1px solid oklch(100% 0 0 / 22%); }

.site-main { overflow: hidden; }
.page-hero {
  position: relative;
  min-height: clamp(29rem, 70vh, 46rem);
  display: grid;
  align-items: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 4vw, 3.5rem) clamp(3rem, 7vw, 6rem);
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, oklch(78% 0.145 78 / 34%), transparent 22rem),
    linear-gradient(130deg, oklch(17% 0.055 250 / 96%), oklch(32% 0.105 245 / 82%)),
    url('/assets/regional-center.png') center/cover;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10rem;
  background: linear-gradient(0deg, var(--blue-soft), transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.55fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  animation: rise-in 720ms cubic-bezier(.22, 1, .36, 1) both;
}
.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid oklch(100% 0 0 / 22%);
  border-radius: 999px;
  color: var(--gold);
  background: oklch(12% 0.05 250 / 58%);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.05;
  text-wrap: balance;
  color: inherit;
}
h1 { max-width: 13ch; margin: 0; font-size: clamp(3rem, 8vw, 5.8rem); letter-spacing: -0.035em; }
h2 { margin: 2.8rem 0 1rem; color: var(--navy); font-size: clamp(1.85rem, 3vw, 3.2rem); letter-spacing: -0.025em; }
h3 { margin: 2.2rem 0 0.8rem; color: var(--blue); font-size: clamp(1.3rem, 2vw, 1.8rem); }
.hero-copy { max-width: 42rem; margin: 1.35rem 0 0; color: oklch(96% 0.012 250); font-size: clamp(1.12rem, 1.7vw, 1.38rem); line-height: 1.65; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.button, .content-shell .wp-block-button__link, .content-shell a.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { color: #fff; background: transparent; border: 1px solid oklch(100% 0 0 / 28%); }
.button:hover, button:hover { transform: translateY(-1px); color: var(--navy); background: oklch(85% 0.15 82); }
.button.secondary:hover { color: var(--navy); background: #fff; }
.hero-card {
  border: 1px solid oklch(100% 0 0 / 18%);
  border-radius: 16px;
  background: oklch(100% 0 0 / 9%);
  padding: clamp(1.3rem, 2vw, 1.8rem);
  backdrop-filter: blur(16px);
}
.hero-card strong { display: block; color: var(--gold); font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1; }
.hero-card span { display: block; margin-top: 0.7rem; color: oklch(96% 0.01 250); font-weight: 700; }
.hero-card p { margin: 1.1rem 0 0; color: oklch(92% 0.012 250); }

.trust-rail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1120px;
  margin: clamp(-3.5rem, -4vw, -2rem) auto 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.trust-item { padding: clamp(1.2rem, 2vw, 1.65rem); border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item b { display: block; color: var(--navy); font-size: 1.04rem; line-height: 1.25; }
.trust-item span { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

.content-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--section) clamp(1rem, 4vw, 2rem);
}
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 4vw, 3.5rem);
  animation: rise-in 820ms 120ms cubic-bezier(.22, 1, .36, 1) both;
}
.content-panel > :first-child { margin-top: 0; }
.content-panel p, .content-panel li { max-width: 72ch; text-wrap: pretty; }
.content-panel ul, .content-panel ol { padding-left: 1.35rem; }
.content-panel li { margin: 0.45rem 0; }
.content-panel figure { margin: 2rem 0; }
.content-panel blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--navy);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
}
.content-panel .wp-block-columns, .content-panel .gb-grid-wrapper { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); align-items: start; }
.content-panel table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.98rem; }
.content-panel th, .content-panel td { border-bottom: 1px solid var(--line); padding: 0.85rem; text-align: left; }
.content-panel th { color: var(--navy); background: var(--blue-soft); }
.content-panel hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }
.content-panel img { box-shadow: 0 10px 24px oklch(18% 0.03 250 / 10%); }

.contact-card {
  margin-top: 3rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
}
.contact-card h2 { color: #fff; margin-top: 0; }
.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: 0.4rem; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid oklch(82% 0.02 246);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0.86rem 0.95rem;
  font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 3px solid oklch(78% 0.145 78 / 42%); outline-offset: 2px; }
textarea { resize: vertical; }
.form-status { min-height: 1.5rem; margin: 0; font-weight: 800; }
.form-status.error { color: oklch(88% 0.14 25); }
.form-status.success { color: oklch(86% 0.13 145); }
.form-note { color: oklch(92% 0.012 250); font-size: 0.95rem; }

.site-footer {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3.5rem);
  color: #fff;
  text-align: center;
  background: var(--navy-2);
}
.site-footer strong { color: var(--gold); font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.4rem, 3vw, 2.1rem); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.site-footer nav a { color: #fff; padding: 0.4rem 0.7rem; }
.site-footer nav a:hover { color: var(--navy); background: var(--gold); }

@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
  .button:hover, button:hover { transform: none; }
}
@media (max-width: 900px) {
  .site-header { position: static; align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
  .hero-inner { grid-template-columns: 1fr; }
  .trust-rail { grid-template-columns: 1fr; margin-inline: 1rem; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: 0; }
}
@media (max-width: 620px) {
  .site-nav a { padding: 0.45rem 0.6rem; font-size: 0.76rem; }
  .page-hero { min-height: 34rem; }
  h1 { font-size: clamp(2.55rem, 15vw, 4rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .content-panel { border-radius: 12px; }
}

.secondary-nav {
  position: sticky;
  top: 4.85rem;
  z-index: 19;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.55rem clamp(1rem, 4vw, 3.5rem);
  color: #fff;
  background: color-mix(in oklch, var(--blue) 86%, var(--navy) 14%);
  border-bottom: 1px solid oklch(100% 0 0 / 14%);
  box-shadow: 0 8px 18px oklch(15% 0.05 250 / 16%);
}
.secondary-nav a {
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
}
.secondary-nav a:hover,
.secondary-nav a[aria-current="page"] {
  color: var(--navy);
  background: #fff;
}
.footer-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  width: min(100%, 980px);
  justify-self: center;
  margin-inline: auto;
  text-align: center;
}
.footer-nav-grid nav {
  padding-top: 0.75rem;
  border-top: 1px solid oklch(100% 0 0 / 12%);
  justify-content: center;
}
@media (max-width: 900px) {
  .secondary-nav { position: static; justify-content: flex-start; }
}

/* Imported WordPress/GenerateBlocks fragments can lose their original icon sizing
   after static sanitization. Keep inline SVGs from dominating content blocks. */
.content-panel svg {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  max-width: 1.05em;
  max-height: 1.05em;
  vertical-align: -0.15em;
  flex: 0 0 auto;
}

.content-panel a:has(svg), .content-panel .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-height: auto;
}

.content-panel form:not(.contact-form),
.content-panel input[name^="3538"],
.content-panel textarea[name^="3538"] {
  display: none !important;
}


/* Preserve the old site's major column relationships without importing WordPress CSS. */
.content-panel .clone-section {
  margin-block: clamp(1.25rem, 3vw, 2.75rem);
}

.content-panel .clone-inner {
  width: 100%;
}

.content-panel .clone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  margin-block: clamp(1.25rem, 3vw, 2.5rem);
}

.content-panel .clone-column {
  min-width: 0;
}

.content-panel .clone-column > .clone-section,
.content-panel .clone-section .clone-section {
  margin-block: 0;
}

.content-panel .clone-grid:has(.clone-column:nth-child(4)) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
}

.content-panel .clone-grid:has(img) {
  align-items: center;
}

.content-panel .wp-block-image {
  margin: clamp(1rem, 2vw, 1.5rem) 0;
}

.content-panel figure {
  max-width: 100%;
}

.content-panel .aligncenter {
  margin-inline: auto;
  text-align: center;
}

.content-panel .alignleft {
  float: left;
  max-width: min(45%, 420px);
  margin: 0.35rem clamp(1rem, 3vw, 2rem) 1rem 0;
}

.content-panel .alignright {
  float: right;
  max-width: min(45%, 420px);
  margin: 0.35rem 0 1rem clamp(1rem, 3vw, 2rem);
}

.content-panel .text-center {
  text-align: center;
  margin-inline: auto;
}

.content-panel .text-left {
  text-align: left;
}

.content-panel .accent-text {
  color: oklch(42% 0.13 30);
}

.content-panel .small-copy {
  font-size: 0.92rem;
  line-height: 1.65;
}

.content-panel .normal-copy {
  font-size: 1rem;
}

.content-panel .clone-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.content-panel .clone-icon {
  display: inline-flex;
  width: 1.05em;
  height: 1.05em;
}

.content-panel .clone-grid::after,
.content-panel .clone-section::after,
.content-panel .content-panel::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 720px) {
  .content-panel .alignleft,
  .content-panel .alignright {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1rem auto;
  }
}

/* Desktop parity pass: four-column GenerateBlocks rows on the source site stay four-up at 1024px. */
@media (min-width: 860px) {
  .content-panel .clone-grid:has(> .clone-column:nth-child(4)):not(:has(> .clone-column:nth-child(5))) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .content-panel .clone-grid:has(> .clone-column:nth-child(2)):not(:has(> .clone-column:nth-child(3))) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
  }
}


/* Mobile alignment and touch pass. Keep desktop parity, rethink the small-screen context. */
@media (max-width: 760px) {
  body {
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  }

  .site-header {
    position: static;
    gap: 0.8rem;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.85rem;
  }

  .brand {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .brand::after {
    font-size: 0.66rem;
  }

  .site-nav,
  .secondary-nav,
  .site-footer nav {
    gap: 0.45rem;
  }

  .site-nav,
  .secondary-nav {
    justify-content: flex-start;
  }

  .site-footer nav {
    justify-content: center;
  }

  .site-nav,
  .secondary-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar,
  .secondary-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a,
  .secondary-nav a,
  .site-footer nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.68rem 0.85rem;
  }

  .secondary-nav {
    position: sticky;
    top: 0;
    z-index: 19;
    padding: 0.5rem 1rem;
  }

  .page-hero {
    min-height: auto;
    padding: clamp(2rem, 9vw, 3.2rem) 1rem clamp(2.25rem, 9vw, 3.5rem);
    align-items: start;
  }

  .hero-inner {
    gap: 1.15rem;
    align-items: start;
  }

  .hero-kicker {
    max-width: 100%;
    margin-bottom: 0.9rem;
    white-space: normal;
  }

  h1 {
    max-width: 11.5ch;
    font-size: clamp(2.25rem, 11vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.032em;
  }

  .hero-copy {
    margin-top: 1rem;
    font-size: 1.04rem;
    line-height: 1.55;
  }

  .hero-actions {
    gap: 0.65rem;
    margin-top: 1.35rem;
  }

  .button,
  button {
    min-height: 46px;
  }

  .hero-card {
    padding: 1rem;
  }

  .hero-card strong {
    font-size: clamp(1.45rem, 8vw, 2.25rem);
  }

  .trust-rail {
    margin-top: -1.1rem;
  }

  .trust-item {
    padding: 1rem;
  }

  .content-shell {
    padding: clamp(2rem, 9vw, 3rem) 1rem;
  }

  .content-panel {
    padding: clamp(1rem, 5vw, 1.4rem);
  }

  .content-panel h2 {
    font-size: clamp(1.5rem, 8vw, 2.25rem);
  }

  .content-panel h3 {
    font-size: clamp(1.18rem, 5.5vw, 1.5rem);
  }

  .content-panel .clone-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    justify-items: stretch;
  }

  .content-panel .clone-grid:has(img) {
    justify-items: center;
  }

  .content-panel .clone-grid:has(img) .clone-column,
  .content-panel .wp-block-image,
  .content-panel figure:has(img) {
    display: grid;
    justify-items: center;
    width: 100%;
  }

  .content-panel img {
    margin-inline: auto;
  }

  .content-panel p,
  .content-panel li {
    max-width: 100%;
  }

  .content-panel a:not(.button):not(.contact-link) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .site-footer {
    padding: 2.25rem 1rem max(2.25rem, env(safe-area-inset-bottom));
  }

  .site-footer nav {
    justify-content: center;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .site-nav a,
  .secondary-nav a,
  .site-footer nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .page-hero {
    min-height: auto;
    padding-block: clamp(3rem, 8vw, 5rem);
  }

  .hero-inner {
    align-items: start;
  }

  .content-panel .clone-grid:has(> .clone-column:nth-child(4)):not(:has(> .clone-column:nth-child(5))) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 1.75rem);
  }
}

/* Second mobile pass: prevent horizontal document growth from scrollable navs and tighten hero density. */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .site-header {
    align-items: stretch;
    overflow: hidden;
  }

  .site-nav,
  .secondary-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a,
  .secondary-nav a {
    flex: 0 0 auto;
  }

  .page-hero {
    padding-top: 1.65rem;
    padding-bottom: 2rem;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.05rem, 10vw, 3rem);
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.48;
  }

  .hero-card {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .hero-card strong {
    font-size: clamp(1.25rem, 7vw, 1.8rem);
  }

  .hero-card span,
  .hero-card p {
    margin-top: 0.45rem;
  }
}

/* Final responsive density pass: keep mobile focused on title, copy, and actions. */
@media (max-width: 760px) {
  .hero-card {
    display: none;
  }

  .page-hero {
    padding-top: 1.45rem;
    padding-bottom: 1.75rem;
  }

  .hero-inner {
    gap: 0;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
    gap: clamp(1.25rem, 3vw, 2rem);
  }

  .hero-copy {
    max-width: 38rem;
  }

  .hero-card {
    align-self: start;
  }
}
