/* =========================================================
   AI & INTELLIGENT AUTOMATION V3.5 - PRODUCTION READY
   High-Clarity SaaS Workflow Visuals & Responsive Design
   Hero is intentionally NOT restyled here.
   ========================================================= */

.sqai3-page {
  --ink: #121827;
  --muted: #64748b;
  --line: rgba(18, 24, 39, .08);
  --violet: #6366f1;
  --purple: #8b5cf6;
  --blue: #0284c7;
  --green: #10b981;
  --orange: #f59e0b;
  --midnight: #0f172a;
  --surface: #ffffff;
  --card-bg: #f8fafc;
  color: var(--ink);
  background: #fff;
  overflow: clip;
}

.sqai3-page * {
  box-sizing: border-box;
}

.sqai3-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.sqai3-kicker-light {
  color: rgba(255, 255, 255, .7);
}

.sqai3-section-title {
  margin: 0;
  max-width: 850px;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.15;
  letter-spacing: -1.2px;
  font-weight: 700;
}

[data-ai3-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}

[data-ai3-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 01 Opening */
.sqai3-opening {
  padding: 90px 0 100px;
  background: #fafbfc;
}

.sqai3-opening h2 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.15;
  letter-spacing: -1.4px;
  font-weight: 700;
}

.sqai3-opening .row p {
  max-width: 720px;
  margin: 18px auto 0;
  color: #64748b;
  font-size: 17px;
  line-height: 1.7;
}

