:root {
  --bg-main: #eef4f7;
  --bg-soft: #f7fafc;
  --card: #ffffff;
  --card-2: #f9fbfc;
  --stroke: #dbe6ec;

  --text: #12324a;
  --text-soft: #5f7486;
  --text-muted: #7f93a3;

  --primary: #2f6fed;
  --primary-strong: #1f5adb;
  --primary-soft: #8291ae;

  --accent: #f28c28;
  --accent-strong: #de7412;
  --accent-soft: #fff1e4;

  --success: #19a463;
  --danger: #d9534f;

  --shadow-sm: 0 8px 18px rgba(16, 53, 74, 0.08);
  --shadow-md: 0 16px 30px rgba(16, 53, 74, 0.12);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --maxw: 760px;
  --font: "Segoe UI", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 111, 237, 0.06), transparent 20%),
    radial-gradient(circle at top right, rgba(242, 140, 40, 0.08), transparent 18%),
    linear-gradient(180deg, #f8fbff 0%, #eef4f7 100%);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(47, 111, 237, 0.04), transparent 10%),
    radial-gradient(circle at 80% 15%, rgba(242, 140, 40, 0.05), transparent 10%);
  z-index: 0;
}

.landing {
  position: relative;
  z-index: 1;
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: 18px 14px 42px;
}

.hero {
  background: var(--card);
  border: 1px solid rgba(47, 111, 237, 0.09);
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #f4f8ff;
  border: 1px solid #dbe6f7;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.brand-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.brand-fallback.small {
  font-size: 1rem;
}

.brand-copy {
  min-width: 0;
}

.brand-mini {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--primary-strong);
}

.brand-copy p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5c8df3);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 111, 237, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent), #f6a24f);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(242, 140, 40, 0.20);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.btn-full {
  width: 100%;
}

.hero-contact,
.company-meta {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.section-block {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--stroke);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--primary-strong);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.ads-slider {
  position: relative;
  min-height: 270px;
}

.ad-card {
  display: none;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid #e2ebf5;
  border-radius: 22px;
  overflow: hidden;
  padding: 14px;
}

.ad-card.active,
.ads-slider > .ad-card:first-child {
  display: grid;
}

.ad-image {
  width: 100%;
  height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf2ff, #fff8f1);
  display: grid;
  place-items: center;
}

.ad-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-empty {
  font-size: 3rem;
  color: var(--primary);
}

.ad-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ad-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft), #fff7ef);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid #ffd9b6;
}

.ad-content h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary-strong);
  line-height: 1.25;
}

.ad-content p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 0;
  background: #cbd8e8;
  cursor: pointer;
  transition: 0.2s ease;
}

.dot.active {
  width: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.testimonials-grid {
  display: grid;
  gap: 14px;
}

.testimonial-card {
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid #e1ebf5;
  border-radius: 22px;
  padding: 16px;
}

.testimonial-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-img {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.testimonial-user h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary-strong);
}

.testimonial-user span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.testimonial-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.stars {
  margin-top: 12px;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--accent);
}

.company-card {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid #e1ebf5;
  border-radius: 24px;
  padding: 16px;
}

.company-card-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  background: #f1f6ff;
  border: 1px solid #dfe8f7;
  display: grid;
  place-items: center;
}

.company-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.company-card-body h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.1rem;
}

.company-card-body p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  background: rgba(10, 31, 44, 0.35);
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: min(100%, 520px);
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #dce7f2;
  border-radius: 26px;
  box-shadow: 0 22px 45px rgba(20, 49, 67, 0.18);
  padding: 18px;
  animation: modalIn 0.22s ease;
}

.modal-large {
  width: min(100%, 620px);
}

@keyframes modalIn {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-strong);
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d9e5f0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--primary);
  font-size: 1.3rem;
  cursor: pointer;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 14px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--primary-strong);
}

.form-group input,
.form-group select {
  width: 100%;
  border: 1px solid #d7e4ef;
  background: #fbfdff;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  font-size: 0.97rem;
}

.form-group input::placeholder {
  color: #98aaba;
}

.form-group select option {
  color: #12324a;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(47, 111, 237, 0.35);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.08);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.pass-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
}

.input-help {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.msg {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.msg.info {
  background: #eef5ff;
  color: var(--primary);
}

.msg.ok {
  background: #eaf8f0;
  color: #178b55;
  border: 1px solid #ccefdc;
}

.msg.err {
  background: #fff1f0;
  color: #c94d47;
  border: 1px solid #f3d0cd;
}

.skeleton-card {
  animation: pulse 1.4s infinite ease-in-out;
}

.skeleton-box,
.skeleton-line,
.skeleton-avatar {
  background: linear-gradient(
    90deg,
    #edf3f8 25%,
    #dfe9f1 50%,
    #edf3f8 75%
  );
  background-size: 200% 100%;
  animation: pulse 1.4s infinite linear;
}

.skeleton-box {
  width: 100%;
  height: 180px;
  border-radius: 18px;
}

.skeleton-line {
  height: 14px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

@keyframes pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (min-width: 640px) {
  .landing {
    padding: 22px 18px 55px;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
  }

  .hero-contact,
  .company-meta {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }

  .company-card {
    grid-template-columns: 110px 1fr;
    align-items: center;
  }
}

@media (min-width: 860px) {
  .landing {
    width: min(100%, 860px);
  }

  .ad-card {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
  }

  .ad-image {
    height: 220px;
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}