/* ==========================================================================
   Homepage — section styles
   Imported only from src/index.html (homepage).
   Depends: tokens.css, base.css, components/button.css, components/form.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared utilities
   -------------------------------------------------------------------------- */

/* Container — mirrors header__inner pattern */
.hp-c {
  max-width: 1980px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Standard section vertical spacing */
.hp-sec {
  padding: var(--section-y) 0;
}

/* Alternate-background section */
.hp-sec--alt {
  background: var(--bg-card);
}

/* Eyebrow label (accent line + uppercase text) */
.hp-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.hp-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Lead / subtitle text */
.hp-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
  margin: 0;
}

/* Large button modifier — used in hero CTAs */
.hp-btn-lg {
  padding: 18px 32px;
  font-size: 16px;
  border-radius: var(--r);
}

/* Centred section header block */
.hp-sec-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.hp-sec-center h2 {
  font-size: 40px;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hp-sec-center .hp-sub {
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Section: Hero
   -------------------------------------------------------------------------- */

.hp-hero {
  padding: 80px 0 100px;
  background: var(--bg);
  overflow: hidden;
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hp-hero-copy {
  display: flex;
  flex-direction: column;
}

.hp-hero-copy h1 {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 20px;
}

.hp-hero-accent {
  color: var(--accent);
}

.hp-hero-copy .hp-sub {
  margin-bottom: 32px;
}

.hp-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hp-hero-media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
}

.hp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-hero-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(12, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.hp-hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: hp-pulse 2s infinite;
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --------------------------------------------------------------------------
   Section: Trust strip
   -------------------------------------------------------------------------- */

.hp-trust {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}

.hp-trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.hp-trust-nums {
  display: flex;
  gap: 48px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.hp-trust-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hp-trust-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Section: How it works (3 steps)
   -------------------------------------------------------------------------- */

.hp-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.hp-step-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: border-color 200ms, box-shadow 200ms;
}

.hp-step-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* Arrow connector between cards (shown on last two cards) */
.hp-step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 60px; /* aligns with step-num center */
  width: 40px;
  height: 40px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
  border: 1px solid var(--line);
  border-radius: 50%;
  z-index: 2;
}

.hp-step-num {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.hp-step-card h3 {
  font-size: 22px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hp-step-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Not used in the 3-col grid but kept for possible JS usage */
.hp-step-arrow {
  display: none;
}

/* --------------------------------------------------------------------------
   Section: Selection by task (4 cards)
   -------------------------------------------------------------------------- */

.hp-tasks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hp-task-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}

.hp-task-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.hp-task-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hp-task-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg);
}

.hp-task-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.hp-task-card:hover .hp-task-media img {
  transform: scale(1.04);
}

.hp-task-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.hp-task-body h3 {
  font-size: 20px;
  margin: 0;
  color: var(--ink);
}

.hp-task-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.hp-task-foot {
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.hp-task-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.hp-task-go {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hp-task-go svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Section: Catalog — popular products grid
   -------------------------------------------------------------------------- */

.hp-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
}

.hp-cat-head h2 {
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}

.hp-cat-head .hp-sub {
  max-width: 60ch;
}

.hp-prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hp-prod-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}

.hp-prod-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.hp-prod-media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg);
}

.hp-prod-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.hp-prod-card:hover .hp-prod-media img {
  transform: scale(1.04);
}

.hp-prod-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 10px;
  font: 700 11px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-xs);
  z-index: 2;
}

