/* ==========================================================================
   PIXIFLUX — PREMIUM + MOBILE REFINEMENT LAYER
   Loaded LAST (after styles.css, styles-wcu.css, styles-zunar.css) so these
   rules win the cascade at equal specificity.

   Redesign mode: PRESERVE. Brand (Deep Slate Navy + Radiant Crimson), fonts
   (Outfit + Plus Jakarta Sans) and the glassmorphism language are kept intact.
   This file only adds polish, mobile stability and accessibility refinements.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Mobile viewport stability — use dynamic viewport height where supported.
      Fixes the iOS/Android browser-chrome jump where 100vh hides hero CTAs
      behind the URL bar. Browsers without dvh keep the existing 100vh.
   -------------------------------------------------------------------------- */
@supports (height: 100dvh) {

  .hero-section.video-hero,
  .z-section,
  .zn-section,
  .mission-section {
    min-height: 100dvh;
  }

  .ambient-glow-wrapper {
    height: 100dvh;
  }

  .modal-dialog {
    max-height: 90dvh;
  }
}

/* --------------------------------------------------------------------------
   2. Form inputs — 16px floor prevents iOS Safari auto-zoom on focus.
   -------------------------------------------------------------------------- */
.glass-input,
.form-field input,
.form-field textarea,
.form-field select,
input.glass-input,
textarea.glass-input {
  font-size: 1rem;
}

/* Keep the floating header and hero balanced on narrow screens. */
@media (max-width: 480px) {
  body .new-floating-header {
    top: 12px !important;
    width: calc(100% - 24px) !important;
    padding: 0 10px 0 14px !important;
  }

  body .new-floating-header .new-navbar {
    height: 56px;
  }

  body .new-floating-header .brand-wordmark-mark {
    max-width: 128px;
  }

  body .new-floating-header .nav-actions {
    gap: 8px;
  }

  body .new-floating-header .nav-cta-btn {
    padding: 8px 13px;
    font-size: 0.86rem;
  }

  body .new-floating-header .mobile-toggle-btn {
    flex: 0 0 32px;
  }

  body #hero.hero-section.video-hero {
    height: 300px !important;
    min-height: 300px !important;
    flex: 0 0 300px !important;
    padding-top: 82px;
    padding-bottom: 20px;
  }
}

@media (max-width: 360px) {
  body .new-floating-header {
    padding-left: 10px !important;
    padding-right: 8px !important;
  }

  body .new-floating-header .brand-wordmark-mark {
    max-width: 104px;
  }

  body .new-floating-header .nav-cta-btn {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 481px) and (max-width: 600px) {
  body #hero.hero-section.video-hero {
    height: 380px !important;
    min-height: 380px !important;
    flex: 0 0 380px !important;
    padding-top: 88px;
    padding-bottom: 24px;
  }
}

@media (max-width: 600px) {
  .hero-carousel,
  .hero-overlay {
    top: 0px !important;
    height: 100% !important;
  }

  .hero-carousel .carousel-slide {
    object-fit: cover !important;
    object-position: center center !important;
  }
}

