:root {
  --red: #e31b2f;
  --ink: #111318;
  --line: #e5e7eb;
  --white: #ffffff;
  --blue: #2870c7;
}

@media (max-width: 760px) {
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #080a0e;
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.86), rgba(7, 9, 13, 0));
}

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

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,
.nav button:hover {
  color: var(--white);
}

.nav button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  display: grid;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 15, 20, 0.96);
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.dropdown-menu a {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-menu.empty {
  min-height: 40px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.structure-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(92vh, 860px);
  padding: clamp(112px, 12vw, 158px) clamp(18px, 6vw, 88px) clamp(64px, 8vw, 112px);
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.94) 0%, rgba(5, 7, 10, 0.68) 47%, rgba(5, 7, 10, 0.2) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.1), rgba(5, 7, 10, 0.32)),
    url("7dd593ed-5473-434e-8527-a3331d864cab.jpeg") left center / 122% auto no-repeat,
    #080a0e;
}

.structure-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.78) 58%, transparent 100%);
  pointer-events: none;
}

.structure-hero::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
  background: var(--red);
  content: "";
}

.structure-copy {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.structure-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 0.98;
}

.structure-copy p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 19px;
  line-height: 1.65;
}

.structure-diagram {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 6vw, 88px) clamp(82px, 10vw, 132px);
  background: #f7f7f5;
}

.diagram-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto clamp(42px, 5vw, 68px);
}

.diagram-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.diagram-heading > p {
  max-width: 260px;
  margin: 0 0 8px;
  padding-left: 0;
  border-left: 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
}

.structure-image {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 1240px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #d6dae1;
  background: #ffffff;
}

.structure-map {
  display: none;
}

.structure-core {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 84px;
  padding: 16px 20px;
  border: 2px solid #d62032;
  color: var(--ink);
  background: #fff8f9;
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 700;
  line-height: 1.16;
  text-align: center;
}

.chart-rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 58px;
  min-width: 0;
}

.chart-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px repeat(5, minmax(110px, 1fr));
  gap: 16px;
  min-width: 0;
}

.chart-row.operations {
  grid-template-columns: 34px repeat(4, minmax(120px, 1fr));
}

.row-connector {
  position: relative;
  align-self: center;
  height: 1px;
  background: #46515b;
}

.row-connector::after {
  position: absolute;
  top: -4px;
  right: -1px;
  width: 0;
  height: 0;
  content: "";
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #46515b;
}

.structure-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #b8c0ca;
  color: var(--ink);
  background: #ffffff;
  font-size: clamp(14px, 1vw, 15.5px);
  font-weight: 600;
  line-height: 1.28;
  text-align: center;
  overflow-wrap: anywhere;
}

.structure-node.lead {
  border-color: #8994a1;
  background: #f5f6f8;
  font-weight: 700;
}

.structure-node.side {
  background: #fafafa;
}

.structure-node.wide {
  min-width: 0;
}

.structure-node.accent {
  border-color: #d62032;
}

.footer {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 6vw, 88px) 36px;
  color: rgba(255, 255, 255, 0.7);
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(227, 27, 47, 0.08), rgba(7, 9, 13, 0) 34%),
    linear-gradient(180deg, #11151d 0%, #07090d 74%),
    #07090d;
}

.footer::before {
  position: absolute;
  top: 0;
  left: clamp(18px, 6vw, 88px);
  width: 72px;
  height: 3px;
  content: "";
  background: var(--red);
}

.footer strong,
.footer span {
  display: block;
}

.footer strong {
  color: var(--white);
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-bottom: 2px solid rgba(227, 27, 47, 0.65);
  color: rgba(255, 255, 255, 0.88);
  transition: border-color 160ms ease, color 160ms ease;
}

.footer-links a:hover {
  color: var(--white);
  border-color: var(--red);
}

@media (max-width: 920px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    display: none;
  }

  .structure-hero {
    background-position: 64% center;
  }

  .diagram-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .diagram-heading > p {
    max-width: 520px;
    margin-bottom: 0;
    text-align: left;
  }

  .structure-map {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .structure-core {
    min-height: 96px;
  }

  .chart-rows {
    gap: 22px;
  }

  .chart-row,
  .chart-row.operations {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .row-connector {
    display: none;
  }
}

@media (max-width: 560px) {
  .structure-copy h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .diagram-heading h2 {
    font-size: clamp(40px, 15vw, 64px);
  }

  .structure-map {
    gap: 14px;
    padding: 16px;
  }

  .structure-core {
    min-height: 76px;
    padding: 16px;
  }

  .chart-row,
  .chart-row.operations {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .structure-node {
    min-height: 54px;
  }
}

@media (max-width: 760px) {
  .structure-hero {
    background-size: auto, auto, 126% auto, auto;
    background-position: center, center, left center, center;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
