/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:           #EEEFF6;
  --surface:      #FFFFFF;
  --surface-hi:   #F5F5FB;
  --border:       rgba(0, 0, 0, 0.08);
  --border-hi:    rgba(0, 0, 0, 0.14);

  --accent:       #09BFB0;
  --accent-dim:   rgba(9, 191, 176, 0.10);
  --accent-glow:  rgba(9, 191, 176, 0.22);

  --text:         #09090F;
  --muted:        #62627A;
  --subtle:       #B0B0C8;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius:       10px;
  --radius-lg:    18px;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: none; border: none; background: none; }
img, svg { display: block; }

/* ─── CURSOR ─────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), opacity 0.2s;
  will-change: transform;
}

.cursor-trail {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(13, 217, 201, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), opacity 0.2s;
  will-change: transform;
}

body:has(a:hover, button:hover, .opt:hover) .cursor { width: 12px; height: 12px; }
body:has(a:hover, button:hover, .opt:hover) .cursor-trail { width: 52px; height: 52px; border-color: rgba(13, 217, 201, 0.6); }

@media (pointer: coarse), (max-width: 768px) {
  .cursor, .cursor-trail { display: none; }
  body, button { cursor: auto; }
}

/* ─── LOADER ─────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-cube {
  width: 52px;
  height: 52px;
  animation: loaderSpin 1.4s ease-in-out infinite;
}

@keyframes loaderSpin {
  0%   { transform: rotate(0deg) scale(1); opacity: 1; }
  50%  { transform: rotate(180deg) scale(0.9); opacity: 0.7; }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.loader-wordmark {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--muted);
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 48px;
  height: 68px;
  transition: background 0.3s, border-bottom 0.3s;
}

.nav.scrolled {
  background: rgba(238, 239, 246, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
  margin-right: 36px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-burger.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── MOBILE NAV ─────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: #EEEFF6;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  flex-direction: column;
  padding: 24px 24px 32px;
  gap: 4px;
  z-index: 99;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
  pointer-events: none;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-link {
  font-size: 18px;
  font-weight: 500;
  padding: 12px 8px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--text); }
.mobile-nav-link:last-of-type { border-bottom: none; }

.mobile-nav-cta {
  margin-top: 16px;
  justify-content: center;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #07A89B;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--accent);
  transition: gap 0.2s;
  gap: 4px;
}
.btn-ghost:hover { gap: 8px; }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  overflow: hidden;
}

/* Animated dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(0,0,0,0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 100%);
  pointer-events: none;
  animation: gridPan 40s linear infinite;
}

@keyframes gridPan {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* Ambient glow */
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(9,191,176,0.10) 0%,
    rgba(9,191,176,0.03) 50%,
    transparent 70%);
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

.hero-content {
  max-width: 640px;
  z-index: 2;
  position: relative;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  opacity: 0;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 24px;
  background: var(--accent-dim);
  border: 1px solid rgba(9,191,176,0.3);
  color: var(--accent);
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line > span,
.hero-line {
  transform-origin: bottom left;
}

.hero-accent {
  background: linear-gradient(105deg, #09BFB0 0%, #3DDDD3 45%, #09BFB0 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 44px;
  max-width: 480px;
  opacity: 0;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
}

.hero-btn {
  opacity: 1;
}

.hero-tg-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}

.hero-tg-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

.hero-tg-link svg { color: #2AABEE; flex-shrink: 0; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: lowercase;
}

.scroll-track {
  width: 1px;
  height: 40px;
  background: var(--subtle);
  position: relative;
  overflow: hidden;
}

.scroll-thumb {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--accent);
  animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%   { top: -40%; }
  100% { top: 140%; }
}

/* ─── STATS ──────────────────────────────────────────────── */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 48px;
}

.stats-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
}

.stat-sep {
  width: 1px;
  height: 60px;
  background: var(--border);
  justify-self: center;
}

