/* v2 — Official document desk (mobile-first) */

:root {
  --ink: #1a1a1a;
  --navy: #0f2a56;
  --navy-deep: #0a1d3d;
  --paper: #f6f3ee;
  --paper-2: #efeae2;
  --line: #d9d2c6;
  --muted: #5c574e;
  --teal: #0f6b5c;
  --teal-press: #0b5246;
  --white: #ffffff;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Source Sans 3", system-ui, sans-serif;
  --max: 42rem;
  --max-wide: 64rem;
  --header-h: 3.5rem;
  --radius: 0.35rem;
  --ease: 180ms ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.ui-v2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(15, 42, 86, 0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  min-height: 100vh;
}

body.ui-v2 img {
  max-width: 100%;
  height: auto;
}

/* Content links only — never paint header/footer chrome with navy/teal-on-navy */
.site-main a {
  color: var(--navy);
}

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

/* —— Brand —— */

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.site-brand:hover,
.site-brand:focus-visible {
  color: #fff;
  opacity: 0.88;
}

.site-brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-brand-footer {
  color: var(--white);
  margin-bottom: 0.35rem;
}

.site-brand-footer .site-brand-name {
  font-size: 1.5rem;
}

/* —— Header —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--white);
  transition: box-shadow var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(10, 29, 61, 0.28);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  min-height: var(--header-h);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--white) !important;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background var(--ease), transform var(--ease);
}

.site-cta:hover,
.site-cta:focus-visible {
  background: var(--teal-press);
  color: var(--white) !important;
}

.site-cta:active {
  transform: scale(0.98);
}

.site-cta-lg {
  padding: 0.85rem 1.35rem;
  font-size: 1.05rem;
}

.site-menu-toggle {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible,
.site-header.is-nav-open .site-menu-toggle {
  background: rgba(255, 255, 255, 0.1);
}

.site-nav {
  display: none;
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.is-nav-open .site-nav {
  display: block;
}

.site-nav-list {
  list-style: none;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.85rem;
  max-width: var(--max-wide);
}

.site-nav-list a {
  display: block;
  padding: 0.75rem 0.15rem;
  color: #fff;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1rem;
}

.site-nav-list a:hover,
.site-nav-list a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-nav-list li:first-child a {
  border-top: 0;
}

.site-header-checkout .site-nav-checkout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-left: auto;
  font-size: 0.9rem;
}

.site-header-checkout .site-nav-checkout a {
  color: #fff;
}

.site-header-checkout .site-nav-checkout a:hover,
.site-header-checkout .site-nav-checkout a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* —— Main —— */

.site-main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

body#index .site-main {
  max-width: var(--max);
  padding-top: 1.75rem;
}

body#certified-quote .site-main,
body#legal .site-main {
  max-width: 46rem;
}

body.ui-v2 .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* —— Home —— */

.home-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.home-brand-signal {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--navy);
}

.home-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

.home-hero-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.home-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.home-trust li::before {
  content: "·";
  margin-right: 0.55rem;
  color: var(--teal);
}

.home-trust li:first-child::before {
  content: none;
  margin: 0;
}

.home-section {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.home-section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 650;
  color: var(--navy);
}

.home-section-lede {
  margin: 0 0 1rem;
  color: var(--muted);
}

.home-doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-doc-grid a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: border-color var(--ease), transform var(--ease);
}

.home-doc-grid a:hover,
.home-doc-grid a:focus-visible {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.home-steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.home-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}

.home-steps p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.home-why {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.home-why li {
  margin-bottom: 0.45rem;
}

.home-why strong {
  color: var(--ink);
}

.home-agency p {
  color: var(--muted);
}

.home-agency-links {
  font-size: 0.95rem;
}

.home-ata {
  display: block;
  margin-top: 1rem;
  width: 11rem;
  opacity: 0.92;
}

/* —— Inner pages —— */

.site-content-wrap {
  display: block;
}

.site-breadcrumbs {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-breadcrumbs a {
  color: var(--muted);
}

.site-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.site-article-header h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 650;
  line-height: 1.2;
  color: var(--navy);
}

.legacy-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.legacy-content table {
  max-width: none;
}

.site-rail {
  display: grid;
  gap: 0.65rem;
}

.site-rail-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.85rem 0.65rem;
}

.site-rail-panel summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.55rem 0;
  list-style: none;
}

.site-rail-panel summary::-webkit-details-marker {
  display: none;
}

.site-rail-panel summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.site-rail-panel[open] summary::after {
  content: "–";
}

.site-rail-list {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
}

.site-rail-quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.site-rail-note {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-rail-note:last-child {
  margin-bottom: 0;
}

/* —— Footer —— */

.site-footer {
  margin-top: 1rem;
  padding: 2rem 1rem 2.5rem;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.site-footer-tagline {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact {
  margin: 0 0 1rem;
}

.site-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.site-legal-links,
.site-copyright,
.site-ui-switch {
  margin: 0.65rem 0 0;
}

.site-ui-switch a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  opacity: 0.75;
}

.seo-basement {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.seo-basement a {
  color: rgba(255, 255, 255, 0.58);
}

.seo-basement a:hover,
.seo-basement a:focus-visible {
  color: rgba(255, 255, 255, 0.88);
}

.seo-basement h2 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-ui);
  text-transform: none;
}

.seo-basement-intro {
  margin: 0 0 0.5rem;
}

.seo-basement .serv {
  margin-bottom: 0.5rem;
}

.seo-basement ul {
  margin: 0;
  padding-left: 1rem;
  columns: 1;
}

/* —— Wider breakpoints —— */

@media (min-width: 720px) {
  .home-doc-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .site-article {
    flex: 1 1 0;
    min-width: 0;
  }

  .site-rail {
    flex: 0 0 15rem;
  }

  .site-footer-inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
  }

  .seo-basement ul {
    columns: 2;
    column-gap: 1.5rem;
  }
}

@media (min-width: 960px) {
  body#index .site-main {
    max-width: 46rem;
  }

  .home-brand-signal {
    font-size: 3rem;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-cta,
  .home-doc-grid a,
  .site-header,
  .site-nav {
    transition: none;
  }
}