/* High Fidelity Workflow Card */
.sqai3-hero-workflow-card {
  max-width: 1060px;
  margin: 50px auto 0;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.sqai3-workflow-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.sqai3-workflow-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.sqai3-workflow-bar .dot.red { background: #ef4444; }
.sqai3-workflow-bar .dot.yellow { background: #f59e0b; }
.sqai3-workflow-bar .dot.green { background: #10b981; }

.sqai3-workflow-bar .title {
  margin-left: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: .5px;
}

.sqai3-workflow-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 35px 30px;
  gap: 15px;
  flex-wrap: wrap;
}

.sqai3-wf-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .06);
  flex: 1 1 200px;
}

.sqai3-wf-step.highlight-step {
  background: #f5f3ff;
  border-color: rgba(139, 92, 246, .25);
  box-shadow: 0 4px 15px rgba(139, 92, 246, .08);
}

.sqai3-wf-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.sqai3-wf-info {
  display: flex;
  flex-direction: column;
}

.sqai3-wf-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .5px;
  margin-bottom: 2px;
}
.sqai3-wf-tag.tag-purple { color: #8b5cf6; }
.sqai3-wf-tag.tag-green { color: #10b981; }
.sqai3-wf-tag.tag-blue { color: #0284c7; }

.sqai3-wf-info strong {
  font-size: 14px;
  color: #0f172a;
}

.sqai3-wf-info small {
  font-size: 12px;
  color: #64748b;
}

.sqai3-wf-arrow {
  color: #94a3b8;
  font-size: 14px;
}

/* 02 Immersive Journey */
.sqai3-journey {
  padding: 100px 0;
  background: var(--midnight);
}

.sqai3-journey-heading {
  margin-bottom: 55px;
}
.sqai3-journey-heading h2 {
  color: #ffffff;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: -1.3px;
}

.sqai3-scenes-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1060px;
  margin: 0 auto;
}

.sqai3-scene-card {
  position: relative;
  background: #1e293b;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 40px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .2);
}

.sqai3-scene-badge {
  display: inline-block;
  background: rgba(99, 102, 241, .2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, .4);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.sqai3-scene-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.sqai3-scene-left h3 {
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.sqai3-scene-left p {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.sqai3-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sqai3-pill-group span {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 6px 12px;
  border-radius: 8px;
}

.sqai3-mock-ui {
  background: #0f172a;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 20px;
}

.sqai3-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .8px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.badge-live {
  color: #38bdf8;
}
.badge-ok {
  background: rgba(16, 185, 129, .2);
  color: #34d399;
  padding: 2px 8px;
  border-radius: 4px;
}

.sqai3-stream-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .03);
  border-radius: 8px;
  margin-bottom: 8px;
}
.sqai3-stream-item div {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.sqai3-stream-item strong {
  color: #f1f5f9;
  font-size: 13px;
}
.sqai3-stream-item span {
  color: #64748b;
  font-size: 11px;
}
.status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, .15);
  color: #38bdf8;
}

.sqai3-kv-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: 13px;
}
.sqai3-kv-row span { color: #64748b; }
.sqai3-kv-row strong { color: #f1f5f9; }

.sqai3-rule-check {
  font-size: 13px;
  color: #e2e8f0;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sqai3-action-item {
  font-size: 13px;
  color: #f1f5f9;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 03 Bento Section */
.sqai3-where {
  padding: 100px 0;
  background: #ffffff;
}

.sqai3-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.sqai3-bento-card {
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, .06);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  grid-column: span 6;
  transition: transform .25s ease, box-shadow .25s ease;
}

.sqai3-bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .06);
}

.sqai3-bento-card-large {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.sqai3-bento-card-wide {
  grid-column: span 12;
}

.sqai3-bento-visual {
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(15, 23, 42, .06);
}

.sqai3-bento-card-large .sqai3-bento-visual {
  margin-bottom: 0;
}

.bg-gradient-doc { background: #fdf4ff; }
.bg-gradient-chat { background: #f0f9ff; }
.bg-gradient-decision { background: #fffbeb; }
.bg-gradient-ops { background: #ecfdf5; }

.sqai3-bento-widget {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.widget-field {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 12px;
}
.widget-field label { color: #64748b; }
.widget-field strong { color: #0f172a; }

.widget-progress {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.widget-progress .bar {
  height: 100%;
  background: var(--base-color);
  border-radius: 3px;
}

.widget-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.widget-tags .tag {
  font-size: 11px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .06);
  padding: 4px 8px;
  border-radius: 6px;
  color: #334155;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.chat-bubble.user {
  background: #f1f5f9;
  color: #1e293b;
}
.chat-bubble.system {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.decision-matrix .matrix-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, .04);
}

.status-chip {
  font-size: 12px;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
  padding: 6px 12px;
  border-radius: 8px;
}

.sqai3-bento-copy span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .8px;
  margin-bottom: 6px;
}

.sqai3-bento-copy h3 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.3;
}

.sqai3-bento-copy p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* 04 Human Control */
.sqai3-human {
  padding: 80px 0;
  background: #fafbfc;
}

.sqai3-human-card-wrapper {
  background: #ffffff;
  border-radius: 24px;
  padding: 48px;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .04);
}

.sqai3-control-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .06);
  font-size: 13px;
  color: #334155;
}

.flow-item.highlight {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, .3);
  color: #065f46;
  font-weight: 700;
}

.flow-item b {
  color: var(--base-color);
}

.sqai3-human-dashboard-mock {
  background: #0f172a;
  border-radius: 16px;
  padding: 26px;
  color: #ffffff;
}

.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 18px;
}

.badge-alert {
  background: rgba(245, 158, 11, .2);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.mock-main .field-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.mock-main .field-row span { color: #94a3b8; }
.highlight-val {
  color: #38bdf8;
  font-weight: 700;
}

.mock-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-mock-approve {
  flex: 1;
  background: #10b981;
  color: #ffffff;
  border: 0;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-mock-edit {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  border: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* 05 Patterns */
.sqai3-patterns {
  padding: 90px 0;
  background: #ffffff;
}

.sqai3-pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.sqai3-pattern-grid article {
  background: #f8fafc;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pattern-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.bg-soft-blue { background: #e0f2fe; color: #0284c7; }
.bg-soft-purple { background: #f3e8ff; color: #9333ea; }
.bg-soft-green { background: #dcfce7; color: #16a34a; }
.bg-soft-orange { background: #ffedd5; color: #ea580c; }

.sqai3-pattern-grid span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .5px;
  display: block;
  margin-bottom: 6px;
}

.sqai3-pattern-grid h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin: 0;
}

/* 06 Guardrails */
.sqai3-guardrails {
  padding: 90px 0;
  background: #fafbfc;
}

.sqai3-guardrail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.sqai3-guardrail-grid article {
  background: #ffffff;
  border-radius: 18px;
  padding: 36px;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .02);
}

.guardrail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--base-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 20px;
}

.sqai3-guardrail-grid span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .8px;
  display: block;
  margin-bottom: 6px;
}

.sqai3-guardrail-grid h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.sqai3-guardrail-grid p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* 07 Final CTA */
.sqai3-final {
  padding: 100px 0;
  background: var(--midnight);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.sqai3-final-content {
  max-width: 820px;
  margin: 0 auto;
}

.sqai3-final-content h2 {
  color: #ffffff;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
}

.sqai3-final-content p {
  color: #94a3b8;
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 35px;
}

.sqai3-final-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--base-color);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  transition: all .25s ease;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .3);
}

.sqai3-final-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(220, 38, 38, .4);
}

/* Responsive */
@media (max-width: 991px) {
  .sqai3-scene-content {
    grid-template-columns: 1fr;
  }
  .sqai3-bento-card-large {
    grid-template-columns: 1fr;
  }
  .sqai3-bento-card {
    grid-column: span 12;
  }
  .sqai3-human-card-wrapper {
    padding: 30px;
  }
}

@media (max-width: 767px) {
  .sqai3-workflow-arrow {
    display: none;
  }
  .sqai3-scene-card {
    padding: 24px;
  }
}