/* Lone Star Payments — design system (structure mirrors redfynn.com, rebranded) */

:root {
  --bg-dark: #171a21;
  --bg-dark-alt: #262b35;
  --bg-light: #f1f3f7;
  --bg-light-alt: #e2e7ef;
  --text-light: #f1f3f7;
  --text-dark: #161a22;
  --text-muted-light: rgba(241, 243, 247, 0.72);
  --text-muted-dark: rgba(22, 26, 34, 0.68);
  --accent: #1e88e5;
  --accent-deep: #0d5ea8;
  --accent-soft: #8fd0ff;
  --navy: #10365c;
  --silver: #c9ccd4;

  --font-primary: "Schibsted Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-xxxxl: clamp(3rem, 2.1rem + 4.5vw, 5.7rem);
  --fs-xxxl: clamp(2.5rem, 1.8rem + 3.5vw, 4.6rem);
  --fs-xxl: clamp(2.25rem, 1.7rem + 2.75vw, 3.8rem);
  --fs-xl: clamp(2rem, 1.7rem + 1.5vw, 2.7rem);
  --fs-lg: clamp(1.75rem, 1.5rem + 1.25vw, 2.3rem);
  --fs-md: clamp(1.3125rem, 1.175rem + 0.6875vw, 1.55rem);
  --fs-sm: clamp(1.125rem, 1.05rem + 0.375vw, 1.2rem);
  --fs-xs: clamp(1rem, 0.85rem + 0.125vw, 1.05rem);
  --fs-xxs: clamp(0.875rem, 0.725rem + 0.125vw, 0.95rem);

  --pad-x: max(1.5rem, 8.33vw);
  --sp-xs: max(1rem, 1.25vw);
  --sp-sm: max(1.5rem, 1.67vw);
  --sp-md: max(2rem, 2.08vw);
  --sp-lg: max(2.25rem, 2.5vw);
  --sp-xl: max(2.625rem, 3.33vw);
  --sp-xxl: max(3.125rem, 4.17vw);
  --sp-xxxl: max(4.5rem, 6.25vw);

  --radius-sm: max(0.5rem, 0.42vw);
  --radius-md: max(1rem, 0.83vw);
  --radius-lg: max(1.5rem, 1.25vw);

  --header-h: 4.75rem;
  --ease: 600ms ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: var(--fs-xs);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }
.h1 { font-size: var(--fs-xxxxl); }
.h2 { font-size: var(--fs-xxl); }
.h3 { font-size: var(--fs-lg); }
.h4 { font-size: var(--fs-md); }
strong { font-weight: 800; }
h1 strong, h2 strong, h3 strong { color: var(--accent); }

.kicker {
  display: block;
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-xs);
}

section { padding: var(--sp-xxxl) var(--pad-x); }
section.dark { background: var(--bg-dark); color: var(--text-light); }
section.dark p { color: var(--text-muted-light); }
section.light-alt { background: var(--bg-light-alt); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: var(--fs-xxs);
  letter-spacing: 0.02em;
  transition: transform 250ms ease, box-shadow 250ms ease, background 250ms ease, color 250ms ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(13, 94, 168, 0.25); }
.button.primary { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #fff; }
.button.dark { background: var(--text-dark); color: var(--text-light); }
.button.dark-outline { border-color: var(--text-dark); color: var(--text-dark); background: transparent; }
.button.dark-outline:hover { background: var(--text-dark); color: var(--text-light); }
.button.light { background: var(--bg-light); color: var(--text-dark); }
.button.light-outline { border-color: var(--text-light); color: var(--text-light); background: transparent; }
.button.light-outline:hover { background: var(--bg-light); color: var(--text-dark); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: inherit;
  font-size: var(--fs-xxs);
}
.arrow-link svg { width: 1.15em; height: 1.15em; fill: var(--accent); transition: transform 250ms ease; }
.arrow-link:hover svg { transform: translateX(5px); }

.buttons { display: flex; flex-wrap: wrap; gap: var(--sp-xs); align-items: center; margin-top: var(--sp-md); }

/* ---------- announcement bar ---------- */
.promo-bar {
  background: linear-gradient(90deg, var(--navy), var(--accent-deep) 55%, var(--accent));
  color: #fff;
  text-align: center;
  font-size: var(--fs-xxs);
  font-weight: 600;
  padding: 0.55rem var(--pad-x);
}
.promo-bar a { text-decoration: underline; font-weight: 800; color: #fff; }

/* ---------- header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(241, 243, 247, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(22, 26, 34, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 0 var(--pad-x);
  height: var(--header-h);
}
.brand img {
  height: 3.1rem;
  width: auto;
  /* chrome wordmark is light — give it definition on the pale header */
  filter: drop-shadow(0 1px 1px rgba(13, 30, 50, 0.35));
}
nav.main-nav { display: flex; align-items: center; gap: 0.25rem; margin: 0 auto; }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-xxs);
  color: var(--text-dark);
  background: none;
  border: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-item > a:hover, .nav-item > button:hover { background: rgba(30, 136, 229, 0.1); color: var(--accent-deep); }
.nav-item .caret { width: 0.6em; height: 0.6em; fill: currentColor; transition: transform 250ms ease; }
.nav-item.open .caret { transform: rotate(180deg); }

