:root {
  --navy: #0f2742;
  --navy-2: #173a61;
  --accent: #1f8ceb;
  --accent-dark: #146fc0;
  --text: #1d2733;
  --muted: #5b6878;
  --bg-alt: #f3f6fa;
  --brand: #e86b61;
  --brand-dark: #b8433a;
  --rule: #d8dfe7;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 39, 66, 0.1);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.25; color: var(--navy); }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; max-width: min(260px, 70vw); object-fit: contain; }

.site-nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 0.5rem 0.75rem; border-radius: 6px;
  color: #d5e2f0; text-decoration: none; font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a.active { color: #fff; background: var(--navy-2); }

.site-nav li { position: relative; }
.has-children > a::after { content: ""; display: inline-block; margin-left: 0.4rem; border: 4px solid transparent; border-top-color: currentColor; vertical-align: 0.1em; }
.site-nav .submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
  flex-direction: column; gap: 0; padding: 0.4rem; border-radius: 8px;
  background: var(--navy); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.has-children:hover > .submenu, .has-children:focus-within > .submenu { display: flex; }

.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #fff; transition: transform 0.2s, opacity 0.2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy); max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: calc(100vh - 72px); overflow-y: auto; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; }
  .site-nav .submenu { display: flex; position: static; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
  .has-children > a::after { display: none; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1d5a94 100%);
  color: #fff;
  padding: 6rem 0 5rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 0.25rem 0 1rem; max-width: 18ch; }
.hero .lead { color: #d5e2f0; max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; color: #8cc4f5; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.page-hero { background: var(--navy); padding: 3rem 0; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }

.lead { font-size: 1.15rem; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-light { background: #fff; color: var(--navy); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Sections */
.section { padding: 4rem 0; }
.section-title { text-align: center; font-size: 2rem; margin: 0 0 2.5rem; }
.content { max-width: 820px; }

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem;
  margin-bottom: 2.25rem;
}
.section-head .section-title { margin: 0; text-align: left; }
.section-head a { font-weight: 600; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

/* Cards: open, ruled entries rather than floating boxes */
.card-grid {
  display: grid; column-gap: 2.5rem; row-gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: card;
}
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 2rem; margin: 1.5rem 0; }
.card {
  position: relative; display: block; padding: 1.4rem 0 1.5rem;
  border-top: 1px solid var(--rule); color: var(--text); text-decoration: none; counter-increment: card;
}
.card::before {
  content: counter(card, decimal-leading-zero);
  display: block; margin-bottom: 0.6rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.card::after {
  content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0;
  background: var(--navy); transition: width 0.35s ease;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
a.card h3::after {
  content: "\2192"; display: inline-block; margin-left: 0.4rem;
  color: var(--brand-dark); transition: transform 0.2s ease;
}
a.card:hover::after, a.card:focus-visible::after { width: 100%; }
a.card:hover h3, a.card:focus-visible h3 { color: var(--accent-dark); }
a.card:hover h3::after, a.card:focus-visible h3::after { transform: translateX(4px); }
a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .card::after, a.card h3::after { transition: none; } }

.page-section { margin-top: 3rem; }
.page-section h2 { margin-bottom: 1rem; }

.check-list {
  list-style: none; padding: 0; margin: 1.25rem 0; display: grid; column-gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.check-list li { padding: 0.7rem 0 0.7rem 1.5rem; border-top: 1px solid var(--rule); position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 1.35rem;
  width: 0.6rem; height: 2px; background: var(--brand);
}

.callout {
  margin-top: 2.5rem; padding: 1.75rem; border-radius: var(--radius); background: var(--bg-alt);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.callout p { margin: 0; font-weight: 600; }

.cta-band { background: var(--accent); color: #fff; padding: 2.5rem 0; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cta-inner p { margin: 0; font-size: 1.2rem; font-weight: 600; }

.profile-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.profile-grid > div { background: var(--bg-alt); padding: 1.25rem 1.5rem; border-radius: var(--radius); }
.profile-grid h3 { margin-top: 0; }
.profile-grid p { margin: 0.35rem 0; }

/* Contact */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1.3fr; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { font-style: normal; background: var(--bg-alt); padding: 1.5rem; border-radius: var(--radius); line-height: 1.9; }

.contact-form { display: grid; gap: 1rem; background: #fff; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form label { display: grid; gap: 0.35rem; font-weight: 600; }
.contact-form small { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; padding: 0.7rem 0.85rem; border: 1px solid #cfd8e3; border-radius: 8px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.contact-form .invalid { border-color: #c62828; }
.field-error { color: #c62828; font-weight: 400; font-size: 0.9rem; min-height: 0; }
.form-status:empty { display: none; }
.form-status { padding: 0.8rem 1rem; border-radius: 8px; background: #fdecea; color: #8e1c1c; }
.form-status.success { background: #e7f6ec; color: #1e6b37; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--navy); color: #c3d2e2; padding: 3rem 0 1.5rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-top: 0; }
.site-footer a { color: #c3d2e2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer address { font-style: normal; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.9rem; }

/* Scroll reveal (only hides content once JS is running) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
