:root {
  --red: #c4000b;
  --red-dark: #970008;
  --red-soft: #fff0f1;
  --ink: #242424;
  --muted: #686868;
  --line: #e7e7e7;
  --panel: #ffffff;
  --bg: #fbfbfb;
  --shadow: 0 16px 36px rgba(28, 28, 28, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

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

.page-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 455px;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 18px;
  color: #b40009;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
  font-weight: 800;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #444;
  font-size: 16px;
  line-height: 1.65;
}

.hero-art {
  position: relative;
  min-height: 188px;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 310px;
  height: 155px;
  background-image: radial-gradient(#d8d8d8 1px, transparent 1px);
  background-size: 11px 11px;
  opacity: 0.7;
}

.laptop {
  position: absolute;
  right: 76px;
  bottom: 18px;
  width: 230px;
  height: 132px;
  border: 7px solid #bd1018;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(145deg, #fff, #ffe6e7);
  box-shadow: 0 16px 20px rgba(160, 0, 10, 0.18);
}

.laptop::after {
  content: "";
  position: absolute;
  left: -28px;
  right: -28px;
  bottom: -22px;
  height: 20px;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #cc2b33, #a40009);
  transform: skewX(-18deg);
}

.laptop-top {
  height: 15px;
  border-bottom: 2px solid #e6a7aa;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 8px;
}

.laptop-top span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.screen-layout {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 10px;
}

.panel-lines {
  display: grid;
  gap: 10px;
}

.panel-lines i {
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #d10a14 0 25%, #ffd4d6 25% 100%);
}

.mini-map {
  position: relative;
  min-height: 75px;
  border-radius: 50%;
  border: 2px solid #f2b6b9;
}

.mini-map b {
  position: absolute;
  background: #d11019;
  clip-path: polygon(22% 6%, 90% 20%, 76% 76%, 32% 95%, 5% 45%);
}

.mini-map b:nth-child(1) { width: 35px; height: 42px; left: 28px; top: 14px; }
.mini-map b:nth-child(2) { width: 22px; height: 26px; left: 62px; top: 34px; opacity: 0.62; }
.mini-map b:nth-child(3) { width: 18px; height: 22px; left: 15px; top: 46px; opacity: 0.4; }
.mini-map b:nth-child(4) { width: 12px; height: 12px; left: 88px; top: 18px; border-radius: 50%; }

.layers {
  position: absolute;
  left: 56px;
  top: 24px;
  width: 112px;
  height: 114px;
}

.layers i {
  position: absolute;
  width: 92px;
  height: 46px;
  transform: rotate(45deg) skew(-12deg, -12deg);
  background: linear-gradient(135deg, #e54850, #9e0008);
  box-shadow: 0 8px 12px rgba(160, 0, 10, 0.16);
}

.layers i:nth-child(1) { left: 0; top: 0; opacity: 0.86; }
.layers i:nth-child(2) { left: 4px; top: 36px; opacity: 0.72; }
.layers i:nth-child(3) { left: 9px; top: 72px; opacity: 0.58; }

.database {
  position: absolute;
  right: 24px;
  bottom: 10px;
  width: 82px;
  height: 94px;
  border-radius: 50% / 16%;
  background: #c4000b;
  border: 3px solid #fff;
  box-shadow: 0 14px 18px rgba(120, 0, 7, 0.18);
}

.database i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 28px;
  border: 3px solid #fff;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 50%;
}

.database i:nth-child(1) { top: 18px; }
.database i:nth-child(2) { top: 44px; }
.database i:nth-child(3) { top: 70px; }

.gear {
  position: absolute;
  right: 4px;
  top: 32px;
  width: 92px;
  height: 92px;
  background: #e7b2b6;
  clip-path: polygon(44% 0, 56% 0, 62% 18%, 74% 23%, 91% 14%, 100% 25%, 90% 42%, 93% 56%, 100% 72%, 90% 85%, 72% 77%, 60% 83%, 55% 100%, 42% 100%, 36% 82%, 24% 76%, 8% 86%, 0 74%, 9% 56%, 7% 43%, 0 27%, 10% 14%, 27% 23%, 38% 18%);
  opacity: 0.8;
}

.gear::after {
  content: "";
  position: absolute;
  inset: 29px;
  border-radius: 50%;
  background: var(--bg);
}

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

.plugin-card,
.install-card,
.demo-card,
.value-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.plugin-card {
  display: flex;
  flex-direction: column;
  min-height: 535px;
  padding: 22px 20px 20px;
}

.plugin-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.plugin-heading h2 {
  margin: 0 0 5px;
  color: #b00009;
  font-size: 19px;
  line-height: 1.2;
}

.plugin-heading p,
.plugin-desc,
.install-card p,
.demo-header p {
  margin: 0;
  color: #525252;
  line-height: 1.55;
}

.plugin-heading p {
  font-size: 13px;
}

.plugin-icon {
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--red);
  position: relative;
}

.category-database-icon::before,
.category-database-icon::after {
  content: "";
  position: absolute;
  left: 19px;
  width: 28px;
  height: 13px;
  border: 6px solid #fff;
  border-top-width: 5px;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.category-database-icon::before { top: 18px; }
.category-database-icon::after { top: 33px; box-shadow: 0 11px 0 -5px #fff; }

.category-vector-icon::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 17px;
  width: 36px;
  height: 31px;
  background: #fff;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.category-vector-icon::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 25px;
  width: 16px;
  height: 14px;
  background: var(--red);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.category-analysis-icon::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 17px;
  width: 36px;
  height: 30px;
  border: 5px solid #fff;
  border-radius: 50%;
}

.category-analysis-icon::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 24px;
  width: 8px;
  height: 22px;
  background: #fff;
  box-shadow: -10px 10px 0 -2px #fff, 10px -7px 0 -2px #fff;
  transform: rotate(45deg);
}

.category-geoprocessing-icon::before {
  content: "";
  position: absolute;
  inset: 14px;
  background:
    linear-gradient(#fff 0 0) 8px 10px / 23px 4px no-repeat,
    linear-gradient(#fff 0 0) 18px 13px / 4px 17px no-repeat,
    linear-gradient(45deg, transparent 45%, #fff 46% 54%, transparent 55%) 8px 15px / 24px 17px no-repeat,
    radial-gradient(circle at 8px 10px, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 31px 10px, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 20px 31px, #fff 0 7px, transparent 8px);
}

.plugin-desc {
  margin-top: 24px;
  font-size: 14px;
}

.feature-list {
  display: grid;
  gap: 14px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.35;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  font-weight: 800;
}

.meta-list {
  margin: auto 0 18px;
  padding-top: 20px;
  border-top: 1px solid #eeeeee;
}

.meta-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 13px;
  font-size: 13px;
}

.meta-list dt {
  color: #4d4d4d;
  position: relative;
  padding-left: 26px;
}

.meta-list dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #b00009;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

.meta-document dt::before {
  left: 1px;
  border: 2px solid #b00009;
  border-radius: 3px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(135deg, transparent 0 46%, #b00009 47% 54%, transparent 55%) 8px 0 / 8px 8px no-repeat;
  clip-path: polygon(0 0, 64% 0, 100% 36%, 100% 100%, 0 100%);
}

.meta-category dt::before { content: "▦"; }
.meta-version dt::before { content: "◆"; font-size: 12px; }
.meta-qgis dt::before { content: "⌕"; font-size: 15px; }

.meta-list dd {
  margin: 0;
  color: #1f1f1f;
  font-weight: 500;
}

.meta-list dd a {
  color: #b00009;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.download-btn,
.run-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  transition: transform 160ms ease, background 160ms ease;
}

.download-btn:hover,
.run-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.download-btn svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.install-card {
  padding: 20px 20px 24px;
}

.install-card h2,
.demo-header h2 {
  margin: 0 0 8px;
  color: #a90008;
  font-size: 24px;
  line-height: 1.15;
}

.install-card h2 {
  display: flex;
  gap: 10px;
  align-items: center;
}

.install-card h2 span {
  color: var(--red);
}

.install-card ol {
  counter-reset: steps;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
}

.install-card li {
  counter-increment: steps;
  position: relative;
  padding: 38px 20px 0 0;
}

.install-card li::before {
  content: counter(steps);
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  text-align: center;
  line-height: 22px;
  font-weight: 800;
  font-size: 12px;
}

.install-card li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 34px;
  right: 0;
  height: 1px;
  background: #e7b8bb;
}

.support {
  margin-top: auto;
  font-size: 14px;
}

.support a {
  color: #b00009;
  font-weight: 700;
}

.demo-card {
  padding: 20px 20px 16px;
}

.demo-header h2 span {
  display: inline-block;
  vertical-align: middle;
  padding: 3px 8px;
  border-radius: 99px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 7px 7px 0 0;
  overflow: hidden;
}

.tab {
  border: 0;
  border-right: 1px solid #d9d9d9;
  background: #fff;
  color: #444;
  min-height: 40px;
  cursor: pointer;
}

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

.tab.is-active {
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.demo-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
}

.demo-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}

.demo-controls label {
  display: grid;
  gap: 7px;
  color: #383838;
  font-size: 12px;
  font-weight: 700;
}

.demo-controls select {
  width: 100%;
  min-height: 37px;
  border: 1px solid #dadada;
  border-radius: 6px;
  color: #595959;
  background: #fff;
  padding: 0 11px;
}

.demo-controls input[type="range"] {
  width: 100%;
  accent-color: var(--red);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: -12px;
  color: #4d4d4d;
  font-size: 12px;
}

.run-btn {
  width: 100%;
  margin-top: 6px;
}

.map-panel {
  position: relative;
  min-height: 305px;
  overflow: hidden;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  background: #d8ecf5;
}

.map-panel::before {
  content: none;
}

.ol-map {
  position: absolute;
  inset: 0;
}

.ol-map .ol-viewport,
.ol-map canvas {
  border-radius: 7px;
}

.map-toolbar {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: grid;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.map-toolbar button {
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  color: #343434;
  font-weight: 800;
  cursor: pointer;
}

.map-toolbar button:last-child {
  border-bottom: 0;
}

.country-shape {
  position: absolute;
  left: 56px;
  right: 64px;
  top: 74px;
  height: 116px;
  clip-path: polygon(0 45%, 8% 28%, 18% 34%, 28% 20%, 40% 36%, 54% 18%, 66% 30%, 76% 20%, 88% 36%, 100% 48%, 92% 61%, 76% 63%, 62% 79%, 47% 66%, 34% 83%, 19% 68%, 8% 72%);
  background:
    radial-gradient(circle at 72% 45%, #b9000a 0 8px, transparent 9px),
    radial-gradient(circle at 53% 61%, #c8000b 0 7px, transparent 8px),
    radial-gradient(circle at 58% 72%, #e1525a 0 9px, transparent 10px),
    radial-gradient(circle at 83% 52%, #ee747a 0 6px, transparent 7px),
    repeating-radial-gradient(circle at 10px 10px, rgba(199, 0, 11, 0.24) 0 3px, transparent 4px 13px),
    linear-gradient(90deg, rgba(255, 182, 185, 0.76), rgba(250, 205, 200, 0.72));
  border: 1px solid rgba(172, 0, 8, 0.26);
}

.country-shape::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg, transparent 0 44%, rgba(175, 0, 8, 0.34) 44% 46%, transparent 46% 100%),
    linear-gradient(150deg, transparent 0 44%, rgba(175, 0, 8, 0.28) 44% 46%, transparent 46% 100%),
    linear-gradient(90deg, transparent 0 48%, rgba(175, 0, 8, 0.16) 48% 51%, transparent 51% 100%);
  background-size: 21px 18px;
}

.sea,
.neighbor {
  position: absolute;
  z-index: 2;
  color: #3d3d3d;
  font-size: 13px;
}

.black { top: 38px; left: 47%; font-style: italic; }
.med { bottom: 48px; left: 11%; font-style: italic; text-align: center; }
.georgia { top: 50px; right: 22px; }
.armenia { top: 106px; right: 22px; }
.iran { top: 155px; right: 16px; }
.syria { bottom: 58px; right: 160px; }

.legend {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 5px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 5px;
  font-size: 11px;
}

.legend strong {
  font-size: 12px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.c1 { background: #ffe4e3; }
.c2 { background: #f9b9b7; }
.c3 { background: #ee7677; }
.c4 { background: #d92832; }
.c5 { background: #a80008; }

.result-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #ececec;
  color: #505050;
  font-size: 14px;
}

.result-bar strong {
  width: 100%;
  color: #a90008;
}

.result-bar span + span {
  padding-left: 20px;
  border-left: 1px solid #cfcfcf;
}

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

.value-strip article {
  display: flex;
  gap: 16px;
  min-height: 98px;
  padding: 22px 20px;
  border-right: 1px solid #ececec;
}

.value-strip article:last-child {
  border-right: 0;
}

.value-strip h3 {
  margin: 0 0 7px;
  color: #a90008;
  font-size: 17px;
}

.value-strip p {
  margin: 0;
  color: #525252;
  font-size: 13px;
  line-height: 1.45;
}

.value-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 2px solid #c30a14;
  border-radius: 50%;
  position: relative;
}

.network::before {
  content: "";
  position: absolute;
  inset: 10px;
  background:
    radial-gradient(circle at 5px 5px, #c30a14 0 4px, transparent 5px),
    radial-gradient(circle at 27px 12px, #c30a14 0 4px, transparent 5px),
    radial-gradient(circle at 12px 28px, #c30a14 0 4px, transparent 5px);
  border-top: 2px solid #c30a14;
  border-right: 2px solid #c30a14;
  transform: rotate(18deg);
}

.standard::before,
.update::before,
.secure::before {
  content: "◎";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c30a14;
  font-weight: 800;
  font-size: 25px;
}

.update::before { content: "⚙"; font-size: 23px; }
.secure::before { content: "✓"; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: 7px;
  background: #252525;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    width: min(100%, 500px);
    margin: 0 auto;
  }

  .plugin-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

  .plugin-card {
    min-height: auto;
  }

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

  .value-strip article:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 28px, 1160px);
    padding-top: 12px;
  }

  .hero-art {
    min-height: 155px;
    transform: scale(0.82);
    transform-origin: center top;
    margin-bottom: -28px;
  }

  .plugin-heading {
    align-items: flex-start;
  }

  .content-grid {
    margin-top: 14px;
  }

  .install-card ol {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .install-card li {
    padding: 0 0 0 38px;
  }

  .install-card li:not(:last-child)::after {
    display: none;
  }

  .demo-workspace {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .tab {
    border-right: 0;
    border-bottom: 1px solid #d9d9d9;
  }

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

  .map-panel {
    min-height: 270px;
  }

  .country-shape {
    left: 38px;
    right: 38px;
    top: 82px;
  }

  .legend {
    right: 9px;
    bottom: 10px;
  }

  .value-strip {
    grid-template-columns: 1fr;
  }

  .value-strip article,
  .value-strip article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #ececec;
  }

  .value-strip article:last-child {
    border-bottom: 0;
  }

  .result-bar span + span {
    padding-left: 0;
    border-left: 0;
  }
}