.mega {
  background: #fff;
  box-shadow: 0 24px 60px rgba(13, 30, 50, 0.18);
  display: none;
  gap: var(--sp-lg);
}
.mega .col { min-width: 10.5rem; }
@media (min-width: 1081px) {
  /* full-width panel anchored to the sticky header, not the nav item */
  .nav-item.has-mega { position: static; }
  .mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(100% - 2 * var(--pad-x), 76rem);
    display: flex;
    justify-content: space-between;
    padding: var(--sp-lg) var(--sp-xl);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: 1px solid rgba(22, 26, 34, 0.06);
    visibility: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 250ms ease, transform 250ms ease, visibility 0s linear 250ms;
  }
  .nav-item.open .mega {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 250ms ease, transform 250ms ease;
  }
  .nav-item.open > button { background: rgba(30, 136, 229, 0.1); color: var(--accent-deep); }
  .mega .col { animation: mega-col-in 350ms ease both; }
  .mega .col:nth-child(2) { animation-delay: 40ms; }
  .mega .col:nth-child(3) { animation-delay: 80ms; }
  .mega .col:nth-child(4) { animation-delay: 120ms; }
  .mega .col:nth-child(5) { animation-delay: 160ms; }
  .nav-item:not(.open) .mega .col { animation: none; }
}
@keyframes mega-col-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.mega-cta {
  background: linear-gradient(160deg, rgba(30, 136, 229, 0.1), rgba(13, 94, 168, 0.16));
  border: 1px solid rgba(30, 136, 229, 0.25);
  border-radius: var(--radius-md);
  padding: var(--sp-sm);
  max-width: 15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mega-cta strong { font-size: var(--fs-xs); line-height: 1.3; }
.mega-cta p { font-size: 0.8rem; color: var(--text-muted-dark); }
.mega-cta .arrow-link { color: var(--accent-deep); margin-top: auto; }
.mega h5 {
  font-size: var(--fs-xxs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  margin-bottom: 0.6rem;
}
.mega a { display: block; padding: 0.28rem 0; font-size: var(--fs-xxs); color: var(--text-muted-dark); }
.mega a:hover { color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: var(--sp-xs); }
.header-phone { font-weight: 800; font-size: var(--fs-xxs); color: var(--text-dark); white-space: nowrap; }
.header-phone:hover { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--text-dark); margin: 5px 0; border-radius: 2px; transition: 250ms ease; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--sp-xxxl) var(--pad-x);
  min-height: calc(88vh - var(--header-h));
  display: flex;
  align-items: center;
}
.hero .content { position: relative; max-width: 62rem; }
.hero p.lede { font-size: var(--fs-md); color: var(--text-muted-dark); margin-top: var(--sp-sm); max-width: 34rem; }

/* ---------- logo ticker ---------- */
.logo-ticker { padding: var(--sp-lg) 0; border-top: 1px solid rgba(22,26,34,0.08); border-bottom: 1px solid rgba(22,26,34,0.08); overflow: hidden; background: #fff; }
.logo-ticker .label { text-align: center; font-size: var(--fs-xxs); letter-spacing: 0.25em; font-weight: 700; color: var(--text-muted-dark); text-transform: uppercase; margin-bottom: var(--sp-sm); }
.ticker-track { display: flex; gap: var(--sp-xxl); width: max-content; animation: ticker 32s linear infinite; }
.ticker-track span {
  font-weight: 800;
  font-size: var(--fs-md);
  color: #a7aeba;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- split section (text + image card) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-xxl); align-items: center; }
.split .media img { border-radius: var(--radius-lg); box-shadow: 0 30px 70px rgba(13, 30, 50, 0.22); }
.split p { color: var(--text-muted-dark); margin-top: var(--sp-sm); font-size: var(--fs-sm); }
section.dark .split p { color: var(--text-muted-light); }

/* ---------- feature list w/ images ---------- */
.feature-rows { display: grid; gap: var(--sp-xl); margin-top: var(--sp-xl); }
.feature-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: 0 14px 44px rgba(13, 30, 50, 0.08);
}
.feature-row:nth-child(even) .media { order: -1; }
.feature-row .media img { border-radius: var(--radius-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.feature-row h3 { display: flex; align-items: center; gap: 0.6rem; }
.feature-row h3 .dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; background: linear-gradient(180deg, var(--accent-soft), var(--accent-deep)); flex: none; }
.feature-row p { color: var(--text-muted-dark); margin-top: var(--sp-xs); }
.stat-line { font-weight: 800; color: var(--accent-deep); font-size: var(--fs-xs); margin-top: 0.7rem; }
.mini-list { padding: 0; margin-top: 0.8rem; display: grid; gap: 0.45rem; }
/* block flow, not flex: bullets contain inline links, and flex would split
   each text fragment into its own item and scramble the sentence */
.mini-list li { display: block; position: relative; padding-left: 1.5em; font-size: var(--fs-xxs); color: var(--text-muted-dark); line-height: 1.5; }
.mini-list .star { color: var(--accent); position: absolute; left: 0; top: 0; }
.mini-list a { color: var(--accent-deep); font-weight: 700; }
.feature-row .arrow-link { margin-top: 0.9rem; color: var(--accent-deep); }
section.dark .stat-line { color: var(--accent-soft); }
section.dark .mini-list li { color: var(--text-muted-light); }
section.dark .mini-list .star { color: var(--accent-soft); }
section.dark .mini-list a { color: var(--accent-soft); }
.card .stat-line { font-size: var(--fs-xxs); margin-top: 0.2rem; }
.card .mini-list { margin-top: 0.4rem; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); }
.card {
  background: var(--bg-dark-alt);
  border: 1px solid rgba(241, 243, 247, 0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  transition: transform 300ms ease, border-color 300ms ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); }
.card img { border-radius: var(--radius-sm); aspect-ratio: 16/10; object-fit: cover; }
.card p { font-size: var(--fs-xxs); }
.card .arrow-link { margin-top: auto; color: var(--accent-soft); }

/* light card variant */
section:not(.dark) .card { background: #fff; border-color: rgba(22,26,34,0.08); }
section:not(.dark) .card .arrow-link { color: var(--accent-deep); }

/* ---------- reviews ---------- */
.review-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); }
.review-tile {
  background: rgba(241, 243, 247, 0.05);
  border: 1px solid rgba(241, 243, 247, 0.1);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  text-align: center;
}
.review-tile .stars { color: #ffc453; font-size: var(--fs-md); letter-spacing: 0.15em; }
.review-tile .score { font-size: var(--fs-xl); font-weight: 800; margin: 0.4rem 0 0.15rem; }
.review-tile .on { color: var(--text-muted-light); font-size: var(--fs-xxs); }
.badge-a-plus {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 800; border-radius: 100px;
  padding: 0.5rem 1.2rem; font-size: var(--fs-xxs); letter-spacing: 0.06em;
}

/* ---------- blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); }
.post-card { background: #fff; color: var(--text-dark); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; transition: transform 300ms ease, box-shadow 300ms ease; }
.post-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(13,30,50,0.25); }
.post-card img { aspect-ratio: 16/9; object-fit: cover; }
.post-card .body { padding: var(--sp-sm); display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post-card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-card .tags span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; color: var(--accent-deep); background: rgba(30,136,229,0.1); border-radius: 100px; padding: 0.2rem 0.65rem; text-transform: uppercase; }
.post-card h3 { font-size: var(--fs-sm); }
.post-card p { font-size: var(--fs-xxs); color: var(--text-muted-dark); }
.post-card .arrow-link { margin-top: auto; color: var(--accent-deep); }

/* ---------- values / feature chips ---------- */
.value-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-xs) var(--sp-lg); margin-top: var(--sp-xl); }
.value-list li {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: var(--fs-sm); font-weight: 700;
  padding: var(--sp-xs) var(--sp-sm);
  background: #fff; border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(13,30,50,0.07);
}
.value-list .star { color: var(--accent); flex: none; }
/* feature tiles with a title + description (category feature lists) */
.value-list li.feature-detail { align-items: flex-start; font-weight: 400; padding: var(--sp-sm) var(--sp-md); }
.value-list li.feature-detail .star { margin-top: 0.2rem; }
.value-list li.feature-detail .feature-body { display: flex; flex-direction: column; gap: 0.3rem; }
.value-list li.feature-detail strong { font-weight: 800; font-size: var(--fs-sm); color: var(--text-dark); line-height: 1.2; }
.value-list li.feature-detail .feature-desc { font-size: var(--fs-xxs); font-weight: 400; color: var(--text-muted-dark); line-height: 1.6; }

