:root {
  --bg: #ffffff;
  --bg-muted: #f5f7f8;
  --text: #2a2a2a;
  --muted: #8a9199;
  --accent: #20b794;
  --accent-soft: rgba(32, 183, 148, 0.12);
  --border: #e8ecef;
  --card: #ffffff;
  --radius: 18px;
  --max: 1120px;
  --shadow: 0 12px 40px rgba(20, 40, 60, 0.06);
  --font: "Manrope", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  touch-action: pan-y pinch-zoom;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input {
  font: inherit;
}

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

.container.narrow {
  width: min(100% - 28px, 820px);
}

.relative {
  position: relative;
}

.accent {
  color: var(--accent);
}

/* ——— Header (mobile first) ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
}

.nav-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

.logo {
  display: flex;
  justify-content: center;
  justify-self: center;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  line-height: 0.82;
}

.logo-team {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--accent);
  line-height: 1;
}

.logo-java {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.05;
}

.nav {
  display: none;
  grid-column: 1 / -1;
  flex-direction: column;
  gap: 0;
  padding: 6px 0 12px;
  border-top: 1px solid var(--border);
}

.nav.open {
  display: flex;
}

.nav a {
  font-size: 16px;
  font-weight: 600;
  color: #5c6570;
  padding: 14px 2px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.nav a.active,
.nav a:hover {
  color: var(--accent);
}

.lang-switch {
  position: relative;
  justify-self: end;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
  color: #4a5560;
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}

.lang-flag {
  font-size: 14px;
  line-height: 1;
}

.lang-chevron {
  font-size: 10px;
  color: var(--muted);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 148px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 40, 60, 0.12);
  z-index: 60;
  display: grid;
  gap: 2px;
}

.lang-menu[hidden] {
  display: none !important;
}

.lang-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  color: var(--text);
}

.lang-menu button:hover,
.lang-menu button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ——— Hero ——— */
.hero {
  padding: 24px 0 24px;
}

.hero h1 {
  margin: 0 auto 12px;
  text-align: center;
  font-size: clamp(22px, 6vw, 44px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0 auto 20px;
  max-width: 720px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 700;
}

/* ——— Invest card ——— */
.invest-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 12px 18px;
  box-shadow: var(--shadow);
}

.invest-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.invest-tabs button {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 12px 8px;
  font-weight: 700;
  font-size: 12.5px;
  background: #eef1f3;
  color: #6b7480;
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.invest-tabs button.active {
  background: var(--accent);
  color: #fff;
}

.invest-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.invest-form {
  display: grid;
  gap: 14px;
}

.form-row-3,
.form-row-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.invest-form label span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7480;
}

.invest-form input[type="text"],
.invest-form input[type="tel"],
.invest-form input[type="password"] {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f3f5f7;
  color: var(--text);
  outline: none;
  font-size: 16px;
  min-height: 48px;
}

.invest-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}

.slider-block {
  display: grid;
  gap: 8px;
}

.period-card {
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: #f5f7f8;
  border: 1px solid var(--border);
}

.slider-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7480;
}

