/* ═══════════════════════════════════════════
   SYLEXO — MOBILE STYLES
   Activates below 900px
   Transforms 3D experience into clean
   linear mobile layout
═══════════════════════════════════════════ */

@media (max-width: 900px) {

  /* ── Hide 3D scene on mobile ── */
  #c3d { display: none !important; }
  #spacer { display: none !important; }
  #sc { display: none !important; }

  /* ── Reset all overlays to flow layout ── */
  .ov {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    transition: none !important;
  }

  .ov.pnl {
    position: relative !important;
    transform: none !important;
  }

  /* ── Body & background ── */
  body {
    background: linear-gradient(180deg, #020818 0%, #040c22 50%, #020818 100%);
    overflow-x: hidden;
  }

  /* ── Mobile container ── */
  .ov-hero,
  .ov.pnl {
    padding: 0 1.5rem !important;
  }

  /* ═══ HERO ═══ */
  .ov-hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding-top: 80px !important;
    padding-bottom: 2rem !important;
    position: relative !important;
    /* Subtle gradient bg since no 3D */
    background:
      radial-gradient(ellipse 80% 50% at 50% 40%, rgba(0,212,170,.04), transparent),
      radial-gradient(ellipse 60% 40% at 20% 80%, rgba(26,92,255,.03), transparent);
  }

  .ov-hero h1 {
    font-size: 2.8rem !important;
    line-height: 1 !important;
    letter-spacing: -.03em;
  }

  .ov-hero h1 em {
    opacity: 1 !important;
    filter: none !important;
  }

  .tag {
    font-size: .5rem;
    padding: .35rem 1rem;
    margin-bottom: 1.2rem;
  }

  .hero-p {
    font-size: .9rem !important;
    margin: 1rem auto 1.5rem !important;
    max-width: 400px !important;
  }

  .btns {
    gap: .6rem;
  }

  .btn {
    padding: 12px 22px;
    font-size: 13px;
  }

  .scroll-cue { display: none; }

  /* ═══ SECTIONS ═══ */
  .ov.pnl {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    border-top: 1px solid rgba(0,212,170,.06);
  }

  .sl {
    font-size: .5rem !important;
    letter-spacing: .3em !important;
  }

  .st {
    font-size: 1.8rem !important;
    line-height: 1.1 !important;
  }

  .sp {
    font-size: .88rem !important;
  }

  /* ═══ SERVICES ═══ */
  .sg {
    grid-template-columns: 1fr !important;
    gap: .8rem !important;
    margin-top: 1.2rem !important;
  }

  .sv {
    padding: 1.2rem !important;
    border-left-width: 3px !important;
  }

  .sv[style*="grid-column:span 2"] {
    grid-column: span 1 !important;
  }

  .sv h3 {
    font-size: .9rem !important;
  }

  .sv p {
    font-size: .78rem !important;
  }

  .sv-h span {
    font-size: 1.4rem !important;
  }

  .badge {
    font-size: .45rem !important;
  }

  /* ═══ ABOUT / STATS ═══ */
  .sr {
    grid-template-columns: 1fr 1fr !important;
    gap: .6rem !important;
  }

  .sn {
    font-size: 1.5rem !important;
  }

  .sll {
    font-size: .5rem !important;
  }

  .eu {
    font-size: .45rem !important;
    padding: .35rem .7rem !important;
    margin-top: .8rem !important;
  }

  /* ═══ PROJECTS (RespekTurtle) ═══ */
  .ov.pnl[data-s="3"] > div {
    border-radius: 14px;
    overflow: hidden;
  }

  .ov.pnl[data-s="3"] img {
    height: 200px;
    object-fit: cover;
    width: 100%;
  }

  .pk a {
    width: 36px !important;
    height: 36px !important;
    font-size: .8rem !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    width: auto !important;
  }

  /* ═══ CTA ═══ */
  .ov.pnl[data-s="4"] {
    text-align: center;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,212,170,.03), transparent);
  }

  .ov.pnl[data-s="4"] .st {
    font-size: 2rem !important;
  }

  /* ═══ CONTACT ═══ */
  .ov.pnl[data-s="5"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .ov.pnl[data-s="5"] > div {
    padding: 1.5rem !important;
    border-radius: 16px;
  }

  /* Contact header */
  .ov.pnl[data-s="5"] > div > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .8rem !important;
  }

  /* Form grid to single column */
  #cf {
    grid-template-columns: 1fr !important;
  }

  #cf > div[style*="grid-column:span 2"] {
    grid-column: span 1 !important;
  }

  #cf > div:last-child {
    grid-column: span 1 !important;
    flex-direction: column !important;
  }

  #cf .fb {
    max-width: none !important;
    width: 100% !important;
  }

  .fg input, .fg textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 12px !important;
  }

  .fg textarea {
    min-height: 100px !important;
  }

  .fg label {
    font-size: .55rem !important;
  }

  /* ═══ NAV ═══ */
  .nav {
    padding: .8rem 1.2rem !important;
    background: rgba(2,8,24,.9) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(0,212,170,.06);
    mix-blend-mode: normal !important;
    pointer-events: auto !important;
  }

  .nav-logo {
    font-size: 1rem !important;
  }

  .nav-links {
    background: rgba(2,8,24,.98) !important;
    backdrop-filter: blur(30px) !important;
    gap: 1.5rem !important;
    z-index: 999 !important;
  }

  .nav-links a {
    font-size: 1.1rem !important;
    opacity: .8 !important;
    letter-spacing: .15em !important;
  }

  .nav-toggle {
    display: block !important;
    z-index: 1000 !important;
    font-size: 1.5rem !important;
  }

  /* ═══ PROGRESS BAR ═══ */
  #prog { display: none; }

  /* ═══ FOOTER ═══ */
  .footer {
    flex-direction: column;
    text-align: center;
    gap: .8rem;
    padding: 2rem 1.5rem !important;
  }

  .footer ul {
    justify-content: center;
  }

  /* ═══ SMOOTH SPACING ═══ */
  .ov + .ov {
    margin-top: 0;
  }

  /* ═══ ANIMATIONS — reduced motion ═══ */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* ═══ LANDSCAPE PHONE ═══ */
  @media (max-height: 500px) and (orientation: landscape) {
    .ov-hero {
      min-height: auto;
      padding-top: 70px !important;
      padding-bottom: 1.5rem !important;
    }

    .ov-hero h1 {
      font-size: 2rem !important;
    }

    .hero-p {
      font-size: .8rem !important;
      margin: .5rem auto 1rem !important;
    }
  }
}

/* ═══ TABLET (901px - 1200px) ═══ */
@media (min-width: 901px) and (max-width: 1200px) {
  .pnl.l { left: 2% !important; max-width: 450px !important; }
  .pnl.r { right: 2% !important; max-width: 450px !important; }
  .st { font-size: 2rem !important; }
  h1 { font-size: 3.5rem !important; }
  .sr { gap: .5rem !important; }
  .sn { font-size: 1.4rem !important; }
}

/* ═══ ULTRA-WIDE (2400px+) ═══ */
@media (min-width: 2400px) {
  .pnl.l { left: 10% !important; max-width: 650px !important; }
  .pnl.r { right: 10% !important; max-width: 650px !important; }
  h1 { font-size: 6.5rem !important; }
  .st { font-size: 3.8rem !important; }
  .hero-p { font-size: 1.3rem !important; }
  .sp { font-size: 1.1rem !important; }
  .sv h3 { font-size: 1.15rem !important; }
  .sv p { font-size: .88rem !important; }
  .btn { padding: 16px 32px !important; font-size: 15px !important; }
  .nav-logo { font-size: 1.5rem !important; }
}
