/* iinsighter design tokens lifted from voice-eval-dashboard/src/index.css */
:root {
  --bg: #fafaf9;
  --fg: #0a0a0a;
  --card: #ffffff;
  --muted: #4a4a4a;
  --secondary: #f4f4f2;
  --border: rgba(36, 39, 47, 0.12);
  --border-subtle: rgba(36, 39, 47, 0.07);
  --primary: #635bff;
  --primary-50: rgba(99, 91, 255, 0.08);
  --primary-20: rgba(99, 91, 255, 0.2);
  --emerald-600: #059669;
  --emerald-50: rgba(16, 185, 129, 0.1);
  --amber-600: #d97706;
  --amber-50: rgba(245, 158, 11, 0.1);
  --red-600: #dc2626;
  --red-50: rgba(239, 68, 68, 0.1);
  --blue-600: #2563eb;
  --blue-50: rgba(59, 130, 246, 0.1);

  --logo-grad: linear-gradient(90deg, #0B1E4F 0%, #1A2E6E 55%, #2A3FCC 100%);

  --radius: 6px;
  --radius-lg: 8px;
}

.dark {
  --bg: #0a0a0c;
  --fg: #f4f4f5;
  --card: #121215;
  --muted: #c4c4c8;
  --secondary: #16161a;
  --border: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.08);
}

html { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Card / table primitives reused across all three directions */
.ii-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 200ms ease;
}
.ii-card:hover { border-color: var(--border); }

.ii-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}

.ii-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.ii-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent;
}
.ii-badge.success { background: var(--emerald-50); color: var(--emerald-600); border-color: rgba(16,185,129,0.2); }
.ii-badge.warn    { background: var(--amber-50);   color: var(--amber-600);   border-color: rgba(245,158,11,0.2); }
.ii-badge.fail    { background: var(--red-50);     color: var(--red-600);     border-color: rgba(239,68,68,0.2); }
.ii-badge.info    { background: var(--blue-50);    color: var(--blue-600);    border-color: rgba(59,130,246,0.2); }
.ii-badge.primary { background: var(--primary-50); color: var(--primary);     border-color: var(--primary-20); }

.ii-pro-table { width: 100%; border-collapse: collapse; }
.ii-pro-table th {
  text-align: left; font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 12px 16px; color: var(--muted);
  border-bottom: 1px solid var(--border-subtle);
}
.ii-pro-table td {
  padding: 12px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}
.ii-pro-table tbody tr:last-child td { border-bottom: 0; }

/* Logo wordmark mask — uses the actual SVG as a mask to apply gradient */
.ii-wordmark {
  display: inline-block;
  background: var(--logo-grad);
  -webkit-mask: url('assets/insighter-logo.svg') center / contain no-repeat;
          mask: url('assets/insighter-logo.svg') center / contain no-repeat;
  height: 28px; width: 168px;
}
.ii-wordmark.invert { background: #ffffff; }

/* Subtle striped placeholder for "drop image here" */
.placeholder-img {
  background-image: repeating-linear-gradient(135deg, rgba(36,39,47,0.04) 0 8px, rgba(36,39,47,0.07) 8px 16px);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.dark .placeholder-img {
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 8px, rgba(255,255,255,0.07) 8px 16px);
}

/* Subtle dot grid background */
.dot-grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(36,39,47,0.09) 1px, transparent 0);
  background-size: 18px 18px;
}
.dark .dot-grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
}

/* Hero soft glow used in direction A */
.purple-glow {
  background: radial-gradient(ellipse at center, rgba(99,91,255,0.18) 0%, rgba(99,91,255,0) 60%);
  filter: blur(20px);
}

