/* ============================================================
   MERGEN IMS — Website Styles
   Palette & typography derived from the source Word document:
     #1D1068  primary headings (deep indigo)
     #0E2841  accent / lead text (dark slate blue)
     #002060  secondary headings (navy)
     #0070C0  blue accent (tags / labels)
     #153D63  stage number cell fill (dark steel blue)
     #F2F2F2  light grey note box
     #DAE9F7  light blue note box
   Font sizes in the doc: 11pt body, 13pt sub, 18pt heading, 20pt title
   ============================================================ */

:root {
  --indigo: #1D1068;
  --navy: #002060;
  --slate: #0E2841;
  --blue: #0070C0;
  --steel: #153D63;
  --grey-box: #F2F2F2;
  --blue-box: #DAE9F7;
  --ink: #1c2230;
  --muted: #5a6478;
  --line: #d7dce8;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --radius: 10px;
  --shadow: 0 8px 26px rgba(14, 40, 65, 0.08);
  --shadow-sm: 0 3px 12px rgba(14, 40, 65, 0.06);
  --maxw: 1120px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header / Navigation ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--indigo);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.15rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo), var(--navy));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-text strong { color: var(--blue); }

.main-nav { display: flex; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 10px 13px;
  text-decoration: none;
  color: var(--slate);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}

.nav-link:hover,
.nav-link.active,
.nav-item:hover > .nav-link {
  background: var(--blue-box);
  color: var(--indigo);
}

.dropdown-toggle { display: none; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 270px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--slate);
  font-size: 0.88rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.dropdown li a:hover {
  background: var(--blue-box);
  color: var(--indigo);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 11px 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--indigo);
  border-radius: 2px;
}

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1100px 480px at 82% -12%, rgba(0, 112, 192, 0.28), transparent 62%),
    linear-gradient(158deg, var(--indigo) 0%, var(--navy) 58%, var(--slate) 100%);
  color: #fff;
  padding: 92px 0 84px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #9fc4ff;
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.1;
  margin: 0 0 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-lead {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 600;
  color: #dbe4ff;
  margin: 0 0 16px;
  max-width: 760px;
}

.hero-text {
  font-size: 1.05rem;
  color: #c3cdea;
  max-width: 760px;
  margin: 0;
}

/* ---------------- Sections ---------------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--indigo);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: 0.3px;
}

.section-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 18px;
}

.sub-title {
  font-size: 1.15rem;
  color: var(--navy);
  font-weight: 700;
  margin: 34px 0 12px;
  letter-spacing: 0.3px;
}

.section p { color: var(--ink); }

/* ---------------- Note boxes (Word: F2F2F2 / DAE9F7) ---------------- */
.note-box {
  margin: 30px 0 0;
  padding: 20px 24px;
  background: var(--grey-box);
  border-left: 5px solid var(--steel);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  color: var(--slate);
}

.note-box-blue {
  background: var(--blue-box);
  border-left-color: var(--blue);
  color: var(--indigo);
}

.note-box.mini { margin-top: 16px; font-size: 0.9rem; padding: 14px 18px; }

/* ---------------- Stage table (Word tables 0-10) ---------------- */
.stage-table {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stage-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.stage-row:last-child { border-bottom: none; }

.stage-cell-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 0;
  background: var(--steel);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1px;
}

.stage-cell-body { padding: 20px 24px; }

.stage-title {
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.3px;
}

.stage-cell-body p { font-size: 0.95rem; margin: 0 0 10px; }

.stage-tags {
  font-size: 0.82rem !important;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.4px;
  margin: 0 !important;
}

