/* ============================================================
   THE DE GOTI GROUP — MOBILE OVERHAUL v2
   Loaded LAST on every marketing page (after page inline styles)
   so equal-specificity rules win by source order.

   Design intent: not a shrunken desktop. One column, full-bleed
   imagery, editorial serif scale tuned for 390px, thumb-size
   targets (≥44px), scrims re-weighted for portrait crops, and
   lightweight touch-first motion.
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   0. FOUNDATIONS — kill sideways scroll, calm tap behavior
   ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  html, body { overflow-x: clip; }
  img, video, canvas, svg { max-width: 100%; }
  a, button, summary, .lang-btn, .scenario-btn, .comm-scenario-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* ── Top navigation: compact lockup, no overflow ──
     (replaces the ≤720px rules in site.css that are declared
     before their base rules and therefore never applied) */
  .topnav {
    padding: 0.9rem 1.25rem;
    gap: 1rem;
  }
  .topnav .lang-toggle { display: none !important; } /* lives in the drawer on mobile */
  .brandmark { gap: 0.85rem; }
  .brandmark-logo { width: 116px !important; height: 116px !important; }
  .brandmark-text { font-size: 20px !important; height: auto !important; }
  .topnav-right { gap: 0.75rem; }
  .account-btn { width: 44px; height: 44px; }
  .account-btn svg { width: 24px; height: 24px; }
  .nav-menu-btn { width: 44px; height: 44px; }
  .nav-menu-btn svg { width: 20px; height: 20px; }
  .acct-signin-menu { min-width: 0; width: min(310px, calc(100vw - 2rem)); }

  /* Softer, quicker section reveals on touch */
  .reveal { transform: translateY(14px); }
}

