/* =====================================================
   IMINERA — Оцифровка лекал — стили
   Mobile-first. Vanilla CSS. Без CDN, без фреймворков.
   ===================================================== */

:root {
  /* Брендовая палитра Iminera */
  --accent:       #E91E63;
  --accent-dark:  #C2185B;
  --dark:         #333333;
  --grey:         #666666;
  --light-grey:   #999999;
  --border:       #E8E0E0;
  --pastel:       #F8F3F3;
  --white:        #FFFFFF;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 32px rgba(0,0,0,0.08);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;

  /* Type scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: clamp(24px, 4vw, 32px);
  --fs-hero: clamp(30px, 5.5vw, 48px);

  --transition-fast: 0.18s ease;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: var(--fs-base);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 10px 18px;
  z-index: 2000;
}
.skip-link:focus { left: 8px; top: 8px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

.section { padding: var(--sp-6) 0; }
.section-pastel { background: var(--pastel); }
.section-dark { background: var(--dark); }

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}
.section-label-light { color: var(--accent); }

.section-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--sp-4);
  max-width: 720px;
}
.section-title-light { color: var(--white); }

.section-text {
  font-size: var(--fs-sm);
  color: var(--grey);
  line-height: 1.7;
}
.section-text-lead {
  font-size: var(--fs-md);
  max-width: 640px;
  margin-bottom: var(--sp-5);
}
.section-text-light { color: rgba(255,255,255,0.72); max-width: 480px; }

/* =====================================================
   КНОПКИ + микроинтеракция "игла с ниткой"
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 15px 32px;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover,
.btn-accent:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233,30,99,0.28);
}
.btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }

.btn-cta { position: relative; }
.needle-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0;
  transform: translate(-4px, 4px) rotate(-8deg);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.needle-thread { opacity: 0.85; }
.btn-cta:hover .needle-icon,
.btn-cta:focus-visible .needle-icon {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg);
}
.btn-cta:hover,
.btn-cta:focus-visible {
  border-style: dashed;
  border-color: rgba(255,255,255,0.85);
}

.btn-submit { width: 100%; justify-content: center; margin-top: var(--sp-3); }

/* =====================================================
   ЭФФЕКТ 1 — СТРОЧКА-РАЗДЕЛИТЕЛЬ МЕЖДУ СЕКЦИЯМИ
   ===================================================== */
.stitch-divider {
  width: 100%;
  height: 20px;
  overflow: hidden;
}
.stitch-divider svg { width: 100%; height: 100%; }
.stitch-divider line {
  stroke: var(--border);
  stroke-width: 2;
  stroke-dashoffset: 100%;
  transition: stroke-dashoffset 0.8s ease;
}
.stitch-divider.is-stitched line { stroke-dashoffset: 0; }

/* =====================================================
   ЭФФЕКТ 3 — РАЗРЕЗ МЕЖДУ БЛОК 1 И БЛОК 2
   ===================================================== */
.scissor-cut {
  position: relative;
  height: 28px;
  background: var(--pastel);
  clip-path: polygon(
    0% 50%, 4% 20%, 8% 50%, 12% 20%, 16% 50%, 20% 20%, 24% 50%,
    28% 20%, 32% 50%, 36% 20%, 40% 50%, 44% 20%, 48% 50%,
    52% 20%, 56% 50%, 60% 20%, 64% 50%, 68% 20%, 72% 50%,
    76% 20%, 80% 50%, 84% 20%, 88% 50%, 92% 20%, 96% 50%, 100% 20%,
    100% 100%, 0% 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.scissor-cut.is-cut { transform: scaleX(1); }

/* =====================================================
   ХЕДЕР
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 64px;
}
.logo { height: 24px; }
.main-nav { display: none; }
.header-phone {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.header-phone:hover { color: var(--accent); }

@media (min-width: 1024px) {
  .header-inner { height: 72px; }
  .logo { height: 30px; }
  .main-nav { display: flex; gap: var(--sp-4); }
  .main-nav a {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--dark);
    transition: color var(--transition-fast);
  }
  .main-nav a:hover { color: var(--accent); }
}

/* =====================================================
   БЛОК 1 — HERO
   ===================================================== */
.hero { padding: var(--sp-6) 0 0; background: var(--white); }
.hero-grid {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}
.hero-title {
  font-size: var(--fs-hero);
  color: var(--dark);
  margin-bottom: var(--sp-3);
}
.hero-subtitle {
  font-size: var(--fs-md);
  color: var(--grey);
  max-width: 480px;
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}
.hero-visual { width: 100%; }
.hero-svg { width: 100%; height: auto; }

.line-dark { stroke: var(--border); stroke-width: 2; }
.pattern-shape { fill: var(--pastel); stroke: var(--dark); stroke-width: 2; }
.pattern-fold { fill: none; stroke: var(--light-grey); stroke-width: 1.4; }
.pattern-notch { stroke: var(--dark); stroke-width: 1.4; }
.stitch-arrow { fill: none; stroke: var(--accent); stroke-width: 2; }
.laptop-screen { fill: var(--dark); stroke: var(--dark); }
.laptop-base { fill: var(--light-grey); opacity: 0.5; }
.digital-shape { fill: none; stroke: var(--accent); stroke-width: 2; }
.digital-line { fill: none; stroke: rgba(233,30,99,0.55); stroke-width: 1.4; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   БЛОК 2 — РЕШЕНИЕ
   ===================================================== */
.solution-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}
.solution-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: var(--sp-5) var(--sp-4);
}
.solution-icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  margin-bottom: var(--sp-3);
}
.solution-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}
.solution-card p {
  font-size: var(--fs-sm);
  color: var(--grey);
  line-height: 1.65;
}

