/* ═══════════════════════════════════════════════════════
   Landing Page — Mobile Overrides (≤ 768px)
   Design reference: TimeXi Mobile.dc.html (390×844)
   ═══════════════════════════════════════════════════════ */

/* ── Mobile drawer (hidden on desktop) ── */
#lp-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #07070e;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1);
  flex-direction: column;
  padding: 80px 20px 40px;
}
#lp-drawer.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
#lp-drawer a.lp-drawer-link {
  display: block;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -2px;
  color: #fff;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s, transform 0.4s;
}
#lp-drawer a.lp-drawer-link:last-child { border-bottom: none; }
#lp-drawer.open a.lp-drawer-link {
  opacity: 1;
  transform: translateY(0);
}
#lp-drawer.open a.lp-drawer-link:nth-child(1) { transition-delay: 0.08s; }
#lp-drawer.open a.lp-drawer-link:nth-child(2) { transition-delay: 0.15s; }
#lp-drawer.open a.lp-drawer-link:nth-child(3) { transition-delay: 0.22s; }
#lp-drawer.open a.lp-drawer-link:nth-child(4) { transition-delay: 0.29s; }
#lp-drawer .lp-drawer-footer {
  padding-top: 32px;
}
#lp-drawer .lp-drawer-footer a {
  text-decoration: none;
}

/* ── Scroll indicator (hidden on desktop) ── */
.lp-scroll-indicator { display: none; }

