/* Master Styling: Premium Light Theme Gallery Style */
:root {
  --bg-primary: #fbfcfa;
  --bg-secondary: #f4f3ee;
  --text-primary: #121212;
  --text-secondary: #5a5a56;
  --primary: #2b4c7e;
  --primary-light: #4a6fa5;
  --accent: #d2a450;
  --accent-light: #f5dfb8;
  --card-bg: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.03);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
  --shadow-hover:
    0 20px 50px rgba(0, 0, 0, 0.08), 0 1px 5px rgba(0, 0, 0, 0.02);
  --font-heading: "Chakra Petch", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --glow-color: rgba(43, 76, 126, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* Light Theme overrides */
body.light-theme {
  background-color: var(--bg-primary);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Preloader styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-logo-container {
  position: relative;
  margin-bottom: 2rem;
}

.preloader-logo {
  width: 120px;
  height: auto;
  filter: invert(1) drop-shadow(0 0 10px rgba(0, 0, 0, 0.05));
  animation: breathing 3s ease-in-out infinite alternate;
}

.preloader-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  animation: scan 2s linear infinite;
}

.preloader-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: 0.1em;
}

.preloader-progress-bar {
  width: 200px;
  height: 2px;
  background: var(--bg-secondary);
  margin-top: 1rem;
  position: relative;
}

.preloader-progress {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.1s linear;
}

/* Cursor Customization */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  position: fixed;
  border-radius: 50%;
  z-index: 999999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s;
}

.cursor-outline {
  width: 32px;
  height: 32px;
  border: 1px solid var(--primary);
  position: fixed;
  border-radius: 50%;
  z-index: 999998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s,
    border-color 0.3s;
}

