 :root {
      --bg: #0f0f10;
      --bg-soft: #121213;
      --card: #171718;
      --card-2: #1b1b1d;
      --line: rgba(255, 255, 255, 0.1);
      --text: #f5f2ec;
      --muted: #cfc6b8;
      --muted-2: #a79e92;
      --gold: #d1b07a;
      --gold-dark: #8b6a3e;
      --gold-soft: rgba(176, 141, 87, 0.12);
      --cta-text: #2a2118;
      --container: 1280px;
      --radius: 32px;
      --radius-md: 24px;
      --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: "Inter", sans-serif;
    }

    a { color: inherit; text-decoration: none; }
    button, input, textarea { font: inherit; }

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

    .serif { font-family: "Cormorant Garamond", serif; }

    .section { padding: 96px 0; }
    .section-tight { padding: 56px 0; }

    .header {
      position: sticky;
      top: 0;
      z-index: 1000;
      backdrop-filter: blur(18px);
      background: rgba(15, 15, 16, 0.8);
      border-bottom: 1px solid var(--line);
      
    }

    .header-inner {
      min-height: 82px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }

    .brand-title {
      font-family: "Cormorant Garamond", serif;
      font-size: 28px;
      line-height: 1;
    }

    .brand-subtitle,
    .eyebrow,
    .small-label {
      text-transform: uppercase;
      letter-spacing: 0.28em;
      font-size: 12px;
      color: var(--muted-2);
    }

    .small-label { letter-spacing: 0.22em; }

    .nav {
      display: flex;
      align-items: center;
      gap: 28px;
      font-family: "Cormorant Garamond", serif;
      font-size: 26px;
      color: #d7d1c8;
    }

    .nav a:hover,
    .link:hover { color: #fff; }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 16px 28px;
      border-radius: 999px;
      border: 1px solid transparent;
      cursor: pointer;
      transition: 0.2s ease;
      white-space: nowrap;
        white-space: normal;
     text-align: center;
     max-width: 100%;
     padding: 14px 18px; 
    }

    .btn-primary {
      background: #b08d57;
      color: #111;
      border-color: rgba(176, 141, 87, 0.4);
    }
    .btn-primary:hover { background: #c29a61; }

    .btn-secondary {
      background: rgba(255, 255, 255, 0.05);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.15);
    }
    .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

    .btn-cta {
      background: #d9b57a;
      color: #1c150f;
      box-shadow: 0 12px 28px rgba(176, 141, 87, 0.2);
    }
    .btn-cta:hover { background: #e4c38f; }

    .hero {
      position: relative;
      overflow: hidden;
      padding: 56px 0 80px;
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at top right, rgba(176, 141, 87, 0.18), transparent 32%),
        radial-gradient(circle at left, rgba(255, 255, 255, 0.05), transparent 28%);
      pointer-events: none;
    }

    .hero-grid,
    .about-grid,
    .geo-grid,
    .bottom-grid,
    .contact-grid,
    .cta-grid,
    .innovation-grid,
    .trusted-grid,
    .media-grid,
    .ai-grid,
    .ai-why-grid {
      display: grid;
      gap: 40px;
    }

    .hero-grid {
      grid-template-columns: 1.15fr 0.85fr;
      align-items: center;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 10px 16px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--line);
      color: #d7d1c8;
      font-size: 14px;
    }

    h1, h2, h3, h4 {
      margin: 0;
      font-family: "Cormorant Garamond", serif;
      font-weight: 600;
    }

    .hero h1 {
      font-size: clamp(54px, 6vw, 84px);
      line-height: 0.92;
      max-width: 900px;
    }
