/* ============================================================
   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);

  /* 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);

  /* Card edges (brutalist) */
  --edge-border-w: 1.5px;
  --edge-border-color: var(--ink-950);
  --edge-shadow: 12px 12px 0 var(--ink-950);
  --edge-shadow-hover: 16px 16px 0 var(--ink-950);
  --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;

  /* Motion */
  --ease-out:    cubic-bezier(0.2,0.8,0.2,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease-in-out: cubic-bezier(0.65,0,0.35,1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 360ms;
  --dur-4: 560ms;

  /* 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(--lime); color: var(--ink-950); }

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 ====================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-700);
}

.tape {
  background: var(--lime);
  color: var(--ink-950);
  padding: 0.04em 0.18em;
  border-radius: 4px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.under {
  /* Подчёркивание фоном вместо absolute-псевдоэлемента: корректно
     переносится на узких экранах. white-space:nowrap убран — длинная
     фраза («Два разных результата») вылезала за край экрана. */
  background: linear-gradient(var(--lime), var(--lime)) 0 100% / 100% 0.14em 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;
  border-bottom: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); 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); color: var(--ink-950); border-color: var(--ink-950); }
.btn-lime:hover { background: var(--lime-600); }

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

.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--dark { background: var(--ink-950); color: var(--white); }
.section--dark .section-title { color: var(--white); }
.section--dark .section-sub { color: var(--ink-400); }
.section--dark .section-eyebrow { color: var(--lime); }
.section--soft { background: var(--bg-section); }

.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(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(197,255,26,0.18);
  animation: pulseEyebrow 2s var(--ease-in-out) infinite;
}
@keyframes pulseEyebrow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(197,255,26,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(197,255,26,0.06); }
}

.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: 0.96;
  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; }

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

.float-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  transform: translateY(140%);
  transition: transform var(--dur-4) var(--ease-spring);
}
.float-cta.show { transform: translateY(0); }

/* ====================== IMAGE PLACEHOLDERS ================== */

.img-ph {
  margin: 0;
  display: block;
  overflow: hidden;
  border-radius: var(--r-5);
}

.img-ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* dev-only outline — удалите после замены реальными изображениями */
.img-ph img[src*="img/"] {
  outline: 2px dashed var(--lime);
  outline-offset: -2px;
  background: var(--ink-900);
  min-height: 120px;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  /* Marquee — медленная, не раздражает; оставляем infinite */
  .marquee-track {
    animation-duration: 56s !important;
    animation-iteration-count: infinite !important;
  }
  .fade-up, .how-step {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
