/* ==========================================
   Zepline ZP-00359 — critical.css
   Критичний CSS першого екрана: база, шапка, hero, ціна, таймер, CTA, sticky.
   index.php вбудовує цей файл інлайн у <head> (readfile), решта стилів — assets/style.css.
   Палітра: кремовий фон, оливково-зелений акцент, теракотовий другорядний акцент.
   Верстка лише мобільна (методологія, правило від 23.08.2026): на широкому екрані —
   та сама колонка до 480px по центру, без десктопних брейкпоінтів.
   ========================================== */

:root {
  --cream: #f6efe1;
  --cream-deep: #efe4cf;
  --paper: #fffdf8;
  --ink: #362f24;
  --ink-soft: #766b58;
  --olive: #6c7a4c;
  --olive-dark: #52603a;
  --olive-soft: #e8ecda;
  --terracotta: #c8754f;
  --terracotta-deep: #a9562f;
  --terracotta-soft: #f6e2d5;
  --line: rgba(54, 47, 36, 0.12);
  --shadow: 0 14px 34px rgba(84, 68, 40, 0.12);
  --shadow-sm: 0 6px 16px rgba(84, 68, 40, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--cream-deep); }

body {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--cream);
  box-shadow: 0 0 40px rgba(84, 68, 40, 0.1);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  text-align: center; /* увесь текст лендингу — по центру; винятки (таблиця, поля форми, юридичні тексти) задані окремо */
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); overflow-wrap: break-word; }

.container { padding: 0 16px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin: 0 0 12px;
}
.kicker::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
}

.lede {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 12px auto 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 16px;
  background: rgba(246, 239, 225, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand span { color: var(--olive); }
.site-header nav { display: none; }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  background: var(--olive);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.header-cta:hover { background: var(--olive-dark); }
.header-cta span { opacity: 0.85; font-weight: 600; }

/* ===== CTA (shine + breathe + nudge, за методологією v2) ===== */
.cta {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  background: linear-gradient(180deg, var(--olive), var(--olive-dark));
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(82, 96, 58, 0.2);
  animation: premiumBreathe 2.8s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cta::before {
  content: "";
  position: absolute;
  top: -45%;
  left: -35%;
  width: 28%;
  height: 190%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: skewX(-20deg);
  animation: premiumShine 3.6s ease-in-out infinite;
  pointer-events: none;
}
.cta .icon { flex-shrink: 0; animation: cartNudge 2.8s ease-in-out infinite; transform-origin: center; }
.cta:hover { filter: brightness(1.04); transform: translateY(-1px); }
.cta:active { transform: translateY(1px) scale(0.99); filter: brightness(0.98); }
.cta:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.cta[disabled] { opacity: 0.7; cursor: default; }
.cta-mini { width: auto; min-height: 44px; padding: 8px 16px; font-size: 14.5px; gap: 8px; }
.cta s { font-weight: 600; opacity: 0.75; font-size: 0.82em; }

@keyframes premiumShine { 0%, 52% { left: -35%; opacity: 0; } 62% { opacity: 0.95; } 78% { left: 115%; opacity: 0; } 100% { left: 115%; opacity: 0; } }
@keyframes premiumBreathe { 0%, 100% { box-shadow: 0 10px 28px rgba(82, 96, 58, 0.2); } 50% { box-shadow: 0 12px 34px rgba(82, 96, 58, 0.34); } }
@keyframes cartNudge { 0%, 70%, 100% { transform: translateX(0) rotate(0); } 76% { transform: translateX(2px) rotate(-3deg); } 82% { transform: translateX(-1px) rotate(2deg); } }

/* ===== Hero ===== */
.hero { padding: 16px 0 12px; }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.hero h1 {
  font-size: clamp(25px, 7vw, 30px);
  line-height: 1.12;
}
.hero h1 em { font-style: normal; color: var(--olive-dark); }
.h1-eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.hero-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }

.hero-photo { position: relative; }
.kb {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--cream-deep);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.kb img { width: 100%; will-change: transform; }
/* Ken Burns: hero стартує одразу; фото нижче — лише коли в зоні видимості (.in-view) */
.kb-hero img {
  transform-origin: 68% 42%;
  animation: kenburnsHero 9s ease-in-out infinite alternate;
}
.kb-hero.is-paused img { animation-play-state: paused; }
@keyframes kenburnsHero { from { transform: scale(1); } to { transform: scale(1.06) translate(-0.6%, 0.4%); } }

.sale-sticker {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--terracotta-deep);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 20px rgba(169, 86, 47, 0.35);
  transform: rotate(8deg);
  animation: stickerPop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) 0.35s both, stickerPulse 2.6s ease-in-out 1.4s infinite;
}
@keyframes stickerPop { from { transform: rotate(-25deg) scale(0); } to { transform: rotate(8deg) scale(1); } }
@keyframes stickerPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(169, 86, 47, 0.35), 0 0 0 0 rgba(200, 117, 79, 0.45); }
  50% { box-shadow: 0 8px 20px rgba(169, 86, 47, 0.35), 0 0 0 10px rgba(200, 117, 79, 0); }
}