/* expanded value cards */
.value-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); }
.value-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  box-shadow: 0 12px 40px rgba(13, 30, 50, 0.07);
  border-left: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.value-card .value-head { display: flex; align-items: center; gap: 0.7rem; }
.value-card .value-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; flex: none;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-deep));
  color: #fff; font-weight: 800; font-size: var(--fs-xxs);
}
.value-card h3 { font-size: var(--fs-md); }
.value-card p { color: var(--text-muted-dark); font-size: var(--fs-xxs); line-height: 1.65; }
@media (max-width: 720px) { .value-cards { grid-template-columns: 1fr; } }

.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-sm); margin-top: var(--sp-xl); }
.chip {
  background: rgba(241,243,247,0.05);
  border: 1px solid rgba(241,243,247,0.12);
  border-radius: var(--radius-sm);
  padding: var(--sp-sm);
  font-weight: 700;
  font-size: var(--fs-xxs);
  display: flex; align-items: center; gap: 0.6rem;
}
.chip .star { color: var(--accent-soft); }
section:not(.dark) .chip { background: #fff; border-color: rgba(22,26,34,0.08); box-shadow: 0 8px 24px rgba(13,30,50,0.07); }
section:not(.dark) .chip .star { color: var(--accent); }

/* ---------- numbered benefits ---------- */
.numbered { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); counter-reset: bn; }
.numbered li { counter-increment: bn; background: #fff; border-radius: var(--radius-md); padding: var(--sp-lg); box-shadow: 0 14px 44px rgba(13,30,50,0.08); }
.numbered li::before {
  content: "0" counter(bn);
  display: block;
  font-size: var(--fs-xl);
  font-weight: 800;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.numbered h4 { margin-bottom: 0.4rem; }
.numbered p { font-size: var(--fs-xxs); color: var(--text-muted-dark); }

/* ---------- contact ---------- */
.contact-section-header {
  background: linear-gradient(135deg, #0d1220 0%, #1a2332 100%);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-xxl);
  box-shadow: 0 24px 60px rgba(13, 30, 50, 0.18);
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}
.contact-section-header .kicker { color: var(--accent-soft); margin-bottom: var(--sp-sm); }
.contact-section-header .h2 { color: #fff; margin-bottom: var(--sp-sm); }
.contact-section-header .h2 strong { color: var(--accent-soft); }
.contact-section-header .lede {
  color: var(--text-muted-light);
  font-size: var(--fs-sm);
  max-width: 44rem;
  margin: 0 auto;
  line-height: 1.5;
}
.contact-section-header .buttons { justify-content: center; margin-top: var(--sp-lg); }
.contact-section-header .button.dark-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.contact-section-header .button.dark-outline:hover { background: #fff; color: var(--text-dark); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
@media (max-width: 720px) {
  .contact-section-header { padding: var(--sp-lg) var(--sp-md); }
  .contact-section-header .buttons { flex-direction: column; align-items: stretch; }
}

/* ---------- trust strip above contact CTA ---------- */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  max-width: 60rem;
  margin: 0 auto var(--sp-xl);
  padding: var(--sp-md) var(--sp-lg);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(13, 30, 50, 0.08);
  border: 1px solid rgba(22, 26, 34, 0.06);
  text-align: center;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-xxs);
  color: var(--text-dark);
}
.trust-item strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--accent-deep);
  line-height: 1.1;
}
.trust-item span { color: var(--text-muted-dark); }
.trust-icon {
  width: 1.55rem;
  height: 1.55rem;
  color: var(--accent);
  flex-shrink: 0;
}
.trust-divider {
  width: 1px;
  height: 2.2rem;
  background: rgba(22, 26, 34, 0.12);
}
.trust-quote {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
}
.trust-quote .stars {
  display: flex;
  gap: 0.2rem;
}
.trust-quote .stars svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #f59e0b;
}
.trust-quote-text {
  font-size: var(--fs-xxs);
  font-style: italic;
  color: var(--text-muted-dark);
  line-height: 1.4;
}
@media (max-width: 720px) {
  .trust-strip { padding: var(--sp-md); gap: var(--sp-sm); }
  .trust-divider { display: none; }
  .trust-quote { align-items: center; text-align: center; }
}

