/* ═══════════════════════════════════════════════════════════════════
   NUTRI-SCHEME — MOBILE CSS
   Paste this AFTER the main nutri-scheme.css
   Covers: 1024px tablets, 768px, 480px, 375px (iPhone SE)
═══════════════════════════════════════════════════════════════════ */

/* ── TABLET (≤1024px) ────────────────────────────────────────────── */
@media (max-width: 1024px) {

  /* Nav */
  .nav { padding: 0 24px; height: 58px; }
  .nav-menu { display: none; }
  .nav-actions .btn-signin,
  .nav-actions .btn-nav-cta { display: none; }
  .burger { display: flex; }

  /* Hero */
  .hero { padding-top: 58px; min-height: auto; }
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 48px 32px 0;
    gap: 0;
  }
  .hero-text { padding: 40px 0 32px; text-align: center; }
  .hero h1 { font-size: clamp(32px, 6vw, 48px); }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-trust { justify-content: center; flex-wrap: wrap; }
  .hero-visual {
    height: 400px;
    margin-bottom: 0;
    justify-content: center;
  }
  .hero-phone-img { max-width: 280px; }
  .fc1 { left: 10px; top: 10%; }
  .fc2 { right: 10px; bottom: 15%; }
  .fc3 { display: none; }

  /* Stats */
  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
    margin: 0 auto;
  }
  .stat-item:nth-child(4),
  .stat-item:nth-child(5) {
    border-top: 1px solid rgba(10, 93, 248, .1);
    border-right: none;
  }
  .stat-item:nth-child(3) { border-right: none; }
  .stat-item:nth-child(4) { border-right: 1px solid rgba(10, 93, 248, .1); }

  /* Sections */
  section { padding: 80px 32px; }
  .stats { padding: 60px 32px; }

  /* What is */
  .what-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .what-text { text-align: center; }
  .what-text .lead { max-width: 100%; margin-left: auto; margin-right: auto; }
  .pill-row { justify-content: center; }
  .what-photo-wrap { max-width: 480px; margin: 0 auto; aspect-ratio: 3/2; }

  /* Risks */
  .risks-grid { grid-template-columns: 1fr 1fr; }
  .risk-card-lg { grid-column: span 2; }

  /* Solution */
  .solution-header { grid-template-columns: 1fr; gap: 20px; }
  .solution-cards { grid-template-columns: 1fr 1fr; }

  /* How it works */
  .how-steps { grid-template-columns: 1fr 1fr; }

  /* Digital menu */
  .digital-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .digital-mockup { max-width: 440px; margin: 0 auto; }

  /* For restaurants grid */
  .forrest-grid { grid-template-columns: 1fr; gap: 40px; }
  .forrest-type-grid { grid-template-columns: repeat(4, 1fr); }

  /* Demo */
  .demo-header { grid-template-columns: 1fr; gap: 32px; }

  /* CTA */
  .cta-band .lead { max-width: 100%; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr 1fr; max-width: 680px; margin: 0 auto; }
  .p-card-featured { grid-column: span 2; max-width: 360px; margin: 0 auto; width: 100%; }

  /* FAQ */
  .faq-inner { grid-template-columns: 1fr; gap: 40px; }

  /* Contact */
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}