.title-with-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-with-logo img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

    .lead {
      max-width: 760px;
      font-size: 15px;
      line-height: 1.75;
      color: #d4cdc0;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
    }

    .stats-grid,
    .cards-2,
    .method-grid,
    .testimonial-list,
    .process-list,
    .case-grid,
    .timeline-grid,
    .services-4,
    .services-3,
    .client-grid,
    .media-list,
    .ai-services-grid {
      display: grid;
      gap: 24px;
    }

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

    .card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .card-solid { background: #161616; }
    .card-inner { padding: 28px; }

    .stat-value,
    .case-accent,
    .process-step {
      font-family: "Cormorant Garamond", serif;
      color: var(--gold);
    }

    .stat-value { font-size: 48px; line-height: 1; }

    .muted,
    .section-text,
    .list,
    .body-text { color: #d7d0c5; }

    .portrait-shell {
      border-radius: 34px;
      border: 1px solid var(--line);
      background: linear-gradient(to bottom right, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
      padding: 16px;
      box-shadow: var(--shadow);
    }

    .portrait-card {
      background: #151516;
      border: 1px solid var(--line);
      border-radius: 28px;
      padding: 24px;
    }

    .portrait-placeholder {
      margin-top: 18px;
      min-height: 460px;
      border-radius: 24px;
      overflow: hidden;
      background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(176,141,87,0.08));
    }

    .portrait-placeholder img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: 24px;
    }

    .section-title {
      max-width: 920px;
      margin-bottom: 40px;
    }

    .section-title h2 {
      font-size: clamp(42px, 5vw, 72px);
      line-height: 0.98;
      margin-top: 14px;
    }

    .section-title p {
      font-size: 18px;
      line-height: 1.8;
      margin-top: 18px;
      color: #d4cdc0;
    }

    .trusted {
      background: var(--bg-soft);
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }

    .trusted-grid {
      grid-template-columns: 0.9fr 1.1fr;
      align-items: center;
    }

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

    .client-item {
      padding: 18px 20px;
      border-radius: 20px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.03);
      color: #d4cdc0;
    }

    .about-grid {
      grid-template-columns: 0.95fr 1.05fr;
      align-items: start;
    }

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

    .card-heading {
      margin-top: 18px;
      font-size: 24px;
      line-height: 1.2;
      color: #ebe5da;
    }

    .icon-box {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      background: var(--gold-soft);
      border: 1px solid rgba(176, 141, 87, 0.2);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--gold);
      flex: 0 0 auto;
    }

    .list {
      margin: 16px 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 12px;
      line-height: 1.7;
    }

    .geo-grid { grid-template-columns: 1.05fr 0.95fr; }

    .pill-list, .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .pill, .tag {
      padding: 10px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.05);
      color: #e7e0d4;
      font-size: 14px;
    }

    
    .real-map-shell {
       position: relative;
  z-index: 1;
      margin-top: 22px;
      padding: 16px;
      border-radius: 24px;
      border: 1px dashed rgba(255,255,255,0.15);
      background: #161618;
    }

    .real-map-frame {
       position: relative;
  z-index: 1;
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.08);
      background: #111214;
    }

    #real-russia-map {
       position: relative;
  z-index: 1;
      width: 100%;
      height: 520px;
      background: #111214;
    }
    
    
    .leaflet-top,