/* Active Hover effects for cursor */
.cursor-active .cursor-dot {
  width: 20px;
  height: 20px;
  background: var(--accent);
}
.cursor-active .cursor-outline {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 0px; /* Monolithic square aesthetic */
  padding: 1rem 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Header master */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  background: rgba(251, 252, 250, 0.85);
  backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

.header.scrolled {
  padding: 0.5rem 0;
  background: rgba(251, 252, 250, 0.95);
}

.header-container {
  padding: 1rem 2rem;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 80px;
  width: auto;
  filter: invert(1);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sound-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.sound-toggle:hover {
  background: var(--bg-secondary);
}

/* Hamburger toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  width: 30px;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-smooth);
}

/* SECTION 1: Immersive Hero styles */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  overflow: hidden;
  padding-top: 120px;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* CSS 3D Receding Floor Grid */
.grid-perspective-floor {
  position: absolute;
  bottom: -150px;
  left: -50%;
  width: 200%;
  height: 600px;
  background-image:
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(400px) rotateX(75deg);
  transform-origin: center bottom;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

.hero-container-inner {
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 800px;
}

.hero-tagline {
  margin-bottom: 1.5rem;
}

.tag-accent {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(43, 76, 126, 0.06);
  padding: 0.5rem 1rem;
}

.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 2rem;
  font-weight: 800;
}

.glow-text-alt {
  color: var(--primary);
  text-decoration: underline var(--accent) 4px;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Animated mouse indicators */
.scroll-down-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.scroll-text {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse .wheel {
  width: 4px;
  height: 8px;
  background: var(--text-primary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% {
    transform: translate(-50%, 0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 15px);
    opacity: 0;
  }
}

/* SECTION 2: Infinitely scrolling results ticker marquee */
.results-ticker-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  overflow: hidden;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-slide 30s linear infinite;
  align-items: center;
}

.ticker-item {
  padding: 0 3rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Section Header utility */
.section-padding {
  padding: 8rem 0;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 5rem auto;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.text-center {
  text-center: center;
}

/* SECTION 3: Services 3D flipping grids */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card-3d-wrap {
  perspective: 1200px;
  height: 380px;
}

.service-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card-3d-wrap:hover .service-card-3d {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.card-front {
  justify-content: space-between;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--bg-secondary);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.card-front h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-front p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.flip-hint {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.metric-specs {
  list-style: none;
  margin: 1.5rem 0;
  width: 100%;
}

.metric-specs li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.spec-label {
  font-weight: 600;
  color: var(--text-secondary);
}

/* SECTION 4: Industry Specific Selection tabs */
.industry-services-section {
  background: var(--bg-secondary);
}

.industry-selector-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.industry-tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.industry-tab-btn.active,
.industry-tab-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.industry-display-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 4rem;
  min-height: 400px;
}

.industry-content-panel {
  display: none;
}

.industry-content-panel.active {
  display: block;
  animation: fade-in 0.5s ease-in-out forwards;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.panel-text h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.panel-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.panel-perks {
  list-style: none;
}

.panel-perks li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.panel-perks li i {
  color: var(--accent);
}

.panel-visualization {
  background: var(--bg-secondary);
  padding: 3rem;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.visual-layer {
  background: var(--card-bg);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.visual-layer.layer-3 {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.visual-grid-ecommerce {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.grid-item-eco {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.visual-secure-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.secure-icon {
  font-size: 4rem;
  color: var(--primary);
}

.visual-health-radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.radar-ping {
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* SECTION 5: KPI Dashboard telemetry and interactive plot chart */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
}

.kpi-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.kpi-details .kpi-value {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.kpi-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}

.kpi-progress {
  width: 100%;
  height: 4px;
  background: var(--bg-secondary);
  margin-top: 1.5rem;
  position: relative;
}

.kpi-bar {
  height: 100%;
  background: var(--primary);
  position: absolute;
  left: 0;
  top: 0;
}

.dashboard-plot-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 3rem;
}

.plot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.plot-legends {
  display: flex;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.legend-color {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.legend-color.organic {
  background: var(--accent);
}
.legend-color.paid {
  background: var(--primary);
}

.plot-svg-wrapper {
  width: 100%;
  height: auto;
}

.plot-svg {
  width: 100%;
  height: auto;
}

/* SECTION 6: Morphing Process blueprint steps */
.process-interactive-scaffold {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.process-steps-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.process-step-item {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.process-step-item.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.step-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--border-color);
  line-height: 1;
}

.process-step-item.active .step-num {
  color: var(--primary);
}

.step-desc h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.step-desc p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.process-graphic-pane {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
}

.interactive-blob-container {
  position: relative;
  width: 380px;
  height: 380px;
}

.morph-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.blob-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  font-size: 4rem;
  color: var(--primary);
}

/* SECTION 7: Comparison Slider before/after drag widget */
.comparison-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 500px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.image-before,
.image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Procedurally generate premium high-end abstract mesh gradient graphics for comparison */
.image-before {
  background-image: linear-gradient(135deg, #e2e8f0 25%, #cbd5e1 100%);
}

.image-after {
  background-image: linear-gradient(135deg, #cbd5e1 25%, #2b4c7e 100%);
  width: 50%; /* JS linked to this width */
}

.image-overlay-text {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.image-overlay-text.text-after {
  left: auto;
  right: 2rem;
  background: var(--primary);
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: 4px;
  background: #ffffff;
  cursor: ew-resize;
  z-index: 10;
}

.handle-line {
  width: 100%;
  height: 100%;
}

.handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  box-shadow: var(--shadow-hover);
}

/* SECTION 8: Interactive ROI Estimation calculator */
.roi-visualizer-section {
  background: var(--bg-secondary);
}

.roi-scaffold {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  align-items: center;
}

.roi-form-pane {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 4rem;
}

.roi-input-group {
  margin-top: 2.5rem;
}

.input-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.input-val-display {
  color: var(--primary);
}

.roi-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  outline: none;
}

.roi-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.roi-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent);
}

.roi-projection-pane {
  background: var(--primary);
  color: #ffffff;
  padding: 4rem;
}

.roi-projection-pane h3 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.projection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.proj-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.proj-card.span-all {
  grid-column: span 2;
  background: var(--card-bg);
  color: var(--text-primary);
}

.proj-label {
  font-size: 0.9rem;
  opacity: 0.8;
  display: block;
  margin-bottom: 0.5rem;
}

.proj-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.proj-value.text-accent {
  color: var(--primary);
}

.roi-disclaimer-p {
  margin-top: 2rem;
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.4;
}

/* SECTION 9: 3D Stack Deck Testimonials */
.deck-container {
  position: relative;
  max-width: 700px;
  height: 380px;
  margin: 0 auto;
}

.card-deck {
  position: relative;
  width: 100%;
  height: 100%;
}

.deck-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 3.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translateY(40px);
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s ease-in-out;
}

.deck-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 50;
}

.deck-card.next {
  opacity: 0.5;
  transform: scale(0.95) translateY(15px);
  z-index: 40;
}

.deck-quote {
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
}

.deck-author h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.deck-author span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.deck-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.deck-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.deck-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* SECTION 10: Goals questionnaire matcher */
.goal-matcher-section {
  background: var(--bg-secondary);
}

.matcher-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.matcher-header {
  text-align: center;
  margin-bottom: 4rem;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fade-in 0.4s ease-in-out forwards;
}

.wizard-step h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.wizard-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.option-card {
  cursor: pointer;
}

.option-card input {
  display: none;
}

.option-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: center;
  transition: var(--transition-smooth);
  height: 100%;
}

.option-box i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.option-title {
  font-weight: 700;
  font-family: var(--font-heading);
}

.option-card input:checked + .option-box {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: var(--shadow-hover);
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
}

.result-evaluation-card {
  text-align: center;
  padding: 2rem;
}

.eval-icon {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.result-evaluation-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.result-evaluation-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* SECTION 11: Canvas Vortex background CTA */
.vortex-cta-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  min-height: 400px;
  display: flex;
  align-items: center;
}

#vortex-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.15;
}

.vortex-content {
  position: relative;
  z-index: 10;
}

.vortex-content h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.vortex-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

/* AI Widget panel */
.ai-agent-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.ai-agent-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  font-size: 1.5rem;
  position: relative;
}

.ai-agent-trigger .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
}

.ai-agent-panel {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  flex-direction: column;
}

.ai-agent-panel.active {
  display: flex;
  animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-up {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.ai-agent-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.agent-info h4 {
  font-size: 0.95rem;
}

.agent-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ai-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-msg {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.ai-msg.bot {
  background: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
}

.ai-msg.user {
  background: var(--primary);
  color: #ffffff;
  align-self: flex-end;
}

.ai-prompts {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.prompt-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
}

.prompt-chip:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Page Header subpages */
.page-header-section {
  background: var(--bg-secondary);
  padding: 10rem 0 6rem 0;
  text-align: center;
}

.page-header-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.page-header-section p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Contact layout pages */
.contact-page-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
}

.contact-block-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact-details-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-detail-item {
  display: flex;
  gap: 1.5rem;
}

.contact-detail-item .icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-detail-item .info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.contact-detail-item .info p,
.contact-detail-item .info a {
  color: var(--text-secondary);
  text-decoration: none;
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 4rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  outline: none;
}

/* Popup overlay specs */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

.popup-content {
  background: var(--card-bg);
  padding: 4rem;
  max-width: 500px;
  text-align: center;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
}

.popup-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.popup-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.popup-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Footer layout rules */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 6rem 0 3rem 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-about-text {
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-socials a:hover {
  background: var(--primary);
  color: #ffffff;
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-links ul,
.footer-contact ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact li {
  display: flex;
  gap: 1rem;
}

.footer-contact i {
  color: var(--primary);
  margin-top: 0.2rem;
}

.footer-contact a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-bottom ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-bottom a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Legal layout pages constraints */
.legal-page .page-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h2 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem 0;
}

.legal-page p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Animations system */
@keyframes breathing {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes scan {
  0% {
    top: 0%;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0%;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  transition:
    opacity 0.8s,
    transform 0.8s;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: none;
}

/* Screen size adjustments */
@media (max-width: 1024px) {
  .services-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .menu-toggle {
    display: flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
  }
  .nav.active {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-title {
    font-size: 3rem;
  }
  .services-grid,
  .kpi-grid,
  .process-interactive-scaffold,
  .roi-scaffold,
  .wizard-options,
  .contact-page-wrapper,
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .wizard-options {
    grid-template-columns: 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
}
