/* OMNIGRAPH · 5-ACT FULLSCREEN SCROLL-TO-DRIVE (c-style.css) */

/* Global Cinema Scrub Act Container */
.c-act-section {
  position: relative;
  z-index: 1;
  height: 210vh;
  background: #08090b;
}

.c-act-section.c-act-tall {
  height: 250vh;
}

.c-act-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-top: 5.25rem;
  background: #08090b;
}

.c-act-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #08090b;
}

.c-act-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.94;
  transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.c-act-section.act-ending .c-act-video {
  opacity: 0.32;
}

.c-act-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 9, 11, 0.56) 0%,
    rgba(8, 9, 11, 0.14) 40%,
    rgba(8, 9, 11, 0.88) 100%
  );
  pointer-events: none;
}

[data-theme="light"] .c-act-scrim {
  background: linear-gradient(
    180deg,
    rgba(246, 244, 239, 0.72) 0%,
    rgba(246, 244, 239, 0.22) 42%,
    rgba(246, 244, 239, 0.94) 100%
  );
}

.c-act-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3rem, 5.2vh, 4.4rem);
  transition: opacity 0.85s ease, transform 0.9s var(--ease-out);
}

/* Smooth fade-in / fade-out of typography synced with video scroll */
.c-act-overlay.fade-out {
  opacity: 0.12;
  transform: translateY(-10px);
}

/* Act 2 Principles Strip over Cinema Lens */
.c-glass-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.c-glass-card {
  background: rgba(14, 15, 19, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
}

[data-theme="light"] .c-glass-card {
  background: rgba(255, 254, 251, 0.78);
  border-color: rgba(20, 21, 24, 0.12);
}

.c-glass-card .p-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.c-glass-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.c-glass-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Act 3 AI Studio Compact Interactive Tabs + Packages */
.c-ai-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.35rem;
}

.c-ai-pill {
  background: rgba(14, 15, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.c-ai-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.c-ai-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
}

[data-theme="light"] .c-ai-pill {
  background: rgba(255, 254, 251, 0.85);
  border-color: rgba(20, 21, 24, 0.14);
}

.c-ai-demo-box {
  margin-top: 0.85rem;
  background: rgba(14, 15, 19, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
}

[data-theme="light"] .c-ai-demo-box {
  background: rgba(255, 254, 251, 0.88);
  border-color: rgba(20, 21, 24, 0.14);
}

.c-ai-demo-panel {
  display: none;
}

.c-ai-demo-panel.active {
  display: block;
}

.c-ai-demo-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.c-ai-demo-head span:last-child {
  color: var(--text-secondary);
}

.c-ai-demo-panel p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.c-ai-demo-panel p strong {
  color: var(--text-primary);
}

.c-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.15rem;
}

.c-ai-card {
  background: rgba(14, 15, 19, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.c-ai-card.featured {
  border-color: var(--accent);
}

[data-theme="light"] .c-ai-card {
  background: rgba(255, 254, 251, 0.84);
  border-color: rgba(20, 21, 24, 0.12);
}

.c-ai-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
}

.c-ai-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.c-ai-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.c-ai-list li {
  padding-left: 0.9rem;
  position: relative;
}

.c-ai-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 1.5px;
  background: var(--accent);
}

/* Act 5 Six Disciplines Glass Grid over Brand & Matter video */
.c-disciplines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.c-disc-card {
  background: rgba(14, 15, 19, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.c-disc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

[data-theme="light"] .c-disc-card {
  background: rgba(255, 254, 251, 0.82);
  border-color: rgba(20, 21, 24, 0.12);
}

.c-disc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.c-disc-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.c-disc-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.c-disc-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.c-disc-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* Act 6 Clients Directory Glass Panel over Boardroom video */
#clienti .section-index {
  margin-bottom: 0.55rem;
}

#clienti .featured-quote {
  font-size: clamp(1.25rem, 2.05vw, 1.85rem);
  line-height: 1.18;
  margin-bottom: 0.45rem;
}

.c-clients-glass {
  background: rgba(14, 15, 19, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 0.2rem 1.4rem;
  margin-top: 0.85rem;
}

.c-clients-glass .cd-row {
  padding: 0.48rem 0;
}

/* Act 7 Contact Glass Layout over Studio Lounge video */
.c-contact-overlay-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

.c-contact-form-glass {
  background: rgba(14, 15, 19, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 1020px) {
  .c-contact-overlay-grid {
    grid-template-columns: 1fr;
  }
}

/* Global Persistent Cinema HUD (Bottom Bar during the 7 Acts) */
.c-global-hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  padding: 0.95rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 9, 11, 0.82) 100%);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

[data-theme="light"] .c-global-hud {
  background: linear-gradient(180deg, transparent 0%, rgba(246, 244, 239, 0.88) 100%);
}

.c-global-hud.hidden {
  opacity: 0;
}

.c-hud-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.c-hud-chapters {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  pointer-events: auto;
}

.c-hud-ch {
  color: var(--text-muted);
  transition: color 0.25s ease;
  text-decoration: none;
}

.c-hud-ch:hover {
  color: var(--text-primary);
}

.c-hud-ch.active {
  color: var(--accent);
  font-weight: 600;
}

.c-hud-track {
  flex: 1;
  max-width: 280px;
  height: 2px;
  background: var(--border-strong);
  position: relative;
  overflow: hidden;
}

.c-hud-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
}

.c-hud-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  pointer-events: auto;
}

.c-hud-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.c-hud-mode-btn:hover {
  border-color: var(--accent);
}

.c-hud-mode-btn.playing {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
}

.c-mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.c-hud-mode-btn.playing .c-mode-dot {
  background: var(--accent-on);
  animation: modePulse 1.4s ease-in-out infinite;
}

@keyframes modePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.c-act-video.loop-fading {
  opacity: 0 !important;
}

.site-footer {
  padding-bottom: 6rem;
}

@media (max-width: 1020px) {
  .c-glass-row,
  .c-ai-grid,
  .c-disciplines-grid {
    grid-template-columns: 1fr;
  }
  .c-act-section,
  .c-act-section.c-act-tall {
    height: auto;
    border-top: 1px solid var(--border);
  }
  .c-act-sticky {
    position: relative;
    height: auto;
    min-height: 0;
    display: block;
    padding-top: 4.5rem;
  }
  /* Mobile widescreen 16:9 cinema window so videos are NEVER zoomed/cropped */
  .c-act-media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }
  .c-act-scrim {
    background: linear-gradient(180deg, rgba(8,9,11,0.12) 0%, rgba(8,9,11,0.0) 45%, #08090b 100%);
  }
  .c-act-overlay {
    padding-top: 1.35rem;
    padding-bottom: 3.5rem;
  }
  .c-hud-chapters,
  .c-hud-track {
    display: none;
  }
  .c-global-hud {
    padding: 0.65rem 0;
    background: rgba(8, 9, 11, 0.9);
    border-top: 1px solid var(--border);
  }
  .c-hud-inner {
    justify-content: space-between;
  }
  .c-hud-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-act-section,
  .c-act-section.c-act-tall {
    height: auto;
  }
  .c-act-sticky {
    position: relative;
    height: auto;
    min-height: 85vh;
    padding-top: 6rem;
  }
}