.leaflet-bottom {
  z-index: 10 !important;
}

    .map-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      align-items: center;
      margin-top: 14px;
      color: #d7d0c5;
      font-size: 14px;
    }

    .legend-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      display: inline-block;
    }

    .legend-dot.legend-presence {
      background: #d1b07a;
      box-shadow: 0 0 0 4px rgba(209,176,122,0.18);
    }

    .legend-dot.legend-base {
      background: rgba(255,255,255,0.22);
    }

    .russia-map-tooltip {
      min-width: 180px;
      line-height: 1.45;
    }

    .russia-map-tooltip strong {
      display: block;
      font-size: 14px;
      color: #fff;
      margin-bottom: 4px;
    }

    .russia-map-tooltip span {
      font-size: 12px;
      color: #d1b07a;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .leaflet-container {
      font-family: "Inter", sans-serif;
    }

    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip {
      background: rgba(15, 15, 16, 0.96);
      color: #f5f2ec;
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    }

    .leaflet-popup-content {
      margin: 12px 14px;
      line-height: 1.5;
    }

    .leaflet-control-attribution {
      background: rgba(15,15,16,0.72) !important;
      color: rgba(255,255,255,0.68) !important;
      border-top-left-radius: 8px;
    }

    .leaflet-control-attribution a {
      color: #d1b07a !important;
    }

    @media (max-width: 860px) {
      #real-russia-map {
        height: 420px;
      }
    }


    .map-placeholder,
    .innovation-placeholder {
      margin-top: 22px;
      padding: 24px;
      border-radius: 24px;
      border: 1px dashed rgba(255,255,255,0.15);
      background: #161618;
      color: var(--muted-2);
    }

    .method-item,
    .process-item,
    .testimonial-item,
    .problem-box,
    .media-item,
    .ai-partner-box,
    .ai-why-box {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.02);
      border-radius: 24px;
    }

    .method-item {
      padding: 16px 18px;
      display: flex;
      gap: 12px;
      align-items: center;
      color: #e5dfd5;
    }

    .services-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .services-3, .case-grid, .timeline-grid, .ai-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .service-desc, .case-text, .body-text, .contact-item, .footer, .input, .textarea {
      line-height: 1.8;
    }

    .service-footer { margin-top: 24px; }

    .case-top {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 16px;
    }

    .case-accent { font-size: 44px; line-height: 1; }

    .problem-box, .result-box {
      margin-top: 22px;
      padding: 18px;
    }

    .problem-box { background: #151516; }

    .result-box {
      border-radius: 24px;
      border: 1px solid rgba(176, 141, 87, 0.2);
      background: rgba(176, 141, 87, 0.1);
    }

    .result-box .small-label { color: #e4c38f; }

    .quote {
      margin-top: 20px;
      padding-left: 16px;
      border-left: 1px solid rgba(255,255,255,0.15);
      color: var(--muted-2);
      font-style: italic;
      line-height: 1.8;
    }

    .timeline-list,
    .result-list,
    .solution-list {
      margin: 16px 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 12px;
    }

    .timeline-item, .solution-item {
      display: flex;
      gap: 12px;
    }

    .arrow {
      color: var(--gold);
      flex: 0 0 auto;
    }

    .bottom-grid, .contact-grid { grid-template-columns:1fr; }
    .process-list, .testimonial-list, .media-list { gap: 16px; }

    .process-item, .testimonial-item, .media-item { padding: 20px; background: #151516; }
    .process-step { font-size: 34px; }

   .media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}



.gallery-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-carousel {
  position: relative;
  margin-top: 20px;
}

.gallery-viewport {
  overflow: hidden;
  border-radius: 28px;
}

.gallery-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.gallery-slide {
  min-width: 100%;
  flex: 0 0 100%;
}

.gallery-item {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #151516;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.gallery-image {
  background: #111214;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 560px;
}

.gallery-image img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

.gallery-caption {
  padding: 18px 20px 20px;
  font-size: 20px;
  color: #f2eadf;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.35;
}

.gallery-nav {
  position: absolute;
  top: calc(50% - 28px);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,15,16,0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(8px);
  transition: 0.2s ease;
}

.gallery-nav:hover {
  background: rgba(29,29,31,0.95);
  border-color: rgba(209,176,122,0.35);
}

.gallery-nav-prev {
  left: 20px;
}

.gallery-nav-next {
  right: 20px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.18);
  cursor: pointer;
  transition: 0.2s ease;
  padding: 0;
}

.gallery-dot.is-active {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(209,176,122,0.14);
}

.gallery-counter {
  margin-top: 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 14px;
}

@media (max-width: 860px) {
  .gallery-image {
    min-height: 360px;
    padding: 12px;
  }

  .gallery-nav {
    width: 48px;
    height: 48px;
    top: calc(50% - 24px);
  }

  .gallery-nav-prev {
    left: 12px;
  }

  .gallery-nav-next {
    right: 12px;
  }
}



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

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

  .credential-card-wide {
    grid-column: span 1;
  }

  .credential-title {
    font-size: 24px;
  }

  .credential-badge {
    border-radius: 20px;
  }
}

    .media-item-title {
      font-size: 24px;
      color: #fff;
      margin-bottom: 8px;
      font-family: "Cormorant Garamond", serif;
    }

    .media-source {
      color: var(--gold);
      font-size: 14px;
      margin-bottom: 10px;
    }


    .media-item {
      overflow: hidden;
      padding: 0;
    }

    .media-preview {
      height: 190px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: flex-end;
      padding: 20px;
      position: relative;
      background-size: cover;
      background-position: center;
    }

    .media-preview::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.55) 100%);
    }

    .media-preview-label {
      position: relative;
      z-index: 1;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(15, 15, 16, 0.72);
      border: 1px solid rgba(255,255,255,0.12);
      color: #f5f2ec;
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .media-content {
      padding: 20px;
      background: #151516;
    }

    .media-link {
      color: var(--gold);
      display: inline-flex;
      margin-top: 12px;
      font-weight: 500;
    }

    .media-link:hover {
      color: #e4c38f;
    }
    .patent-link {
      margin-top: 18px;
      display: inline-flex;
      flex-direction: column;
      gap: 4px;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid rgba(176, 141, 87, 0.22);
      background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(176,141,87,0.08));
      color: #f2eadf;
      cursor: pointer;
      transition: 0.2s ease;
      text-align: left;
    }

    .patent-link:hover {
      border-color: rgba(176, 141, 87, 0.38);
      background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(176,141,87,0.12));
    }

    .patent-link strong {
      font-size: 14px;
      line-height: 1.5;
      font-weight: 600;
    }

    .patent-link-text {
      font-size: 13px;
      line-height: 1.7;
      color: #d7d0c5;
    }

    .gov-case-title {
      align-items: flex-start;
    }

    .gov-case-title img {
      flex: 0 0 auto;
      max-width: 150px;
      height: auto;
      object-fit: contain;
    }

    .patent-modal-dialog {
      max-width: min(980px, calc(100vw - 32px));
    }

    .patent-description-image {
      margin-top: 12px;
    }

    .patent-description-caption span {
      line-height: 1.7;
    }

    .map-attribution {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

    .ois-logo {
      margin-top: 14px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
    }
    .ois-logo img {
      height: 48px;
      width: auto;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.12);
      background: #fff;
      padding: 6px 10px;
    }

    .patent-link span {
      color: var(--gold);
      font-size: 13px;
      line-height: 1.5;
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(5, 5, 7, 0.82);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
      z-index: 300;
    }

    .modal.is-open {
      display: flex;
    }

    .modal-dialog {
      position: relative;
      width: min(92vw, 760px);
      max-height: 92vh;
      border-radius: 28px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.12);
      background: #121213;
      box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    }

    .modal-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 42px;
      height: 42px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 999px;
      background: rgba(15,15,16,0.72);
      color: #fff;
      cursor: pointer;
      z-index: 2;
      font-size: 20px;
      line-height: 1;
    }

    .modal-image-wrap {
      background: #0f0f10;
      padding: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .modal-image-wrap img {
      display: block;
      max-width: 100%;
      max-height: 72vh;
      border-radius: 18px;
    }

    .modal-caption {
      padding: 18px 22px 22px;
      border-top: 1px solid rgba(255,255,255,0.08);
      background: #151516;
    }

    .modal-caption strong {
      display: block;
      color: #f2eadf;
      font-size: 15px;
      line-height: 1.6;
    }

    .modal-caption span {
      display: block;
      margin-top: 6px;
      color: var(--gold);
      font-size: 13px;
    }

    .cta-wrap { padding-bottom: 96px; }

    .cta-card {
      border-radius: 36px;
      border: 1px solid rgba(176, 141, 87, 0.2);
      background: linear-gradient(135deg, rgba(176, 141, 87, 0.18), rgba(255, 248, 235, 0.92));
      overflow: hidden;
    }

    .cta-grid {
      grid-template-columns: 1fr;
      align-items: center;
      padding: 40px 48px;
    }

    .cta-card .eyebrow { color: #8b6a3e; }

    .cta-card h3 {
      margin-top: 14px;
      max-width: 760px;
      font-size: clamp(40px, 4vw, 62px);
      line-height: 1;
      color: var(--cta-text);
    }

    .innovation-grid { grid-template-columns: 0.95fr 1.05fr; }

    .innovation-chip {
      display: inline-flex;
      margin-top: 18px;
      padding: 10px 16px;
      border-radius: 999px;
      border: 1px solid rgba(176, 141, 87, 0.2);
      background: rgba(176, 141, 87, 0.1);
      color: #e4c38f;
    }

    .ai-block {
      background: linear-gradient(180deg, rgba(18,18,19,1) 0%, rgba(15,15,16,1) 100%);
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }

    .ai-why-box,
    .ai-partner-box {
      padding: 28px;
      background: #151516;
    }

    .contacts {
      background: var(--bg-soft);
      border-top: 1px solid var(--line);
    }

    .contact-list {
      display: grid;
      gap: 16px;
      margin-top: 24px;
    }

    .contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  transition: 0.2s;
    }
.contact-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
    .form-card .card-inner { padding: 32px; }
    .form-title { font-size: 24px; font-weight: 600; }

    .form-grid {
      display: grid;
      gap: 14px;
      margin-top: 24px;
    }

    .input, .textarea {
      width: 100%;
      border-radius: 20px;
      border: 1px solid var(--line);
      background: #151516;
      color: #fff;
      padding: 15px 16px;
      outline: none;
    }

    .input::placeholder, .textarea::placeholder { color: #8f877c; }
    .textarea { min-height: 140px; resize: vertical; }
    .policy { font-size: 12px; line-height: 1.8; color: var(--muted-2); }

    .footer { padding: 40px 0; }

    .footer-inner {
      padding-top: 24px;
      border-top: 1px solid var(--line);
      display: flex;
      justify-content: space-between;
      gap: 24px;
      color: var(--muted-2);
      font-size: 14px;
    }

    .footer-links {
      display: flex;
      flex-wrap: wrap;
      gap: 24px;
    }


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

    .gov-case-grid .card {
      height: 100%;
    }

    @media (max-width: 860px) {
      .gov-case-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1180px) {
      .hero-grid,
      .about-grid,
      .geo-grid,
      .bottom-grid,
      .contact-grid,
      .innovation-grid,
      .trusted-grid,
      .cta-grid,
      .media-grid,
      .ai-grid,
      .ai-why-grid {
        grid-template-columns: 1fr;
      }

      .services-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .services-3, .case-grid, .timeline-grid, .stats-grid, .cards-2, .ai-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 860px) {
      .nav { display: none; }
      .header-inner { min-height: 74px; }
      .hero { padding-top: 36px; }

      .services-4,
      .services-3,
      .case-grid,
      .timeline-grid,
      .stats-grid,
      .cards-2,
      .client-grid,
      .ai-services-grid {
        grid-template-columns: 1fr;
      }

      .section, .cta-wrap { padding: 72px 0; }
      .section-tight { padding: 44px 0; }
      .cta-grid, .footer-inner { gap: 20px; }
      .cta-grid { padding: 32px 24px; }
      .footer-inner { flex-direction: column; }
    
    .hero-actions .btn {
  width: 100%;
}

.cta-grid .btn {
  width: 100%;
}
    }
    .consent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.consent-item input[type="checkbox"] {
  margin-top: 4px;
  accent-color: #b08d57;
}

.consent-item a {
  color: var(--gold);
  text-decoration: underline;
}

.consent-item a:hover {
  color: #e4c38f;
}


/* Fix patent modal layout */
.patent-modal-dialog {
  width: min(96vw, 980px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
  scrollbar-gutter: stable;
}

.patent-modal-dialog .modal-close {
  position: sticky;
  top: 14px;
  margin-left: auto;
  margin-right: 14px;
}

.patent-modal-dialog .modal-image-wrap {
  padding: 24px;
  flex: 0 0 auto;
}

.patent-modal-dialog .modal-image-wrap img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.patent-modal-dialog .modal-caption {
  display: none;
}

.patent-description-image {
  margin-top: 0;
}

@media (max-width: 860px) {
  .modal {
    padding: 12px;
    align-items: flex-start;
  }

  .patent-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    padding-top: 52px;
  }

  .patent-modal-dialog .modal-image-wrap {
    padding: 14px;
  }
}
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    width: calc(100% - 24px);
  }

  .section {
    padding: 64px 0;
  }

  .section-tight {
    padding: 40px 0;
  }

  .header-inner {
    min-height: auto;
    padding: 14px 0;
    gap: 12px;
    align-items: center;
  }

  .header-inner > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .nav {
    display: none;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-subtitle {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .header .btn {
    width: auto;
    flex: 0 0 auto;
    padding: 12px 18px;
    font-size: 15px;
    line-height: 1.2;
  }

  .hero {
    padding: 28px 0 48px;
  }

  .hero-grid,
  .about-grid,
  .geo-grid,
  .bottom-grid,
  .contact-grid,
  .cta-grid,
  .innovation-grid,
  .trusted-grid,
  .cards-2,
  .stats-grid,
  .client-grid,
  .services-4,
  .services-3,
  .case-grid,
  .timeline-grid,
  .ai-services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero h1 {
    font-size: 56px;
    line-height: 0.98;
    max-width: 100%;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .section-title h2 {
    font-size: 34px;
    line-height: 1.08;
  }

  .section-title p,
  .section-text,
  .body-text,
  .lead {
    font-size: 15px;
    line-height: 1.65;
    max-width: 100%;
  }

  .badge {
    display: block;
    width: 100%;
    white-space: normal;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 14px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn,
  .cta-grid .btn,
  .innovation-grid .btn,
  .contact-grid .btn {
    width: 100%;
  }

  .btn {
    padding: 14px 18px;
    font-size: 15px;
    line-height: 1.35;
  }

  .card-inner,
  .portrait-card {
    padding: 22px;
  }

  .card-heading {
    font-size: 22px;
  }

  .portrait-shell {
    padding: 12px;
  }

  .portrait-placeholder {
    min-height: 320px;
  }

  .stat-value {
    font-size: 40px;
  }

  .case-accent,
  .process-step {
    font-size: 36px;
  }

  .trusted-grid h3,
  .innovation-grid h3,
  .bottom-grid h3,
  .geo-grid h3,
  #services h3,
  #experience h2,
  #gov-cases h2,
  #business h2,
  #media h2,
  #ai h2,
  #contacts h2 {
    font-size: 34px !important;
    line-height: 1.08 !important;
  }

  .case-top {
    flex-direction: column;
    gap: 10px;
  }

  .title-with-logo,
  .gov-case-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .gov-case-title img,
  .title-with-logo img {
    max-width: 140px;
    height: auto;
  }

  .pill-list,
  .tag-list,
  .map-legend {
    gap: 8px;
  }

  .pill,
  .tag {
    font-size: 13px;
    line-height: 1.4;
  }

  #real-russia-map {
    height: 320px;
  }

  .real-map-shell,
  .real-map-frame {
    overflow: hidden;
  }

  .gallery-image {
    min-height: 320px;
    padding: 12px;
  }

  .gallery-caption {
    font-size: 18px;
    padding: 16px;
  }

  .gallery-nav {
    width: 44px;
    height: 44px;
    top: calc(50% - 22px);
  }

  .gallery-nav-prev {
    left: 10px;
  }

  .gallery-nav-next {
    right: 10px;
  }

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

  .media-content {
    padding: 18px;
  }

  .media-item-title {
    font-size: 22px;
  }

  .contact-item {
    word-break: break-word;
  }

  .input,
  .textarea {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero-grid > *,
  .about-grid > *,
  .geo-grid > *,
  .bottom-grid > *,
  .contact-grid > *,
  .cta-grid > *,
  .innovation-grid > *,
  .trusted-grid > *,
  .cards-2 > *,
  .stats-grid > *,
  .client-grid > *,
  .services-4 > *,
  .services-3 > *,
  .case-grid > *,
  .timeline-grid > *,
  .ai-services-grid > * {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 20px);
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .header .btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .section-title h2,
  .trusted-grid h3,
  .innovation-grid h3,
  .bottom-grid h3,
  .geo-grid h3,
  #services h3 {
    font-size: 30px !important;
  }

  .lead,
  .section-title p,
  .section-text,
  .body-text {
    font-size: 14px;
  }

  .btn {
    font-size: 14px;
  }

  .card-inner,
  .portrait-card {
    padding: 18px;
  }

  .portrait-placeholder {
    min-height: 280px;
  }

  #real-russia-map {
    height: 280px;
  }
}

.credentials-block {
  margin-top: 32px;
}

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

.credential-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(176,141,87,0.06));
  box-shadow: 0 16px 40px rgba(0,0,0,0.16);
}