/* ────────────────────────────────────────────────────────────
   1. PHONE CORE — ≤700px
   ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {

  /* ── Rhythm: tighter but still grand ── */
  section { padding: 4.5rem 0; }
  .section-label { margin-bottom: 1.5rem; gap: 0.75rem; }
  .section-label::before { width: 28px; }

  /* ── Editorial type scale for 390px ── */
  .editorial-title { font-size: clamp(31px, 9vw, 40px); margin-bottom: 1.5rem; }
  .headline-md { font-size: 30px; line-height: 38px; }
  .headline-sm { font-size: 24px; line-height: 32px; }
  .body-lg { font-size: 16px; line-height: 28px; }

  /* ── HERO — the vibe carrier ── */
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero .hero-content,
  .hero.subpage-hero .hero-content,
  .policy-hero .hero-content {
    padding: 6.5rem 1.5rem 3.25rem !important;
  }
  .hero-inner { max-width: 100%; }
  .hero-eyebrow,
  .hero-eyebrow.label-caps {
    font-size: 10px;
    letter-spacing: 0.13em;
    line-height: 1.6;
    margin-bottom: 1.4rem;
    color: var(--gold-bright, #e9c176);
    text-shadow: 0 1px 10px rgba(4,10,22,0.85);
  }
  .hero-title {
    font-size: clamp(34px, 10.6vw, 44px) !important;
    line-height: 1.07 !important;
    letter-spacing: -0.015em;
    overflow-wrap: break-word;
  }
  .hero-tagline { font-size: 23px; margin-bottom: 1rem; }
  .hero-sub, .hero-one-liner, .subpage-intro {
    font-size: 16px !important;
    line-height: 1.72 !important;
    margin-top: 1.5rem;
    max-width: 100%;
    text-shadow: 0 1px 12px rgba(4,10,22,0.7);
  }
  .policy-intro {
    font-size: 16px !important;
    line-height: 1.72;
    margin: 1.5rem 0 2.25rem;
    text-shadow: 0 1px 12px rgba(4,10,22,0.7);
  }
  .hero-cta-pair, .hero-cta-row, .policy-cta-row { margin-top: 2rem; gap: 1rem; }
  .hero-cta-link { font-size: 12px; padding-top: 10px; padding-bottom: 10px; }
  .hero-foot { padding-bottom: 1.75rem; }
  .hero-foot-left { max-width: 100%; font-size: 12px !important; line-height: 1.7; }

  /* Full-width primary CTAs — thumb-first */
  .btn-start-app,
  .policy-cta-row .btn-primary,
  .policy-cta-row .btn-ghost,
  .detail-cta .btn-start-app {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    text-align: center;
    padding: 17px 28px;
  }

  /* ── Mobile scrims: portrait crops need bottom weight ──
     (heroes put text low on phones; desktop scrims are
     left-weighted and leave titles on bright sky/sand) */
  .hero-scrim {
    background:
      linear-gradient(180deg,
        rgba(4,10,22,0.74) 0%,
        rgba(4,10,22,0.34) 26%,
        rgba(4,10,22,0.46) 50%,
        rgba(4,10,22,0.86) 76%,
        rgba(6,13,30,0.97) 100%) !important;
  }
  .hero .hero-bg::before,
  .subpage-hero .hero-bg::before,
  .policy-hero .hero-bg::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background:
      linear-gradient(180deg,
        rgba(4,10,22,0.68) 0%,
        rgba(4,10,22,0.28) 26%,
        rgba(4,10,22,0.42) 50%,
        rgba(4,10,22,0.84) 78%,
        rgba(10,26,50,1) 100%) !important;
  }

  /* ── Coverage choosers & mosaics: full-bleed editorial cards.
     Copy stays gated behind the hover/tap-open reveal — same as desktop/tablet;
     first tap reveals the description, second tap follows the link. ── */
  .cov-panel { min-height: min(120vw, 500px); }
  .cov-panel-body { padding: 2rem 1.5rem 2.25rem; }
  .cov-panel-title { font-size: clamp(31px, 9vw, 40px); }
  .policy-panel-body, .comm-panel-body { padding: 1.9rem 1.4rem 2.1rem !important; }
  .policy-panel-title, .comm-panel-title,
  .policy-row-bottom .policy-panel-title { font-size: clamp(26px, 7.6vw, 33px) !important; line-height: 1.05; }
  .policy-panel-label, .comm-panel-label, .cov-panel-label { margin-bottom: 0.6rem; font-size: 10px; letter-spacing: 0.15em; }
  .cov-panel-desc, .policy-panel-desc, .comm-panel-desc {
    font-size: 14px !important;
    line-height: 1.65 !important;
    max-width: 44ch;
  }
  .cov-panel-link, .policy-panel-link, .comm-panel-link { font-size: 11px; padding-bottom: 6px; }
  #policyChooser .policy-panel, .policy-panel.active,
  #commChooser .comm-panel, .comm-panel.active { min-height: min(96vw, 430px); }
  .policy-one-app-badge, .comm-one-app-badge {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    padding: 1.9rem 1.25rem 0.4rem;
    white-space: normal;
    text-align: center;
  }

  /* ── Scenario explorer: compact grid, no ghost cells ── */
  .scenario-policies, .comm-scenario-policies { grid-template-columns: 1fr 1fr !important; }
  .scenario-policy, .comm-scenario-policy { padding: 1.05rem 1rem 1rem; opacity: 0.5; }
  .scenario-policy.active, .comm-scenario-policy.active { opacity: 1; }
  .sp-name, .csp-name { margin-bottom: 0; font-size: 9.5px; letter-spacing: 0.12em; }
  .sp-role, .csp-role { display: none; min-height: 0; }
  .scenario-policy.active .sp-role,
  .comm-scenario-policy.active .csp-role {
    display: block; opacity: 1; transform: none;
    margin-top: 0.55rem; font-size: 12.5px;
  }
  .scenario-btn, .comm-scenario-btn { padding: 0.85rem 1.15rem; font-size: 10.5px; }
  .scenario-desc, .comm-scenario-desc { font-size: 15.5px; }
  .scenario-desc-wrap { min-height: 0; margin-bottom: 1.75rem; }

  /* ── Stats: confident 2-up, not a long single file ── */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem 1.5rem; }
  .stat { padding-left: 1.1rem; }
  .stat-num { font-size: clamp(34px, 9.2vw, 42px); }

  /* ── Process / detail sections ── */
  .process-section { padding: 4rem 0; }
  .process-num { font-size: 42px; margin-bottom: 0.85rem; }
  .process-step h4 { font-size: 22px; }
  .detail-section { padding: 4rem 0; }
  .detail-grid-3 { margin-top: 2.5rem; gap: 1rem; }
  .detail-card { padding: 1.5rem 1.35rem 1.6rem; }
  .detail-process { padding: 3.75rem 0; }
  .detail-process-steps { margin-top: 2.25rem; }
  .detail-process-step { padding: 0 0 1.9rem; border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.9rem; }
  .detail-process-step:first-child { border-top: 0; padding-top: 0; }
  .detail-process-num { font-size: 40px; }
  .detail-quote { padding: 4rem 0; }
  .detail-quote blockquote { font-size: clamp(20px, 5.8vw, 26px); max-width: 100%; }
  .detail-cta { padding: 4.5rem 0; }
  .detail-cta h3 { font-size: clamp(27px, 7.8vw, 36px); }

  /* ── Testimonial ── */
  .testimonial-section { padding: 5.5rem 0; }
  .testimonial-quote { max-width: 100%; font-size: clamp(22px, 6.4vw, 28px); margin-bottom: 2rem; }
  .testimonial-name { font-size: 22px; }

  /* ── CTA / contact rows ── */
  .cta-section { padding: 5rem 0 4rem; }
  .cta-card { padding: 1.75rem 1.4rem; }
  .cta-contact-row { grid-template-columns: 1fr; gap: 0.4rem; padding: 1.1rem 0; }
  .cta-contact-label { padding-top: 0; }

  /* ── Carriers strip ── */
  .carriers-section { padding: 2.5rem 0 3rem; }
  .carrier-name { font-size: 16px; padding: 0 0.85rem; line-height: 2; }
  .carriers-divider { font-size: 14px; }
  .carrier-strip-inner { justify-content: center; gap: 1.5rem; }
  .carrier-list { gap: 0.4rem 1.5rem; justify-content: center; }
  .carrier-strip .carrier-name { font-size: 17px; line-height: 1.9; }

  /* ── FAQ ── */
  .faq-item summary { font-size: 18px; padding: 1.3rem 0; gap: 1rem; }
  .faq-item .faq-body { font-size: 14.5px; }
  .covers-section { padding: 4.5rem 0 4rem; }
  .cover-item { padding: 1.75rem 1.5rem 1.9rem; }
  .cover-item h4 { font-size: 21px; }

  /* ── Contact page ── */
  .cf-chip { padding: 13px 15px; min-height: 44px; border-radius: 12px; }
  .cf-row { gap: 0; }
  .btn-send { width: 100%; justify-content: center; text-align: center; min-height: 52px; }

  /* ── Footer: brand full-width, link columns paired ── */
  .site-footer { padding: 3.5rem 0 1.75rem; }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5rem 1.25rem;
    padding-bottom: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-logo { width: 52px; height: 52px; }
  .footer-brand-text { font-size: 21px; }
  .footer-col-title { margin-bottom: 0.9rem; }
  .footer-col ul { gap: 0.2rem; }
  .footer-col a { font-size: 14px; padding: 7px 0; display: inline-block; }
  .footer-bottom { flex-direction: column; gap: 0.85rem; text-align: center; padding-top: 1.6rem; }
}

