/* ═══════════════════════════════════════════════════════════
   belya · mobile layout (≤767px)
   App-store landing style — compact nav, stacked hero, sticky CTA
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* ── Page shell ── */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .container {
    width: 100%;
    padding: 0;
  }

  /* ── Navigation ── */
  nav {
    height: 52px;
    padding: 0 14px;
  }

  .nav-logo svg { width: 22px; height: 22px; }
  .nav-logo-word { font-size: 17px; }

  .nav-right { gap: 6px; }

  .btn-app { display: none; }

  .nav-drawer {
    inset: 52px 0 0 0;
    padding: 16px;
    gap: 10px;
  }

  .nav-drawer a {
    font-size: 17px;
    padding: 16px 18px;
    border-radius: 14px;
  }

  /* ── Hero — mobile-first app landing ── */
  #hero {
    min-height: auto;
    padding: 64px 16px 40px;
    align-items: flex-start;
  }

  .hero-glow {
    width: 120vw;
    height: 420px;
    top: 0;
    opacity: 0.85;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: center;
  }

  /* Flatten copy wrapper so we can reorder children */
  .hero-copy { display: contents; }

  .hero-eyebrow {
    order: 1;
    justify-content: center;
    font-size: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 14px;
  }

  .hero-eyebrow::before { width: 16px; }

  .hero-title {
    order: 2;
    font-size: clamp(34px, 9.5vw, 44px);
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
  }

  .hero-phones {
    order: 3;
    position: relative;
    display: block;
    height: auto;
    margin: 0 auto 36px;
    width: min(240px, 68vw);
    overflow: visible;
  }

  /* Extend ambient glow outside the narrow mobile container */
  .hero-phones::before {
    inset: -50% -80%;
    filter: blur(50px);
    opacity: 0.75;
  }

  /* Floor glow — hide on mobile to avoid layout artifacts */
  .hero-phones::after {
    display: none;
  }

  .hero-phones .phone-left,
  .hero-phones .phone-right {
    display: none !important;
  }

  .hero-phones .phone-main {
    position: relative;
    top: auto !important;
    left: auto !important;
    /* transform: none removed — GSAP manages the float animation */
    width: 100%;
    margin: 0 auto;
    filter: none;
    will-change: transform;
  }

  .hero-phones .phone-screen {
    height: min(400px, 112vw);
  }

  .hero-phones .phone-mock::before {
    width: 72px;
    height: 20px;
    top: 14px;
  }

  .hero-sub {
    order: 4;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 auto 20px;
    max-width: 100%;
    text-align: center;
  }

  .hero-pills {
    order: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
  }

  .hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-tint);
    border: 1px solid var(--accent-line);
    white-space: nowrap;
  }

  .hero-ctas {
    order: 6;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    border-radius: 14px;
  }

  /* Hide in-hero download on mobile — sticky bar handles it */
  .hero-ctas .btn-primary { display: none; }

  html[data-lang="ar"] .hero-ctas,
  html[data-lang="ar"] .hero-eyebrow,
  html[data-lang="ar"] .hero-pills {
    justify-content: center;
  }

  /* ── Sections ── */
  section {
    padding: 52px 16px;
  }

  #screens {
    padding-left: 0;
    padding-right: 0;
  }

  .section-eyebrow {
    justify-content: center;
    font-size: 10px;
  }

  html[data-lang="ar"] .section-eyebrow {
    justify-content: center;
  }

  .section-title {
    font-size: clamp(28px, 8vw, 36px);
    text-align: center;
    margin-bottom: 12px;
  }

  .section-sub {
    font-size: 15px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 28px;
    max-width: 100%;
  }

  .screens-header {
    padding: 0 16px;
    margin-bottom: 28px;
  }

  .screens-header .section-title,
  .screens-header .section-eyebrow {
    text-align: center;
    justify-content: center;
  }

  /* ── Bento — stacked cards, no absolute clutter ── */
  .bento {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .bento-card {
    grid-column: auto !important;
    padding: 22px 20px 20px;
    min-height: auto;
    border-radius: 18px;
  }

  .bento-card:hover {
    transform: none;
  }

  .bento-card.span-7 { min-height: auto; }

  .bento-title { font-size: 19px; margin-bottom: 8px; }
  .bento-desc { font-size: 13px; max-width: 100%; }
  .bento-icon { width: 38px; height: 38px; margin-bottom: 16px; }
  .bento-icon svg { width: 18px; height: 18px; }

  .chat-bubbles,
  .health-ring,
  .notif-pills,
  .vin-art,
  .chart-bars {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    margin-top: 18px;
    width: 100%;
    max-width: none;
  }

  .chat-bubbles { width: 100%; max-width: 280px; margin-left: auto; margin-right: auto; }
  .bubble { max-width: 85%; font-size: 11px; }

  .health-ring {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .health-ring svg { width: 80px; height: 80px; }

  .notif-pills { width: 100%; }

  .vin-art {
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }

  .chart-bars {
    justify-content: center;
    height: 64px;
    margin-top: 16px;
  }

  .bento-resale-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bento-resale-cards {
    justify-content: center !important;
    width: 100%;
  }

  .bento-resale-cards > div {
    flex: 1 1 calc(50% - 8px);
    min-width: 0 !important;
  }

  /* ── How it works — vertical timeline ── */
  .steps {
    margin-top: 28px;
    border: none;
    background: transparent;
    gap: 0;
  }

  .step {
    border: none !important;
    border-left: 2px solid var(--accent-line) !important;
    margin-left: 10px;
    padding: 0 0 28px 22px;
    background: transparent;
  }

  html[data-lang="ar"] .step {
    border-left: none !important;
    border-right: 2px solid var(--accent-line) !important;
    margin-left: 0;
    margin-right: 10px;
    padding: 0 22px 28px 0;
  }

  .step:last-child { padding-bottom: 0; }

  .step-num {
    font-size: 36px;
    margin-bottom: 10px;
  }

  .step-title { font-size: 16px; }
  .step-desc { font-size: 13px; }

  /* ── Screen gallery — snap scroll ── */
  .screens-scroll {
    gap: 14px;
    padding: 0 16px 24px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
  }

  .screen-card {
    width: min(72vw, 260px);
    scroll-snap-align: center;
    border-radius: 22px;
  }

  .screen-card:hover {
    transform: none;
  }

  /* ── Premium — pricing card first ── */
  .premium-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .premium-grid > div:first-child { order: 2; }
  .premium-grid > .reveal { order: 1; }

  .premium-perks { margin-top: 24px; gap: 16px; }

  .premium-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .price-amount { font-size: 40px; }

  .price-features li { font-size: 13px; }

  /* ── Footer ── */
  footer {
    padding: 40px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid { gap: 28px; }

  .footer-links {
    gap: 16px;
  }

  .footer-copy {
    text-align: left !important;
  }

  html[data-lang="ar"] .footer-copy {
    text-align: right !important;
  }

  /* ── Sticky download bar ── */
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--nav-bg-scroll);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--line);
  }

  .mobile-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    border-radius: 14px;
    font-size: 15px;
  }

  .mobile-cta-bar.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-cta-bar {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
}

/* Tablet tweaks */
@media (min-width: 768px) {
  .hero-pills,
  .mobile-cta-bar {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hero-pills {
    display: flex;
  }

  .mobile-cta-bar {
    display: flex;
  }
}

@media (max-width: 380px) {
  .lang-btn {
    padding: 5px 7px;
    font-size: 9px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-pill {
    font-size: 10px;
    padding: 6px 10px;
  }
}
