/* =============================================
   AQUINTAQA — Mobile Overrides
   File: css/mobile.css

   BREAKPOINTS:
     @media (max-width: 767px)  — phones
     @media (max-width: 479px)  — small phones

   RULES:
     Desktop / tablet (≥ 768 px) is NOT affected.
     All rules are additive overrides.
   ============================================= */


/* ─────────────────────────────────────────────
   A. GLOBAL FOUNDATION
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }

  html, body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-width: 100vw !important;
  }

  img, video, iframe, embed, object, canvas, svg {
    max-width: 100% !important;
  }
}


/* ─────────────────────────────────────────────
   B. CARD-RAIL PAGES  (technology.html, quality.html)
      Horizontal rail  →  Vertical stack
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  /* Override inline height:100% + overflow:hidden */
  .page {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    overflow-x: hidden !important;
  }

  /* --- Header --- */
  .header {
    padding: 28px 20px 0 !important;
  }

  .header h1 {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
  }

  .header .subtitle {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .header .hint {
    display: none !important;
  }

  /* --- Rail → vertical --- */
  .rail-wrap {
    flex: none !important;
    overflow: visible !important;
    padding: 20px 0 !important;
  }

  .arrow-btn {
    display: none !important;
  }

  .rail {
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    height: auto !important;
    padding: 0 20px !important;
    gap: 16px !important;
    scroll-snap-type: none !important;
    cursor: default !important;
  }

  .card {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: visible !important;
    height: auto !important;
    padding: 28px 24px !important;
  }

  .card-number {
    font-size: 10px !important;
    margin-bottom: 12px !important;
  }

  .card h2 {
    font-size: 19px !important;
    margin-bottom: 16px !important;
  }

  .card p {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  .card li {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }

  .card h3 {
    font-size: 15px !important;
  }

  .card .note {
    font-size: 12px !important;
  }

  .card .comparison-group h4 {
    font-size: 13px !important;
  }

  .card .scope-link {
    font-size: 14px !important;
  }

  /* --- Progress bar hidden (no horizontal scroll) --- */
  .bottom-bar {
    padding: 0 20px 28px !important;
  }

  .progress-track {
    display: none !important;
  }
}

@media screen and (max-width: 479px) {

  .header {
    padding: 24px 16px 0 !important;
  }

  .header h1 {
    font-size: 22px !important;
  }

  .header .subtitle {
    font-size: 13px !important;
  }

  .rail {
    padding: 0 16px !important;
    gap: 14px !important;
  }

  .card {
    padding: 24px 18px !important;
  }

  .card h2 {
    font-size: 17px !important;
  }

  .card p, .card li {
    font-size: 13.5px !important;
  }
}


/* ─────────────────────────────────────────────
   C. INVESTOR PAGE  (investor.html)
      Tabs — scrollable on mobile
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  .analytics-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px !important;
  }

  .u-text-style-h1 {
    font-size: clamp(24px, 7vw, 36px) !important;
  }

  .u-text-style-h1.blue._2 {
    width: 100% !important;
  }

  .u-text-style-h1.blue._2 .subtitle {
    font-size: 17px !important;
  }

  ._2col-grid {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  ._2col-grid.analytics-header._2 {
    margin-bottom: 1.5rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  /* Force tab menu visible (the mobile-dropdown is empty) */
  .tabs-2.w-tabs {
    display: flex !important;
  }

  .tabs-menu.w-tab-menu {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    scrollbar-width: none !important;
    padding-bottom: 4px !important;
  }

  .tabs-menu.w-tab-menu::-webkit-scrollbar {
    display: none !important;
  }

  .tab-link-tab-1,
  .tab-link-tab-2,
  .tab-link-tab-3,
  .tab-link-tab-4,
  .tab-link-tab-5,
  .tab-link-tab-6-2,
  .tab-link-tab-7 {
    white-space: nowrap !important;
    padding: 0 12px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
  }

  .u-text-style-large.tab-title {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .tabs-content {
    max-width: 100% !important;
  }

  .tab-2col-grid {
    grid-template-columns: 1fr !important;
  }

  .tab {
    padding: 1.5rem 1.25rem !important;
  }

  .tab.left-tab {
    min-height: auto !important;
    height: auto !important;
    padding-top: 1.5rem !important;
  }

  .tab.right-tab {
    padding-top: 1.5rem !important;
    height: auto !important;
  }

  .tab-section-title {
    font-size: 15px !important;
    margin-top: 1rem !important;
  }

  .bullet-text {
    font-size: 14px !important;
  }

  .bullet-text.white-40 {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .tab-note {
    font-size: 0.82rem !important;
  }

  .analytics-button._2 {
    font-size: 0.9rem !important;
    padding: 10px 24px !important;
  }

  .mobile-dropdown {
    display: none !important;
  }
}

@media screen and (max-width: 479px) {

  .u-text-style-h1 {
    font-size: 22px !important;
  }

  .u-text-style-h1.blue._2 .subtitle {
    font-size: 15px !important;
  }

  .tab {
    padding: 1.25rem 1rem !important;
  }

  .tab-link-tab-1,
  .tab-link-tab-2,
  .tab-link-tab-3,
  .tab-link-tab-4,
  .tab-link-tab-5,
  .tab-link-tab-6-2,
  .tab-link-tab-7 {
    padding: 0 10px !important;
    height: 36px !important;
  }

  .u-text-style-large.tab-title {
    font-size: 11px !important;
  }

  .bullet-text.white-40 {
    font-size: 13px !important;
  }
}


/* ─────────────────────────────────────────────
   D. INVESTOR ACCESS FORM  (investor-access.html)
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  .form-header h1 {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.2 !important;
  }

  .form-header p {
    font-size: 14px !important;
  }

  .form-card {
    padding: 28px 20px !important;
  }

  .nda-block {
    padding: 16px !important;
  }

  .nda-block .nda-text {
    font-size: 12.5px !important;
  }

  .field input {
    font-size: 16px !important;
  }
}


/* ─────────────────────────────────────────────
   E. ERROR PAGES  (401.html, 404.html)
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  .w-password-page {
    padding: 20px !important;
  }

  .w-password-page h2 {
    font-size: 22px !important;
  }

  .w-password-page .w-input {
    font-size: 16px !important;
  }
}


/* ─────────────────────────────────────────────
   F. INDEX.HTML — Supplemental
      Main mobile styles are in aquintaqa.webflow.css
      and the index.html inline <style>.
      Only additions below.
   ───────────────────────────────────────────── */

@media screen and (max-width: 767px) {

  /* Force navbar always visible on mobile —
     overrides Webflow IX2 inline opacity:0 fade-in animation
     that may not trigger on mobile browsers */
  .menu.w-nav {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Navbar: transparent, absolute (only visible over hero, scrolls away with page) */
  .navbar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    z-index: 100 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 16px !important;
    height: 52px !important;
  }


  /* Disable smooth scroll on mobile — causes jank on low-end Android */
  html {
    scroll-behavior: auto !important;
  }

  /* ── ANDROID PERFORMANCE ──
     Reduce GPU composite layers and paint complexity */

  /* Remove expensive glow/shadow effects */
  .sfera,
  .sfera.no,
  ._1.no,
  .podpis {
    display: none !important;
  }

  /* Simplify box-shadows */
  .link.button._2 {
    box-shadow: none !important;
  }

  /* Disable will-change on mobile to reduce GPU memory */
  * {
    will-change: auto !important;
  }

  /* Reduce transition complexity */
  .spline-content {
    transition: none !important;
  }

  /* Reset desktop translateY so icons align with logo text on mobile */
  .navbar .menu-button { transform: none !important; }
  .navbar .w-dropdown   { transform: none !important; }

  section {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .footer2 {
    padding: 32px 0 env(safe-area-inset-bottom, 20px) !important;
  }

  .footer-2 .div-block-3 a {
    padding: 4px 0 !important;
  }
}


/* ─────────────────────────────────────────────
   G. MOBILE HERO — stats text + sphere + title
   Order: navbar → stats → sphere → title+CTA
   ───────────────────────────────────────────── */

/* Sphere poster: hidden on desktop, shown on mobile for sphere image */
.sphere-poster {
  display: none !important;
}

@media screen and (max-width: 767px) {

  /* === Hide Spline 3D entirely on mobile === */
  .spline-content {
    display: none !important;
  }

  /* Hero section — extra padding-bottom so sphere isn't cut off */
  .se1 {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding-bottom: 80px !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: flex-start !important;
  }

  .se1::before, .se1::after { display: none !important; }

  .se1 .noize {
    padding: 0 !important;
    height: auto !important;
    width: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .se1 .div1 {
    width: 100% !important;
    height: auto !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  /* === 1. STATS TEXT (colum-l) — under navbar === */
  .se1 .colum-l {
    display: block !important;
    width: 100% !important;
    padding: 64px 24px 0 24px !important;
    position: relative !important;
    order: 1 !important;
  }

  .se1 .content-img {
    display: block !important;
    position: static !important;
  }

  /* EN first two lines — visible by default; RU same styles but visibility from script */
  .se1 .content-img > .text-block:not(.lang-ru) {
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    max-width: 100% !important;
    width: auto !important;
    text-align: left !important;
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    color: rgba(255,255,255,0.88) !important;
    letter-spacing: 0.06em !important;
    margin: 0 0 4px 0 !important;
    text-shadow: none !important;
  }

  .se1 .content-img > .text-block._2:not(.lang-ru) {
    color: rgba(255,255,255,0.72) !important;
    font-size: 0.78rem !important;
    font-family: inherit !important;
    margin: 0 0 6px 0 !important;
  }

  /* RU first two lines — same font/ladder, no display (script shows when RU) */
  .se1 .content-img > .text-block.lang-ru,
  .se1 .content-img > .text-block._2.lang-ru {
    position: static !important;
    top: auto !important;
    left: auto !important;
    max-width: 100% !important;
    width: auto !important;
    text-align: left !important;
    font-family: inherit !important;
    text-shadow: none !important;
  }

  .se1 .content-img > .text-block.lang-ru {
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,0.88) !important;
    letter-spacing: 0.06em !important;
    margin: 0 0 4px 0 !important;
  }

  .se1 .content-img > .text-block._2.lang-ru {
    font-size: 0.78rem !important;
    color: rgba(255,255,255,0.72) !important;
    margin: 0 0 6px 0 !important;
  }

  /* Hide desktop <1% block — we show it from sphere-poster__caption below */
  .se1 .colum-l .content-img .div-block-17 {
    display: none !important;
  }

  /* Hide decorative desktop-only elements */
  .se1 .div-block-5,
  .se1 .podpis,
  .se1 .sfera {
    display: none !important;
  }

  /* === 2. SPHERE — <1% line then orb === */
  .sphere-poster {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 0 24px !important;
    order: 2 !important;
  }

  .sphere-poster__stats {
    display: none !important;
  }

  /* <1% SHARE — show here in flow, under second line, left-aligned */
  .sphere-poster__caption:not(.lang-ru) {
    display: block !important;
    order: -1 !important;
    font-size: 0.6rem !important;
    font-weight: 500 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.85) !important;
    text-align: left !important;
    margin: 12px 0 10px 0 !important;
    padding: 0 !important;
  }

  .sphere-poster__caption.lang-ru {
    order: -1 !important;
    font-size: 0.6rem !important;
    font-weight: 500 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.85) !important;
    text-align: left !important;
    margin: 12px 0 10px 0 !important;
    padding: 0 !important;
  }

  .sphere-poster__visual {
    width: 80vw !important;
    max-width: 340px !important;
    aspect-ratio: 1 / 1 !important;
    position: relative !important;
  }

  .sphere-poster__orb {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background: url('../images/sphere.webp') center/contain no-repeat !important;
  }

  .sphere-poster__play {
    display: none !important;
  }

  /* === 3. TITLE + CTA (colum-r) — below sphere === */
  .se1 .colum-r {
    position: static !important;
    background: none !important;
    background-image: none !important;
    width: 100% !important;
    padding: 0 28px 50px 28px !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    order: 3 !important;
  }

  .se1 .colum-r::before,
  .se1 .colum-r::after {
    display: none !important;
  }

  .se1 .h1 {
    font-size: clamp(32px, 10vw, 48px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 14px !important;
  }

  .se1 .colum-r .text {
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.45) !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 28px !important;
  }

  .se1 .div-block-4 {
    margin: 0 !important;
  }

  .se1 .div-block-4 .link.button._2 {
    padding: 12px 22px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.08em !important;
    border-color: rgba(39, 169, 204, 0.55) !important;
  }
}