/* ---------------- Capacity table (Word table 12) ---------------- */
.capacity-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.capacity-cell {
  padding: 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.capacity-cell:nth-child(3n) { border-right: none; }
.capacity-cell:nth-last-child(-n+3) { border-bottom: none; }

.capacity-cell h4 {
  margin: 0 0 8px;
  color: var(--indigo);
  font-size: 0.92rem;
  letter-spacing: 0.5px;
}

.capacity-cell p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ---------------- Flow table (Word tables 14,16,20,23,24,26,29) ---------------- */
.flow-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.flow-table-4 { grid-template-columns: repeat(4, 1fr); }
.flow-table-5 { grid-template-columns: repeat(5, 1fr); }
.flow-table-6 { grid-template-columns: repeat(6, 1fr); }
.flow-table-7 { grid-template-columns: repeat(7, 1fr); }

.flow-col {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.flow-col:last-child { border-right: none; }

.flow-head {
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  padding: 14px 12px;
  text-align: center;
}

.flow-body {
  padding: 16px 14px;
  font-size: 0.85rem;
  color: var(--slate);
  flex: 1;
}

.flow-table-5 .flow-body,
.flow-table-6 .flow-body,
.flow-table-7 .flow-body {
  text-align: center;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Two / three column boxes ---------------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.col-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.col-box h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.col-box p { font-size: 0.94rem; margin: 0 0 12px; }
.col-box p:last-child { margin-bottom: 0; }

.tags {
  font-size: 0.78rem !important;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.4px;
}

/* ---------------- Value table (Word tables 32,33) ---------------- */
.value-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.value-cell {
  padding: 20px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-cell:nth-child(5n) { border-right: none; }
.value-cell:nth-last-child(-n+5) { border-bottom: none; }

.value-cell h4 {
  margin: 0 0 10px;
  color: var(--indigo);
  font-size: 0.88rem;
  letter-spacing: 0.2px;
}

.value-cell p { margin: 0; font-size: 0.82rem; color: var(--muted); }

/* ---------------- Data table (Word table 30) ---------------- */
.table-wrap { overflow-x: auto; margin-top: 30px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
}

.data-table thead th {
  background: var(--indigo);
  color: #fff;
  text-align: left;
  padding: 16px 18px;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:first-child { font-weight: 600; color: var(--navy); width: 38%; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--slate);
  color: #c3cdea;
  padding: 48px 0;
  text-align: center;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: 1px;
}

.footer-brand strong { color: #9fc4ff; }

.footer-tag { margin: 0 0 10px; color: #9fc4ff; font-weight: 600; }
.footer-note { margin: 0; font-size: 0.85rem; color: #7f8db0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open { max-height: 80vh; overflow-y: auto; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 20px;
  }

  .nav-item { border-bottom: 1px solid var(--line); }

  .nav-link { padding: 14px 6px; }

  .dropdown-toggle {
    display: block;
    position: absolute;
    right: 6px;
    top: 8px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .dropdown-toggle::after {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: 0 auto;
    border-right: 2px solid var(--indigo);
    border-bottom: 2px solid var(--indigo);
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .nav-item.open .dropdown-toggle::after { transform: rotate(-135deg); }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 0 0 12px;
    transition: max-height 0.25s ease;
  }

  .nav-item.open > .dropdown { max-height: 400px; padding-bottom: 10px; }

  .capacity-table { grid-template-columns: repeat(2, 1fr); }
  .capacity-cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .capacity-cell:nth-child(2n) { border-right: none; }
  .capacity-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .capacity-cell:nth-last-child(-n+2) { border-bottom: none; }

  .flow-table,
  .flow-table-4,
  .flow-table-5,
  .flow-table-6,
  .flow-table-7 { grid-template-columns: repeat(2, 1fr); }

  .flow-col { border-bottom: 1px solid var(--line); }
  .flow-col:nth-child(2n) { border-right: none; }

  .value-table { grid-template-columns: repeat(2, 1fr); }
  .value-cell:nth-child(5n) { border-right: 1px solid var(--line); }
  .value-cell:nth-child(2n) { border-right: none; }
  .value-cell:nth-last-child(-n+5) { border-bottom: 1px solid var(--line); }
  .value-cell:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .hero { padding: 68px 0 60px; }
  .stage-row { grid-template-columns: 60px 1fr; }
  .stage-cell-num { font-size: 1rem; }
  .capacity-table,
  .flow-table,
  .flow-table-4,
  .flow-table-5,
  .flow-table-6,
  .flow-table-7,
  .value-table { grid-template-columns: 1fr; }
  .capacity-cell,
  .flow-col,
  .value-cell { border-right: none !important; }
}
