:root {
  --navy: #18243A;
  --slate: #4C6A92;
  --soft-gray: #E9EDF2;
  --warm-white: #FAF9F7;
  --charcoal: #262A30;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(24,36,58,.10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--charcoal);
  background: var(--warm-white);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,249,247,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(24,36,58,.08);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--navy); font-weight: 700; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--slate); }
.nav-toggle { display: none; border: 0; background: transparent; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 21px; border-radius: 999px; text-decoration: none; font-weight: 800; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--white); background: var(--navy); box-shadow: 0 10px 28px rgba(24,36,58,.18); }
.btn-secondary { color: var(--navy); background: transparent; border-color: rgba(24,36,58,.22); }

.hero { position: relative; overflow: hidden; padding: 96px 0 90px; background: linear-gradient(90deg, rgba(250,249,247,.98) 0%, rgba(250,249,247,.93) 50%, rgba(250,249,247,.60) 100%), url('assets/nosidam-hero.png') center/cover no-repeat; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; min-height: 500px; }
.eyebrow { display: inline-block; color: var(--slate); font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; margin-bottom: 16px; }
h1, h2, h3 { color: var(--navy); line-height: 1.12; margin-top: 0; }
h1 { font-size: clamp(3rem, 7vw, 5.8rem); letter-spacing: -.04em; margin-bottom: 16px; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.03em; margin-bottom: 18px; }
h3 { font-size: 1.35rem; margin-bottom: 10px; }
.serif { font-family: Lora, Georgia, "Times New Roman", serif; font-weight: 500; }
.hero-tagline { font-size: clamp(1.4rem, 2.4vw, 2.1rem); color: var(--navy); margin: 0 0 16px; }
.hero-sub { max-width: 660px; font-size: 1.12rem; color: #4a4f57; margin: 0 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding: 88px 0; }
.section.alt { background: var(--white); }
.section.navy { background: var(--navy); color: var(--warm-white); }
.section.navy h2, .section.navy h3 { color: var(--warm-white); }
.section.navy .eyebrow { color: #a8bad2; }
.lead { font-size: 1.18rem; max-width: 780px; color: #50555d; }
.section.navy .lead { color: #dfe5ec; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 38px; }
.card { padding: 26px; border-radius: var(--radius); background: var(--white); border: 1px solid rgba(24,36,58,.08); box-shadow: 0 10px 30px rgba(24,36,58,.06); }
.card p { margin-bottom: 0; color: #565b63; }
.card .num { font-weight: 900; color: var(--slate); font-size: .85rem; letter-spacing: .12em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.quote-card { padding: 34px; background: var(--soft-gray); border-radius: var(--radius); border-left: 5px solid var(--slate); }
.quote-card p { margin: 0; font-size: 1.35rem; color: var(--navy); }

.band { background: linear-gradient(135deg, var(--soft-gray), #f8fafc); border: 1px solid rgba(24,36,58,.08); border-radius: 32px; padding: 44px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 42px; align-items: center; }
.band strong { color: var(--navy); }

.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 36px; }
.step { padding-top: 22px; border-top: 2px solid var(--slate); }
.step span { color: var(--slate); font-weight: 900; font-size: .85rem; letter-spacing: .14em; }

.page-hero { padding: 82px 0 64px; background: linear-gradient(135deg, var(--soft-gray), var(--warm-white)); }
.page-hero p { max-width: 760px; font-size: 1.15rem; }
.prose { max-width: 820px; }
.prose h2 { margin-top: 46px; }
.prose p { font-size: 1.08rem; }

.form-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
form { background: var(--white); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
label { display: block; color: var(--navy); font-weight: 800; margin-bottom: 6px; }
input, textarea { width: 100%; border: 1px solid #cdd4de; background: #fff; border-radius: 12px; padding: 13px 14px; font: inherit; margin-bottom: 18px; }
input:focus, textarea:focus { outline: 3px solid rgba(76,106,146,.18); border-color: var(--slate); }
textarea { min-height: 160px; resize: vertical; }

.cta { text-align: center; padding: 76px 0; background: var(--navy); color: var(--warm-white); }
.cta h2 { color: var(--warm-white); margin-bottom: 12px; }
.cta p { margin: 0 auto 26px; max-width: 650px; color: #dfe5ec; }
.cta .btn-primary { background: var(--warm-white); color: var(--navy); }

footer { background: #101827; color: #cbd4e0; padding: 44px 0 24px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; }
.footer-brand { color: var(--white); font-weight: 800; font-size: 1.2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #d8e0e9; text-decoration: none; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.10); font-size: .9rem; color: #9daabd; }

@media (max-width: 900px) {
  .hero-grid, .split, .band, .form-wrap { grid-template-columns: 1fr; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { min-height: auto; }
  .hero { padding: 72px 0; background-position: 65% center; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 20px; right: 20px; top: 68px; flex-direction: column; align-items: stretch; padding: 20px; background: var(--warm-white); border-radius: 18px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1140px); }
  .cards, .steps { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .hero { padding: 60px 0; }
  h1 { font-size: clamp(2.7rem, 15vw, 4rem); }
  .footer-grid { flex-direction: column; }
}

/* V3 visual refinements */
.icon-wrap {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--soft-gray);
  color: var(--slate);
  margin-bottom: 18px;
}
.icon-wrap svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card .icon-wrap { margin-bottom: 16px; }

.visual-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}
.flow-node {
  min-height: 160px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 22px;
  background: rgba(255,255,255,.06);
}
.flow-node h3 { margin: 8px 0 6px; }
.flow-node p { margin: 0; color: #dfe5ec; font-size: .98rem; }
.flow-arrow { color: #a8bad2; font-size: 1.7rem; font-weight: 700; }
.section.navy .icon-wrap { background: rgba(255,255,255,.10); color: #c6d4e7; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 34px;
}
.about-panel {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(24,36,58,.08);
  box-shadow: 0 10px 30px rgba(24,36,58,.05);
}
.about-panel p:last-child { margin-bottom: 0; }

.security-points {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.security-point {
  padding: 20px;
  border-radius: 18px;
  background: var(--soft-gray);
  color: var(--navy);
  text-align: center;
  font-weight: 750;
}
.security-point .icon-wrap { margin: 0 auto 12px; background: var(--white); }

.page-hero h1 { font-size: clamp(2.8rem, 5.2vw, 4.8rem); }
.keep-line { white-space: nowrap; }
.prose-wide { max-width: 1040px; }

@media (min-width: 901px) {
  .page-hero .keep-line { font-size: clamp(2.7rem, 4.2vw, 4.35rem); }
  .prose-wide h2.keep-line { font-size: clamp(2rem, 3.2vw, 3rem); }
}

@media (max-width: 900px) {
  .keep-line { white-space: normal; }
  .visual-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); text-align: center; }
  .about-grid { grid-template-columns: 1fr; }
  .security-points { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .security-points { grid-template-columns: 1fr 1fr; }
}


/* V4 layout fixes */
html, body { max-width: 100%; overflow-x: hidden; }
.container, .about-grid, .about-panel, .split > *, .band > *, .visual-flow > * { min-width: 0; }
.about-panel h3 { white-space: normal; overflow-wrap: break-word; }
.quote-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.quote-card p { max-width: 28ch; margin-inline: auto; }
@media (min-width: 901px) {
  .split .quote-card { min-height: 190px; }
}

/* V5 responsive heading fixes */
/* Headings should never widen their grid column or the page. */
.keep-line {
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: normal;
  max-width: 100%;
}

/* Full-width page hero headings may stay on one line when there is truly room. */
@media (min-width: 1400px) {
  .page-hero h1.keep-line {
    white-space: nowrap;
    font-size: clamp(2.5rem, 3.6vw, 3.75rem);
  }
}

/* Two-column sections need their own width-safe heading scale. */
.split h2,
.band h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  text-wrap: balance;
  max-width: 100%;
}

.split > div,
.band > div {
  min-width: 0;
  max-width: 100%;
}

.split p,
.band p,
.about-panel p,
.page-hero p {
  overflow-wrap: break-word;
}

/* Prevent any decorative or content element from creating horizontal overflow. */
main, section, .page-hero, .section, .band, .split, .about-grid {
  max-width: 100%;
}

@media (max-width: 1399px) {
  .page-hero h1.keep-line {
    white-space: normal;
    text-wrap: balance;
  }
}
