/* ============================================
   KLAVIYO FLOW VIZ
   ============================================ */

.klaviyo-flow-wrapper {
  background: #0f111a;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  height: 100%;
}

.klaviyo-flow-header-bar {
  background: #1e2233;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.klaviyo-live-pill {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.klaviyo-flow-track {
  padding: 2rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  position: relative;
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.05) 0%, transparent 40%);
}

.klaviyo-connector {
  width: 2px;
  height: 25px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4) 50%, transparent 50%);
  background-size: 100% 8px;
  margin: 4px 0;
}

.klaviyo-node {
  width: 100%;
  max-width: 320px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #151822;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.klaviyo-node:hover {
  transform: translateY(-2px);
}

.klaviyo-node-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.klaviyo-node-icon {
  font-size: 1rem;
}

.klaviyo-split .klaviyo-node-header { color: #c084fc; border-bottom: 1px solid rgba(192, 132, 252, 0.2); }
.klaviyo-split { border-color: #c084fc; box-shadow: 0 0 15px rgba(192, 132, 252, 0.15); }

.klaviyo-property .klaviyo-node-header { color: #fbbf24; border-bottom: 1px solid rgba(251, 191, 36, 0.2); }
.klaviyo-property { border-color: #fbbf24; box-shadow: 0 0 15px rgba(251, 191, 36, 0.15); }

.klaviyo-email .klaviyo-node-header { color: #60a5fa; border-bottom: 1px solid rgba(96, 165, 250, 0.2); }
.klaviyo-email { border-color: #60a5fa; box-shadow: 0 0 15px rgba(96, 165, 250, 0.15); }

.klaviyo-trigger .klaviyo-node-header { color: #4ade80; border-bottom: 1px solid rgba(74, 222, 128, 0.2); }
.klaviyo-trigger { border-color: #4ade80; box-shadow: 0 0 15px rgba(74, 222, 128, 0.15); }

.klaviyo-delay .klaviyo-node-header { color: #9ca3af; border-bottom: 1px solid rgba(156, 163, 175, 0.2); }
.klaviyo-delay { border-color: #9ca3af; box-shadow: 0 0 15px rgba(156, 163, 175, 0.15); }


.klaviyo-node-body {
  padding: 0.75rem;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.2);
}

.klaviyo-text-muted {
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.klaviyo-split-stats {
  display: flex;
  gap: 1rem;
  font-weight: 600;
}

.klaviyo-email-metrics {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.65rem;
}

.klaviyo-email-metrics span {
  color: #6b7280;
}

.klaviyo-email-metrics strong {
  font-size: 0.8rem;
}

.klaviyo-flow-footer-bar {
  background: #1e2233;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.65rem;
  text-align: left;
}

.klaviyo-flow-footer-bar strong {
  font-size: 1rem;
}

.klaviyo-flow-footer-bar span {
  color: #9ca3af;
  text-transform: uppercase;
}

/* ============================================
   CODE TERMINAL
   ============================================ */

.code-terminal-wrapper {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  min-height: 300px;
}

.code-terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-terminal-dots {
  display: flex;
  gap: 5px;
}

.code-terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-terminal-dots .dot.red { background: #ff5f57; }
.code-terminal-dots .dot.yellow { background: #febc2e; }
.code-terminal-dots .dot.green { background: #28c840; }

.code-terminal-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}

.code-terminal-tab {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.6rem;
  font-family: var(--font-body);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.code-terminal-tab:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #fff;
}

.code-terminal-tab.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--color-primary);
}

.code-terminal-deploy-count {
  font-size: 0.65rem;
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
}

.code-terminal-file-label {
  padding: 0.3rem 0.75rem;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Courier New', monospace;
}

.code-terminal-body {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.6;
}

.code-terminal-line {
  display: flex;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.code-terminal-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.line-number {
  color: rgba(255, 255, 255, 0.15);
  min-width: 1.5rem;
  text-align: right;
  user-select: none;
}

.line-content {
  color: #e6edf3;
}

/* Syntax highlighting classes */
.ct-kw { color: #ff7b72; }
.ct-fn { color: #d2a8ff; }
.ct-str { color: #a5d6ff; }
.ct-num { color: #79c0ff; }

.code-terminal-cursor {
  display: inline-block;
  color: var(--color-primary);
  animation: cursor-blink 1s step-end infinite;
  margin-left: 2.25rem;
}

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

.code-terminal-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
}

.code-terminal-deploy-btn {
  background: var(--gradient-brand);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.code-terminal-deploy-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.code-terminal-deploy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.code-terminal-deploy-btn.deploying {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  animation: pulse-deploy 0.6s ease infinite;
}

.code-terminal-deploy-btn.success {
  background: #22c55e;
}

@keyframes pulse-deploy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Conveyor Belt Subtitle */
.conveyor-belt-subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Video play overlay fix — remove dark state on play */
.video-testimonial-player video {
  transition: none;
}

/* ============================================
   CASE STUDIES
   ============================================ */

.case-studies-section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
}

.case-studies-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.case-studies-title-hero {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case-studies-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0.75rem auto 0;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.case-study-card {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.case-study-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.case-study-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.case-study-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.case-study-card:hover .case-study-hover-overlay {
  opacity: 1;
}

.case-study-hover-label {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

/* Case Study Modal */
.case-study-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.case-study-modal {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.case-study-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s;
}

.case-study-modal-close:hover {
  background: rgba(139, 92, 246, 0.4);
}

.case-study-modal-image {
  height: 280px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.case-study-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-study-modal-content {
  padding: 1.5rem 2rem 2rem;
}

.case-study-modal-content h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.case-study-modal-type {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.case-study-modal-details {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.case-study-modal-content .case-study-metrics {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.case-study-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.case-study-card:hover .case-study-image img {
  transform: scale(1.05);
}

.case-study-info {
  padding: 1.25rem;
}

.case-study-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.case-study-type {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.case-study-metrics {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.case-study-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.case-study-metric-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
}

.case-study-metric-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================
   PROFIT ENGINE / EMAIL DESIGNS
   ============================================ */

.profit-engine-section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
}

.profit-engine-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.profit-engine-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 700px;
  margin: 0.75rem auto 0;
  line-height: 1.6;
}

/* Auto-scrolling conveyor container */
.profit-engine-scroll-container {
  overflow: hidden;
  position: relative;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.profit-engine-scroll-container::before,
.profit-engine-scroll-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.profit-engine-scroll-container::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.profit-engine-scroll-container::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent);
}

.profit-engine-scroll-track {
  display: flex;
  gap: 1.25rem;
  animation: email-scroll 40s linear infinite;
  width: max-content;
}

.profit-engine-scroll-track:hover {
  animation-play-state: paused;
}

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

.profit-engine-card {
  flex: 0 0 220px;
  height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--color-surface);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.profit-engine-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.profit-engine-card-scroll {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.profit-engine-card-scroll img {
  width: 100%;
  display: block;
}

.profit-engine-hint {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
  font-style: italic;
}

/* ============================================
   MID CTA
   ============================================ */

.mid-cta-section {
  display: flex;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-md);
}

.mid-cta-section .btn-gradient {
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
}

/* ============================================
   RESPONSIVE — New Sections
   ============================================ */

@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  /* Center case study text on mobile */
  .case-study-info {
    text-align: center;
  }

  .case-study-metrics {
    justify-content: center;
  }

  .case-study-metric {
    align-items: center;
  }


  .case-studies-title-hero {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .profit-engine-designs {
    flex-wrap: wrap;
  }

  .profit-engine-card {
    flex: 0 0 calc(50% - 0.5rem);
    height: 300px;
  }

  .code-terminal-tabs {
    display: none;
  }

  /* Ensure email designs scrollable track is always visible */
  .profit-engine-scroll-track {
    will-change: transform;
  }
}

@media (max-width: 480px) {
  .profit-engine-card {
    flex: 0 0 100%;
    height: 350px;
  }

  .case-study-metrics {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .case-study-metric {
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* ============================================
   MOBILE OPTIMIZATION — HAMBURGER MENU
   ============================================ */

/* Hamburger button — hidden on desktop */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1002;
}

.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-hamburger-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger-open span:nth-child(2) {
  opacity: 0;
}

.navbar-hamburger-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.navbar-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 10, 1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.navbar-mobile-overlay-open {
  opacity: 1;
  pointer-events: auto;
}

.navbar-mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.navbar-mobile-link {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.navbar-mobile-link:hover {
  color: var(--color-text-main);
}

.navbar-mobile-cta {
  margin-top: 1rem;
  font-size: 1rem;
  padding: 0.85rem 2.2rem;
}

/* Show hamburger, hide desktop links on mobile */
@media (max-width: 1024px) {
  .navbar-hamburger {
    display: flex;
  }
}

/* ============================================
   MOBILE OPTIMIZATION — ALL SECTIONS
   ============================================ */

@media (max-width: 768px) {

  /* --- Hero: centered, balanced --- */
  .cx-hero {
    padding: calc(var(--header-height) + 1.5rem) 0 2rem;
    text-align: center;
  }

  .cx-pill {
    font-size: 0.8rem;
    padding: 0.4rem 1.2rem;
  }

  .cx-hero-title {
    font-size: 1.75rem;
    text-align: center;
  }

  .cx-hero-subtitle {
    text-align: center;
    max-width: 100%;
    white-space: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  /* Toggle hero stats: show mobile checkmarks, hide desktop pipe-separated */
  .hero-stats-desktop {
    display: none !important;
  }

  .hero-stats-mobile {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .hero-stat-check {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 1rem;
    line-height: 1.8;
  }

  .hero-metric-divider {
    display: none;
  }
  /* Slightly faster marquee on mobile */
  .cx-hero .marquee {
    --speed: 50s;
    --logo-max-h: 28px;
    --marquee-height: 60px;
  }

  .cx-hero .logo-item img {
    height: 36px;
  }

  /* --- Trampoline: toggle layouts --- */
  .trampoline-desktop-only {
    display: none !important;
  }

  .trampoline-mobile-only {
    display: block !important;
  }

  .trampoline-section {
    padding: 1rem 0 2.5rem;
  }

  .trampoline-intro h2 {
    font-size: 1.6rem;
  }

  .trampoline-video-block {
    max-width: 320px;
  }

  .trampoline-desc-block p {
    font-size: 0.95rem;
  }

  /* --- Five Reasons headline: BIGGER --- */
  .five-reasons-headline {
    padding: 2rem 1.5rem 0.5rem;
  }

  .five-reasons-headline .cx-title-xl {
    font-size: clamp(1.65rem, 6vw, 2.4rem);
  }

  /* --- Skill Cards: centered text, animation clipping --- */
  .skills-section {
    padding: 2rem 0;
  }

  .skill-card {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .skill-card-content {
    text-align: center;
    align-items: center;
  }

  .skill-card-label {
    align-self: center;
    font-size: 0.75rem;
  }

  .skill-card h3 {
    text-align: center;
    font-size: 1.35rem;
  }

  .skill-card p {
    text-align: center;
    font-size: 1rem;
  }

  /* Show mobile paragraphs, hide desktop ones */
  .skill-card-paragraphs-desktop {
    display: none;
  }

  .skill-card-paragraphs-mobile {
    display: block;
  }

  .skill-card-visual {
    width: 100%;
    min-height: 220px;
    max-height: 280px;
    margin: 0 0.5rem;
    overflow: hidden;
  }

  /* Conveyor belt needs more room on mobile */
  .skill-card-visual:has(.conveyor-belt-wrapper) {
    min-height: 250px;
    max-height: 320px;
  }

  /* Klaviyo flow needs more height on mobile to show bottom nodes */
  .skill-card-visual:has(.klaviyo-flow-wrapper) {
    min-height: 260px;
    max-height: 300px;
  }

  /* Force clip ALL animation wrappers on mobile */
  .skill-card-visual:has(.kanban-board),
  .skill-card-visual:has(.conveyor-belt-wrapper),
  .skill-card-visual:has(.klaviyo-flow-wrapper),
  .skill-card-visual:has(.code-terminal-wrapper) {
    overflow: hidden;
  }

  /* --- Achievements: tighter spacing --- */
  .achievements-section {
    padding: 1rem 0 1rem;
  }

  .achievements-header {
    margin-bottom: 1rem;
  }

  .sp-stats-grid {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .sp-stat-number {
    font-size: 3rem;
  }

  /* --- Certificates: equal width columns --- */
  .sp-badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 380px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .sp-badge {
    width: 100%;
  }

  .sp-badge {
    padding: 0.75rem 0.5rem;
  }

  .sp-badge-title {
    font-size: 0.65rem;
  }

  .sp-badge-ribbon {
    font-size: 0.55rem;
    padding: 0.15rem 0.5rem;
  }

  .sp-badge-year {
    font-size: 0.65rem;
  }

  .sp-badge-logo svg,
  .sp-badge-logo img {
    width: 24px;
    height: 24px;
  }

  /* --- Testimonials headline: bigger --- */
  .testimonials-headline .cx-title-xl {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  /* --- Video & Written testimonials: touch scroll --- */
  .video-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .video-scroll-container::-webkit-scrollbar {
    display: none;
  }

  .video-scroll-track {
    animation: videoScroll 30s linear infinite;
    touch-action: pan-x;
  }

  .video-testimonial-card-v2 {
    width: 200px;
    scroll-snap-align: start;
  }

  .written-reviews-marquee {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .written-reviews-marquee::-webkit-scrollbar {
    display: none;
  }

  .written-reviews-track {
    touch-action: pan-x;
  }

  .written-review-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
  }

  /* --- Case Studies: bigger headings --- */
  .case-studies-header .cx-title-lg {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
  }

  .case-studies-section {
    padding: 3rem 0;
  }

  /* --- Email Designs (Profit Engine): fixed mobile --- */
  .profit-engine-header .cx-title-lg {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  }

  .profit-engine-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .profit-engine-scroll-container::-webkit-scrollbar {
    display: none;
  }

  .profit-engine-scroll-track {
    animation: email-scroll 30s linear infinite;
    touch-action: pan-x;
  }

  .profit-engine-card {
    flex: 0 0 160px;
    height: 320px;
    scroll-snap-align: start;
  }

  /* --- Navbar: show logo + hamburger on mobile --- */
  .navbar-logo {
    display: block;
    font-size: 0.95rem;
  }

  .navbar-inner {
    justify-content: space-between;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {

  .cx-hero-title {
    font-size: 1.5rem;
  }

  .cx-hero-subtitle {
    font-size: 0.9rem;
  }

  .five-reasons-headline .cx-title-xl {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .skill-card h3 {
    font-size: 1.2rem;
  }

  .skill-card p {
    font-size: 0.9rem;
  }

  .sp-stat-number {
    font-size: 2.5rem;
  }

  .sp-badges-grid {
    max-width: 280px;
    gap: 0.5rem;
  }

  .video-testimonial-card-v2 {
    width: 180px;
  }

  .written-review-card {
    flex: 0 0 260px;
  }

  .profit-engine-card {
    flex: 0 0 140px;
    height: 280px;
  }

  .testimonials-headline .cx-title-xl {
    font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  }

  .case-studies-header .cx-title-lg {
    font-size: clamp(1.3rem, 5.5vw, 1.75rem);
  }

  .profit-engine-header .cx-title-lg {
    font-size: clamp(1.3rem, 5.5vw, 1.8rem);
  }

  .navbar-mobile-link {
    font-size: 1.3rem;
  }
}

/* ============================================
   WELCOME FLOW ANIMATION (Nerdwax Case Study)
   ============================================ */
.welcome-flow-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0a0e1a;
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* Header bar */
.wf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(135deg, #1a1f35, #0f1225);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wf-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-klaviyo-logo {
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  letter-spacing: -0.03em;
  opacity: 0.9;
}

.wf-flow-name {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.wf-live-badge {
  font-size: 0.6rem;
  color: #22c55e;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Canvas area */
.wf-canvas {
  flex: 1;
  overflow: hidden;
  padding: 16px 20px;
  scrollbar-width: none;
}

.wf-canvas::-webkit-scrollbar {
  display: none;
}

.wf-flow-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-bottom: 20px;
}

/* Node group (connector + card) */
.wf-node-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Connector line between nodes */
.wf-connector {
  width: 2px;
  height: 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wf-connector-line {
  width: 2px;
  height: 100%;
  border-left: 2px dashed rgba(100, 116, 139, 0.3);
}

.wf-connector-pulse {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wf-pulse-active {
  opacity: 1;
  animation: wf-pulse-flow 1s ease-in-out infinite;
}

@keyframes wf-pulse-flow {
  0% { transform: translateY(-8px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

/* Node card */
.wf-node {
  width: 85%;
  max-width: 240px;
  border: 1px solid;
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.4s ease;
  backdrop-filter: blur(8px);
}

.wf-node-active {
  transform: scale(1.03);
}

.wf-node-delay {
  max-width: 160px;
  padding: 5px 10px;
  text-align: center;
}

.wf-node-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.wf-node-icon {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.wf-node-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-node-detail {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 20px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.wf-node-delay .wf-node-label {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.wf-node-delay .wf-node-header {
  justify-content: center;
  margin-bottom: 0;
}

/* Stats row */
.wf-node-stats {
  display: flex;
  gap: 8px;
  margin-left: 20px;
  margin-top: 2px;
}

.wf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.wf-stat-label {
  font-size: 0.45rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.wf-stat-value {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Summary bar */
.wf-summary {
  display: flex;
  justify-content: space-around;
  padding: 8px 10px;
  background: linear-gradient(135deg, #1a1f35, #0f1225);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wf-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.wf-summary-num {
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.wf-summary-label {
  font-size: 0.45rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── Nerdwax Wide Modal ── */
.case-study-modal-wide {
  max-width: 720px !important;
  width: 95vw !important;
}

.nw-flow-tabs {
  display: flex;
  gap: 6px;
  padding: 0 24px;
  margin-top: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.nw-flow-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.nw-flow-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.nw-flow-tab-active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.nw-flow-container {
  margin: 8px 24px 24px;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
