html, body {
  max-width: 100%;
  overflow-x: hidden;
}


/* =====================
   ROOT / VARIABLES
===================== */
:root {
  --accent: #4f46e5;        /* indigo */
  --accent-soft: #eef2ff;
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e5e7eb;
  --radius: 16px;
  --transition: all 0.25s ease;
}

/* =====================
   RESET
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* =====================
   LAYOUT
===================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

.section-soft {
  background: var(--bg-soft);
}

/* =====================
   HEADER
===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(0,0,0,0.04);

  box-shadow:
    0 10px 30px rgba(79,70,229,0.06),
    0 1px 0 rgba(255,255,255,0.6) inset;
}

.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  height: 40px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.85),
    rgba(255,255,255,0)
  );
  pointer-events: none;
}

/* =====================
   HEADER LAYOUT
===================== */

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

/* LINKS */
.nav-link {
  position: relative;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: #4f46e5;
}

/* =====================
   HEADER ACTIONS
===================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* LANGUAGE */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-flag {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-flag img {
  width: 22px;
  height: auto;
  display: block;
  border-radius: 4px;
}

.lang-flag:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.lang-flag.active {
  opacity: 1;
}

/* =====================
   HAMBURGER
===================== */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  width: 26px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
}

/* =====================
   MOBILE
===================== */

@media (max-width: 768px) {

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    display: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    z-index: 999;
  }

  .nav.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
  }
}

/* линия снизу */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    #6366f1,
    #8b5cf6
  );
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

/* hover */
.nav-link:hover {
  color: #4f46e5;
}

.nav-link:hover::after {
  width: 100%;
}

/* active (если добавишь класс вручную) */
.nav-link.active {
  color: #4f46e5;
}

.nav-link.active::after {
  width: 100%;
}

/* =====================
   BUTTONS
===================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.9rem 2.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(79,70,229,0.25);
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(79,70,229,0.35);
}

.btn-outline {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* =====================
   HERO
===================== */
.hero {
  padding: 9rem 0 7rem;
  text-align: center;
  background:
    radial-gradient(
      ellipse at center top,
      rgba(79,70,229,0.22) 0%,
      rgba(79,70,229,0.14) 35%,
      rgba(79,70,229,0.06) 55%,
      rgba(255,255,255,0) 70%
    ),
    linear-gradient(
      to bottom,
      rgba(255,255,255,0) 60%,
      #ffffff 100%
    );
}

.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 3rem;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.hero-trust {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* LOGOS */
.hero-platforms {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.8rem;
  flex-wrap: wrap;
}

.hero-platforms img {
  height: 26px;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: all 0.25s ease;
}

.hero-platforms img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-3px);
}

/* PROOF LINE */
.hero-proof {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
}

.hero-platforms img {
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.hero-platforms img:nth-child(1) { animation-delay: 0.1s; }
.hero-platforms img:nth-child(2) { animation-delay: 0.2s; }
.hero-platforms img:nth-child(3) { animation-delay: 0.3s; }
.hero-platforms img:nth-child(4) { animation-delay: 0.4s; }
.hero-platforms img:nth-child(5) { animation-delay: 0.5s; }
.hero-platforms img:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 0.55;
  }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* MOBILE */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-120%);
    transition: 0.35s ease;
    z-index: 999;
  }

  .nav.active {
    transform: translateY(0);
  }
}

/* =====================
   TITLES
===================== */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.section-subtext {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-muted);
}

/* =====================
   GRID / CARDS
===================== */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  text-align: center;
}

.card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 2.4rem 2.2rem;

  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: #1e293b;

  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.06);

  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

/* мягкий премиум-акцент */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(79,70,229,0.10),
    rgba(139,92,246,0.10)
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* hover */
.card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 28px 65px rgba(79,70,229,0.18);
}

.card:hover::before {
  opacity: 1;
}

/* =====================
   HOW IT WORKS – STEPS
===================== */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}

/* шаг */
.steps > div {
  position: relative;
  padding-top: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  transition: transform 0.3s ease;
}

.steps > div:hover {
  transform: translateY(-6px);
}

/* номер */
.steps span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;

  border-radius: 50%;
  background: linear-gradient(
    135deg,
    #4f46e5,
    #8b5cf6
  );
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;

  box-shadow:
    0 10px 25px rgba(79,70,229,0.35);
}

/* текст шага */
.steps span:last-child {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #475569;
}

/* соединяющая линия (десктоп) */
@media (min-width: 900px) {
  .steps::before {
    content: "";
    position: absolute;
    top: 38px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(
      90deg,
      rgba(79,70,229,0.15),
      rgba(139,92,246,0.15)
    );
    z-index: 0;
  }

  .steps > div {
    z-index: 1;
  }
}

/* =====================
   FORM
===================== */
.form-container {
  max-width: 520px;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f9fafb;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-success {
  display: none;
  margin-top: 1.2rem;
  padding: 1rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: var(--radius);
  font-weight: 500;
}

/* =====================
   LOGIN SECTION
===================== */
.login-section {
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(79,70,229,0.08),
    transparent
  );
}

/* =====================
   FOOTER
===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: #fafafa;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* =====================
   MOBILE
===================== */
.hamburger {
  display: none;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-120%);
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  }

  .nav.active {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
  }

  .hamburger-line {
    width: 26px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
  }

  .hero-actions {
    flex-direction: column;
  }
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 14px;
}

.lang-flag {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-flag img {
  width: 22px;
  height: auto;
  display: block;
  border-radius: 4px;
}

.lang-flag:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.lang-flag.active {
  opacity: 1;
}

.hero-proofline {
  margin-top: 2.8rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  opacity: 0.9;
}

.hero-proofline span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.section-title {
  position: relative;
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(79,70,229,0.12),
    rgba(139,92,246,0.12)
  );

  margin: 0 auto 2.5rem;
  text-align: center;
}

/* =====================
   MOBILE AUTO BEAUTIFY
===================== */
@media (max-width: 768px) {

  /* контейнер */
  .container {
    width: 92%;
  }

  section {
    padding: 4.5rem 0;
  }

  /* HERO */
  .hero {
    padding: 7rem 0 5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
  }

  .hero-actions {
    gap: 1rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* SECTION TITLES */
  .section-title {
    display: block;
    text-align: center;
    margin: 0 auto 2.2rem;
    font-size: 1.6rem;
  }

  /* CARDS */
  .grid {
    gap: 1.4rem;
  }

  .card {
    padding: 1.6rem;
    border-radius: 18px;
  }

  /* WHO WE WORK WITH */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* WHY RIXTUNE */
  .grid-3 .card {
    text-align: center;
  }

  /* HOW IT WORKS */
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps::before {
    display: none;
  }

  .steps span:first-child {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  /* FORM */
  .form-container {
    width: 100%;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 1rem;
  }

  /* DASHBOARD */
  .login-section {
    padding: 4.5rem 0;
  }

  /* FOOTER */
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* =====================
   MOBILE FORM FIX
===================== */
@media (max-width: 768px) {

  /* секция заявки */
  #application {
    padding: 4rem 0;
  }

  /* контейнер формы */
  .form-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
  }

  /* сама форма */
  #applicationForm {
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
  }

  /* группы */
  .form-group {
    margin-bottom: 1.1rem;
  }

  /* labels */
  .form-group label {
    font-size: 0.95rem;
  }

  /* инпуты */
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
  }

  /* textarea */
  .form-group textarea {
    min-height: 110px;
  }

  /* кнопка */
  .btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    border-radius: 999px;
  }

  /* убираем вылезания */
  body {
    overflow-x: hidden;
  }
}
