/* ============================================================
   ClickShot GEO — base.css
   Design system variables + global shared styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@300;400;500;600;700;800&family=Onest:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Ink (neutral) */
  --ink-950: #0A0A0A;
  --ink-900: #171717;
  --ink-800: #262626;
  --ink-700: #404040;
  --ink-600: #525252;
  --ink-500: #737373;
  --ink-400: #A3A3A3;
  --ink-300: #D4D4D4;
  --ink-200: #E5E5E5;
  --ink-150: #EDEDED;
  --ink-100: #F5F5F5;
  --ink-50:  #FAFAFA;
  --white:   #FFFFFF;

  /* Signal — electric lime */
  --lime:      #C5FF1A;
  --lime-600:  #B7F500;
  --lime-200:  #E6FF99;
  --lime-100:  #F1FFCC;
  --lime-glow: rgba(197,255,26,0.55);
  --lime-400:      #b5ff51;

  /* Surfaces */
  --bg-page:     var(--white);
  --bg-section:  var(--ink-50);
  --bg-dark:     var(--ink-950);

  /* Borders */
  --border-hair: 1px solid var(--ink-200);
  --border-soft: 1px solid var(--ink-150);
  --border-ink:  1.5px solid var(--ink-950);

  /* Radii */
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;
  --r-5: 18px;
  --r-6: 22px;
  --r-7: 28px;
  --r-8: 36px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(10,10,10,0.04);
  --shadow-2: 0 6px 18px rgba(10,10,10,0.06), 0 1px 2px rgba(10,10,10,0.04);
  --shadow-3: 0 18px 40px rgba(10,10,10,0.08), 0 2px 8px rgba(10,10,10,0.04);
  --shadow-4: 0 32px 64px rgba(10,10,10,0.14);

  /* Accent (structural dark navy) */
  --accent:        #181b25;
  --accent-600:    #232735;
  --accent-200:    #c9ccd6;
  --accent-tint:   #eef0f5;
  --accent-tint-2: #dfe2eb;
  --accent-on:     #ffffff;

  /* Warm surfaces */
  --cream:         #f6f2e8;
  --cream-2:       #ede7d6;

  /* Card edges */
  --edge-border-w: 1.5px;
  --edge-border-color: var(--accent);
  --edge-shadow:       5px 5px 0 var(--accent-tint-2);
  --edge-shadow-hover: 7px 7px 0 var(--accent-tint-2);
  --edge-radius: var(--r-5);

  /* Spacing */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px;
  --s-6:24px; --s-7:32px; --s-8:40px; --s-9:56px;
  --s-10:72px; --s-11:96px; --s-12:128px;

  /* Typography */
  --font-display: 'Geologica', 'Onest', system-ui, sans-serif;
  --font-body:    'Onest', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale — hero (base) */
  --fs-svc-hero: clamp(31px, 4.3vw, 62px);

  /* Motion — правила выбора: docs/design-system/SPECIFICATION.md → «Движение» */
  --ease-out:    cubic-bezier(0.23,1,0.32,1);    /* появление, уход, отклик интерфейса */
  --ease-in-out: cubic-bezier(0.77,0,0.175,1);   /* перемещение по экрану */
  --ease-drawer: cubic-bezier(0.32,0.72,0,1);    /* выезжающие панели */
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1); /* только редкие акценты (плавающая CTA) */
  --dur-1: 120ms;  /* нажатие, смена цвета */
  --dur-2: 220ms;  /* hover, dropdown, мелкие переходы */
  --dur-3: 360ms;  /* модалки, панели, аккордеон */
  --dur-4: 560ms;  /* маркетинговые появления */
  --stagger: 60ms; /* шаг задержки в группе .reveal */

  /* Type stretch */
  --type-stretch-display: 85%;
  --type-stretch-h: 92%;
}

/* ====================== RESET & BASE ====================== */

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

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--ink-950);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-on); }

a {
  color: var(--ink-950);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink-200);
  transition: border-color var(--dur-2) var(--ease-out);
}
a:hover { border-bottom-color: var(--ink-950); }

/* ====================== LAYOUT ====================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ====================== TYPOGRAPHY HELPERS ====================== */