.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-top: var(--sp-xl); }
.dept {
  position: relative;
  background: #fff;
  border-left: 4px solid #0d1220;
  padding: var(--sp-lg);
  box-shadow: 0 4px 20px -4px rgba(13,30,50,0.10);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* hover-only lift/glow so touch users don’t get stuck “hover” states */
@media (hover: hover) {
  .dept:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -12px rgba(13,30,50,0.18); border-left-color: var(--accent); }
  .dept:hover .dept-media img { transform: scale(1.05); }
  .dept .dept-links a:hover { color: var(--accent); }
}
.dept:active { transform: scale(0.992); }
.dept:focus-within { box-shadow: 0 22px 44px -12px rgba(13,30,50,0.18); border-left-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 3px; }
.dept h3 { font-size: var(--fs-md); text-transform: uppercase; letter-spacing: -0.01em; font-weight: 800; margin-bottom: 0.6rem; }
.dept p { font-size: var(--fs-xxs); color: var(--text-muted-dark); margin-bottom: var(--sp-sm); font-style: italic; line-height: 1.55; }
.dept .dept-media { position: relative; margin: calc(var(--sp-lg) * -1) calc(var(--sp-lg) * -1) var(--sp-md); height: 10rem; overflow: hidden; }
.dept .dept-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.dept .dept-links { margin-top: auto; display: flex; flex-direction: column; gap: 0.4rem; }
.dept .dept-links a { display: block; font-weight: 700; color: var(--accent-deep); font-size: var(--fs-sm); padding: 0.3rem 0; }
.dept .dept-links a + a { color: var(--text-dark); font-size: var(--fs-xxs); font-weight: 600; }
.dept .dept-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.dept .dept-links a:active { color: var(--accent); }
.dept .dept-choose {
  width: 100%;
  margin-top: var(--sp-sm);
  padding: 0.75rem 1.25rem;
  font-size: var(--fs-xxs);
  border-radius: 100px;
  border: 2px solid var(--accent);
  background: #fff;
  color: var(--accent-deep);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.dept .dept-choose:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13, 94, 168, 0.22); }
.dept .dept-choose:active { transform: scale(0.98); }
.dept .dept-choose:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dept.dept-featured .dept-choose { background: rgba(255,255,255,0.1); border-color: var(--accent-soft); color: #fff; }
.dept.dept-featured .dept-choose:hover { background: var(--accent-soft); color: var(--bg-dark); }
@media (max-width: 720px) {
  .dept .dept-choose { min-height: 44px; }
}
.dept.dept-featured {
  background: #0d1220;
  border-left-color: var(--accent);
  color: var(--text-light);
  box-shadow: 0 22px 44px -12px rgba(30,136,229,0.35);
}
.dept.dept-featured::after {
  content: "";
  position: absolute;
  right: -30px; bottom: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(30,136,229,0.35), transparent 65%);
  pointer-events: none;
}
.dept.dept-featured .dept-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  margin-bottom: var(--sp-xs);
}
.dept.dept-featured h3 { color: #fff; }
.dept.dept-featured p { color: rgba(241,243,247,0.75); }
.dept.dept-featured .dept-links a { color: var(--accent-soft); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.02em; }
.dept.dept-featured .dept-links a + a { color: #fff; font-size: var(--fs-xxs); font-weight: 600; letter-spacing: normal; }
.dept.dept-featured .dept-links a:hover { color: #fff; }

.promo-block {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
  background: #0d1220;
  color: var(--text-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  margin-top: var(--sp-xl);
  box-shadow: 0 22px 44px -12px rgba(30,136,229,0.25);
  overflow: hidden;
}
.promo-block-content { display: flex; flex-direction: column; gap: var(--sp-sm); }
.promo-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
}
.promo-block h3 { color: #fff; }
.promo-benefits { display: flex; flex-direction: column; gap: 0.55rem; margin: 0.25rem 0; }
.promo-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--fs-xxs);
  color: var(--text-muted-light);
  line-height: 1.5;
}
.promo-benefits li::before {
  content: "✓";
  color: var(--accent-soft);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.promo-benefits li span { display: block; }
.promo-benefits li strong { color: #fff; font-weight: 800; display: block; margin-bottom: 0.15rem; }
.promo-block .button { align-self: flex-start; margin-top: 0.5rem; }
.promo-note { font-size: 0.75rem; color: rgba(241,243,247,0.55); margin: 0; }
.promo-block-image {
  position: relative;
  height: 100%;
  min-height: 230px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.promo-block-image img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .promo-block { grid-template-columns: 1fr; }
  .promo-block-image { min-height: 180px; order: -1; }
  .promo-block .button { align-self: stretch; text-align: center; }
}

form.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); margin-top: var(--sp-xl); }
form.contact-form .full { grid-column: 1 / -1; }
form.contact-form label { display: block; font-size: var(--fs-xxs); font-weight: 700; margin-bottom: 0.35rem; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-xxs);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,26,34,0.15);
  background: #fff;
  transition: border-color 200ms ease;
}
form.contact-form input:focus, form.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.form-success {
  display: none;
  background: linear-gradient(180deg, rgba(30,136,229,0.12), rgba(13,94,168,0.08));
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  font-weight: 700;
  margin-top: var(--sp-md);
}