/* ────────────────────────────────────────────────────────────
   2. SMALL PHONES — ≤480px
   ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-title { font-size: clamp(31px, 11vw, 40px) !important; }
  .editorial-title { font-size: clamp(29px, 9.6vw, 36px); }
  .cov-panel-title { font-size: clamp(29px, 9.4vw, 36px); }
  .shell { padding: 0 1.25rem; }
  .hero .hero-content,
  .hero.subpage-hero .hero-content,
  .policy-hero .hero-content { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  .topnav { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* ────────────────────────────────────────────────────────────
   3. TOUCH MOTION — premium feedback without hover
   ──────────────────────────────────────────────────────────── */
@media (hover: none) {
  /* Cards & panels respond to the press itself */
  .cov-panel:active .cov-panel-bg,
  .policy-panel:active .policy-panel-bg,
  .comm-panel:active .comm-panel-bg { transform: scale(1.035); }
  .cov-panel .cov-panel-bg,
  .policy-panel .policy-panel-bg,
  .comm-panel .comm-panel-bg { transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
  .detail-card:active { background: rgba(197,160,89,0.05); border-top-color: var(--gold, #C5A059); }
  .cov-card:active { transform: translateY(-2px); border-color: rgba(197,160,89,0.4); }
  .story-tile:active { transform: translateY(-2px); }
  .footer-col a:active, .topnav-link:active, .hero-cta-link:active { color: var(--gold, #C5A059); }

  /* No sticky hover states left behind after a tap */
  .cov-card:hover .cov-img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cov-panel:active .cov-panel-bg,
  .policy-panel:active .policy-panel-bg,
  .comm-panel:active .comm-panel-bg { transform: none; }
}
