:root {
  --ink: #102033;
  --ink-2: #263d55;
  --muted: #607489;
  --paper: #eef5fb;
  --paper-2: #dceaf6;
  --panel: #ffffff;
  --line: #cddce8;
  --green: #0f6fb3;
  --green-dark: #073e6b;
  --gold: #c88918;
  --rust: #2f6f9f;
  --blue: #0a5f9f;
  --focus: #0b74c9;
  --shadow: 0 18px 45px rgba(8, 39, 69, 0.13);
  --radius: 8px;
  --header-height: 76px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fbff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.narrow {
  width: min(780px, calc(100% - 32px));
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  background: rgba(248, 251, 255, 0.96);
  border-bottom: 1px solid rgba(205, 220, 232, 0.95);
  backdrop-filter: blur(16px);
}

.site-header[data-scrolled] {
  box-shadow: 0 10px 30px rgba(8, 39, 69, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  flex: 0 0 52px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(205, 220, 232, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(8, 39, 69, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: contain;
}

.site-header .brand-mark {
  width: 100px;
  height: 100px;
  flex-basis: 100px;
}

.brand-text {
  display: grid;
  min-width: 0;
}

.brand-name {
  color: var(--green-dark);
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.1;
}

.site-header .brand-name {
  font-size: 1.34rem;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.site-header .brand-tagline {
  max-width: 300px;
  white-space: normal;
}

.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--paper);
  color: var(--green-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(7px) rotate(90deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  opacity: 0;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(720px, calc(100vh - var(--header-height) - 80px));
  padding: 96px 0;
  isolation: isolate;
}

.hero-home {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 34, 61, 0.94) 0%, rgba(10, 75, 125, 0.84) 48%, rgba(13, 96, 157, 0.48) 100%),
    url("/img/hero-construction.svg") center / cover no-repeat;
}

.hero-content {
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 4.5vw, 4.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 700px;
  margin: 22px 0 0;
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button-secondary:hover {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.button-light {
  border-color: #fff;
  background: #fff;
  color: var(--green-dark);
}

.button-light:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--green-dark);
}

.button-muted {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button-muted:hover {
  border-color: var(--green);
  background: var(--paper);
  color: var(--green-dark);
}

.button-small {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.link-button {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.link-button:hover {
  color: var(--green);
}

.link-button.danger {
  color: #8a2424;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 800;
}

.text-link::after {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: width 160ms ease;
}

.text-link:hover::after {
  width: 28px;
}

.stats-band {
  background: #082745;
  color: #fff;
  padding: 28px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  padding: 14px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
}

.stat span {
  display: block;
  max-width: 220px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.section {
  padding: 88px 0;
}

.section-muted {
  background: var(--paper);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading h2,
.split-grid h2,
.prose h2,
.cta-inner h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.split-grid p,
.prose p,
.cta-inner p {
  color: var(--muted);
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.mini-card,
.fact-panel,
.contact-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(8, 39, 69, 0.08);
}

.card,
.mini-card {
  min-width: 0;
}

.service-card,
.news-card,
.mini-card {
  padding: 28px;
}

.card h3,
.mini-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.25;
}

.card p,
.mini-card p {
  color: var(--muted);
  font-size: 1rem;
}

.card p:last-child,
.mini-card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--green) 0 48%, transparent 48% 100%),
    linear-gradient(135deg, transparent 0 48%, var(--gold) 48% 100%),
    var(--paper);
}

.project-card {
  overflow: hidden;
}

.project-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.035);
}

.project-card-body {
  padding: 24px;
}

.meta-line {
  margin: 0 0 10px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.split-section {
  background:
    linear-gradient(90deg, #ffffff 0 50%, var(--paper) 50% 100%);
}

.split-grid,
.detail-grid,
.content-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.highlight-list {
  display: grid;
  gap: 14px;
}

.highlight-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.highlight-item span {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--green);
  position: relative;
}

.highlight-item span::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 6px;
  width: 13px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.highlight-item p {
  margin: 0;
}

.page-hero,
.detail-hero {
  padding: 86px 0;
  background:
    linear-gradient(90deg, rgba(5, 34, 61, 0.95), rgba(13, 86, 143, 0.88)),
    url("/img/section-texture.svg") center / cover no-repeat;
  color: #fff;
}

.page-hero-inner p,
.detail-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.detail-grid {
  align-items: center;
}

.detail-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-grid {
  grid-template-columns: 320px minmax(0, 1fr);
}

.fact-panel,
.contact-panel,
.contact-form {
  padding: 28px;
}

.fact-panel {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.fact-panel h2,
.contact-panel h2 {
  margin: 0 0 18px;
  font-size: 1.2rem;
}

.fact-panel dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.fact-panel dt,
.contact-panel strong {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-panel dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 36px;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
}

.prose p,
.split-grid p,
.content-grid p {
  font-size: 1.03rem;
}

.prose a:not(.button) {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check-list,
.plain-list {
  padding-left: 0;
  list-style: none;
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-list li,
.plain-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before,
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 12px;
  height: 2px;
  background: var(--green);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.cta-band {
  padding: 56px 0;
  color: #fff;
  background: linear-gradient(135deg, #073e6b, #0f6fb3);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-inner p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
}

.contact-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.contact-panel address {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  font-style: normal;
}

.contact-panel address strong:not(:first-child) {
  margin-top: 18px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5d1;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #a83232;
}

.field-error,
.form-error-summary {
  color: #8a2424;
}

.field-error {
  margin: 0;
  font-size: 0.92rem;
}

.form-error-summary,
.form-success {
  padding: 14px 16px;
  border-radius: var(--radius);
}

.form-error-summary {
  border: 1px solid #e4a3a3;
  background: #fff2f2;
}

.form-error-summary p {
  margin: 0;
}

.form-success {
  border: 1px solid #9cc9b1;
  background: #effaf3;
  color: var(--green-dark);
  font-weight: 800;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  background: #082745;
  color: rgba(255, 255, 255, 0.76);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.footer-logo .brand-mark {
  border-color: rgba(255, 255, 255, 0.2);
  background: #fff;
}

.footer-logo .brand-name {
  color: #fff;
}

.footer-logo .brand-tagline,
.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 0.98rem;
}

.footer-links {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.site-footer a:hover {
  color: #fff;
}

.site-footer address {
  font-style: normal;
}

.footer-bottom {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
}

.error-debug {
  max-width: 100%;
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.admin-page,
.admin-auth-page {
  background: var(--paper);
}

.admin-auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
}

.admin-auth-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-auth-brand {
  margin-bottom: 28px;
}

.admin-auth-brand .brand-mark {
  width: 80px;
  height: 80px;
  flex-basis: 80px;
}

.admin-auth-card h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.admin-auth-card > p {
  margin: 10px 0 24px;
  color: var(--muted);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.admin-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
}

.admin-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-nav a:hover,
.admin-nav a[aria-current="page"] {
  background: var(--paper);
  color: var(--green-dark);
}

.admin-logout {
  margin-left: auto;
}

.admin-main {
  padding: 36px 0 72px;
}

.admin-section {
  padding: 14px 0 48px;
}

.admin-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.admin-stat-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(23, 32, 38, 0.03);
}

.admin-stat-card {
  padding: 24px;
}

.admin-stat-card strong {
  display: block;
  color: var(--green-dark);
  font-size: 2.2rem;
  line-height: 1;
}

.admin-stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-panel {
  padding: 24px;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-panel-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-list small,
.admin-table small {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-message-cell {
  max-width: 360px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.admin-form.wide {
  max-width: 920px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 8px 0;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash-message {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-weight: 800;
}

.flash-success {
  border: 1px solid #9cc9b1;
  background: #effaf3;
  color: var(--green-dark);
}

.flash-error {
  border: 1px solid #e4a3a3;
  background: #fff2f2;
  color: #8a2424;
}

@media (max-width: 980px) {
  .card-grid.three,
  .card-grid.four,
  .stats-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid,
  .detail-grid,
  .content-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .admin-card-grid,
  .admin-two-column {
    grid-template-columns: 1fr;
  }

  .fact-panel {
    position: static;
  }
}

@media (max-width: 1160px) {
  .header-inner {
    gap: 16px;
  }

  .site-header .brand-tagline {
    display: none;
  }

  .primary-nav ul {
    gap: 4px;
  }

  .primary-nav a {
    padding: 0 9px;
    font-size: 0.88rem;
  }
}

@media (max-width: 860px) {
  .site-header .brand-mark,
  .brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .site-header .brand-name {
    font-size: 1.08rem;
  }

  .brand-tagline {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow: auto;
    padding: 18px 16px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .primary-nav[data-open] {
    display: block;
  }

  .primary-nav ul {
    display: grid;
    gap: 6px;
    width: min(520px, 100%);
    margin-inline: auto;
  }

  .primary-nav a {
    min-height: 48px;
    justify-content: space-between;
    padding: 0 14px;
  }

  .hero {
    min-height: 620px;
    padding: 76px 0;
  }

  .hero h1,
  .page-hero h1,
  .detail-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .row-heading,
  .cta-inner,
  .admin-title-row,
  .admin-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-nav {
    width: 100%;
  }

  .admin-logout {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .container,
  .narrow {
    width: min(100% - 24px, 1120px);
  }

  .section,
  .page-hero,
  .detail-hero {
    padding: 62px 0;
  }

  .hero {
    min-height: 560px;
  }

  .stats-grid,
  .card-grid.three,
  .card-grid.four,
  .footer-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .service-card,
  .news-card,
  .mini-card,
  .fact-panel,
  .contact-panel,
  .contact-form,
  .project-card-body {
    padding: 22px;
  }
}