.contact-form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  box-shadow: 0 18px 50px rgba(13, 30, 50, 0.12);
  border: 1px solid rgba(22, 26, 34, 0.08);
}
form.contact-form .form-header {
  text-align: center;
  margin-bottom: var(--sp-lg);
}
form.contact-form .form-header .h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-xs); }
form.contact-form .form-header .lede { color: var(--text-muted-dark); font-size: var(--fs-sm); }
form.contact-form .field { position: relative; }
form.contact-form label { display: block; font-size: var(--fs-xxs); font-weight: 700; margin-bottom: 0.4rem; color: var(--text-dark); }
form.contact-form label .required { color: #c62828; margin-left: 0.1rem; }
form.contact-form label .optional { font-weight: 400; color: var(--text-muted-dark); }
form.contact-form input, form.contact-form textarea, form.contact-form select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-xs);
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,26,34,0.15);
  background: #fff;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
form.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23161a22' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.8rem;
  cursor: pointer;
}
form.contact-form select:required:invalid { color: rgba(22,26,34,0.5); }
form.contact-form input::placeholder, form.contact-form textarea::placeholder { color: rgba(22,26,34,0.4); }
form.contact-form input:focus, form.contact-form textarea:focus, form.contact-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12); }
form.contact-form input.error, form.contact-form textarea.error, form.contact-form select.error { border-color: #c62828; background: rgba(198, 40, 40, 0.04); }
form.contact-form input.error:focus, form.contact-form textarea.error:focus, form.contact-form select.error:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.12); }
form.contact-form .error-msg {
  display: none;
  color: #c62828;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
form.contact-form .error-msg.visible { display: block; }
form.contact-form .form-actions { text-align: center; }
form.contact-form .form-actions .button.primary { width: 100%; max-width: 22rem; padding: 1rem 2rem; font-size: var(--fs-sm); }
form.contact-form .form-microcopy { color: var(--text-muted-dark); font-size: 0.78rem; margin-top: var(--sp-sm); text-align: center; }
form.contact-form .form-success { margin-top: var(--sp-md); }
@media (max-width: 720px) {
  .contact-form-card { padding: var(--sp-lg) var(--sp-md); }
  form.contact-form .form-actions .button.primary { max-width: none; }
}

/* ---------- newsletter + footer ---------- */
.newsletter { background: var(--bg-light-alt); }
.newsletter .split .media { display: flex; justify-content: flex-end; }
.newsletter form { display: flex; gap: 0.6rem; margin-top: var(--sp-md); max-width: 30rem; }
.newsletter input {
  flex: 1; font: inherit; font-size: var(--fs-xxs);
  padding: 0.85rem 1.1rem; border-radius: 100px;
  border: 1.5px solid rgba(22,26,34,0.15);
}
.newsletter input:focus { outline: none; border-color: var(--accent); }

footer.site-footer { background: var(--bg-dark); color: var(--text-light); padding: var(--sp-xxxl) var(--pad-x) var(--sp-lg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: var(--sp-lg); }
.footer-grid h5 { font-size: var(--fs-xxs); text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-soft); margin-bottom: 0.8rem; }
.footer-grid a { display: block; padding: 0.22rem 0; color: var(--text-muted-light); font-size: var(--fs-xxs); }
.footer-grid a:hover { color: #fff; }
.footer-brand img {
  height: 2.6rem;
  margin-bottom: var(--sp-sm);
  /* chrome wordmark needs a lift against the dark footer */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.footer-brand p { color: var(--text-muted-light); font-size: var(--fs-xxs); max-width: 20rem; }
.footer-social { display: flex; gap: 0.7rem; margin-top: var(--sp-sm); }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(241, 243, 247, 0.08);
  border: 1px solid rgba(241, 243, 247, 0.15);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer-social svg { width: 1.15rem; height: 1.15rem; fill: var(--text-light); }
.footer-legal { border-top: 1px solid rgba(241,243,247,0.12); margin-top: var(--sp-xl); padding-top: var(--sp-sm); font-size: 0.78rem; color: rgba(241,243,247,0.5); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }

/* ---------- page hero (interior pages) ---------- */
.page-hero { padding-top: var(--sp-xxl); padding-bottom: var(--sp-xxl); }
.page-hero p.lede { font-size: var(--fs-md); color: var(--text-muted-dark); margin-top: var(--sp-sm); max-width: 40rem; }
section.dark .page-hero p.lede, .page-hero.dark p.lede { color: var(--text-muted-light); }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 46rem; margin: 0 auto; }
.quiz-card { background: #fff; border-radius: var(--radius-lg); padding: var(--sp-xl); box-shadow: 0 30px 70px rgba(13,30,50,0.14); }
.quiz-progress { height: 6px; border-radius: 3px; background: var(--bg-light-alt); margin-bottom: var(--sp-md); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-soft), var(--accent-deep)); transition: width 300ms ease; }
.quiz-options { display: grid; gap: 0.7rem; margin-top: var(--sp-md); }
.quiz-options button {
  font: inherit; font-weight: 700; font-size: var(--fs-xs);
  text-align: left; padding: 1rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,26,34,0.14);
  background: #fff; cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.quiz-options button:hover { border-color: var(--accent); background: rgba(30,136,229,0.06); transform: translateX(4px); }

/* ---------- blog posts ---------- */
.post-hero { padding: var(--sp-xxl) var(--pad-x) var(--sp-lg); max-width: 60rem; }
.post-hero h1 { font-size: var(--fs-xxl); }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: var(--sp-sm); font-size: var(--fs-xxs); color: var(--text-muted-dark); font-weight: 600; }
.post-meta .dot-sep::before { content: "•"; margin-right: 1.4rem; color: var(--accent); }