.hp-prod-badge--hit  { background: var(--bg-dark); color: #fff; }
.hp-prod-badge--new  { background: var(--amber);   color: var(--ink); }
.hp-prod-badge--sale { background: var(--danger);  color: #fff; }

.hp-prod-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.hp-prod-sku {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hp-prod-name {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: -4px 0 0;
}

.hp-prod-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hp-prod-spec-lbl {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hp-prod-spec-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 3px;
  line-height: 1.3;
}

.hp-prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.hp-prod-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hp-prod-price-from {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.hp-prod-price-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hp-prod-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  background: var(--bg-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font: 600 13px/1 var(--sans);
  cursor: pointer;
  transition: background 160ms, transform 160ms;
  white-space: nowrap;
}

.hp-prod-cta:hover {
  background: var(--accent);
}

.hp-prod-cta:active {
  transform: scale(0.97);
}

.hp-prod-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hp-prod-cta svg {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   Section: Showcase — featured product (dark background)
   -------------------------------------------------------------------------- */

.hp-showcase {
  background: var(--bg-dark);
  color: var(--ink-light);
  padding: var(--section-y) 0;
  overflow: hidden;
}

.hp-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hp-showcase-media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.hp-showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-showcase-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--r-xs);
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hp-showcase-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hp-showcase-copy .hp-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.hp-showcase-copy .hp-eyebrow::before {
  background: rgba(255, 255, 255, 0.3);
}

.hp-showcase-copy h2 {
  font-size: 36px;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.hp-showcase-copy .hp-sub {
  color: rgba(255, 255, 255, 0.65);
}

.hp-showcase-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.hp-showcase-spec-lbl {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.hp-showcase-spec-val {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
}

.hp-showcase-price {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.hp-showcase-price-from {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.hp-showcase-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* White button for use on dark sections */
.btn-white {
  background-color: #fff;
  color: var(--accent);
  border-color: transparent;
}

.btn-white:hover {
  background-color: #F0F4FF;
}

.btn-white:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hp-showcase-testimonial {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}

.hp-showcase-testimonial q {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 10px;
  quotes: "«" "»";
}

.hp-showcase-testimonial .author {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* --------------------------------------------------------------------------
   Section: USP / Преимущества (dark background, 3×2 card grid)
   -------------------------------------------------------------------------- */

.hp-usp {
  background: var(--bg-dark);
  color: var(--ink-light);
  padding: var(--section-y) 0;
}

.hp-usp .hp-sec-center h2 {
  color: #fff;
}

.hp-usp .hp-sec-center .hp-sub {
  color: rgba(255, 255, 255, 0.65);
}

.hp-usp .hp-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.hp-usp .hp-eyebrow::before {
  background: rgba(255, 255, 255, 0.3);
}

.hp-usp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hp-usp-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 200ms, border-color 200ms;
}

.hp-usp-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.hp-usp-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hp-usp-icon svg {
  width: 22px;
  height: 22px;
}

.hp-usp-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
}

.hp-usp-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Section: Contact form / Get selection
   -------------------------------------------------------------------------- */

.hp-quiz {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 56px;
}

.hp-quiz-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-quiz-copy h2 {
  font-size: 32px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hp-quiz-copy .hp-sub {
  font-size: 16px;
}

.hp-quiz-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.hp-quiz-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}

.hp-quiz-check {
  width: 22px;
  height: 22px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.hp-quiz-check svg {
  width: 12px;
  height: 12px;
}

.hp-quiz-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hp-quiz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hp-quiz-consent {
  font-size: 12px;
  color: var(--muted);
}

.hp-quiz-consent a {
  color: var(--accent);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Section: FAQ
   -------------------------------------------------------------------------- */

.hp-faq-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

.hp-faq-aside {
  position: sticky;
  top: 148px; /* header height (72px main + 52px cats) + 24px gap */
}

.hp-faq-aside h2 {
  font-size: 36px;
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}

.hp-faq-aside .hp-sub {
  font-size: 16px;
  margin-bottom: 24px;
}

.hp-faq-list {
  display: flex;
  flex-direction: column;
}

.hp-faq-item {
  border-bottom: 1px solid var(--line);
}

.hp-faq-item:first-child {
  border-top: 1px solid var(--line);
}

.hp-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 150ms;
}

.hp-faq-item summary::-webkit-details-marker {
  display: none;
}

.hp-faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.hp-faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 200ms, color 200ms;
}

.hp-faq-item[open] .hp-faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.hp-faq-item[open] summary {
  color: var(--accent);
}

.hp-faq-answer {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Responsive: Tablet ≤ 1024px
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hp-hero-copy h1 {
    font-size: 40px;
  }

  .hp-steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .hp-step-card:not(:last-child)::after {
    display: none;
  }

  .hp-tasks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-usp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-quiz {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px;
  }

  .hp-faq-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hp-faq-aside {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   Responsive: Mobile ≤ 640px
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .hp-hero {
    padding: 48px 0 64px;
  }

  .hp-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hp-hero-copy h1 {
    font-size: 32px;
    max-width: none;
  }

  .hp-hero-media {
    aspect-ratio: 16/10;
  }

  .hp-trust-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hp-trust-nums {
    gap: 24px;
    justify-content: flex-start;
  }

  .hp-steps-grid {
    grid-template-columns: 1fr;
  }

  .hp-tasks-grid {
    grid-template-columns: 1fr;
  }

  .hp-prod-grid {
    grid-template-columns: 1fr;
  }

  .hp-usp-grid {
    grid-template-columns: 1fr;
  }

  .hp-quiz {
    padding: 24px;
  }

  .hp-quiz-row {
    grid-template-columns: 1fr;
  }

  .hp-cat-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hp-sec-center h2 {
    font-size: 30px;
  }
}