.tape {
  background: var(--lime-400);
  color: var(--accent);
  padding: 0.02em 0.18em;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: inset 0 -0.18em 0 #95e02e;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.under {
  background: linear-gradient(var(--lime-400), var(--lime-400)) 0 94% / 100% 0.26em no-repeat;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ====================== BUTTONS ====================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--r-3);
  padding: 14px 22px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out);
  text-decoration: none;
  letter-spacing: -0.008em;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: translateY(0) scale(0.97); transition-duration: var(--dur-1); }

.btn-primary { background: var(--ink-950); color: var(--white); }
.btn-primary:hover { background: var(--ink-800); }

.btn-lime { background: var(--lime-400); color: var(--accent); border-color: var(--lime-400); }
.btn-lime:hover { background: var(--lime-400); border-color: var(--lime-400); }

.btn-secondary { background: transparent; color: var(--ink-800); border: 1.5px solid var(--ink-200); }
.btn-secondary:hover { background: var(--ink-50); border-color: var(--ink-300); color: var(--ink-950); }

.btn-ghost { background: transparent; color: var(--ink-700); padding: 14px 8px; }
.btn-ghost:hover { color: var(--ink-950); }

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: var(--r-2); }
.btn-lg { padding: 17px 28px; font-size: 16px; border-radius: var(--r-4); }

/* ====================== SECTIONS ====================== */

.section { padding: 128px 0; position: relative; }
@media (max-width: 768px) { .section { padding: 80px 0; } }
@media (max-width: 600px) { .section { padding: 56px 0; } }
.section--soft { background: var(--cream); }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin: 0 0 28px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(24,27,37,0.12);
  animation: pulseEyebrow 2s var(--ease-in-out) infinite;
}
@keyframes pulseEyebrow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(24,27,37,0.12); }
  50% { box-shadow: 0 0 0 8px rgba(24,27,37,0.05); }
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 68px);
  font-stretch: var(--type-stretch-h);
  letter-spacing: -0.045em;
  line-height: 1.06;
  color: var(--ink-950);
  margin: 0 0 22px 0;
  text-wrap: balance;
  max-width: 1000px;
}
.section-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-600);
  max-width: 660px;
  margin: 0;
}

/* ====================== DOTFIELD CANVAS ====================== */

.dotfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.dotfield canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ====================== FADE ANIMATIONS ====================== */

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s var(--ease-out) forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

/* Появление при прокрутке: .reveal на элементе, js/reveal.js добавляет .is-visible.
   Без JS (нет класса .js на <html>) элементы видны сразу. Задержка в группе —
   style="--i: N" (шаг --stagger). */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ====================== FLOATING CTA ====================== */

.float-cta {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  transform: translateY(140%);
  transition: transform var(--dur-4) var(--ease-spring);
  background: var(--lime-400);
  border-color: var(--lime-400);
  box-shadow: var(--shadow-3);
}
.float-cta:hover { background: #a6f23a; border-color: #a6f23a; }
.float-cta.show { transform: translateY(0); }

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.5; }
}

/* ====================== REDUCED MOTION ====================== */

/* Меньше движения — не ноль: перемещения убираем глобально, а смену цвета
   и прозрачности ключевые компоненты возвращают точечно (кнопки здесь,
   модалка — в order-modal.css, меню — в nav.css). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn {
    transition-property: background, color, border-color !important;
    transition-duration: var(--dur-2) !important;
  }
  .btn:active { transform: none; }
  .js .reveal {
    transform: none;
    transition-property: opacity !important;
    transition-duration: var(--dur-2) !important;
    transition-delay: 0s !important;
  }
  /* Marquee — медленная, не раздражает; оставляем infinite */
  .marquee-track {
    animation-duration: 56s !important;
    animation-iteration-count: infinite !important;
  }
  .fade-up {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}


/* Petrovich family planner: scoped palette from its watercolor references. */
.pv-app {
  --pv-paper:#fafaf7; --pv-surface:#fffefa; --pv-text:#293d38; --pv-muted:#64736d;
  --pv-line:#e0e5de; --pv-sage:#e7eee2; --pv-green:#5d7965; --pv-green-dark:#42604b;
  --pv-blue:#e7eff4; --pv-lavender:#eeeaf4; --pv-peach:#f8e8dd; --pv-coral:#e3b49d;
  --pv-radius:24px; --pv-shadow:0 8px 32px #34433a08;
}