.post-layout { background: var(--bg-light-alt); padding: var(--sp-xl) var(--pad-x) var(--sp-xxxl); }
.post-body { max-width: 46rem; margin: 0 auto; background: #fff; border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 3.5rem); box-shadow: 0 20px 60px rgba(13,30,50,0.08); }
.post-body > * + * { margin-top: 1.1rem; }
.post-body h2 { font-size: var(--fs-lg); margin-top: 2.6rem; scroll-margin-top: calc(var(--header-h) + 2rem); }
.post-body h3 { font-size: var(--fs-md); margin-top: 1.9rem; }
.post-body p, .post-body li { color: var(--text-muted-dark); font-size: var(--fs-xs); line-height: 1.75; }
.post-body ul, .post-body ol { padding-left: 1.4rem; display: grid; gap: 0.45rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(30,136,229,0.35); }
.post-body a:hover { color: var(--accent); }
.post-body img { border-radius: var(--radius-md); }
.post-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-xxs); }
.post-body .table-scroll { overflow-x: auto; }
.post-body th, .post-body td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid rgba(22,26,34,0.1); color: var(--text-muted-dark); }
.post-body th { color: var(--text-dark); font-weight: 800; border-bottom: 2px solid var(--accent); white-space: nowrap; }

/* answer capsule — the AEO direct answer under the H1 */
.box-answer {
  background: linear-gradient(160deg, rgba(30,136,229,0.09), rgba(13,94,168,0.14));
  border: 1.5px solid rgba(30,136,229,0.35);
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
}
.box-answer .box-label { color: var(--accent-deep); }
.box-answer p { color: var(--text-dark); font-weight: 500; }

.box-protip, .box-caution, .box-takeaways {
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
  border-left: 5px solid;
}
.box-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.box-protip { background: rgba(30, 136, 229, 0.07); border-color: var(--accent); }
.box-protip .box-label { color: var(--accent-deep); }
.box-caution { background: rgba(224, 122, 33, 0.08); border-color: #e07a21; }
.box-caution .box-label { color: #b35f13; }
.box-takeaways { background: rgba(16, 54, 92, 0.06); border-color: var(--navy); }
.box-takeaways .box-label { color: var(--navy); }

.toc { background: var(--bg-light); border-radius: var(--radius-md); padding: var(--sp-sm) var(--sp-md); }
.toc ol { list-style: none; padding: 0; column-count: 2; column-gap: 2rem; }
.toc a { text-decoration: none; font-weight: 600; color: var(--accent-deep); font-size: var(--fs-xxs); }
.toc a:hover { text-decoration: underline; }

.faq-item { border: 1px solid rgba(22,26,34,0.1); border-radius: var(--radius-sm); padding: 0; overflow: hidden; }
.faq-item + .faq-item { margin-top: 0.6rem; }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-dark);
  padding: 0.9rem 1.1rem;
  font-size: var(--fs-xs);
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
}
.faq-item summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 800; font-size: 1.2rem; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 1.1rem 1rem; }

.post-cta {
  background: linear-gradient(135deg, var(--navy), var(--accent-deep));
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
}
.post-cta h3 { color: #fff; }
.post-cta p { color: rgba(255,255,255,0.85); }
.related-posts {
  max-width: 62rem;
  margin: var(--sp-xxl) auto 0;
  padding: var(--sp-xl) 0 0;
  border-top: 1px solid rgba(22, 26, 34, 0.12);
}
.related-posts h2 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-md);
  letter-spacing: -0.01em;
}
.related-posts h2::before {
  content: "";
  display: inline-block;
  width: 2.25rem;
  height: 3px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.75rem;
  transform: translateY(-4px);
}
.related-posts .chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
  margin-top: 0;
}
.related-posts .chip {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(22, 26, 34, 0.1);
  border-radius: 0.75rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.related-posts .chip:hover,
.related-posts .chip:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -18px rgba(30, 136, 229, 0.6);
}
.related-posts .chip .star {
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1.35;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .toc ol { column-count: 1; }
  .related-posts .chip-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) { .toc ol { column-count: 1; } }

/* ---------- parallax hero backgrounds ---------- */
.has-parallax { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  /* oversized so the image can travel without exposing edges */
  top: -18%;
  bottom: -18%;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* keep dark hero text readable: strong light veil, lighter toward the right */
  background:
    linear-gradient(90deg, rgba(241, 243, 247, 0.96) 0%, rgba(241, 243, 247, 0.88) 45%, rgba(241, 243, 247, 0.6) 100%),
    linear-gradient(0deg, rgba(241, 243, 247, 0.9) 0%, rgba(241, 243, 247, 0) 30%);
}
.has-parallax > *:not(.hero-bg) { position: relative; z-index: 1; }
.page-hero.has-parallax, .post-hero.has-parallax { padding-top: var(--sp-xxxl); padding-bottom: var(--sp-xxxl); }
/* hero sections must span full width so the bg image has no gap;
   cap the text content instead (!important beats inline max-width styles) */
.page-hero.has-parallax, .post-hero.has-parallax { max-width: none !important; }
.page-hero.has-parallax > *:not(.hero-bg), .post-hero.has-parallax > *:not(.hero-bg) { max-width: 60rem; }
@media (prefers-reduced-motion: reduce) { .hero-bg img { transform: none !important; } }