/* ── MOBILE (≤768px) ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  .nav { padding: 0 18px; height: 56px; }

  /* Hero */
  .hero { padding-top: 56px; }
  .hero-inner { padding: 32px 20px 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); letter-spacing: -.025em; }
  .hero-sub { font-size: 15px; }
  .btn-primary { font-size: 14px; padding: 13px 24px; width: 100%; justify-content: center; }
  .btn-ghost { font-size: 14px; padding: 12px 20px; width: 100%; justify-content: center; }
  .hero-ctas { flex-direction: column; gap: 10px; }
  .hero-visual { height: 340px; }
  .hero-phone-img { max-width: 220px; }
  .fc { padding: 10px 13px; border-radius: 10px; }
  .fc-val { font-size: 16px; }
  .fc1 { left: 0; top: 8%; }
  .fc2 { right: 0; bottom: 10%; }

  /* Ticker */
  .ticker-item { font-size: 11px; padding: 0 18px; }

  /* Stats */
  .stats { padding: 48px 20px; }
  .stats-inner {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
  .stat-item { padding: 20px 14px; }
  .stat-num { font-size: 34px; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid rgba(10,93,248,.1); border-right: 1px solid rgba(10,93,248,.1); }
  .stat-item:nth-child(4) { border-top: 1px solid rgba(10,93,248,.1); }
  .stat-item:nth-child(5) {
    grid-column: span 2;
    border-top: 1px solid rgba(10,93,248,.1);
    border-right: none;
  }

  /* Sections */
  section { padding: 64px 20px; }
  .wrap, .wrap-sm { padding: 0; }

  /* Typography */
  h2 { font-size: clamp(24px, 7vw, 36px); margin-bottom: 14px; }
  .lead { font-size: 15px; line-height: 1.7; }
  .eyebrow { font-size: 10px; margin-bottom: 10px; }

  /* What is */
  .what-grid { gap: 36px; }
  .what-text { text-align: left; }
  .pill-row { justify-content: flex-start; }
  .what-photo-wrap { aspect-ratio: 4/3; max-width: 100%; border-radius: 14px; }
  .what-badge { top: 16px; right: 16px; padding: 10px 14px; border-radius: 10px; }
  .what-badge-n { font-size: 20px; }

  /* Photo strip */
  .strip { padding-bottom: 40px; padding-top: 0; }
  .strip-row { padding: 0 20px; gap: 10px; }
  .strip-img { width: 180px; height: 118px; border-radius: 10px; }
  .strip-row:nth-child(2) { transform: translateX(-30px); }

  /* Risks */
  .risks-grid { grid-template-columns: 1fr; gap: 12px; }
  .risk-card-lg { grid-column: span 1; }
  .risk-card-lg .risk-inner { grid-template-columns: 1fr; gap: 20px; }
  .risk-card { padding: 22px 20px; border-radius: 14px; }
  .risk-icon { font-size: 22px; margin-bottom: 12px; }

  /* Solution */
  .solution-cards { grid-template-columns: 1fr; gap: 12px; }
  .solution-header { margin-bottom: 36px; }
  .sol-card { padding: 24px 20px; border-radius: 14px; }
  .sol-card-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 18px; margin-bottom: 16px; }

  /* How it works */
  .how-steps { grid-template-columns: 1fr; gap: 12px; }
  .how-header { margin-bottom: 48px; }
  .how-step { padding: 22px 20px; border-radius: 14px; }
  .how-num { font-size: 38px; }
  .how-step-img { border-radius: 8px; }
  .how-outcome { font-size: 10.5px; }

  /* Digital menu */
  .digital-inner { gap: 36px; }
  .digital-mockup { max-width: 100%; }
  .digital-food-badge { width: 90px; height: 90px; bottom: -12px; left: -12px; border-width: 3px; }
  .digital-stat { top: -12px; right: -12px; padding: 10px 14px; border-radius: 10px; }
  .digital-stat-n { font-size: 22px; }
  .digital-list li { font-size: 13px; padding: 9px 0; }
  .digital-link { margin-top: 20px; font-size: 13px; }

  /* For restaurants type cards */
  .forrest-type-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Demo */
  .demo-inner { max-width: 100%; }
  .demo-list-item { padding: 12px 14px; border-radius: 10px; }
  .demo-step-n { width: 28px; height: 28px; min-width: 28px; font-size: 11px; }
  .play-circle { width: 58px; height: 58px; }
  .play-circle svg { width: 16px; height: 16px; }

  /* CTA */
  .cta-band { padding: 72px 20px; }
  .cta-band h2 { font-size: clamp(26px, 7vw, 40px); }
  .cta-band .btn-primary { width: 100%; justify-content: center; }
  .cta-avatars-row { flex-direction: column; align-items: center; gap: 12px; }
  .cta-avatars-text { text-align: center; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; max-width: 340px; gap: 20px; }
  .p-card-featured { grid-column: span 1; max-width: 100%; }
  .p-card { padding: 28px 22px; border-radius: 16px; }
  .p-price { font-size: 44px; }
  .p-feats li { font-size: 12px; padding: 8px 0; }

  /* FAQ */
  .faq { padding: 64px 20px 80px; }
  .faq-inner { gap: 32px; }
  .faq-btn { padding: 16px 18px; }
  .faq-q { font-size: 13.5px; }
  .faq-body-inner { padding: 0 18px 16px; font-size: 13px; }

  /* Contact */
  .contact-inner { gap: 36px; }
  .contact-form { padding: 28px 22px; border-radius: 16px; }
  .contact-cta { width: 100%; justify-content: center; margin-top: 22px; }

  /* Footer */
  footer { padding: 48px 20px 32px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-top: 24px;
  }
  .footer-langs { gap: 5px; }

  /* Mobile nav overlay */
  .mob-menu { padding: 16px 20px 32px; }
  .mob-menu a { font-size: 16px; padding: 12px 0; }
  .mob-actions { margin-top: 20px; gap: 8px; }
  .mob-actions .btn-signin,
  .mob-actions .btn-nav-cta { flex: 1; justify-content: center; font-size: 13px; padding: 11px 16px; }
}


