/* ==========================================================================
   CINEMATIC WEB ANIMATION: THE TRADITIONAL WORKFLOW
   AdShot AI — Apple-level polished, restrained, 60fps GPU-accelerated motion
   ========================================================================== */

.cine-workflow-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto 52px auto;
  position: relative;
  border-radius: 28px;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 
    0 24px 60px -15px rgba(15, 23, 42, 0.08),
    0 6px 18px -4px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.problem-section .section-title {
  font-size: clamp(22px, 3.8vw, 32px) !important;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.problem-section .section-subtitle {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
  line-height: 1.5;
}

/* ---------- Top Director Control Bar ---------- */
.cine-nav-bar {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 20;
}

.cine-phase-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
}

.cine-record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: cinePulse 1.8s infinite ease-in-out;
}

@keyframes cinePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.cine-scene-index {
  color: #64748B;
  font-weight: 600;
  font-size: 11.5px;
}

.cine-divider {
  color: #CBD5E1;
}

.cine-scene-name {
  color: #0F172A;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Timeline Scrubber */
.cine-timeline-nav {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 12px;
}

.cine-progress-bar-bg {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 4px;
  background: #E2E8F0;
  border-radius: 999px;
  z-index: 1;
}

.cine-progress-bar-fill {
  height: 100%;
  width: 11.11%;
  background: linear-gradient(90deg, #6366F1, #8B5CF6);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cine-steps-dots {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cine-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.cine-step-dot:hover {
  border-color: #6366F1;
  color: #6366F1;
  transform: scale(1.15);
}

.cine-step-dot.active {
  background: #6366F1;
  border-color: #6366F1;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
  transform: scale(1.15);
}

.cine-step-dot.passed {
  background: #EEF2FF;
  border-color: #A5B4FC;
  color: #4F46E5;
}

/* Control Buttons */
.cine-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cine-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cine-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
  transform: translateY(-1px);
}

.cine-btn-icon {
  font-size: 12px;
}

/* ---------- The Viewport Stage ---------- */
.cine-viewport {
  position: relative;
  width: 100%;
  height: 590px;
  background: radial-gradient(ellipse at 50% 30%, #FFFFFF 0%, #F8FAFC 65%, #F1F5F9 100%);
  overflow: hidden;
}

/* Subtle architectural dot grid */
.cine-viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

/* Scene Wrapper */
.cine-scene {
  position: absolute;
  inset: 0;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s;
  pointer-events: none;
  z-index: 2;
}

.cine-scene.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  z-index: 5;
}

/* Common Scene Header / Label */
.cine-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6366F1;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.cine-headline {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
  text-align: center;
}

.cine-subtext {
  font-size: 13.5px;
  color: #64748B;
  margin-bottom: 24px;
  text-align: center;
  max-width: 580px;
}

/* ==========================================================================
   SCENE 1: ONE SIMPLE REQUEST
   ========================================================================== */
.s1-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.s1-request-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.08);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  animation: s1Float 3s ease-in-out infinite alternate;
}

@keyframes s1Float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.s1-brief-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #EEF2FF;
  color: #6366F1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.s1-brief-text {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.s1-brief-sub {
  font-size: 11px;
  color: #64748B;
}

.s1-product-frame {
  width: 360px;
  max-width: 90vw;
  height: 330px;
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 
    0 24px 50px -12px rgba(15, 23, 42, 0.12),
    0 8px 24px -4px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s1-product-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.5s ease;
}

.s1-innocent-tag {
  position: absolute;
  bottom: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   SCENE 2: PHOTOGRAPHY
   ========================================================================== */
.s2-grid {
  display: grid;
  grid-template-columns: 320px 290px;
  gap: 28px;
  align-items: center;
}

.s2-preview-card {
  width: 320px;
  height: 310px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.18);
  border: 1px solid #334155;
  position: relative;
}

.s2-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s2-details-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.06);
}

.s2-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.s2-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.s2-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #EDE9FE;
  color: #7C3AED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.s2-price-badge {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 17px;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   SCENE 3: DESIGNER REVISIONS
   ========================================================================== */
.s3-concepts-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
}

.s3-concept-card {
  width: 190px;
  height: 220px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.s3-concept-card img {
  width: 100%;
  height: 155px;
  object-fit: cover;
}

.s3-concept-info {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s3-concept-title {
  font-size: 12px;
  font-weight: 800;
  color: #0F172A;
}

.s3-concept-status {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
}

.s3-concept-card.rejected {
  opacity: 0.55;
  filter: grayscale(0.5);
  transform: scale(0.95);
}

.s3-stamp {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  border: 3px solid #EF4444;
  color: #EF4444;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  pointer-events: none;
}

.s3-loop-indicator {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #D97706;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  animation: s3Spin 2s linear infinite;
}

/* ==========================================================================
   SCENE 4: AGENCY / BACK-AND-FORTH
   ========================================================================== */
.s4-stack-container {
  width: 480px;
  position: relative;
  height: 280px;
}

.s4-msg-card {
  position: absolute;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.s4-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
  color: #4338CA;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s4-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.s4-sender {
  font-size: 12px;
  font-weight: 800;
  color: #0F172A;
}

.s4-time {
  font-size: 10px;
  color: #94A3B8;
}

.s4-body {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
}

/* ==========================================================================
   SCENE 5: TOO MANY FORMATS
   ========================================================================== */
.s5-formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 820px;
}

.s5-format-tile {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease;
}

.s5-format-tile:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
}