/* ---------- cookie consent ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(0);
  width: min(94vw, 44rem);
  background: #fff;
  border: 1px solid rgba(22, 26, 34, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 70px rgba(13, 30, 50, 0.3);
  padding: var(--sp-sm) var(--sp-md);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  animation: cookie-in 400ms ease;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateX(-50%) translateY(24px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cookie-banner .cookie-star { font-size: 1.6rem; color: var(--accent); flex: none; }
.cookie-banner p { font-size: var(--fs-xxs); color: var(--text-muted-dark); margin: 0; }
.cookie-banner p a { color: var(--accent-deep); font-weight: 700; }
.cookie-actions { display: flex; gap: 0.5rem; flex: none; }
.cookie-actions .button { padding: 0.55rem 1.1rem; font-size: 0.8rem; white-space: nowrap; }
@media (max-width: 720px) {
  .cookie-banner { flex-direction: column; align-items: flex-start; gap: var(--sp-xs); bottom: 0.75rem; }
  .cookie-actions { width: 100%; }
  .cookie-actions .button { flex: 1; }
}

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.from-left { transform: translateX(-30px); }
.reveal.from-right { transform: translateX(30px); }
.reveal.from-left.in, .reveal.from-right.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}

/* ---------- responsive ---------- */
@keyframes acc-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
body.nav-locked { overflow: hidden; }
@media (max-width: 1080px) {
  /* backdrop-filter would make the header the containing block for the
     fixed-position nav panel below — use a near-solid bg on mobile instead */
  header.site-header { backdrop-filter: none; background: rgba(241, 243, 247, 0.98); }
  nav.main-nav {
    position: fixed;
    /* --nav-top is set by JS to the header's real bottom edge (promo bar included) */
    top: var(--nav-top, var(--header-h));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-light);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-sm) var(--pad-x) var(--sp-xxl);
    gap: 0;
    overflow-y: auto;
    z-index: 80;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 250ms ease, transform 250ms ease, visibility 0s linear 250ms;
  }
  nav.main-nav.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 250ms ease, transform 250ms ease;
  }
  .nav-item { border-bottom: 1px solid rgba(22,26,34,0.08); }
  .nav-item > a, .nav-item > button { width: 100%; justify-content: space-between; padding: 1rem 0.2rem; font-size: var(--fs-sm); }
  .mega { position: static; transform: none; box-shadow: none; min-width: 0; flex-direction: column; gap: 0.3rem; padding: 0 0 var(--sp-sm); background: transparent; }
  .nav-item.open .mega { display: flex; animation: acc-in 280ms ease; }
  .nav-item.open > button { color: var(--accent-deep); }
  .mega h5 { margin: 0.5rem 0 0.2rem; }
  .mega a { padding: 0.55rem 0 0.55rem 0.8rem; font-size: var(--fs-xs); border-left: 2px solid rgba(30,136,229,0.25); }
  .mega a:active { color: var(--accent); border-left-color: var(--accent); }
  .mega-cta { max-width: none; margin-top: 0.6rem; }
  .mega-cta a { border-left: 0; padding-left: 0; }
  .nav-toggle { display: block; }
  .nav-toggle span { transition: transform 250ms ease, opacity 200ms ease; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .header-cta .button { padding: 0.6rem 1.15rem; }
  .card-grid, .review-tiles, .post-grid, .dept-grid { grid-template-columns: 1fr 1fr; }
  .numbered, .chip-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .split, .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .media { order: 0; }
  .card-grid, .review-tiles, .post-grid, .dept-grid, .numbered, .chip-grid, .value-list, .footer-grid { grid-template-columns: 1fr; }
  .dept-grid { gap: var(--sp-sm); }
  .dept { padding: var(--sp-md); }
  .dept .dept-media { height: 13rem; margin: calc(var(--sp-md) * -1) calc(var(--sp-md) * -1) var(--sp-md); }
  .dept h3 { font-size: var(--fs-sm); margin-bottom: 0.4rem; }
  .dept p { margin-bottom: var(--sp-xs); }
  .dept .dept-links { gap: 0.6rem; }
  .dept .dept-links a { padding: 0.45rem 0; min-height: 44px; display: flex; align-items: center; }
  .dept .dept-links a + a { font-size: var(--fs-xxs); }
  .dept.dept-featured .dept-links a { font-size: var(--fs-md); }
  form.contact-form { grid-template-columns: 1fr; }
  .header-phone { display: none; }
}