.credential-card-wide {
  grid-column: span 2;
}

.credential-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(176, 141, 87, 0.12);
  border: 1px solid rgba(176, 141, 87, 0.24);
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  margin-top: 2px;
}

.credential-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.credential-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  line-height: 1.05;
  color: #f4ede3;
}

.credential-meta {
  margin-top: 8px;
  color: #d8d0c3;
  line-height: 1.7;
  font-size: 15px;
}

.credential-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e7e0d4;
  line-height: 1.55;
}

.credential-badge-accent {
  background: rgba(176,141,87,0.1);
  border-color: rgba(176,141,87,0.24);
}

/* compact credentials block */
.credentials-block-full {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.credentials-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.credential-row {
  display: grid;
  grid-template-columns: 92px 1px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 22px 28px;
  border-radius: 28px;
  border: 1px solid rgba(209, 176, 122, 0.16);
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(176,141,87,0.04));
  box-shadow: 0 16px 42px rgba(0,0,0,0.18);
}

.credential-row-featured {
  padding-top: 26px;
  padding-bottom: 26px;
}

.credential-row-accent {
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(176,141,87,0.08));
  border-color: rgba(209, 176, 122, 0.24);
}

.credential-row-compact .credential-title {
  font-size: 28px;
  line-height: 1.18;
}

.credential-row-icon {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(209,176,122,0.18);
  color: var(--gold);
  font-size: 20px;
  box-shadow: inset 0 0 28px rgba(176,141,87,0.05);
}

.credential-row-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, rgba(209,176,122,0.02), rgba(209,176,122,0.35), rgba(209,176,122,0.02));
}

.credential-row-content {
  min-width: 0;
}

.credentials-block .credential-type {
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}

.credentials-block .credential-title {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
}

.credentials-block .credential-meta {
  font-size: 15px;
  line-height: 1.6;
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .credential-row {
    grid-template-columns: 74px 1px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 22px;
  }

  .credential-row-icon {
    width: 60px;
    height: 60px;
    font-size: 18px;
  }
}

@media (max-width: 860px) {
  .credentials-block-full {
    margin-top: 0;
  }

  .credential-row {
    grid-template-columns: 52px 1px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 16px;
    border-radius: 22px;
  }

  .credential-row-icon {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .credentials-block .credential-type {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .credentials-block .credential-title,
  .credential-row-compact .credential-title {
    font-size: 22px;
    line-height: 1.16;
  }

  .credentials-block .credential-meta {
    font-size: 14px;
    line-height: 1.5;
  }
}