/* Direction-specific: editorial big serif headline option */
.editorial-headline {
  font-family: 'GT Sectra', 'Source Serif Pro', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

/* Direction C terminal-ish */
.term-card {
  background: #0a0a0c;
  color: #f4f4f5;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: 'JetBrains Mono', monospace;
}

/* Soft kbd */
.kbd {
  display: inline-flex; align-items: center; padding: 2px 6px;
  border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; font-size: 11px; font-family: 'JetBrains Mono', monospace;
  background: var(--card); color: var(--muted);
}

/* No focus ring inside artboards (they aren't real interactive surfaces) */
.ii-artboard a:focus, .ii-artboard button:focus { outline: none; }

/* ───────────────────────────────────────────────────────────────────────
   Animated trend chart (hero, direction A)
   pathLength="1" lets us animate stroke-dashoffset in 0..1 units
   so the line draws from left to right regardless of geometry.
   ─────────────────────────────────────────────────────────────────── */
.ii-chart-animate .ii-chart-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ii-draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}
.ii-chart-animate .ii-chart-area {
  opacity: 0;
  animation: ii-fadein 0.7s ease-out 1.2s forwards;
}
.ii-chart-animate .ii-chart-dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ii-popin 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.75s forwards;
}
.ii-chart-animate .ii-chart-grid {
  opacity: 0;
  animation: ii-fadein 0.6s ease-out 0.1s forwards;
}
@keyframes ii-draw   { to { stroke-dashoffset: 0; } }
@keyframes ii-fadein { to { opacity: 1; } }
@keyframes ii-popin {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.35); }
  100% { opacity: 1; transform: scale(1); }
}
/* Pulse halo around the leading dot once it lands */
.ii-chart-animate .ii-chart-dot-halo {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ii-halo 2.4s ease-out 2.1s infinite;
}
@keyframes ii-halo {
  0%   { opacity: 0.5; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(3); }
}

/* ───────────────────────────────────────────────────────────────────────
   Entrance animations — gentle fade-up on hero content
   ─────────────────────────────────────────────────────────────────── */