.slider-value {
  margin: 0;
  font-size: clamp(26px, 7.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.slider-range {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e6eaee;
  outline: none;
  touch-action: pan-y;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(32, 183, 148, 0.45);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  cursor: pointer;
}

.calc-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.calc-income {
  margin: 0;
  font-size: clamp(15px, 4.2vw, 20px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.35;
}

.calc-rate {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 15px 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-status {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.form-status.is-ok {
  background: #e8f8f4;
  color: #0f7a63;
}

.form-status.is-err {
  background: #fdecea;
  color: #c0392b;
}

.form-status.is-pending {
  background: #eef3f5;
  color: var(--muted);
}

.btn-outline {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  background: transparent;
  min-height: 48px;
}

/* ——— Contact cards ——— */
.contact-pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 40, 60, 0.04);
}

.pill-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.pill-icon svg {
  width: 22px;
  height: 22px;
}

.pill strong,
.pill-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.pill-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.pill span:not(.pill-icon) {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.pill-phone {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent) !important;
}

/* ——— Sections ——— */
.section {
  padding: 48px 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 5.5vw, 38px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
}

.accent-title {
  color: var(--accent) !important;
}

.section-lead {
  margin: 0 auto 28px;
  max-width: 760px;
  text-align: center;
  color: #6b7480;
  font-size: 14px;
  line-height: 1.55;
}

.muted-center {
  color: var(--muted);
}

.stat-cards,
.product-grid,
.metrics-grid,
.scale-grid,
.partner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat-card,
.metric-card,
.product-card,
.partner-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.stat-num,
.metric-num {
  margin: 0 0 6px;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  color: var(--accent);
}

.stat-title,
.metric-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.stat-desc,
.metric-card p,
.product-card p,
.partner-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.gallery-block {
  margin-top: 28px;
}

.gallery-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.gallery-head p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.gallery-wrap {
  display: grid;
  grid-template-columns: 1fr;
}

.gallery-arrow {
  display: none;
}

.gallery-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  -webkit-overflow-scrolling: touch;
}

.phone-shot {
  flex: 0 0 auto;
  width: 148px;
  scroll-snap-align: start;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
  padding: 0;
}

.phone-shot img {
  width: 100%;
  height: 296px;
  object-fit: cover;
  object-position: top;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card h3 {
  margin: 0;
  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
}

.scale-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  padding: 22px 16px;
}

.scale-grid h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.scale-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.partner-card h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  background: #f3f5f7;
  border-radius: 14px;
  padding: 0 14px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 28px 16px 0;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #8a9199;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0 0 16px;
  color: #6b7480;
  font-size: 13px;
  line-height: 1.5;
  padding-right: 12px;
}

.legal h2 {
  text-align: left;
  font-size: clamp(20px, 5vw, 28px);
  margin-bottom: 12px;
}

.legal h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  font-weight: 800;
}

.legal p {
  margin: 0 0 10px;
  color: #5c6570;
  font-size: 14px;
  line-height: 1.55;
}

.site-footer {
  padding: 28px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: #5c6570;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-footer hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #6b7480;
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

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

.footer-contacts a {
  font-weight: 700;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-contacts a[href^="tel:"] {
  color: var(--accent);
  font-size: 16px;
}

.deco-gem {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 16, 24, 0.9);
  display: grid;
  place-items: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: min(420px, 100%);
  max-height: calc(100vh - 80px);
  border-radius: 18px;
}

.lightbox-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* ——— Tablet+ ——— */
@media (min-width: 720px) {
  .container {
    width: min(100% - 40px, var(--max));
  }

  .hero {
    padding: 40px 0 36px;
  }

  .hero h1 {
    font-size: clamp(28px, 4vw, 44px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .invest-card {
    padding: 24px 28px 28px;
    border-radius: 28px;
  }

  .invest-tabs button {
    font-size: 15px;
  }

  .form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .slider-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  .calc-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
  }

  .contact-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

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

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

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

  .scale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
  }

  .gallery-wrap {
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    align-items: center;
  }

  .gallery-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: #5c6570;
    font-size: 24px;
    cursor: pointer;
  }

  .phone-shot {
    width: 170px;
  }

  .phone-shot img {
    height: 340px;
  }

  .section {
    padding: 64px 0;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-contacts {
    flex-direction: row;
    gap: 18px;
  }
}

/* ——— Desktop ——— */
@media (min-width: 980px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
  }

  .nav-toggle {
    display: none;
  }

  .logo {
    justify-self: start;
  }

  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    grid-column: auto;
    border: none;
    padding: 0;
    gap: 8px 20px;
  }

  .nav a {
    font-size: 14px;
    padding: 0;
    min-height: auto;
  }

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

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

  .deco-gem {
    display: block;
    position: absolute;
    width: 180px;
    height: 180px;
    right: -20px;
    top: -30px;
    background: linear-gradient(145deg, rgba(32, 183, 148, 0.35), rgba(32, 183, 148, 0.05));
    clip-path: polygon(50% 0%, 90% 25%, 80% 75%, 50% 100%, 20% 75%, 10% 25%);
    pointer-events: none;
    opacity: 0.7;
  }

  .deco-gem--right {
    right: 4%;
    top: 40px;
    width: 220px;
    height: 220px;
  }

  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
