/* ==========================================================================
   BUGFREE SOLUTIONS PVT LTD - SCROLLYTELLING STYLESHEET
   Replicating the exact design language of consider.digital/story
   ========================================================================== */

:root {
  --bg: #0e1113;
  --ink: #cfc8ba;
  --body: #b5afa2;
  --dim: #7a7568;
  --faint: #33352f;
  --accent: #00e5ff;      /* Cyan brand accent */
  --accent-warm: #d9a441; /* Amber/gold accent */
  --moss: #8fb896;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  transition: background-color 1.1s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #0e1113;
}

/* ---------- Top HUD Navigation ---------- */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(14, 17, 19, 0.8) 0%, rgba(14, 17, 19, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hud * {
  pointer-events: auto;
}

.hud-logo {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.hud-logo .accent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hud-center {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#chapter-label {
  color: var(--ink);
  transition: opacity 0.3s ease;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-audio {
  background: transparent;
  border: 1px solid var(--faint);
  color: var(--dim);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-audio:hover, .btn-audio.active {
  color: var(--accent);
  border-color: var(--accent);
}

.hud-link {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--faint);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.hud-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hud-link-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.hud-link-primary:hover {
  background: #3ceeff;
  color: #000;
}

/* Timeline scrubber needle */
.timeline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 60;
}

.timeline-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 0.08s linear;
}

/* ---------- Scene Scaffolding ---------- */
.scene {
  position: relative;
  height: calc(var(--len, 2.5) * 100vh);
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: block;
}

/* ---------- Vector Art Architecture ---------- */
.art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.art path, .art line, .art circle, .art rect, .art ellipse, .art polyline, .art polygon {
  fill: none;
  stroke: var(--ink);
  stroke-width: calc(2px * var(--k, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.art .thin { stroke-width: calc(1.2px * var(--k, 1)); }
.art .hair { stroke-width: calc(1px * var(--k, 1)); stroke: var(--dim); }
.art .acc { stroke: var(--accent); }
.art .gold { stroke: var(--accent-warm); }
.art .moss { stroke: var(--moss); }
.art .dimline { stroke: var(--dim); }

.art text {
  fill: var(--dim);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  stroke: none;
}

.art text.big {
  fill: var(--ink);
  font-size: 15px;
  stroke: none;
}

.art .dot { fill: var(--ink); stroke: none; }
.art .adot { fill: var(--accent); stroke: none; }
.art .gdot { fill: var(--accent-warm); stroke: none; }
.art .mdot { fill: var(--moss); stroke: none; }

/* ---------- Copy Blocks (Exact consider.digital layout) ---------- */
.copy {
  position: absolute;
  z-index: 2;
  top: clamp(4.5rem, 11vh, 7.5rem);
  left: clamp(1.25rem, 6vw, 5.5rem);
  max-width: min(34rem, 88vw);
  pointer-events: auto;
}

.copy.right {
  left: auto;
  right: clamp(1.25rem, 6vw, 5.5rem);
}

.copy.bottom {
  top: auto;
  bottom: clamp(3.5rem, 9vh, 6rem);
}

.copy.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: min(48rem, 92vw);
}

.copy.cta-panel {
  left: 50%;
  transform: translateX(-50%);
  max-width: min(58rem, 92vw);
  width: 100%;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eyebrow.gold { color: var(--accent-warm); }
.eyebrow.moss { color: var(--moss); }

h1, h2 {
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4.4vw, 3.2rem); }

.copy p {
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  line-height: 1.62;
  color: var(--body);
  margin: 0 0 1.2rem;
}

.copy strong {
  color: var(--ink);
  font-weight: 650;
}

.stat {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--dim);
}

.stat b {
  color: var(--accent);
  font-weight: 500;
}

.stat b.gold { color: var(--accent-warm); }

/* Buttons inside copy */
.btn-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #3ceeff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--faint);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Interactive Metric & Telemetry Bars ---------- */
.telemetry-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.2rem;
  max-width: 320px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
}

.bar-track {
  width: 100%;
  height: 4px;
  background: var(--faint);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transform-origin: left;
  transition: transform 0.1s linear;
}

/* ---------- Interactive Product Switcher (Scene 4) ---------- */
.product-shelf {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1.25rem;
  max-height: 42vh;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--faint);
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--body);
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.product-item:hover, .product-item.active {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(0, 229, 255, 0.06);
}

.product-card-details {
  margin-top: 1rem;
  padding: 1.25rem;
  background: rgba(14, 17, 19, 0.8);
  border: 1px solid var(--faint);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--body);
}

.product-card-details strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

/* ---------- Video Player Box (Scene 7) ---------- */
.video-frame-container {
  width: 100%;
  max-width: 860px;
  margin: 1.5rem auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--faint);
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  position: relative;
}

.video-frame-container video {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  object-fit: cover;
}

