/* ============================================
   Qube by Researchwire — Main Stylesheet
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,600&display=swap');

/* ---------- Base ---------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #f0f0ee;
  color: #0b1220;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
}

a { text-decoration: none; }

/* ---------- Get in Touch Button ---------- */
@keyframes glowing {
  0%   { background-position: 0 0; }
  50%  { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

.get-in-touch-outer {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.get-in-touch-btn {
  position: relative;
  z-index: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.get-in-touch-btn::before {
  content: '';
  background: linear-gradient(45deg,
    #012970, #0A52C4, #0891B2,
    #06B6D4, #0891B2, #0A52C4,
    #012970, #0891B2, #012970
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(6px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 8s linear infinite;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
  border-radius: 999px;
}

.get-in-touch-btn::after {
  z-index: -1;
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  left: 0;
  top: 0;
  border-radius: 999px;
}

.get-in-touch-outer:hover .get-in-touch-btn {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -4px rgba(1, 41, 112, 0.35);
}

.get-in-touch-outer:hover .get-in-touch-btn::before {
  opacity: 1;
}

.get-in-touch-outer:active .get-in-touch-btn {
  transform: translateY(0px);
  box-shadow: none;
}

.get-in-touch-btn .btn-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.get-in-touch-outer:hover .btn-arrow {
  transform: translateX(5px);
}

/* ---------- Custom Components ---------- */
.qube-grid {
  background-image:
    linear-gradient(to right, rgba(30, 64, 175, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 64, 175, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, black 0%, transparent 75%);
}

.soft-card {
  background: #ffffff;
  border: 1px solid rgba(10, 42, 107, 0.08);
  box-shadow:
    0 1px 0 rgba(10, 42, 107, 0.04),
    0 18px 40px -22px rgba(10, 42, 107, 0.18);
}

.glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 12px 40px rgba(10, 42, 107, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ---------- Animations ---------- */
@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

.animate-floaty {
  animation: floaty 3s ease-in-out infinite;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Ticker ---------- */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #012970;
  white-space: nowrap;
}

.ticker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #012970;
  flex-shrink: 0;
}

/* Mobile-only heading break (hidden on desktop/tablet) */
.hero-h1-br-2 {
  display: none;
}

/* Innovators section — reduce bottom padding on desktop */
.innovators-section {
  padding-bottom: 32px !important;
}

/* ---------- Icons (Lucide) ---------- */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

/* ---------- Persona Cards ---------- */
.persona-card {
  transition: all 0.3s;
}
.persona-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.1);
}

/* ---------- Tab Buttons ---------- */
.tab-btn {
  border: none;
  cursor: pointer;
}

.tab-btn.inactive {
  background: #fff;
  color: #374151;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tab-btn.inactive:hover {
  background: #f9fafb;
}

.tab-btn.active-tab {
  background: linear-gradient(106.31deg, #3D72FF 0%, #00AFF7 100%);
  color: #fff;
  box-shadow: 0 4px 15px -3px rgba(1, 41, 112, 0.4);
}

/* ---------- Sidebar Items ---------- */
.sidebar-item.active-sidebar {
  background: linear-gradient(106.31deg, #3D72FF 0%, #00AFF7 100%);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar-item:not(.active-sidebar):hover {
  background: rgba(243, 244, 246, 0.5);
}

/* ============================================
   MOCKUP PANEL GRIDS (desktop defaults)
   ============================================ */
.panel-stats   { grid-template-columns: repeat(3, 1fr); }
.panel-bottom  { grid-template-columns: 2fr 3fr; }
.panel-insights { grid-template-columns: 1fr 1fr; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Tablet (641px – 1024px) */
@media (max-width: 1024px) {

  .sec-wrap {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  /* Hero */
  .hero-card {
    height: auto !important;
    min-height: 460px !important;
    border-radius: 32px !important;
  }

  .hero-content {
    padding: 32px 40px 90px !important;
  }

  .hero-bottom {
    padding: 0 40px !important;
  }

  .hero-h1 {
    font-size: 34px !important;
  }

  /* Float pills — hidden on tablet */
  .float-pill {
    display: none !important;
  }

  /* About */
  .about-img-wrap {
    max-width: 100% !important;
  }

  /* Innovators */
  .monitor-img {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Panel grids — tablet */
  .panel-bottom  { grid-template-columns: 1fr; }
  .panel-insights { grid-template-columns: 1fr 1fr; }

  /* In Action mockup */
  .mockup-body {
    gap: 24px !important;
  }

  #mockup-sidebar {
    width: 180px !important;
  }

  /* CTA */
  .cta-inner {
    border-radius: 3rem !important;
    padding: 44px 28px !important;
  }

  .cta-h2 {
    font-size: 34px !important;
  }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {

  .sec-wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* ---------- HERO ---------- */
  .hero-card {
    height: auto !important;
    min-height: 0 !important;
    border-radius: 20px !important;
    flex-direction: column !important;
  }

  .hero-content {
    padding: 24px 20px 20px !important;
    padding-right: 38% !important;
    justify-content: flex-start !important;
  }

  .hero-badge {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
  }

  /* 1. Badge text: normal weight, smaller size, single line */
  .hero-badge span {
    font-weight: 400 !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
  }

  /* Show both line-breaks on mobile for 3-line heading layout */
  .hero-h1-br {
    display: inline !important;
  }

  .hero-h1-br-2 {
    display: inline !important;
  }

  .hero-h1 {
    font-size: 22px !important;
    margin-bottom: 12px !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Shrink the "Qube" bordered badge on mobile */
  .hero-qube-span {
    padding: 3px 7px !important;
    border-radius: 7px !important;
    margin-left: 0 !important;
    margin-top: 8px !important;
  }

  .hero-p {
    font-size: 13px !important;
    margin-bottom: 16px !important;
    max-width: 100% !important;
  }

  .hero-badges {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  /* Hero bottom row: unstick it so it flows below content */
  .hero-bottom {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    padding: 12px 20px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* The centered "Get in touch" wrapper */
  .hero-bottom-center {
    position: relative !important;
    left: auto !important;
    transform: none !important;
  }


  /* Float pills — shown on mobile with adjusted positions */
  .float-pill {
    display: flex !important;
  }

  /* Pill 1 — top-right corner of card */
  .float-pill-1 {
    top: -14px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
  }

  /* Pill 2 — right side, mid-card */
  .float-pill-2 {
    top: 55% !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
  }

  /* Pill 3 — bottom-left corner of card */
  .float-pill-3 {
    bottom: -14px !important;
    left: 8px !important;
    right: auto !important;
    top: auto !important;
  }

  /* ---------- SECTION HEADINGS ---------- */
  .section-h2 {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  /* ---------- ABOUT ---------- */
  .about-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 36px !important;
    padding: 0 !important;
  }

  .about-img-col {
    order: 2 !important;
    width: 100% !important;
  }

  .about-img-wrap {
    max-width: 100% !important;
    width: 100% !important;
    margin-top: 18px !important;
    margin-bottom: 18px !important;
  }

  .about-text-col {
    order: 1 !important;
  }

  /* ---------- INNOVATORS ---------- */
  .innovators-section {
    padding-bottom: 64px !important;
  }

  .innovators-heading {
    margin-bottom: 20px !important;
  }

  .innovators-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
  }

  .monitor-img {
    width: 100% !important;
    max-width: 100% !important;
  }

  .persona-grid {
    grid-template-columns: 1fr !important;
  }

  .persona-span-2 {
    grid-column: span 1 !important;
  }

  /* ---------- FEATURES SLIDER ---------- */
  #features-slider-wrap {
    position: relative;
    overflow: hidden;
  }

  #features-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
  }

  #features-grid > article {
    min-width: 100% !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    border-radius: 1.5rem !important;
    margin: 0 !important;
  }

  /* Dot indicators */
  #features-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
  }

  .feature-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.35s ease, transform 0.35s ease, width 0.35s ease;
    cursor: pointer;
    flex-shrink: 0;
  }

  .feature-dot.active {
    background: #012970;
    width: 22px;
    border-radius: 999px;
    transform: none;
  }

  /* Panel grids — mobile */
  .panel-stats    { grid-template-columns: repeat(3, 1fr); gap: 8px !important; }
  .panel-bottom   { grid-template-columns: 1fr; }
  .panel-insights { grid-template-columns: 1fr; }

  /* Stat card compact sizing */
  .panel-stats > div {
    min-width: 0;
    padding: 10px 10px !important;
    overflow: hidden;
  }
  .panel-stats > div > div:first-child {
    font-size: 16px !important;
    white-space: nowrap;
  }
  .panel-stats > div > div:last-child {
    font-size: 8.5px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------- IN ACTION mockup ---------- */
  .mockup-body {
    flex-direction: column !important;
    padding: 16px !important;
    gap: 16px !important;
    overflow: hidden;
  }

  #mockup-main-panel {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  #mockup-sidebar {
    display: none !important;
  }

  /* Tab buttons smaller on mobile */
  .tab-btn {
    font-size: 12px !important;
    padding: 8px 14px !important;
    gap: 6px !important;
  }

  /* ---------- CTA ---------- */
  .cta-inner {
    border-radius: 1.75rem !important;
    padding: 32px 20px !important;
  }

  .cta-h2 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
    white-space: normal !important;
  }

  .cta-subtitle {
    font-size: 13.5px !important;
    margin-bottom: 28px !important;
  }

  .cta-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .cta-btn {
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