/* ===== Price box ===== */
.price-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.price-new {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: pricePop 0.65s cubic-bezier(0.2, 1.3, 0.4, 1) 0.15s both;
}
.price-new small { font-size: 0.5em; font-weight: 700; letter-spacing: 0; }
.price-old {
  position: relative;
  font-size: 18px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.price-old::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 52%;
  height: 2px;
  border-radius: 2px;
  background: var(--terracotta);
  transform-origin: left center;
  animation: strikeDraw 0.45s ease-out 0.7s both;
}
.price-badge {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  font-weight: 800;
  font-size: 13.5px;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  animation: badgePop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 1s both, badgePulse 2.6s ease-in-out 1.8s infinite;
}
.price-side { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.price-side .price-badge { font-size: 12.5px; padding: 3px 10px; }
.price-note { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-soft); }
@keyframes pricePop { from { opacity: 0; transform: scale(0.72); } to { opacity: 1; transform: scale(1); } }
@keyframes strikeDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes badgePop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes badgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* ===== Timer ===== */
.timer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--terracotta-soft);
  border: 1px solid rgba(200, 117, 79, 0.28);
  border-radius: var(--radius-sm);
}
.timer-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  color: var(--terracotta-deep);
}
.timer-label svg { flex-shrink: 0; }
.timer-cells { display: flex; align-items: flex-start; gap: 4px; }
.timer-cells .cell { text-align: center; }
.timer-cells .cell b {
  display: block;
  min-width: 42px;
  padding: 6px 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 9px;
  font-size: 21px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.timer-cells .cell span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.timer-cells i {
  font-style: normal;
  font-size: 20px;
  font-weight: 800;
  line-height: 36px;
  color: var(--terracotta-deep);
  animation: softBlink 1s ease-in-out infinite;
}
.timer-cells .cell-sec b { background: var(--terracotta-deep); animation: softBlink 1s ease-in-out infinite; }
@keyframes softBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.price-block .cta { margin-top: 14px; }

.trust-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { flex-shrink: 0; color: var(--olive); }

/* ===== Hero bullets ===== */
.hero-bullets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.hero-bullets li {
  background: var(--olive-soft);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
}
.hero-bullets b { display: block; font-size: 18px; line-height: 1.15; color: var(--olive-dark); white-space: nowrap; }
.hero-bullets span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===== Sticky mobile CTA ===== */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(246, 239, 225, 0), var(--cream) 42%);
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}
.sticky-bar .cta { pointer-events: auto; display: flex; }
.sticky-bar.is-hidden { transform: translateY(110%); opacity: 0; visibility: hidden; }

/* ===== Scroll-reveal (вмикається лише з JS + IntersectionObserver, клас .anim на <html>) ===== */
.anim .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.anim .reveal.is-visible { opacity: 1; transform: none; }

/* ===== Без анімацій для тих, хто їх вимкнув ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .cta::before, .cta .icon { animation: none !important; }
  .cta::before { display: none; }
  .kb img, .sale-sticker, .price-new, .price-old::after, .price-badge,
  .timer-cells i, .timer-cells .cell-sec b { animation: none !important; }
  .sticky-bar { transition: none; }
}