.stat-item {
  text-align: center;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out) var(--delay, 0s),
              transform 0.6s var(--ease-out) var(--delay, 0s);
}
.stat-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stat-count {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  max-width: 160px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─── DEMO ───────────────────────────────────────────────── */
/* ─── DEMO (Telegram Screencast) ─────────────────────────── */
.demo {
  padding: 120px 48px;
  background: var(--bg);
}

.demo-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.demo-header {
  margin-bottom: 52px;
}

/* Wrapper with cursor overlay */
.tgd-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* Animated cursor */
.tgd-cursor {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.25s;
  top: 0; left: 0;
  transform: translate(0px, 0px);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.tgd-cursor.visible { opacity: 1; }

/* Highlight spotlight behind cursor */
.tgd-cursor::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(9, 191, 176, 0.15);
  animation: cursorGlow 1.8s ease-in-out infinite;
}
@keyframes cursorGlow {
  0%, 100% { transform: scale(1);   opacity: 0.7; }
  50%       { transform: scale(1.2); opacity: 1; }
}

.tgd-click-ring {
  position: absolute;
  top: -6px; left: -6px;
  width: 36px; height: 36px;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
}
.tgd-click-ring.pop {
  animation: clickPop 0.5s ease-out forwards;
}
@keyframes clickPop {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(3);   opacity: 0; }
}

/* Telegram Desktop Window */
.tgd-window {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 960px;
  height: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.09);
}

/* Sidebar */
.tgd-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--surface-hi);
}

.tgd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--subtle);
}

.tgd-chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: default;
  transition: background 0.15s;
}
.tgd-chat-item:hover { background: rgba(0,0,0,0.03); }
.tgd-chat-active { background: rgba(9,191,176,0.08) !important; }

.tgd-ci-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #2AABEE;
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tgd-ci-av-q { background: linear-gradient(135deg, #09BFB0 0%, #0891B2 100%); }

.tgd-ci-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tgd-ci-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tgd-ci-preview {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tgd-ci-time {
  font-size: 11px;
  color: var(--subtle);
  flex-shrink: 0;
}

/* Chat area */
.tgd-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tgd-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.tgd-chat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.tgd-chat-status {
  font-size: 11px;
  color: var(--accent);
}

/* Messages list */
.tgd-messages {
  flex: 1;
  overflow-y: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(9,191,176,0.02) 0%, transparent 100%);
}

/* Message wrapper */
.tgdm {
  display: flex;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.tgdm.show { opacity: 1; transform: translateY(0); }

.tgdm-bot  { justify-content: flex-start; }
.tgdm-user { justify-content: flex-end; }

/* Bubble */
.tgdm-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}

.tgdm-bot .tgdm-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.tgdm-user .tgdm-bubble {
  background: #2AABEE;
  color: white;
  border-bottom-right-radius: 4px;
}

.tgdm-bubble p { margin: 0 0 4px; }
.tgdm-bubble p:last-child { margin-bottom: 0; }

/* Inline keyboard — always on its own line under the bubble */
.tgdm { flex-wrap: wrap; }
.tgdm-keyboard {
  display: flex;
  flex-basis: 100%;
  gap: 8px;
  margin-top: 8px;
  max-width: 72%;
}

.tgdm-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  color: #2AABEE;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.tgdm-btn:hover { background: var(--surface-hi); }
.tgdm-btn.pressed {
  background: rgba(9,191,176,0.12);
  border-color: var(--accent);
  transform: scale(0.97);
}

.tgdm-btn-sec { color: var(--muted); }

/* Интерактив: пульс приглашает нажать, done — клавиатура использована */
.tgdm-keyboard:not(.done) #tdmBtnYes {
  animation: tgdBtnPulse 2.4s ease-in-out infinite;
}
@keyframes tgdBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(42, 171, 238, 0.16); border-color: #2AABEE; }
}
.tgdm-keyboard.done {
  opacity: 0.35;
  pointer-events: none;
}

/* Кнопка «начать заново» в шапке чата */
.tgd-restart {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, transform 0.3s;
  cursor: pointer;
}
.tgd-restart:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  transform: rotate(-45deg);
}

/* Подсказка над демо-окном */
.tgd-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