@media (max-width: 768px) {

  /* ══ GLOBAL ══ */
  body {
    background: #07070e !important;
    color: #fff !important;
  }

  /* ══ NAV ══ */
  #main-nav {
    height: 60px !important;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: none !important;
  }
  #main-nav > div {
    width: calc(100% - 40px) !important;
  }
  #main-nav img {
    height: 20px !important;
  }
  .nav-desktop-links { display: none !important; }
  .nav-hamburger { display: flex !important; }
  .nav-cta {
    font-size: 13px !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
  }
  #nav-mobile-menu { display: none !important; }
  #lp-drawer { display: flex; }

  /* ══ EVOLUTION STATS ══ */
  #stats-section {
    padding: 0 !important;
  }

  .stats-grid {
    padding: 52px 20px !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 36px 20px !important;
    width: 100% !important;
  }
  .stat-item {
    text-align: left !important;
    padding: 0 !important;
    border-left: none !important;
  }
  .stat-item p:first-child,
  .stat-item > p:first-of-type {
    font-size: 50px !important;
    letter-spacing: -2.5px !important;
  }
  .stat-item p:last-child {
    font-size: 11px !important;
    letter-spacing: 2.5px !important;
    color: rgba(255,255,255,0.65) !important;
    margin-top: 6px !important;
  }

  /* ══ SERVICES ══ */
  #services {
    padding: 72px 20px !important;
    background: #07070e !important;
    border-top: 1px solid rgba(255,255,255,0.05);
  }

  .services-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .services-sticky {
    position: static !important;
    margin-bottom: 44px !important;
  }
  .services-sticky h2 {
    font-size: 36px !important;
    letter-spacing: -1.5px !important;
    color: #fff !important;
  }
  .services-sticky > p {
    font-size: 14px !important;
    color: rgba(255,255,255,0.65) !important;
  }
  .services-sticky .services-cta {
    display: none !important;
  }
  .services-sticky > div:last-child {
    display: none !important;
  }
  .services-sticky > p:first-child {
    color: rgba(255,255,255,0.65) !important;
  }
  .services-sticky > p:first-child span {
    background: #00d4ff !important;
  }

  /* Service cards → stacked list in bordered container */
  .services-grid > div:last-child {
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    gap: 0 !important;
  }

  .service-card {
    background: #0d0d16 !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    padding: 22px 20px !important;
  }
  .service-card:first-child {
    border-top: none !important;
  }
  .service-card:hover {
    background: #0d0d16 !important;
  }

  .service-card h3 {
    font-size: 16px !important;
    color: #fff !important;
    letter-spacing: -0.2px !important;
  }
  .service-card p {
    font-size: 13px !important;
    color: rgba(255,255,255,0.4) !important;
    line-height: 1.6 !important;
  }

  /* Service card icon boxes */
  .service-card > div > div:first-child {
    width: 40px !important;
    height: 40px !important;
    background: rgba(0,212,255,0.09) !important;
    border: none !important;
    border-radius: 10px !important;
  }
  .service-card iconify-icon {
    font-size: 18px !important;
    color: #00d4ff !important;
  }

  /* ══ PROJECTS ══ */
  .dark-panel-wrap:has(#projects) {
    padding: 0 !important;
    margin: 0 !important;
  }
  .dark-panel-wrap:has(#projects) > .dark-panel {
    border-radius: 0 !important;
    padding: 0 !important;
    background: #090910 !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
  }

  #projects {
    padding: 72px 20px !important;
    box-sizing: border-box !important;
  }
  #projects > div:first-child {
    color: rgba(255,255,255,0.65) !important;
  }
  #projects > div:first-child span {
    background: #00d4ff !important;
  }
  #projects h2 {
    font-size: 36px !important;
    letter-spacing: -1.5px !important;
  }
  #projects > div:nth-child(2) {
    margin-bottom: 44px !important;
  }
  #projects > div:nth-child(2) > p {
    font-size: 14px !important;
    color: rgba(255,255,255,0.65) !important;
  }

  /* Project cards → vertical list, no images */
  .proj-top-grid,
  .proj-bottom-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
  }

  .project-card {
    border-radius: 14px !important;
    background: #111119 !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* Project card hero image — compact strip */
  .project-card > div:first-child {
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  .project-card > div:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* Project card text content */
  .project-card > div:last-child {
    padding: 20px 20px 20px 24px !important;
  }

  /* Left accent bar */
  .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #00d4ff;
    border-radius: 1px;
  }
  .project-card.purple::before { background: #a78bfa; }
  .project-card.green::before { background: #34d399; }
  .project-card.yellow::before { background: #f59e0b; }

  /* Project card tag labels */
  .project-card > div:last-child > div:first-child {
    margin-bottom: 10px !important;
  }
  .project-card > div:last-child > div:first-child span:first-child {
    font-size: 10px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: rgba(255,255,255,0.6) !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
  }
  .project-card > div:last-child > div:first-child span:last-child {
    display: none !important;
  }

  .project-card h3 {
    font-size: 19px !important;
    letter-spacing: -0.4px !important;
  }
  .project-card p {
    font-size: 13px !important;
    color: rgba(255,255,255,0.7) !important;
    margin-bottom: 14px !important;
  }

  /* Project card tech tags */
  .project-card > div:last-child > div:last-child span {
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #fff !important;
  }

  /* View all button → row style */
  #projects > div:last-child {
    text-align: left !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
  }
  .view-all-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.02) !important;
    color: #fff !important;
    font-size: 15px !important;
    box-shadow: none !important;
  }
  .view-all-btn:hover {
    background: rgba(255,255,255,0.04) !important;
    transform: none !important;
    box-shadow: none !important;
  }

  /* ══ WHO WE ARE ══ */
  section:has(.whoweare-layout) {
    padding: 72px 0 !important;
    border-top: 1px solid rgba(255,255,255,0.05);
  }

  .whoweare-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 52px !important;
    padding: 0 20px !important;
    width: 100% !important;
  }

  .whoweare-layout > div:first-child > p:first-child {
    color: rgba(255,255,255,0.65) !important;
  }
  .whoweare-layout > div:first-child > p:first-child span {
    background: #00d4ff !important;
  }
  .whoweare-layout > div:first-child > p:last-child {
    font-size: 36px !important;
    font-weight: 800 !important;
    letter-spacing: -1.5px !important;
    line-height: 1.05 !important;
    color: #fff !important;
  }
  .whoweare-layout > div:first-child > p:last-child span {
    color: #fff !important;
  }
  .whoweare-layout > div:first-child > p:last-child span[style*="color: #0090b0"],
  .whoweare-layout > div:first-child > p:last-child span[style*="#0090b0"] {
    color: #00d4ff !important;
  }

  /* Values section */
  .values-grid {
    border-left: none !important;
    padding-left: 0 !important;
    gap: 0 !important;
  }
  .values-grid > div {
    padding: 28px 0 !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
    border-bottom: none !important;
  }
  .values-grid > div:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  }
  .values-grid > div > p:first-child {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -0.3px !important;
    text-transform: none !important;
    margin-bottom: 6px !important;
  }
  .values-grid > div > p:last-child {
    font-size: 13px !important;
    color: rgba(255,255,255,0.7) !important;
    line-height: 1.65 !important;
  }

  /* ══ TRUSTED BY / MARQUEE ══ */
  div:has(> div > div[style*="marquee"]) {
    padding: 52px 0 !important;
    background: #090910 !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
  }
  div:has(> div > div[style*="marquee"]) > p {
    text-align: left !important;
    padding: 0 20px !important;
    font-size: 11px !important;
    letter-spacing: 3px !important;
    color: rgba(255,255,255,0.2) !important;
    margin-bottom: 28px !important;
  }
  div:has(> div > div[style*="marquee"]) img {
    height: 30px !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.5 !important;
  }

  /* ══ CONTACT ══ */
  .dark-panel-wrap:has(#contact) {
    padding: 0 !important;
    margin: 0 !important;
  }
  .dark-panel-wrap:has(#contact) > .dark-panel {
    border-radius: 0 !important;
    padding: 0 !important;
    background: #07070e !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    overflow: visible !important;
  }
  /* Hide decorative gradient orb */
  .dark-panel-wrap:has(#contact) > .dark-panel > div:first-child {
    display: none !important;
  }

  #contact {
    padding: 72px 20px !important;
  }
  #contact > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .contact-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Contact heading */
  .contact-grid > div:first-child {
    padding-top: 0 !important;
    width: 100% !important;
  }
  .contact-grid > div:first-child > p:first-child {
    color: rgba(255,255,255,0.65) !important;
  }
  .contact-grid > div:first-child > p:first-child span {
    background: #00d4ff !important;
  }
  .contact-grid > div:first-child h2 {
    font-size: 44px !important;
    letter-spacing: -2px !important;
    line-height: 0.95 !important;
  }
  /* Description text */
  .contact-grid > div:first-child > p:nth-of-type(1) {
    font-size: 14px !important;
    color: rgba(255,255,255,0.7) !important;
    line-height: 1.72 !important;
    margin-bottom: 0 !important;
  }
  /* Hide italic "— But you first." */
  .contact-grid > div:first-child > p:nth-of-type(2) {
    display: none !important;
  }

  /* Hide contact info below heading (email/location) */
  .contact-grid > div:first-child > div:last-child {
    display: none !important;
  }

  /* Form container */
  .contact-grid > div:last-child {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
  }

  /* Form labels */
  .contact-grid label {
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    color: rgba(255,255,255,0.65) !important;
  }

  /* Form fields wrapper spacing */
  .contact-grid > div:last-child > form > div {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  /* Form inputs */
  .contact-grid input,
  .contact-grid textarea {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Form labels */
  .contact-grid label {
    padding-left: 5px !important;
  }

  /* Submit button spacing */
  .submit-btn {
    margin-left: 5px !important;
    margin-right: 5px !important;
    width: calc(100% - 10px) !important;
  }

  /* Submit button */
  .submit-btn {
    border-radius: 10px !important;
    padding: 16px !important;
    font-size: 16px !important;
    width: 100% !important;
  }

  /* Show email/location after form */
  #contact-form ~ div,
  #form-success ~ div {
    margin-top: 36px !important;
    padding-top: 28px !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
  }

  /* ══ FOOTER ══ */
  footer {
    background: #050509 !important;
    padding: 40px 20px 36px !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
  }
  footer > div {
    width: 100% !important;
    padding: 0 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    margin-bottom: 36px !important;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-grid > div:first-child img {
    height: 17px !important;
    opacity: 0.6 !important;
  }
  .footer-grid > div:first-child > p {
    font-size: 13px !important;
    color: rgba(255,255,255,0.6) !important;
    max-width: 240px !important;
  }
  /* Hide social icons in footer */
  .footer-grid > div:first-child > div:last-child {
    display: none !important;
  }

  /* Footer column headers */
  .footer-grid > div:not(:first-child) > p:first-child {
    font-size: 10px !important;
    letter-spacing: 2.5px !important;
    color: rgba(255,255,255,0.6) !important;
  }

  .footer-link {
    font-size: 14px !important;
    color: rgba(255,255,255,0.7) !important;
  }

  .footer-bottom {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .footer-bottom p {
    font-size: 12px !important;
    color: rgba(255,255,255,0.18) !important;
  }

  /* ══ DARK PANEL RESETS ══ */
  .dark-panel {
    border-radius: 0 !important;
    padding: 0 !important;
  }
  .dark-panel-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
