:root {
  --bg: #F4F8FB;
  --surface: #FFFFFF;
  --surface-soft: #E8F2F5;
  --ink: #172B4D;
  --muted: #5F7180;
  --brand: #176B87;
  --brand-dark: #12556B;
  --accent: #8EBBC8;
  --line: #D5E2E8;
  --focus: rgba(23, 107, 135, 0.2);
  --radius: 10px;
  --container: 1060px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

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

.nav-bar {
  display: flex;
  justify-content: center;
  min-height: 38px;
  padding-top: 18px;
}

.pagination {
  display: flex;
  gap: 7px;
}

.dot {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: #B9CCD5;
  cursor: pointer;
}

.dot.active {
  background: var(--brand);
}

.slider {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.slide {
  display: none;
  min-height: 72vh;
  padding-bottom: 32px;
}

.slide.active {
  display: block;
}

.hero {
  padding-top: 10px;
}

.hero-card {
  display: grid;
  grid-template-areas:
    "visual"
    "content";
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 43, 77, 0.06);
}

.hero__content {
  grid-area: content;
  min-width: 0;
  padding: 30px;
}

.hero__kicker {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero__title {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.hero__subtitle {
  max-width: 440px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
}

.hero__image {
  grid-area: visual;
  min-height: 160px;
  background-image: url("./images/banner.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.links,
.link-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.link-card,
.link-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
  text-decoration: none;
}

.link-card {
  min-height: 58px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.link-card img {
  display: none;
}

.link-card::after {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-top: 2px solid var(--brand);
  border-right: 2px solid var(--brand);
  content: "";
  transform: rotate(45deg);
}

.link-card:hover {
  border-color: var(--accent);
  background: #F0F7F9;
}

.link-row:hover {
  border-color: #C5D7DF;
  background: #FBFDFE;
}

.search-wrap {
  position: relative;
  margin: 0 0 12px;
}

.search-wrap::before {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translateY(-58%);
}

.search-wrap::after {
  position: absolute;
  top: calc(50% + 6px);
  left: 29px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
}

.search-box {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px 13px 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 16px;
  font-weight: 400;
}

.search-box::placeholder {
  color: var(--muted);
}

.search-box:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus);
}

.catalog-hero {
  display: none;
}

.catalog-header {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-left: 5px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.catalog-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.catalog-header h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.12;
  white-space: nowrap;
}

.catalog-nav {
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.5;
  transform: translateY(-50%);
}

.catalog-nav-btn {
  display: flex;
  width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #125F75;
  border-radius: 50%;
  color: #FFFFFF;
  background: #16758F;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.catalog-header .search-wrap {
  margin: 0;
}

.link-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 82px;
  overflow: hidden;
  padding: 12px 13px 12px 20px;
  background: var(--surface);
}

.link-row .product-copy {
  align-self: center;
  padding-inline: 0 12px;
}

.link-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.product-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.product-number {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.link-row .text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.product-cta {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.product-cta img,
.platform-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
}

.link-card:focus-visible,
.link-row:focus-visible,
.legal-brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.footer a {
  text-underline-offset: 3px;
}

.legal-page {
  width: min(calc(100% - 32px), 760px);
  margin: 0 auto;
  padding: 34px 0 60px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

.legal-page h1 {
  margin: 0 0 7px;
  font-size: 34px;
  line-height: 1.15;
}

.legal-page h2 {
  margin: 27px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.legal-page p {
  margin: 0 0 13px;
  color: #40556A;
}

.legal-page .updated {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 760px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__image {
    min-height: 340px;
  }
}

@media (max-width: 759px) {
  .hero-card {
    grid-template-areas:
      "visual"
      "content";
  }

  .hero__content {
    grid-area: content;
    padding: 16px 20px 22px;
  }

  .hero__image {
    grid-area: visual;
    min-height: clamp(110px, 28vw, 140px);
  }

  .hero__title {
    font-size: clamp(32px, 8vw, 44px);
  }

  .hero__subtitle {
    margin-bottom: 18px;
    font-size: 16px;
  }

  .catalog-header {
    gap: 12px;
    padding: 18px 16px;
  }

  .link-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .container,
  .legal-page {
    width: min(calc(100% - 24px), var(--container));
  }

  .nav-bar {
    min-height: 32px;
    padding-top: 14px;
  }

  .dot {
    width: 15px;
  }

  .hero {
    padding-top: 6px;
  }

  .hero-card {
    border-radius: 12px;
  }

  .hero__content {
    padding: 14px 16px 18px;
  }

  .hero__kicker {
    font-size: 12px;
  }

  .hero__title {
    font-size: clamp(30px, 8.5vw, 37px);
  }

  .links {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .link-card {
    min-height: 54px;
  }

  .search-box {
    min-height: 52px;
  }

  .catalog-header h1 {
    min-width: 0;
    font-size: clamp(21px, 5.6vw, 24px);
    white-space: normal;
  }

  .catalog-title-row {
    align-items: flex-start;
    gap: 8px;
  }

  .catalog-nav {
    right: 10px;
    gap: 6px;
  }

  .catalog-nav-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
  }

  .link-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 78px;
    padding-left: 17px;
  }

  .link-row .product-copy {
    padding-inline: 0 9px;
  }

  .link-row .text {
    font-size: 15px;
  }

  .product-cta {
    min-height: 36px;
    padding-inline: 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