@keyframes ii-fadeup {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ii-fadeup { animation: ii-fadeup 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ii-fadeup.d1 { animation-delay: 0.05s; }
.ii-fadeup.d2 { animation-delay: 0.15s; }
.ii-fadeup.d3 { animation-delay: 0.25s; }
.ii-fadeup.d4 { animation-delay: 0.35s; }
.ii-fadeup.d5 { animation-delay: 0.45s; }

/* ───────────────────────────────────────────────────────────────────────
   Hover interactions
   ─────────────────────────────────────────────────────────────────── */

/* Nav links — fade up to fg on hover */
.nav-link {
  position: relative;
  text-decoration: none;
  transition: color 160ms ease;
}
.nav-link:hover { color: var(--fg) !important; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { transform: scaleX(1); }

/* Buttons — variant-aware hover */
.btn {
  position: relative; overflow: hidden;
  transition: background 180ms ease, color 180ms ease,
              border-color 180ms ease, transform 180ms ease,
              box-shadow 220ms ease;
  cursor: pointer;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary:hover { background: #1f1f1f !important; }
.btn-accent:hover  { background: #4d44ff !important; box-shadow: 0 8px 24px -8px rgba(99, 91, 255, 0.55); }
.btn-ghost:hover   { background: var(--secondary) !important; border-color: var(--border) !important; }
.btn-invert:hover  { background: #f4f4f4 !important; box-shadow: 0 8px 24px -8px rgba(255,255,255,0.25); }
.btn .ii-arrow { transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover .ii-arrow { transform: translateX(3px); }

/* Feature pillar / generic card hover-lift */
.card-lift {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms ease,
              box-shadow 240ms ease;
  cursor: default;
}
.card-lift:hover {
  transform: translateY(-3px);
  border-color: var(--border) !important;
  box-shadow: 0 14px 40px -18px rgba(20, 20, 40, 0.18);
}

/* Calls table row hover */
.calls-row {
  transition: background 160ms ease;
}
.calls-row:hover { background: rgba(36, 39, 47, 0.025); }
.calls-row .ii-chevron { transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms ease; }
.calls-row:hover .ii-chevron { transform: translateX(3px); color: var(--primary); }

/* Step / how-it-works hover */
.how-step { transition: background 220ms ease; }
.how-step:hover { background: rgba(99, 91, 255, 0.025); }

/* Footer / quiet links */
.footer-link {
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
  display: inline-block;
}
.footer-link:hover { color: var(--fg) !important; transform: translateX(2px); }

/* Stat card subtle hover lift (used in hero dashboard mock) */
.stat-hover {
  transition: border-color 200ms ease, transform 220ms ease;
}
.stat-hover:hover { border-color: var(--border) !important; transform: translateY(-1px); }

/* Source-badge in footer — hover lifts and lightens */
.source-hover {
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
  cursor: default;
}
.source-hover:hover {
  border-color: var(--border) !important;
  background: var(--secondary);
}

/* CTA "see all" inline arrow link */
.text-link {
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 160ms ease, gap 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.text-link:hover { color: var(--fg) !important; gap: 10px; }

/* ───────────────────────────────────────────────────────────────────────
   Company logo marquee — endless left-scroll, pauses on hover
   ─────────────────────────────────────────────────────────────────── */
.logo-marquee-mask {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: logo-marquee 32s linear infinite;
}
.logo-marquee-mask:hover .logo-marquee-track {
  animation-play-state: paused;
}
.logo-marquee-set {
  display: flex;
  gap: 56px;
  padding-right: 56px;
  flex-shrink: 0;
}
.logo-marquee-item {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity 200ms ease;
}
.logo-marquee-item:hover {
  opacity: 1;
}
@keyframes logo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes ii-livepulse {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.6); }
}

/* New row streaming in from the top of the calls table */
@keyframes ii-rowin {
  0% {
    opacity: 0;
    transform: translateY(-6px);
    background: rgba(99, 91, 255, 0.07);
  }
  60% {
    background: rgba(99, 91, 255, 0.07);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background: transparent;
  }
}
.calls-row-new {
  animation: ii-rowin 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ───────────────────────────────────────────────────────────────────────
   Mobile breakpoints — collapses the desktop landing for ≤ 900px
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* All horizontal section padding tightens uniformly */
  .ii-artboard section,
  .ii-artboard > div > section,
  .ii-artboard footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Nav: hide secondary nav links + "Sign in", keep logo and primary CTA */
  .ii-artboard nav { display: none !important; }
  .ii-artboard .nav-link[data-role="signin"],
  .ii-artboard a.nav-link { display: none !important; }

  /* Hero text scales down */
  .ii-artboard h1 {
    font-size: 36px !important;
    line-height: 1.08 !important;
  }
  .ii-artboard .ii-fadeup.d2 { font-size: 16px !important; }

  /* Hero CTA row stacks */
  .ii-artboard .ii-fadeup.d3 {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .ii-artboard .ii-fadeup.d3 .btn { width: 100% !important; justify-content: center; }

  /* Hero dashboard mock collapses to a single column, sidebar hidden */
  .hero-dash-wrap { margin-top: 36px !important; }
  .hero-dash-body { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .hero-dash-sidebar { display: none !important; }
  .hero-dash-stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* All 3-up / 4-up grids collapse */
  .pricing-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .ii-artboard [style*="grid-template-columns: repeat(3,1fr)"],
  .ii-artboard [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Feature rows stack image below text */
  .ii-artboard [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Logo row wraps tighter */
  .ii-artboard section [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 20px; }

  /* Section vertical rhythm */
  .ii-artboard section { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* Footer stacks */
  .ii-artboard footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* CTA dark card: stack columns */
  .ii-artboard h2 { font-size: 28px !important; }
}

@media (max-width: 560px) {
  .hero-dash-stats { grid-template-columns: 1fr !important; }
  .ii-artboard h1 { font-size: 30px !important; }
  .ii-pro-table th, .ii-pro-table td { padding: 10px 12px !important; font-size: 12px !important; }
}
