:root {
  --navy: #061b33;
  --navy-2: #0b2d4d;
  --blue: #155e96;
  --cyan: #23a6d5;
  --mint: #5fd6b2;
  --paper: #f7fbff;
  --line: #dce8f2;
  --text: #132233;
  --muted: #5b6b7d;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(6, 27, 51, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(247, 251, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a,
.admin-nav a,
.admin-nav button {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.main-nav a:hover,
.admin-nav a:hover,
.admin-nav button:hover {
  background: #e8f2fa;
}

.admin-nav form,
.admin-nav button {
  width: 100%;
}

.admin-nav button {
  justify-content: flex-start;
  min-height: 0;
  background: transparent;
}

.nav-cta,
.button.primary {
  color: var(--white) !important;
  background: var(--blue);
}

.nav-toggle {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 72px) 36px;
  background:
    radial-gradient(circle at 88% 8%, rgba(35, 166, 213, 0.18), transparent 28%),
    linear-gradient(160deg, #f7fbff 0%, #edf7ff 54%, #ffffff 100%);
}

.hero h1,
.page-hero h1 {
  margin: 10px 0 18px;
  color: var(--navy);
  font-size: clamp(2.25rem, 5vw, 5.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p,
.page-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.admin-card-heading,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  color: var(--navy);
  background: #e6f2fb;
}

.carousel {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--navy);
}

.carousel-track,
.carousel-slide {
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  opacity: 0;
  transition: opacity 400ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(6, 27, 51, 0.88));
}

.carousel-slide div {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 32px;
  color: var(--white);
}

.carousel-slide h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.carousel-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  width: 44px;
  padding: 0;
  color: var(--navy);
  background: var(--white);
  font-size: 1.5rem;
}

.impact-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.impact-band div {
  padding: 26px clamp(18px, 4vw, 44px);
  background: var(--white);
}

.impact-band strong {
  display: block;
  color: var(--navy);
  font-size: 2rem;
}

.impact-band span {
  color: var(--muted);
}

.section-grid,
.content-strip,
.article-layout,
.contact-grid,
.post-view,
.page-hero {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 42px;
}

.section-heading h2,
.admin-title h1 {
  margin: 8px 0 12px;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.08;
}

.feature-grid,
.cards,
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid article,
.card,
.contact-card,
.side-panel,
.admin-card,
.admin-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(6, 27, 51, 0.06);
}

.feature-grid article,
.card,
.contact-card,
.side-panel,
.admin-card,
.admin-metrics article {
  padding: 24px;
}

.card time,
.post-view time {
  color: var(--blue);
  font-weight: 800;
  font-size: 0.86rem;
}

.card h3 {
  margin: 8px 0;
  color: var(--navy);
  font-size: 1.22rem;
}

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

.card a,
.back-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.muted {
  background: #edf7ff;
}

.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.page-hero {
  background: linear-gradient(135deg, #ffffff, #eaf6ff);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.prose,
.post-view {
  max-width: 860px;
  font-size: 1.08rem;
}

.prose h2 {
  color: var(--navy);
  margin-top: 32px;
}

.side-panel {
  align-self: start;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #c7d8e6;
  border-radius: 8px;
  color: var(--text);
  background: #fbfdff;
  font: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

textarea.large {
  min-height: 320px;
}

.form-note,
.empty-state {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 72px);
  color: #dcecff;
  background: var(--navy);
}

.site-footer a {
  color: var(--mint);
  font-weight: 800;
}

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

.admin-body {
  background: #eef5fb;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  padding: 22px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.admin-nav {
  align-items: stretch;
  flex-direction: column;
  margin-top: 30px;
}

.admin-content {
  padding: clamp(22px, 4vw, 52px);
}

.admin-title {
  margin-bottom: 24px;
}

.admin-metrics {
  margin-bottom: 22px;
}

.admin-metrics strong {
  display: block;
  color: var(--navy);
  font-size: 2.2rem;
}

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

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

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--navy);
}

.actions form {
  display: inline;
}

.actions button {
  min-height: 0;
  padding: 0;
  color: #a62626;
  background: transparent;
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 800;
}

.alert.error {
  color: #8f1d1d;
  background: #ffe9e9;
}

.alert.success {
  color: #135c3d;
  background: #e6f8ef;
}

.login-card {
  max-width: 440px;
}

.carousel-fieldset {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-preview {
  display: block;
  margin-bottom: 8px;
}

.image-preview img {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.admin-form small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: #667;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

@media (max-width: 980px) {
  .hero,
  .section-grid,
  .article-layout,
  .contact-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .carousel {
    min-height: 340px;
  }

  .impact-band,
  .feature-grid,
  .cards,
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
    color: var(--navy);
    background: #e8f2fa;
  }

  .main-nav {
    position: absolute;
    top: 78px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .impact-band,
  .feature-grid,
  .cards,
  .admin-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