.s5-format-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s5-format-name {
  font-size: 11px;
  font-weight: 800;
  color: #0F172A;
}

.s5-ratio-badge {
  font-size: 9px;
  font-weight: 700;
  color: #6366F1;
  background: #EEF2FF;
  padding: 2px 5px;
  border-radius: 4px;
}

.s5-visual-holder {
  height: 54px;
  background: #F1F5F9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.s5-visual-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s5-tags-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.s5-tag {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748B;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 1.5px 5px;
  border-radius: 3px;
}

/* ==========================================================================
   SCENE 6: TIME (THE TIMELINE DRAG)
   ========================================================================== */
.s6-timeline-wrapper {
  width: 100%;
  max-width: 820px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.06);
}

.s6-timeline-line {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 20px;
}

.s6-timeline-line::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #E2E8F0;
  z-index: 1;
}

.s6-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 140px;
}

.s6-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #6366F1;
  color: #6366F1;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
  margin-bottom: 10px;
}

.s6-day {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
}

.s6-label {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 600;
  margin-top: 2px;
}

.s6-drag-callout {
  margin-top: 28px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   SCENE 7: COST (COMPOUNDING INVOICES)
   ========================================================================== */
.s7-cost-receipt {
  width: 440px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 18px 42px -8px rgba(15, 23, 42, 0.09);
}

.s7-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #E2E8F0;
  font-size: 13.5px;
}

.s7-row-name {
  color: #475569;
  font-weight: 600;
}

.s7-row-amt {
  color: #0F172A;
  font-weight: 800;
  font-family: monospace;
  font-size: 14px;
}

.s7-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 4px;
}

.s7-total-label {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
}

.s7-total-amt {
  font-size: 26px;
  font-weight: 900;
  color: #DC2626;
  font-family: monospace;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   SCENE 8: INCONSISTENCY (4 DISPARATE ADS)
   ========================================================================== */
.s8-inconsistent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 860px;
}

.s8-inconsistent-card {
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  border: 2px solid rgba(226, 232, 240, 0.9);
  position: relative;
  transition: transform 0.25s ease;
}

.s8-inconsistent-card:hover {
  transform: scale(1.04);
  z-index: 10;
}

.s8-inconsistent-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s8-verdict-banner {
  margin-top: 18px;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #E11D48;
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   SCENE 9: FINAL VISUAL STATEMENT
   ========================================================================== */
.s9-mosaic-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  opacity: 0.14;
  filter: blur(2.5px);
  transform: scale(0.94);
  pointer-events: none;
}

.s9-mosaic-item {
  border-radius: 10px;
  background: #E2E8F0;
  overflow: hidden;
  height: 100px;
}

.s9-mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s9-verdict-wrapper {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.s9-words-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.s9-word {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  opacity: 0;
  transform: translateY(18px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.s9-word-slow {
  color: #F59E0B;
}

.s9-word-expensive {
  color: #EF4444;
}

.s9-word-inconsistent {
  color: #7C3AED;
}

.cine-scene.active .s9-word:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.cine-scene.active .s9-word:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.cine-scene.active .s9-word:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.8s;
}

.s9-transition-hint {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.s9-scroll-arrow {
  color: #6366F1;
  animation: s9Bounce 1.5s infinite ease-in-out;
}

@keyframes s9Bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 900px) {
  .cine-viewport {
    height: 560px;
  }
  .cine-timeline-nav {
    display: none;
  }
  .s2-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .s2-preview-card {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }
  .s3-concepts-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .s3-concept-card {
    width: 140px;
    height: 180px;
  }
  .s3-concept-card img {
    height: 120px;
  }
  .s4-stack-container {
    width: 95%;
  }
  .s5-formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .s8-inconsistent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .s8-inconsistent-card {
    height: 160px;
  }
}

@media (max-width: 600px) {
  .cine-workflow-container {
    border-radius: 18px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
  .cine-nav-bar {
    padding: 10px 12px;
    gap: 8px;
  }
  .cine-scene-name,
  .cine-divider {
    display: none;
  }
  .cine-play-btn,
  .cine-replay-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 4px;
  }
  .cine-viewport {
    height: 570px;
  }
  .cine-scene {
    padding: 20px 16px;
  }
  .cine-headline {
    font-size: 20px;
  }
  .s1-product-frame {
    width: 290px;
    height: 270px;
  }
  .s7-cost-receipt {
    width: 100%;
    padding: 18px 20px;
  }
  .s9-words-row {
    flex-direction: column;
    gap: 8px;
  }
  .s9-word {
    font-size: 28px;
  }
  .s9-summary-text {
    font-size: 13px;
    max-width: 310px;
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .problem-section .section-title {
    font-size: clamp(22px, 5.5vw, 30px);
    line-height: 1.25;
  }
}