@media (min-width: 993px) {
  .zn-section:not(.solutions-scroll-section) .zn-heading-large,
  .solutions-scroll-section .sol-left h2 {
    max-width: 620px;
    font-size: clamp(2.25rem, 2.7vw, 3.15rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
  }

  .zn-section:not(.solutions-scroll-section) .zn-grid-title {
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
  }

  .solutions-scroll-section .sol-card-header h3 {
    font-size: clamp(1.25rem, 1.6vw, 1.6rem);
    line-height: 1.15;
  }

  .mission-section {
    min-height: 640px !important;
    padding: 56px 5% !important;
    gap: 4%;
  }

  .mission-left {
    flex: 0 0 46%;
    height: 500px;
  }

  .mission-right {
    flex: 1;
    max-width: 640px;
  }

  .mission-right .z-heading {
    max-width: 590px;
    font-size: clamp(2.15rem, 2.55vw, 3rem);
    line-height: 1.06;
    margin-bottom: 24px;
  }

  .mission-right .z-paragraph {
    max-width: 58ch;
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .mission-right .z-grid {
    gap: 0 22px;
    padding-top: 26px;
  }

  .mission-right .z-grid-item {
    font-size: 1.08rem;
    padding: 17px 0;
  }

  .mission-left .zn-node-network {
    transform: scale(0.88);
  }

  .hero-section.video-hero {
    min-height: 760px !important;
  }

  .zn-section:not(.solutions-scroll-section) {
    min-height: 680px !important;
  }

  .mission-section {
    min-height: 720px !important;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .zn-section:not(.solutions-scroll-section) .zn-left,
  .zn-section:not(.solutions-scroll-section) .zn-right {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .zn-pre-footer-brand {
    padding: 46px 20px 0;
  }

  .zn-brand-massive-text {
    max-width: 1100px;
    margin: 16px auto;
    font-size: clamp(4.8rem, 8vw, 9rem);
    line-height: 0.82;
    letter-spacing: -0.06em;
  }

  .zn-footer-new {
    margin: -18px 32px 0;
    padding: 34px 34px 22px;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(145deg, #202e49 0%, #18243a 100%) !important;
    box-shadow: 0 -10px 30px rgba(18, 29, 49, 0.14);
  }

  .zn-footer-top-grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.025);
  }

  .zn-ft-info {
    padding: 22px 24px;
  }

  .zn-ft-info p {
    max-width: 34ch;
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .zn-ft-link {
    padding: 18px 20px;
    border-color: rgba(255, 255, 255, 0.09);
  }

  .zn-ft-link a {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
  }

  .zn-footer-connect-row {
    padding: 18px 8px 10px;
    border-bottom: 0;
    gap: 20px;
  }

  .zn-connect-title {
    font-size: 1rem;
  }

  .zn-connect-link {
    font-size: 0.86rem;
  }

  .zn-social-btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 600px) {
  body.page-ready #intro-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body.page-ready #hero.hero-section.video-hero,
  body.page-ready header.new-floating-header {
    opacity: 1 !important;
  }

  #intro-screen .intro-content {
    transform: scale(0.72);
  }

  #intro-clip-area {
    width: 110px;
    height: 86px;
  }

  #intro-clip-area.expanded {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    top: 12px;
    left: 12px;
  }
}

@media (min-width: 993px) {
  .solutions-scroll-section .sol-right {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .solutions-scroll-section .sol-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    column-gap: 26px;
    align-items: center;
    padding: 22px;
    margin-bottom: 24px;
  }

  .solutions-scroll-section .sol-card-header {
    grid-column: 1 / -1;
    margin-bottom: 16px;
  }

  .solutions-scroll-section .sol-card-img {
    grid-column: 1;
    grid-row: 2 / span 2;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
  }

  .solutions-scroll-section .sol-card-img img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .solutions-scroll-section .sol-card-body {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    padding: 0 10px 0 0;
  }

  .solutions-scroll-section .sol-card-body p {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}

/* Platform section: lighter editorial rail with focused product panels. */
.solutions-scroll-section {
  background:
    radial-gradient(circle at 78% 18%, rgba(94, 132, 197, 0.16), transparent 32%),
    linear-gradient(135deg, #263652 0%, #1d2940 100%) !important;
  overflow: clip;
}

.solutions-scroll-section .sol-container {
  max-width: 1440px;
  align-items: stretch;
}

.solutions-scroll-section .sol-left {
  width: 34%;
  height: 100vh;
  min-height: 720px;
  padding: 112px 42px 56px;
  justify-content: center;
}

.solutions-scroll-section .sol-left h2 {
  max-width: 360px;
  font-size: clamp(2.3rem, 3.2vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.solutions-scroll-section .sol-nav {
  margin-top: 42px;
  gap: 10px;
}

.solutions-scroll-section .sol-nav-item {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}

.solutions-scroll-section .sol-nav-item:hover,
.solutions-scroll-section .sol-nav-item.active {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.solutions-scroll-section .sol-right {
  width: 66%;
  padding: 96px 5% 96px 4%;
}

.solutions-scroll-section .sol-card {
  padding: 26px;
  margin-bottom: 34px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 50px rgba(9, 17, 32, 0.16);
  transform: translateY(18px);
  opacity: 0.72;
  animation: platformCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.solutions-scroll-section .sol-card:nth-child(2) {
  animation-delay: 0.12s;
}

.solutions-scroll-section .sol-card:nth-child(3) {
  animation-delay: 0.24s;
}

.solutions-scroll-section .sol-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 26px 64px rgba(9, 17, 32, 0.28), 0 0 28px rgba(93, 139, 216, 0.12);
}

.solutions-scroll-section .sol-card-header {
  margin-bottom: 18px;
}

.solutions-scroll-section .sol-card-header h3 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.solutions-scroll-section .sol-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 15px;
}

.solutions-scroll-section .sol-card-img {
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  border-radius: 12px;
}

.solutions-scroll-section .sol-card-img img {
  object-fit: cover;
}

.solutions-scroll-section .sol-card-body p {
  max-width: 58ch;
  font-size: 0.96rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

@keyframes platformCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .solutions-scroll-section .sol-left,
  .solutions-scroll-section .sol-right {
    width: 100%;
  }

  .solutions-scroll-section .sol-left {
    min-height: 0;
    height: auto;
    padding: 72px 20px 24px;
  }

  .solutions-scroll-section .sol-left h2 {
    max-width: 520px;
  }

  .solutions-scroll-section .sol-right {
    padding: 20px 20px 72px;
  }
}

@media (max-width: 600px) {
  .zn-section:not(.solutions-scroll-section) .zn-heading-large {
    font-size: clamp(1.9rem, 8vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .zn-section:not(.solutions-scroll-section) .zn-grid-title {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .mission-section .mission-right {
    order: 1;
  }

  .mission-section .mission-left {
    order: 2;
    margin-top: 28px;
  }

  .solutions-scroll-section .sol-left {
    padding: 56px 16px 20px;
  }

  .solutions-scroll-section .sol-left h2 {
    font-size: 2.15rem;
  }

  .solutions-scroll-section .sol-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .solutions-scroll-section .sol-nav-item:hover,
  .solutions-scroll-section .sol-nav-item.active {
    transform: none;
  }

  .solutions-scroll-section .sol-right {
    padding: 16px 16px 56px;
  }

  .solutions-scroll-section .sol-card {
    padding: 18px;
    margin-bottom: 20px;
  }

  .solutions-scroll-section .sol-card-img {
    aspect-ratio: auto;
    height: auto;
  }

  .solutions-scroll-section .sol-card-img img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* --------------------------------------------------------------------------
   3. Premium interaction polish — brand text selection, visible focus ring,
      anchor offset under the floating header, refined scrollbar.
   -------------------------------------------------------------------------- */
::selection {
  background: rgba(170, 28, 65, 0.16);
  color: var(--text-primary);
}

html {
  scroll-padding-top: 100px;
}

:focus-visible {
  outline: 2px solid var(--accent-crimson);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (min-width: 993px) {
  .solutions-scroll-section .sol-card {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
    column-gap: 20px;
    padding: 18px;
    margin-bottom: 22px;
  }

  .solutions-scroll-section .sol-card-header {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 12px;
  }

  .solutions-scroll-section .sol-card-img {
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    grid-row: 2;
    align-self: start;
    margin-bottom: 0;
  }

  .solutions-scroll-section .sol-card-img img {
    height: auto;
    object-fit: contain;
  }

  .solutions-scroll-section .sol-card-body {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    padding: 0 4px 0 0;
  }

  .solutions-scroll-section .sol-left h2 {
    max-width: 360px;
    font-size: clamp(2.25rem, 2.7vw, 3.15rem) !important;
    line-height: 1.04;
  }

  .solutions-scroll-section .sol-card-header h3 {
    font-size: clamp(1.25rem, 1.6vw, 1.6rem) !important;
    line-height: 1.15;
  }
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: #eef1f6;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-navy), #3a4d70);
  border-radius: 999px;
  border: 3px solid #eef1f6;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-crimson);
}

/* --------------------------------------------------------------------------
   4. Touch devices — retire the desktop-only cursor spotlight, give nav
      items comfortable tap targets, and stop the heavy blurred ambient orbs
      from animating (GPU repaint cost) while keeping them visible.
   -------------------------------------------------------------------------- */
@media (hover: none),
(pointer: coarse) {
  .cursor-glow-halo {
    display: none !important;
  }

  .mobile-nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .mobile-cta-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ambient-orb {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   5. Small-screen rhythm — trim oversized section padding and headline scale
      so phones get tighter, more expensive-feeling vertical spacing.
      (Vertical padding only; never touches layout widths.)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {

  .platform-pillars-section,
  .switchboard-section,
  .faq-terminal-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .demo-booking-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero-section.video-hero {
    padding-top: 96px;
    padding-bottom: 32px;
  }

  .z-footer {
    padding-top: 64px;
  }

  .zn-heading-large {
    font-size: clamp(1.9rem, 7.5vw, 2.4rem);
  }
}

/* --------------------------------------------------------------------------
   6. Reduced motion — collapse infinite/decorative animation for users who
      ask for it. The intro overlay is removed by JS regardless, so this is
      safe for the load sequence.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   7. Floating navbar aura — the original ::before ring cycles through an
      off-brand rainbow (blue/purple/magenta). Retint it to the locked brand
      palette (crimson -> navy) and dial the opacity down so the glass pill
      reads refined rather than neon. In the light "scrolled" state the ring
      is nearly invisible for a clean, expensive look.
   -------------------------------------------------------------------------- */
.new-floating-header::before {
  background: linear-gradient(90deg,
      var(--accent-crimson),
      var(--accent-crimson-bright),
      var(--primary-navy),
      var(--accent-crimson));
  opacity: 0.4;
}

.new-floating-header.scrolled::before {
  opacity: 0.16;
}

/* --------------------------------------------------------------------------
   8. Brand wordmark — replaces the baked-in logo image (which contained the
      "INOVATE" typo) with crisp, scalable HTML type. The P-mark stays as the
      existing pixiflux-mark.png asset; colors adapt per surface.
   -------------------------------------------------------------------------- */
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  color: inherit;
}

.brand-wordmark-mark {
  display: block;
  height: 40px;
  width: auto;
}

.brand-wordmark-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-wordmark-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  line-height: 1;
  color: inherit;
}

.brand-wordmark-tag {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1;
  color: inherit;
  opacity: 0.72;
}

/* Larger variant for drawer + footer */
.brand-wordmark-lg .brand-wordmark-mark {
  height: 42px;
}

.brand-wordmark-lg .brand-wordmark-name {
  font-size: 1.7rem;
}

/* Navbar: white on the dark glass pill at top, dark on the light scrolled pill */
.new-floating-header .brand-wordmark {
  color: #ffffff;
}

.new-floating-header.scrolled .brand-wordmark {
  color: var(--text-primary);
}

.new-floating-header.scrolled .brand-wordmark-mark {
  filter: none;
}

/* Mobile drawer sits on a light surface */
.mobile-drawer-top .brand-wordmark {
  color: var(--text-primary);
}

/* Footer sits on a dark surface */
.brand-wordmark-light {
  color: #ffffff;
  margin-bottom: 20px;
}

.brand-wordmark-light .brand-wordmark-mark {
  filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
   9. Hero composition — the hero was a full-bleed product image with only a
      floating button and no value proposition. Add an asymmetric left copy
      column (headline + subtext) over a directional scrim so the message is
      legible without hiding the product visual on the right.
   -------------------------------------------------------------------------- */
.hero-content-fullscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
      rgba(16, 24, 40, 0.78) 0%,
      rgba(16, 24, 40, 0.55) 34%,
      rgba(16, 24, 40, 0.18) 62%,
      rgba(16, 24, 40, 0) 88%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  text-align: left;
  max-width: 640px;
  margin: auto 0;
  padding: 96px 5% 120px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-align: left;
  text-align-last: left;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(16, 24, 40, 0.35);
}

.hero-subtext {
  margin-top: 20px;
  max-width: 46ch;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  line-height: 1.6;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  text-align-last: left;
  text-wrap: pretty;
}

/* Mobile: center the copy and switch to a vertical scrim for legibility */
@media (max-width: 768px) {
  .hero-content-fullscreen::before {
    background: linear-gradient(180deg,
        rgba(16, 24, 40, 0.55) 0%,
        rgba(16, 24, 40, 0.35) 45%,
        rgba(16, 24, 40, 0.72) 100%);
  }

  .hero-copy {
    align-self: stretch;
    text-align: center;
    padding: 110px 6% 130px;
  }

  .hero-headline,
  .hero-subtext {
    text-align: center;
    text-align-last: center;
  }

  .hero-subtext {
    margin-left: auto;
    margin-right: auto;
  }
}