/* ── Tech Pages ──
   Стилі для /pages/* (оферта, доставка, гарантія тощо).
   Усі розміри в px — тут НЕ працює em-шкала Webflow (body { font-size:1vw }). */

/* ── Reading progress ── */
.tp-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: #c61717;
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10000;
  pointer-events: none;
  will-change: transform;
}

/* ── Wrapper ── */
html .tp {
  --tp-red: #c61717;
  --tp-dark: #1e1f23;
  --tp-heading: #1c1c22;
  --tp-text: #2d2d3a;
  --tp-muted: #7e7e8e;
  --tp-light: #f7f7fa;
  --tp-border: #e5e5ec;

  display: block;
  max-width: none;
  width: 100%;
  margin: 0;
  overflow-x: clip;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tp-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html .tp__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ────────────────────────────────────────────
   CONTACT CARDS
   ──────────────────────────────────────────── */
html .tp__contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

html .tp__card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 14px;
  background: var(--tp-dark);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: default;
}

html a.tp__card {
  cursor: pointer;
}

html .tp__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

html .tp__card--accent {
  background: linear-gradient(145deg, #c61717 0%, #d92626 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

html .tp__card-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html .tp__card--accent .tp__card-icon {
  background: rgba(255, 255, 255, 0.16);
}

html .tp__card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

html .tp__card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}

html .tp__card-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

html .tp__card-meta {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

/* ────────────────────────────────────────────
   HEADER
   ──────────────────────────────────────────── */
html .tp__header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tp-border);
}

html .tp__title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--tp-heading);
  letter-spacing: -0.025em;
}

html .tp__accent-bar {
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 18px;
  margin-bottom: 14px;
  background: var(--tp-red);
  border-radius: 2px;
}

html .tp__updated {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--tp-muted);
  line-height: 1.5;
}

/* ────────────────────────────────────────────
   BODY: RICH TEXT
   ──────────────────────────────────────────── */
html .tp__body {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--tp-text);
  overflow-wrap: break-word;
}

/* — Headings — */
html .tp__body h2 {
  margin: 48px 0 14px;
  padding-left: 16px;
  border-left: 3px solid var(--tp-red);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tp-heading);
}

html .tp__body h2:first-child {
  margin-top: 0;
}

html .tp__body h3 {
  margin: 40px 0 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tp-heading);
}

html .tp__body h3:first-child {
  margin-top: 0;
}

html .tp__body h4 {
  margin: 30px 0 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tp-heading);
}

html .tp__body h4:first-child {
  margin-top: 0;
}

/* — Paragraphs — */
html .tp__body p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--tp-text);
}

html .tp__body p:last-child {
  margin-bottom: 0;
}

/* — Links — */
html .tp__body a {
  color: var(--tp-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(198, 23, 23, 0.3);
  transition: text-decoration-color 0.2s ease;
}

html .tp__body a:hover {
  text-decoration-color: var(--tp-red);
}

/* — Lists — */
html .tp__body ul,
html .tp__body ol {
  margin: 4px 0 18px;
  padding-left: 0;
  list-style: none;
}

html .tp__body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.75;
}

html .tp__body ul li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tp-red);
}

html .tp__body ol {
  counter-reset: tp-ol;
}

html .tp__body ol li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.75;
  counter-increment: tp-ol;
}

html .tp__body ol li::before {
  content: counter(tp-ol) '.';
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--tp-red);
  font-size: 15px;
  line-height: 1.75;
}

/* — Blockquote — */
html .tp__body blockquote {
  position: relative;
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--tp-light);
  border-left: 3px solid var(--tp-red);
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--tp-text);
}

html .tp__body blockquote p {
  margin-bottom: 8px;
}

html .tp__body blockquote p:last-child {
  margin-bottom: 0;
}

/* — Horizontal rule — */
html .tp__body hr {
  height: 1px;
  margin: 40px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--tp-border) 12%, var(--tp-border) 88%, transparent);
}

/* — Strong — */
html .tp__body strong {
  font-weight: 600;
  color: var(--tp-heading);
}

/* — Images — */
html .tp__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* — Tables — */
html .tp__body table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

html .tp__body th {
  padding: 12px 16px;
  background: var(--tp-light);
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--tp-border);
  color: var(--tp-heading);
}

html .tp__body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--tp-border);
  vertical-align: top;
}

html .tp__body tr:last-child td {
  border-bottom: 0;
}

/* — Code (inline) — */
html .tp__body code {
  padding: 2px 6px;
  background: var(--tp-light);
  border-radius: 4px;
  font-size: 14px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* ────────────────────────────────────────────
   ENTRANCE ANIMATIONS
   ──────────────────────────────────────────── */
@keyframes tp-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tp-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

html .tp__card {
  animation: tp-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html .tp__card:nth-child(1) { animation-delay: 0.04s; }
html .tp__card:nth-child(2) { animation-delay: 0.10s; }
html .tp__card:nth-child(3) { animation-delay: 0.16s; }

html .tp__header {
  animation: tp-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.20s both;
}

html .tp__accent-bar {
  transform-origin: left;
  animation: tp-bar 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.40s both;
}

html .tp__body {
  animation: tp-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

/* ────────────────────────────────────────────
   REDUCED MOTION
   ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html .tp__card,
  html .tp__header,
  html .tp__accent-bar,
  html .tp__body {
    animation: none;
    opacity: 1;
    transform: none;
  }

  html .tp__card:hover {
    transform: none;
  }

  .tp-progress {
    display: none;
  }
}

/* ────────────────────────────────────────────
   RESPONSIVE: TABLET (≤ 991px)
   ──────────────────────────────────────────── */
@media screen and (max-width: 991px) {
  html .tp__title {
    font-size: 34px;
  }

  html .tp__body h2 {
    font-size: 23px;
  }

  html .tp__body h3 {
    font-size: 19px;
  }
}

/* ────────────────────────────────────────────
   RESPONSIVE: MOBILE (≤ 767px)
   ──────────────────────────────────────────── */
@media screen and (max-width: 767px) {
  html .tp__inner {
    padding: 20px 16px 72px;
  }

  html .tp__contacts {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 36px;
  }

  html .tp__card {
    padding: 18px 16px;
    border-radius: 12px;
  }

  html .tp__card-icon {
    width: 38px;
    height: 38px;
  }

  html .tp__header {
    margin-bottom: 28px;
    padding-bottom: 22px;
  }

  html .tp__title {
    font-size: 28px;
    letter-spacing: -0.02em;
  }

  html .tp__accent-bar {
    width: 32px;
    margin-top: 14px;
    margin-bottom: 10px;
  }

  html .tp__body {
    font-size: 16px;
    line-height: 1.7;
  }

  html .tp__body h2 {
    font-size: 21px;
    margin-top: 36px;
  }

  html .tp__body h3 {
    font-size: 18px;
    margin-top: 28px;
  }

  html .tp__body h4 {
    font-size: 16px;
    margin-top: 22px;
  }

  html .tp__body blockquote {
    padding: 16px 18px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
  }

  html .tp__body hr {
    margin: 28px 0;
  }
}

/* ────────────────────────────────────────────
   RESPONSIVE: SMALL MOBILE (≤ 479px)
   ──────────────────────────────────────────── */
@media screen and (max-width: 479px) {
  html .tp__title {
    font-size: 25px;
  }

  html .tp__card {
    gap: 12px;
    padding: 16px 14px;
  }

  html .tp__body ul li {
    padding-left: 18px;
  }

  html .tp__body ol li {
    padding-left: 24px;
  }
}