/* Contact form stepper */
.step-progress { display: flex; align-items: center; gap: 0.6rem; margin-top: var(--sp-md); }
.step-dot {
  width: 1.75rem; height: 1.75rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(22,26,34,0.08); color: var(--text-muted-dark); font-weight: 700; font-size: 0.85rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.step-dot.is-active { background: var(--accent); color: #fff; transform: scale(1.05); }
.step-dot.is-done { background: #111; color: #fff; }
.step-bar { flex: 1; height: 2px; background: rgba(22,26,34,0.1); border-radius: 2px; max-width: 3rem; }

.form-step { }
.need-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); margin-top: var(--sp-sm);
}
.need-tile {
  text-align: left; background: #fff; border: 1.5px solid rgba(22,26,34,0.12); border-radius: 14px;
  padding: 1rem 1.05rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  font: inherit; color: inherit; min-height: 7.5rem;
}
.need-tile:hover, .need-tile:focus-visible {
  border-color: var(--accent); box-shadow: 0 10px 24px rgba(30,136,229,0.14); transform: translateY(-2px); outline: none;
}
.need-tile.is-selected { border-color: var(--accent); background: rgba(30,136,229,0.06); }
.need-tile-icon { font-size: 1.4rem; line-height: 1; color: var(--accent); }
.need-tile-title { font-weight: 800; font-size: var(--fs-sm); color: var(--text-dark); }
.need-tile-sub { font-size: var(--fs-xxs); color: var(--text-muted-dark); line-height: 1.35; }
.need-tile.is-featured { background: #111; color: #fff; border-color: #111; }
.need-tile.is-featured .need-tile-title { color: #fff; }
.need-tile.is-featured .need-tile-sub { color: rgba(255,255,255,0.75); }
.need-tile.is-featured .need-tile-icon { color: #ffc65a; }
.need-tile.is-featured.is-selected { background: #1a1a1a; }

.step2-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.link-back {
  background: none; border: none; padding: 0.35rem 0; color: var(--accent); font-weight: 700; font-size: var(--fs-xxs);
  cursor: pointer; font-family: inherit;
}
.link-back:hover { text-decoration: underline; }
.step2-tag {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(30,136,229,0.1); color: var(--accent); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
}
.step2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
.step2-grid .full { grid-column: 1 / -1; }
.dept-fields-grid { margin-top: 0; padding-top: var(--sp-sm); border-top: 1px dashed rgba(22,26,34,0.12); }

@media (max-width: 720px) {
  .need-grid { grid-template-columns: 1fr; }
  .step2-grid { grid-template-columns: 1fr; }
}

/* ---------- blog sidebar (desktop) ---------- */
.post-side { display: none; }
.side-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  box-shadow: 0 14px 44px rgba(13, 30, 50, 0.08);
}
.side-card .box-label { margin-bottom: 0.55rem; }
.side-links a {
  display: block;
  padding: 0.34rem 0;
  font-size: var(--fs-xxs);
  font-weight: 600;
  color: var(--text-muted-dark);
  border-bottom: 1px solid rgba(22, 26, 34, 0.06);
  text-decoration: none;
}
.side-links a:last-child { border-bottom: 0; }
.side-links a:hover { color: var(--accent-deep); }
.side-cta {
  background: linear-gradient(135deg, var(--navy), var(--accent-deep));
  color: #fff;
}
.side-cta .box-label { color: var(--accent-soft); }
.side-cta p { font-size: var(--fs-xxs); color: rgba(255, 255, 255, 0.88); margin: 0 0 0.8rem; }
.side-cta .button { width: 100%; }
.side-phone {
  display: block;
  text-align: center;
  margin-top: 0.6rem;
  font-weight: 800;
  color: var(--accent-soft);
  font-size: var(--fs-xs);
  text-decoration: none;
}
@media (min-width: 1150px) {
  .post-layout.has-side {
    display: grid;
    grid-template-columns: minmax(0, 46rem) 19rem;
    justify-content: center;
    gap: 2.75rem;
    align-items: start;
  }
  .post-layout.has-side > .post-body { margin: 0; max-width: none; min-width: 0; }
  .post-layout.has-side > .related-posts { display: none; } /* moved into sidebar */
  .post-layout.has-side > .post-side {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
    max-height: calc(100vh - var(--header-h) - 2.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 2px;
  }
}

/* value cards: thematic image behind the text, veiled for readability */
.value-card { position: relative; overflow: hidden; }
.value-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.value-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 55%, rgba(255, 255, 255, 0.72) 100%);
}
.value-card > *:not(.value-bg) { position: relative; z-index: 1; }

/* partners hero stat band */
.agent-stat-band .review-tiles { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.agent-stat-band .review-tile .score { font-size: var(--fs-lg); }
.agent-stat-band .review-tile .on { font-size: 0.82rem; }
@media (max-width: 980px) { .agent-stat-band .review-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .agent-stat-band .review-tiles { grid-template-columns: 1fr; } }

/* ---- Overlapping card carousel (Apple Photos style) ---- */
.stack-carousel { margin-top: var(--sp-xl); }
.stack-stage { position: relative; }
.stack-card {
  position: absolute; top: 0; left: 50%; width: min(30rem, 88%);
  background: #fff; border-radius: var(--radius-md); padding: var(--sp-lg);
  border: 1px solid rgba(13,30,50,0.05);
  box-shadow: 0 24px 60px rgba(13,30,50,0.16);
  transition: transform 560ms cubic-bezier(0.22, 0.9, 0.24, 1), opacity 560ms ease, filter 560ms ease, box-shadow 560ms ease;
  will-change: transform;
}
.stack-card:not(.is-active) { cursor: pointer; box-shadow: 0 14px 36px rgba(13,30,50,0.10); }
.stack-num {
  display: inline-block; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.6rem;
}
.stack-card h4 { margin-bottom: 0.4rem; }
.stack-card p { font-size: var(--fs-xxs); color: var(--text-muted-dark); }
.stack-nav { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: var(--sp-md); }
.stack-arrow {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid rgba(13,30,50,0.14);
  background: #fff; color: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 220ms ease; flex: none;
}
.stack-arrow svg { width: 1rem; height: 1rem; }
.stack-arrow:hover, .stack-arrow:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.stack-dots { display: flex; gap: 0.5rem; }
.stack-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: none; background: rgba(13,30,50,0.18); cursor: pointer; padding: 0; transition: all 220ms ease; }
.stack-dot.on { background: var(--accent); transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) { .stack-card { transition: opacity 200ms ease; } }

/* ---- city-page polish: fill blank rails ---- */
.city-split, .faq-split { display: grid; align-items: start; gap: var(--sp-xl); }
.city-split { grid-template-columns: minmax(0, 1fr) 21rem; }
.faq-split { grid-template-columns: minmax(0, 1fr) 19rem; }
.city-panel {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  background: #fff; border-radius: var(--radius-md); padding: var(--sp-lg);
  box-shadow: 0 14px 44px rgba(13,30,50,0.08); border-top: 4px solid var(--accent);
}
.city-panel .box-label, .city-faq-card .box-label {
  display: block; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 0.72rem; margin-bottom: 0.9rem;
}
.city-panel .box-label { color: var(--accent-deep); }
.city-panel .mini-list li { font-size: var(--fs-xxs); }
.city-panel .mini-list li + li { margin-top: 0.55rem; }
.city-panel-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: var(--sp-md); }
.city-panel-phone { font-weight: 800; color: var(--accent-deep); white-space: nowrap; }
.city-panel-phone:hover { color: var(--accent); }
.city-faq-card {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  background: linear-gradient(135deg, var(--navy), var(--accent-deep));
  color: #fff; border-radius: var(--radius-md); padding: var(--sp-lg);
}
.city-faq-card .box-label { color: var(--accent-soft); }
.city-faq-card p { font-size: var(--fs-xxs); color: rgba(255,255,255,0.85); margin-bottom: var(--sp-md); }
.city-faq-card nav { margin-top: var(--sp-md); border-top: 1px solid rgba(255,255,255,0.16); padding-top: 0.7rem; }
.city-faq-card nav a { display: block; color: #fff; font-weight: 700; font-size: var(--fs-xxs); padding: 0.35rem 0; }
.city-faq-card nav a:hover { color: var(--accent-soft); }
@media (max-width: 980px) {
  .city-split, .faq-split { grid-template-columns: 1fr; }
  .city-panel, .city-faq-card { position: static; }
}