@media (min-width: 768px) {
  .solution-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================
   БЛОК 3 — УСЛУГИ
   ===================================================== */
.service-block {
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }
.service-head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.service-num {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: rgba(233,30,99,0.25);
  line-height: 1;
}
.service-head h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.service-tagline {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
}
.service-sub {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin: var(--sp-3) 0 var(--sp-2);
}

/* =====================================================
   ЧЕК-ЛИСТЫ
   ===================================================== */
.check-list li {
  position: relative;
  padding-left: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: var(--sp-2);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.check-list-big li { color: var(--dark); font-size: var(--fs-base); }
.check-sublist { margin-top: var(--sp-2); }
.check-sublist li::before { background: var(--light-grey); }

/* =====================================================
   БЛОК 4 — ПОЧЕМУ IMINERA
   ===================================================== */
.why-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}
.why-num {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: rgba(0,0,0,0.12);
  line-height: 1;
  margin-bottom: -6px;
}
.why-line {
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--sp-3);
}
.why-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}
.why-item p {
  font-size: var(--fs-sm);
  color: var(--grey);
  line-height: 1.65;
}

@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .why-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================
   БЛОК 5 — ПРАЙС
   ===================================================== */
.price-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
.price-table th, .price-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
}
.price-table thead th {
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: var(--fs-xs);
}
.price-table tbody tr { border-bottom: 1px solid var(--border); }
.price-table tbody tr:last-child { border-bottom: none; }
.price-table tbody tr:nth-child(even) { background: var(--pastel); }
.price-table td:nth-child(2) { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }

.price-note {
  font-size: var(--fs-xs);
  color: var(--light-grey);
  margin-top: var(--sp-3);
  max-width: 560px;
}

/* =====================================================
   БЛОК 7 — ПРОЦЕСС
   ===================================================== */
.steps-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}
.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: var(--fs-md);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  box-shadow: 0 4px 16px rgba(233,30,99,0.28);
}
.step-card h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.step-card p { font-size: var(--fs-sm); color: var(--grey); line-height: 1.65; }

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================
   БЛОК 8 — CTA + ФОРМА
   ===================================================== */
.order-grid {
  display: grid;
  gap: var(--sp-6);
}
.order-phone-fallback {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
}
.order-phone-fallback a { color: var(--white); font-weight: 700; text-decoration: underline; }

.order-form-card {
  background: var(--white);
  padding: var(--sp-5);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: var(--sp-3); }
.field label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--dark);
  background: var(--white);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition-fast);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--light-grey); }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  min-height: 1.4em;
}
.form-status.is-error { color: var(--accent-dark); }
.form-status.is-loading { color: var(--grey); }

.form-success { text-align: center; padding: var(--sp-6) var(--sp-4); }
.form-success h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.form-success p { color: var(--grey); font-size: var(--fs-sm); }

@media (min-width: 1024px) {
  .order-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* =====================================================
   ФУТЕР
   ===================================================== */
.site-footer { background: var(--dark); padding: var(--sp-6) 0; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
}
.footer-logo { height: 24px; filter: invert(1) brightness(2); }
.footer-phone { color: var(--white); font-weight: 700; font-size: var(--fs-md); }
.footer-phone:hover { color: var(--accent); }
.footer-copy { color: rgba(255,255,255,0.4); font-size: var(--fs-xs); }

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* =====================================================
   DESKTOP: контейнер и секции — больше воздуха
   ===================================================== */
@media (min-width: 768px) {
  .container { padding: 0 var(--sp-4); }
  .section { padding: var(--sp-7) 0; }
}
@media (min-width: 1024px) {
  .container { padding: 0 var(--sp-5); }
  .section { padding: var(--sp-8) 0; }
  .hero { padding-top: var(--sp-7); }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .stitch-divider line { stroke-dashoffset: 0 !important; }
  .scissor-cut { transform: scaleX(1) !important; }
}