/* ── SMALL MOBILE (≤480px) ───────────────────────────────────────── */
@media (max-width: 480px) {

  /* Hero */
  .hero-inner { padding: 24px 16px 0; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-visual { height: 280px; }
  .hero-phone-img { max-width: 180px; }
  .hero-badge { font-size: 10px; padding: 6px 12px; }
  .fc { display: none; }  /* hide floating cards on very small screens */

  /* Stats */
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 30px; }
  .stat-lbl { font-size: 10px; }

  /* Typography */
  h2 { font-size: 24px; letter-spacing: -.02em; }
  h3 { font-size: 15px; }
  .lead { font-size: 14px; }

  /* Nav */
  .nav { padding: 0 14px; height: 52px; }
  .nav-logo img { height: 28px; }
  .mob-menu { inset: 52px 0 0; }

  /* Sections */
  section { padding: 52px 16px; }
  .stats { padding: 40px 16px; }
  .strip-row { padding: 0 16px; }
  .strip-img { width: 150px; height: 100px; }

  /* Risks */
  .risk-card { padding: 18px 16px; }

  /* Pricing */
  .pricing-grid { max-width: 100%; }
  .p-card { padding: 24px 18px; }
  .p-price { font-size: 38px; }

  /* Footer */
  footer { padding: 40px 16px 28px; }
  .footer-logo-img { height: 24px; }

  /* Ticker */
  .ticker { padding: 10px 0; }
  .ticker-item { font-size: 10.5px; padding: 0 14px; }

  /* CTA */
  .cta-band { padding: 56px 16px; }
}


/* ── IPHONE SE / VERY SMALL (≤375px) ────────────────────────────── */
@media (max-width: 375px) {

  .hero h1 { font-size: 24px; line-height: 1.1; }
  .hero-sub { font-size: 13px; }
  .hero-visual { height: 240px; }
  .hero-phone-img { max-width: 160px; }

  h2 { font-size: 22px; }
  .stat-num { font-size: 26px; }
  .strip-img { width: 130px; height: 88px; }

  .btn-primary,
  .btn-ghost { font-size: 13px; padding: 12px 18px; }

  .p-price { font-size: 34px; }
  .pricing-grid { padding: 0 4px; }

  .nav { height: 50px; }
  .nav-logo img { height: 26px; }
  .mob-menu { inset: 50px 0 0; }
}


/* ── TOUCH / HOVER FIXES ─────────────────────────────────────────── */
@media (hover: none) {
  /* Remove hover transforms on touch — prevents sticky hover states */
  .risk-card:hover,
  .sol-card:hover,
  .how-step:hover,
  .demo-list-item:hover,
  .p-card:hover,
  .faq-item:hover,
  .strip-img:hover img { transform: none; box-shadow: none; }

  /* Tap target minimum 44px */
  .nav-menu a,
  .footer-col a,
  .mob-menu a { min-height: 44px; display: flex; align-items: center; }

  /* FAQ tap target */
  .faq-btn { min-height: 52px; }
}


/* ── LANDSCAPE PHONE ─────────────────────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero-inner { grid-template-columns: 1fr 1fr; align-items: center; min-height: auto; padding: 24px 24px 0; }
  .hero-text { padding: 20px 0; text-align: left; }
  .hero h1 { font-size: clamp(22px, 4vw, 30px); }
  .hero-ctas { flex-direction: row; justify-content: flex-start; }
  .btn-primary, .btn-ghost { width: auto; }
  .hero-trust { justify-content: flex-start; }
  .hero-visual { height: 260px; }
  .hero-phone-img { max-width: 160px; }
}


/* ── SAFE AREA (iPhone notch/home bar) ───────────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .mob-menu { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .nav { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
}