/* Typing dots */
.tgdm-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 2px;
}
.tgdm-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--subtle);
  animation: typingDot 1.2s ease-in-out infinite;
}
.tgdm-typing span:nth-child(2) { animation-delay: 0.2s; }
.tgdm-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* Progress bar inside bot message */
.tgdm-progress-bar {
  margin-top: 8px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tgdm-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tgdm-progress-fill.run { width: 100%; }

/* Report bubble */
.tgdm-bubble-report {
  max-width: 94% !important;
  width: 94%;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tgdm-report-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #16A34A;
  letter-spacing: 0.02em;
}

/* Mini Sheets table */
.tgdm-sheet {
  border: 1px solid rgba(52,168,83,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.tgdm-sheet-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: rgba(52,168,83,0.07);
  border-bottom: 1px solid rgba(52,168,83,0.15);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #16A34A;
  font-weight: 600;
}

.tgdm-sheet-tag {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 400;
}

.tgdm-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}

.tgdm-table thead tr {
  background: #F8FFF8;
}

.tgdm-table th {
  padding: 6px 8px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  white-space: nowrap;
}

.tgdm-src {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.tgdm-tr {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tgdm-tr.show { opacity: 1; }

.tgdm-table td {
  padding: 6px 8px;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}

.tgdm-total td {
  padding: 8px 10px;
  font-weight: 700;
  color: var(--text);
  background: rgba(52,168,83,0.06);
  border-top: 1px solid rgba(52,168,83,0.2);
}

.tgdm-green { color: #16A34A; font-weight: 700; }
.tgdm-yellow { color: #CA8A04; font-weight: 700; }

.tgdm-sent {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* ─── tdm6: Google Sheets notification bubble ─────────── */
.tgdm-bubble-gsheets {
  background: #F0FFF4;
  border: 1px solid rgba(52,168,83,0.22);
  padding: 12px 14px;
  max-width: 82%;
}
.tgdm-gsh-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  padding: 10px 12px;
  background: rgba(52, 168, 83, 0.07);
  border: 1px solid rgba(52, 168, 83, 0.2);
  border-radius: 10px;
}
.tgdm-gsh-icon {
  flex-shrink: 0;
  display: flex;
}
.tgdm-gsh-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.tgdm-gsh-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.tgdm-gsh-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 14px;
  background: #34A853;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
}
.tgdm-gsh-btn:hover { opacity: 0.9; }

/* ─── Google Sheets slide-in panel ────────────────────── */
/* Covers the whole .tgd-window; clipped by its overflow:hidden when closed */
.tgd-sheets-panel {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 15;
  transform: translateX(102%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -16px 0 48px rgba(0,0,0,0.10);
}
.tgd-sheets-panel.open { transform: translateX(0); }

.tgds-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: #fff;
  border-bottom: 1px solid #E8EAED;
  flex-shrink: 0;
}
.tgds-fname {
  font-size: 13px;
  color: #3C4043;
  flex: 1;
  font-family: var(--font-sans);
}
.tgds-saved {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #0F9D58;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.tgds-close {
  margin-left: 10px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #E8EAED;
  background: #fff;
  font-size: 12px;
  color: #3C4043;
  font-family: var(--font-sans);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.tgds-close:hover { background: #F8F9FA; }

.tgds-menubar {
  display: flex;
  gap: 2px;
  padding: 3px 8px;
  border-bottom: 1px solid #E8EAED;
  flex-shrink: 0;
}
.tgds-menu-item {
  padding: 3px 8px;
  font-size: 12px;
  color: #5F6368;
  border-radius: 4px;
  cursor: default;
  font-family: var(--font-sans);
}

.tgds-formulabar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #E8EAED;
  background: #fff;
  flex-shrink: 0;
  min-height: 26px;
}
.tgds-cell-ref {
  padding: 4px 10px;
  font-size: 12px;
  color: #3C4043;
  border-right: 1px solid #E8EAED;
  min-width: 48px;
  text-align: center;
  font-family: var(--font-mono);
}
.tgds-formula-sep {
  width: 1px;
  height: 16px;
  background: #E8EAED;
  margin: 0 6px;
}
.tgds-formula-text {
  padding: 4px 8px;
  font-size: 12px;
  color: #3C4043;
  font-family: var(--font-sans);
}

.tgds-grid {
  flex: 1;
  overflow: auto;
}
.tgds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #3C4043;
  font-family: var(--font-sans);
}
.tgds-col-headers th {
  background: #F8F9FA;
  border: 1px solid #E8EAED;
  padding: 4px 8px;
  font-weight: 500;
  text-align: center;
  color: #3C4043;
  min-width: 68px;
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 11px;
}
.tgds-col-headers .tgds-corner {
  min-width: 30px;
  background: #F8F9FA;
}
.tgds-rownum {
  background: #F8F9FA;
  border: 1px solid #E8EAED;
  padding: 4px 6px;
  text-align: center;
  color: #80868B;
  font-size: 11px;
  min-width: 30px;
  position: sticky;
  left: 0;
  z-index: 1;
}
.tgds-cell {
  border: 1px solid #E8EAED;
  padding: 5px 8px;
  white-space: nowrap;
}
.tgds-cell-hdr {
  background: #E8F5E9;
  font-weight: 700;
  color: #1E7E34;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.tgds-cell-money { text-align: right; font-family: var(--font-mono); }
.tgds-cell-num   { text-align: right; font-family: var(--font-mono); }
.tgds-cell-pos   { color: #0F9D58; font-weight: 700; text-align: right; }
.tgds-cell-warn  { color: #F29900; font-weight: 700; text-align: right; }
.tgds-cell-total { background: #F8F9FA; font-weight: 700; }
.tgds-cell.hl    { background: #E8F0FE; outline: 2px solid #1A73E8; outline-offset: -2px; }

.tgds-row-total td { border-top: 2px solid #BDBDBD; }

.tgds-tabs {
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-top: 1px solid #E8EAED;
  background: #F8F9FA;
  height: 32px;
  gap: 2px;
  flex-shrink: 0;
}
.tgds-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  font-size: 12px;
  color: #5F6368;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  cursor: default;
  background: transparent;
  border-bottom: none;
  font-family: var(--font-sans);
}
.tgds-tab-active {
  background: #fff;
  border-color: #E8EAED;
  border-bottom-color: #fff;
  color: #0F9D58;
  font-weight: 600;
  margin-bottom: -1px;
}
.tgds-tab-add {
  padding: 4px 8px;
  font-size: 14px;
  color: #5F6368;
  cursor: default;
  user-select: none;
}

/* Input bar */
.tgd-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.tgd-input-fake {
  flex: 1;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--subtle);
}

.tgd-input-send {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(9,191,176,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .tgd-sidebar { display: none; }
  .tgd-window { height: auto; min-height: 480px; }
  .tgdm-bubble { max-width: 88%; }
  .tgdm-keyboard { max-width: 88%; }
}

/* ─── SECTION COMMONS ────────────────────────────────────── */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.section-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 36px;
}

.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out) var(--delay, 0s),
              transform 0.7s var(--ease-out) var(--delay, 0s);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HERO FLOAT CARDS ───────────────────────────────────── */
.hero-float {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2;
  pointer-events: none;
}

.hf-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.hf-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Mini status bar */
.hf-mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
}

.hf-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hf-mini-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.hf-mini-text strong {
  color: var(--text);
  font-weight: 700;
}

/* Platform card */
.hf-platform {
  padding: 28px 36px;
  min-width: 480px;
}

.hf-platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.hf-platform-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hf-plat-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hf-plat-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.hf-agents {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hf-agent {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.hf-agent-div {
  height: 1px;
  background: var(--border);
  margin: 0 2px;
}

.hf-agent-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hf-ai-report   { background: rgba(9,191,176,0.1); }
.hf-ai-analytics{ background: rgba(99,102,241,0.1); }
.hf-ai-creative { background: rgba(245,158,11,0.1); }

.hf-agent-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.hf-agent-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.hf-agent-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.hf-platform-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hf-pf-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.hf-pf-stat strong { color: var(--text); font-weight: 700; }
.hf-pf-stat svg { color: var(--muted); flex-shrink: 0; }

.hf-pf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hf-agent-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-agent-status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.hf-st-done { background: rgba(74,222,128,0.12); color: #16A34A; }
.hf-st-run  { background: rgba(99,102,241,0.10); color: #4F46E5; }
.hf-st-gen  { background: rgba(245,158,11,0.12); color: #B45309; }

/* ─── PRODUCTS ───────────────────────────────────────────── */
.products {
  padding: 120px 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.products-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.products-header {
  margin-bottom: 60px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* Integrations strip */
.integrations-strip {
  margin-top: 56px;
  padding: 24px 32px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.integrations-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.integrations-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
}

.int-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

.int-item:first-child { padding-left: 0; }

.int-item:hover { color: var(--text); }

.int-item svg { flex-shrink: 0; opacity: 0.8; }

.int-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.product-card {
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.product-card:hover {
  border-color: rgba(9,191,176,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-dim);
  border: 1px solid rgba(9,191,176,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
}

.pc-live {
  background: rgba(74,222,128,0.12);
  color: #16A34A;
  border: 1px solid rgba(74,222,128,0.25);
}

.pc-soon {
  background: rgba(148,163,184,0.12);
  color: var(--muted);
  border: 1px solid var(--border);
}

.pc-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pc-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.pc-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}

.pc-features li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.pc-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}

/* Product preview boxes */
.pc-activity {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pca-item {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pca-done { color: var(--accent); }
.pca-next { color: var(--muted); }

.pc-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* ── Column chart (Analytics) ── */
.pc-preview-chart {
  padding: 16px;
}

.pp-chart-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  flex-shrink: 0;
}

.pp-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.pp-col-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.pp-col-val {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.pp-col-val.accent { color: var(--accent); }
.pp-col-val.muted  { color: var(--subtle); }

.pp-col {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.pp-col-fill {
  width: 100%;
  height: var(--h, 50%);
  background: var(--accent);
  opacity: 0.55;
  border-radius: 4px 4px 2px 2px;
  transition: height 0.6s var(--ease-out);
}
.pp-col-fill-top { opacity: 0.85; }
.pp-col-fill-dim { opacity: 0.3; }

.pp-col-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--subtle);
  text-align: center;
  line-height: 1.3;
  flex-shrink: 0;
}

/* ── Creatives thumbs ── */
.pc-preview-creatives {
  padding: 12px;
}

.pp-thumbs {
  flex: 1;
  display: flex;
  gap: 8px;
}

.pp-thumb {
  flex: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 120px;
}

.pp-thumb-best { border-color: rgba(9,191,176,0.35); }
.pp-thumb-gen  { border-style: dashed; border-color: rgba(124,58,237,0.3); }

.pp-thumb-bg {
  flex: 1;
  background: linear-gradient(160deg, rgba(9,191,176,0.12) 0%, rgba(9,191,176,0.04) 100%);
}

.pp-thumb-bg2 {
  background: linear-gradient(160deg, rgba(99,102,241,0.10) 0%, rgba(99,102,241,0.03) 100%);
}

.pp-thumb-ai {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: rgba(124,58,237,0.4);
  letter-spacing: 0.04em;
  background: linear-gradient(160deg, rgba(124,58,237,0.06) 0%, rgba(124,58,237,0.02) 100%);
}

.pp-thumb-meta {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.7);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.pp-thumb-ctr {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}

.pp-thumb-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
}

.pp-thumb-badge-ai {
  background: rgba(124,58,237,0.1);
  color: #7C3AED;
}

.pp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pp-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

.pp-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.pp-val.accent { color: var(--accent); }
.pp-val.muted  { color: var(--muted); }


/* Terminal inside product card */
.product-card .product-terminal {
  max-width: 100%;
  flex: 1;
}

/* ─── PRODUCT (old compat) ───────────────────────────────── */
.product {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.feature-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Terminal mockup */
.product-terminal {
  width: 100%;
  max-width: 480px;
  background: #0A0A10;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(13,217,201,0.08),
    0 32px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(13,217,201,0.04);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.term-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.term-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  text-align: center;
  letter-spacing: 0.03em;
}

.term-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4ADE80;
}

.term-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

.term-body {
  padding: 20px 20px 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.term-line.visible { opacity: 1; transform: translateY(0); }

.term-ts   { color: var(--subtle); flex-shrink: 0; }
.term-ok   { color: #4ADE80; }
.term-dim  { color: var(--muted); }
.term-acc  { color: var(--accent); }
.term-num  { color: #7DD3FC; }
.term-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
  border-radius: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── CASES ──────────────────────────────────────────────── */
.cases {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 120px 48px;
}

.cases-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cases-inner > .section-title { margin-bottom: 52px; }

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.cases-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.case-card:hover {
  border-color: rgba(13,217,201,0.25);
  box-shadow: 0 0 0 1px rgba(13,217,201,0.08), 0 12px 48px rgba(0,0,0,0.4);
}

.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.case-size {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 20px;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.case-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-block-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--subtle);
}

.case-after .case-block-label { color: rgba(13,217,201,0.6); }

.case-block p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.case-footer {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.case-stat { display: flex; flex-direction: column; gap: 4px; }

.case-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.case-stat-unit {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Case CTA card */
.case-cta {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

/* Full-width CTA below the 3 cases */
.case-cta-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: linear-gradient(105deg, var(--surface) 60%, rgba(9,191,176,0.04) 100%);
  border-color: rgba(9,191,176,0.2);
  margin-top: 8px;
}

.case-cta-text { flex: 1; }
.case-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.case-cta h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.case-cta p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.custom-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--subtle);
  line-height: 1.5;
  margin-top: 8px;
}
.custom-note svg { flex-shrink: 0; margin-top: 1px; color: var(--subtle); }

/* ─── CONTACT ────────────────────────────────────────────── */
.contact {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
}

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--accent);
  border: 1px solid rgba(13,217,201,0.25);
  border-radius: var(--radius);
  padding: 10px 18px;
  transition: background 0.2s, border-color 0.2s;
}
.tg-link:hover {
  background: var(--accent-dim);
  border-color: rgba(13,217,201,0.5);
}

/* Form */
.form-container {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(9,191,176,0.06),
    0 24px 60px rgba(0,0,0,0.08);
}
.form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(9,191,176,0.4), transparent);
  pointer-events: none;
}

.form-steps-wrapper { position: relative; }

.form-step {
  display: none;
  border: none;
  padding: 0;
  flex-direction: column;
  gap: 24px;
}
.form-step.active { display: flex; }

.step-question {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.step-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 4px;
}

.opts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.opts-col {
  grid-template-columns: 1fr;
}

.opt {
  padding: 13px 16px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  text-align: left;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: none;
}

.opt:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.opt.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.step-btn {
  padding: 13px 24px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  transition: all 0.2s;
  cursor: none;
  align-self: flex-start;
}

.step-btn:not(:disabled) {
  border-color: var(--border-hi);
  color: var(--text);
}
.step-btn:not(:disabled):hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Step 4 inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--muted);
}

.input-group input {
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.input-group input::placeholder { color: var(--subtle); }
.input-group input:focus { border-color: var(--accent); }

.submit-btn {
  width: 100%;
  justify-content: center;
  padding: 15px 28px;
}

/* Success */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px 0;
}
.form-success[hidden] { display: none; }

.form-success h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.form-success p {
  font-size: 14px;
  color: var(--muted);
}

/* Progress */
.form-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.form-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.4s var(--ease-out);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 48px 28px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
}

.footer-logo {
  font-size: 14px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.03em;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1300px) {
  .hero-float { display: none; }
}

@media (max-width: 1024px) {
  .product-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-float { display: none; }
  .products-grid { grid-template-columns: 1fr; }
  .cases-grid-3 { grid-template-columns: 1fr; }
  .product-terminal { max-width: 100%; }

  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Carousel dots ─────────────────────────────────────── */
.mob-carousel-dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
}

.mcd {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, width 0.3s;
  flex-shrink: 0;
}

.mcd-on {
  background: var(--accent);
  width: 20px;
  border-radius: 4px;
}

/* ─── Mobile Telegram Chat ──────────────────────────────── */
.tgm-outer {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.tgm-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.tgm-phone {
  position: relative;
  width: 340px;
  background: #EAEDF5;
  border-radius: 44px;
  overflow: hidden;
  /* Safari: без собственного слоя overflow+radius не режет composited-детей */
  transform: translateZ(0);
  isolation: isolate;
  box-shadow:
    0 0 0 7px #DDE0EC,
    0 0 0 9px rgba(0,0,0,0.06),
    0 48px 120px rgba(0,0,0,0.22);
}

/* Restart в шапке телефона */
.tgm-restart {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tgm-restart:active { background: rgba(0,0,0,0.06); color: var(--text); }

/* Клавиатура: done — использована */
.tgm-kbd.done { opacity: 0.4; pointer-events: none; }
.tgm-kbd:not(.done) #tgmBtnYes { animation: tgdBtnPulse 2.4s ease-in-out infinite; }

/* ─── Мобильная Google Sheets: поверх экрана макета телефона ── */
.tgm-sheets-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #fff;
  display: flex;
  flex-direction: column;
  /* дублируем радиус телефона на себе — даже если родитель не обрежет */
  border-radius: 44px;
  overflow: hidden;
  transform: translateX(102%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.tgm-sheets-panel.open { transform: translateX(0); }

.tgms-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 14px 10px;
  border-bottom: 1px solid #E8EAED;
  flex-shrink: 0;
}
.tgms-fname {
  flex: 1;
  font-size: 13px;
  color: #3C4043;
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tgms-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #E8EAED;
  background: #fff;
  color: #3C4043;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.tgms-close:active { background: #F8F9FA; }

.tgms-grid {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  /* пустая зона выглядит как продолжение таблицы, а не белая дыра */
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, #EDEFF2 31px 32px),
    repeating-linear-gradient(to right, transparent 0 71px, #EDEFF2 71px 72px),
    #fff;
}
.tgms-grid .tgds-table { font-size: 11px; background: #fff; }
.tgms-grid .tgds-cell { padding: 6px 8px; }
.tgms-grid .tgds-col-headers th { min-width: 56px; font-size: 10px; }

.tgms-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}
.tgms-tabs::-webkit-scrollbar { display: none; }

.tgm-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 8px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tgm-sb-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.tgm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 13px;
  background: #fff;
  border-bottom: 1px solid #E8E8EC;
}

.tgm-back {
  color: #2AABEE;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tgm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tgm-hdr-name {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.tgm-hdr-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.tgm-body {
  background: #EAEDF5;
  padding: 16px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 360px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.tgm-body::-webkit-scrollbar { display: none; }

.tgm-anim {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tgm-anim.show {
  opacity: 1;
  transform: translateY(0);
}

.tgm-msg { display: flex; }
.tgm-in  { justify-content: flex-start; }
.tgm-out { justify-content: flex-end; }

.tgm-bubble {
  max-width: 82%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.tgm-bubble-in {
  background: #fff;
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tgm-bubble-out {
  background: #2AABEE;
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 1px 3px rgba(42,171,238,0.3);
}

.tgm-kbd {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.tgm-kbd-btn {
  background: rgba(9,191,176,0.07);
  border: 1px solid rgba(9,191,176,0.25);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  cursor: default;
  transition: background 0.2s, border-color 0.2s;
}

.tgm-kbd-btn.tgm-selected {
  background: rgba(9,191,176,0.16);
  border-color: var(--accent);
  font-weight: 600;
}

.tgm-kbd-no {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
  color: var(--muted);
}

/* Typing dots */
.tgm-dots { padding: 12px 16px; }
.tgm-dots span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #A0A0B0;
  margin: 0 2px;
  animation: tgmDot 1.4s ease-in-out infinite;
}
.tgm-dots span:nth-child(2) { animation-delay: 0.2s; }
.tgm-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes tgmDot {
  0%, 80%, 100% { transform: scale(1); opacity: 0.35; }
  40%            { transform: scale(1.35); opacity: 1; }
}

/* Report card */
.tgm-report {
  max-width: 94%;
  padding: 14px 16px;
}

.tgm-report-hdr {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EBEBEB;
}

.tgm-rrow {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid #F0F0F5;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tgm-rrow-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tgm-rrow-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.tgm-rsrc {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.tgm-rsrc-fb { background: rgba(9,191,176,0.1); color: var(--accent); }
.tgm-rsrc-tt { background: rgba(0,0,0,0.06); color: var(--text); }

.tgm-rroi {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: auto;
}
.tgm-roi-pos { background: rgba(74,222,128,0.12); color: #16A34A; }

/* 4-column metrics grid */
.tgm-rrow-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.tgm-si {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tgm-sl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tgm-si strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.tgm-rtotal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #EBEBEB;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.tgm-rtotal strong { color: var(--text); font-weight: 700; }

/* Google Sheets message */
.tgm-sheets {
  padding: 12px 14px;
}

.tgm-sheets-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tgm-sheets-icon {
  flex-shrink: 0;
  display: flex;
}

.tgm-sheets-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tgm-sheets-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.tgm-sheets-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.tgm-sheets-btn {
  background: rgba(52,168,83,0.08);
  border: 1px solid rgba(52,168,83,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #22863A;
  text-align: center;
}

.tgm-input-bar {
  background: #fff;
  padding: 10px 14px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tgm-input-field {
  flex: 1;
  background: #F1F3F6;
  border-radius: 22px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #A0A0B0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tgm-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
}

/* ─── LEGAL PAGE (privacy.html) ─────────────────────────── */
.nav-static { position: absolute; }
.nav-cta-visible { display: inline-flex !important; margin-left: auto; }

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 24px 100px;
}

/* Legal pages don't load script.js → restore the native cursor */
body.page-legal,
.page-legal a,
.page-legal button {
  cursor: auto;
}
.page-legal a { cursor: pointer; }

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.legal-updated {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 48px;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--text);
}

.legal p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal ul {
  list-style: none;
  padding-left: 4px;
  margin: 4px 0 12px;
}

.legal li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 4px;
  padding-left: 20px;
  position: relative;
}

.legal li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.legal a { color: var(--accent); }
.legal strong { color: var(--text); }

/* Form consent line */
.form-consent {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--subtle);
}
.form-consent a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a { color: var(--subtle); }
.footer-bottom a:hover { color: var(--muted); }

/* ─── Demo window scaling (tablet/mobile) ──────────────── */
@media (max-width: 960px) {
  .demo { overflow: hidden; }
  .tgd-wrap { overflow: hidden; }
}

@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .mobile-nav { display: flex; }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 92px 24px 32px;
    min-height: 100svh;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(38px, 10vw, 56px);
  }

  .hero-sub {
    font-size: 16px;
    margin-bottom: 28px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-scroll { display: none; }

  /* Platform card as flex child — space-between pushes it to bottom, no overlap */
  .hero-float {
    display: flex;
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    flex-direction: column;
    gap: 0;
    pointer-events: none;
    width: 100%;
    z-index: 2;
  }
  .hf-mini-stat { display: none; }
  .hf-platform {
    min-width: unset;
    width: 100%;
    padding: 16px 20px;
  }
  .hf-platform-footer { display: none; }
  .hf-platform-header { margin-bottom: 14px; }
  .hf-agent { padding: 10px 0; }
  .hf-agent-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .hf-agent-icon svg { width: 16px; height: 16px; }
  .hf-agent-name { font-size: 14px; }
  .hf-agent-sub { font-size: 11px; }
  .hf-agent-status { font-size: 11px; padding: 4px 10px; }

  .stats { padding: 52px 24px; }
  .stats-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .stat-sep { display: none; }
  .stat-item { text-align: left; }
  .stat-value { justify-content: flex-start; }
  .stat-label { max-width: none; margin: 0; }

  /* Demo: desktop window → скрыть, показать мобильный чат */
  .tgd-wrap  { display: none !important; }
  .tgd-hint  { display: none; }
  .tgm-outer { display: flex; }
  .demo { padding: 60px 24px 72px; }
  .demo-header { margin-bottom: 32px; }

  /* ─── Products carousel ─────────────────────────── */
  /* overflow:hidden on section = bulletproof bleed clipping */
  .products {
    overflow: hidden;
    padding: 72px 0;
  }
  .products-header { padding: 0 24px; margin-bottom: 8px; }

  .products-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 16px;
    padding: 4px 0 12px 36px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-template-columns: unset !important;
  }
  .products-grid::-webkit-scrollbar { display: none; }
  /* symmetric spacer = (vw - cardWidth) / 2 = 72/2 = 36px — constant at any viewport */
  .products-grid::after {
    content: '';
    min-width: 36px;
    flex-shrink: 0;
  }
  .product-card {
    min-width: calc(100vw - 72px);
    width: calc(100vw - 72px);
    flex-shrink: 0;
    scroll-snap-align: center;
    /* force visible regardless of GSAP state */
    opacity: 1 !important;
    transform: none !important;
  }

  /* ─── Cases carousel ─────────────────────────── */
  .cases {
    overflow: hidden;
    padding: 72px 0;
  }
  .cases-inner > .section-eyebrow,
  .cases-inner > .section-title { padding: 0 24px; }
  .cases-inner > .section-title { margin-bottom: 32px; }

  .cases-grid-3 {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 16px;
    padding: 4px 0 12px 36px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-template-columns: unset !important;
  }
  .cases-grid-3::-webkit-scrollbar { display: none; }
  .cases-grid-3::after {
    content: '';
    min-width: 36px;
    flex-shrink: 0;
  }
  .case-card {
    min-width: calc(100vw - 72px);
    width: calc(100vw - 72px);
    flex-shrink: 0;
    scroll-snap-align: center;
    padding: 24px;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Dots + CTA */
  .mob-carousel-dots { display: flex; margin-top: 16px; }
  .case-cta-wide { margin: 24px 24px 0; }

  .contact { padding: 72px 24px 56px; }

  /* CTA в кейсах — вертикально на мобиле */
  .case-cta-wide {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .form-container { padding: 28px 24px; }
  .opts-grid { grid-template-columns: 1fr; }

  /* Activity-строки продуктовых карточек: перенос вместо обрезки */
  .pca-item {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .footer { padding: 36px 24px 24px; }
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }
  /* Ссылки в строку с переносом — компактнее колонки */
  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
  }
  .footer-nav a { font-size: 14px; padding: 4px 0; }
  .footer-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding-top: 18px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(34px, 11vw, 48px);
  }
  .case-footer { flex-direction: column; gap: 16px; }
  /* Продуктовые карточки — preview поменьше */
  .pc-preview, .pc-preview-chart, .pc-preview-creatives { min-height: 140px; }
}