.video-toggle-pills {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

.video-pill {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--faint);
  color: var(--dim);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.video-pill:hover, .video-pill.active {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(0, 229, 255, 0.08);
}

/* ---------- Contact & Collaboration Layout (Scene 8) ---------- */
.contact-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 800px) {
  .contact-grid-2col {
    grid-template-columns: 1fr;
  }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-row-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  text-transform: uppercase;
}

.contact-link-val {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link-val:hover {
  color: var(--accent);
}

.consult-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(14, 17, 19, 0.85);
  border: 1px solid var(--faint);
  padding: 1.8rem;
  border-radius: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  text-transform: uppercase;
}

.form-field input, .form-field select, .form-field textarea {
  background: rgba(9, 11, 13, 0.9);
  border: 1px solid var(--faint);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-form-submit {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 0.4rem;
  transition: background 0.2s ease;
}

.btn-form-submit:hover {
  background: #3ceeff;
}

/* ---------- Global Minimal Footer ---------- */
.minimal-footer {
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  gap: 1rem;
}

.minimal-footer a {
  color: var(--body);
  text-decoration: none;
  transition: color 0.2s ease;
}

.minimal-footer a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .hud-center {
    display: none; /* Hide redundant chapter label on mobile; dock shows active chapter */
  }

  .hud-actions {
    gap: 0.6rem;
  }

  .hud-link {
    padding: 0.25rem 0.55rem;
    font-size: 0.68rem;
  }

  .copy {
    left: 1.25rem;
    right: 1.25rem;
    max-width: none;
  }

  .copy.right {
    right: 1.25rem;
    left: 1.25rem;
  }

  .copy.cta-panel {
    left: 1.25rem;
    right: 1.25rem;
    transform: none;
    max-width: none;
    width: auto;
  }

  .copy.center {
    left: 1.25rem;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    max-width: none;
  }
}

/* ---------- Product Direct Links & External Badges ---------- */
.product-direct-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  transition: all 0.2s ease;
}

.product-direct-link:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-1px);
}

.product-item-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.product-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

.product-item.active .product-item-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.url-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--faint);
}

.whatsapp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #25d366;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: 0.3rem;
  transition: opacity 0.2s ease;
}

.whatsapp-badge:hover {
  opacity: 0.85;
}

/* ==========================================================================
   MOBILE BOTTOM DOCK NAVIGATION (< 768px)
   ========================================================================== */
.mobile-dock {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 5.2rem;
  }

  .mobile-dock {
    display: flex;
    position: fixed;
    bottom: max(0.6rem, env(safe-area-inset-bottom, 0.6rem));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 1.5rem);
    max-width: 440px;
    background: rgba(14, 17, 19, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0.35rem 0.5rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 229, 255, 0.2);
    justify-content: space-around;
    align-items: center;
  }

  .mobile-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    min-width: 52px;
    min-height: 44px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-dock-btn svg {
    transition: transform 0.2s ease, stroke 0.2s ease;
  }

  .mobile-dock-btn:active {
    transform: scale(0.92);
  }

  .mobile-dock-btn.active {
    color: var(--accent);
    background: rgba(0, 229, 255, 0.08);
  }

  .mobile-dock-btn.active svg {
    stroke: var(--accent);
    transform: translateY(-1px);
  }
}

/* ==========================================================================
   CATEGORY FILTER PILLS (AI, Analytics, Automation)
   ========================================================================== */
.tag-filter-bar {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tag-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--faint);
  border-radius: 16px;
  padding: 0.35rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 32px;
}

.filter-pill:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.filter-pill.active {
  color: #000;
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot-ai { background: var(--accent); }
.dot-analytics { background: var(--moss); }
.dot-automation { background: var(--accent-warm); }

.filter-pill.active .pill-dot {
  background: #000;
}

/* ==========================================================================
   PRODUCT ITEM TAG BADGES
   ========================================================================== */
.product-item-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-tags {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.tag-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

.tag-badge.tag-ai {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.tag-badge.tag-analytics {
  background: rgba(0, 230, 118, 0.12);
  color: var(--moss);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.tag-badge.tag-automation {
  background: rgba(255, 213, 79, 0.12);
  color: var(--accent-warm);
  border: 1px solid rgba(255, 213, 79, 0.25);
}

/* Product list item animation for filter transitions */
.product-item {
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-item.hidden-by-filter {
  display: none !important;
}

/* Mobile responsive refinements */
@media (max-width: 600px) {
  .product-tags {
    display: none; /* Keep mobile product item row compact; badges shown in details card */
  }

  .product-shelf {
    max-height: 34vh;
  }

  .tag-filter-bar {
    margin: 0.75rem 0 0.6rem;
  }

  .filter-pill {
    padding: 0.3rem 0.65rem;
    font-size: 0.68rem;
  }

  .product-item {
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
  }

  .product-card-details {
    padding: 1rem;
    font-size: 0.82rem;
  }

  .minimal-footer {
    padding-bottom: 5.5rem; /* Ensure footer links never get blocked by dock */
  }
}

