/* ═══════════════════════════════════════════════════════════
   AstroKamya™ · Mobile & Tablet PREMIUM UI/UX Overhaul
   ─────────────────────────────────────────────────────────
   This file RESTORES cinematic quality on mobile/tablet 
   while keeping GPU usage sane. Loaded AFTER mobile.css 
   to override the overly-aggressive animation kill.
   ═══════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   1. RESTORED ANIMATIONS — GPU-SAFE MOBILE VARIANTS
   We bring back life without hurting performance.
   Only `transform` and `opacity` — never layout properties.
   ════════════════════════════════════════════════════════════ */

/* ── CTA Button Shimmer: RESTORED with lighter sweep ── */
@media (max-width: 768px) {
  @keyframes mobileShimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
  }

  @keyframes mobilePulseGlow {
    0%, 100% { box-shadow: 0 2px 16px rgba(255,184,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 4px 28px rgba(255,184,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
  }

  @keyframes mobileFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes mobileScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes mobileFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }

  @keyframes mobilePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
  }

  @keyframes cardBorderShimmer {
    0%, 100% { border-color: rgba(124,58,237,0.12); }
    50% { border-color: rgba(255,184,0,0.18); }
  }

  @keyframes ctaSweep {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
  }

  /* ── Primary CTA: Shimmer + pulse glow ── */
  .btn-glow,
  .shimmer-btn,
  .cta-btn {
    background: linear-gradient(110deg, #E5A600 0%, #FFB800 25%, #FFCB45 50%, #FFB800 75%, #E5A600 100%) !important;
    background-size: 200% 100% !important;
    animation: mobileShimmer 4s ease-in-out infinite, mobilePulseGlow 3s ease-in-out infinite !important;
    position: relative;
    overflow: hidden;
  }

  /* Restore sweep shine pseudo-element */
  .btn-glow::before,
  .shimmer-btn::before,
  .cta-btn::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    animation: ctaSweep 5s ease-in-out infinite !important;
    pointer-events: none;
  }

  /* ── Secondary CTA: Subtle border pulse ── */
  .btn-outline {
    animation: cardBorderShimmer 4s ease-in-out infinite !important;
  }

  /* ── Scroll Reveal: Keep smooth but don't kill ── */
  .r {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* ── Stars canvas: Boost visibility ── */
  #stars-canvas {
    opacity: 0.5 !important;
  }

  /* ── Pricing card popular: Keep glow animation ── */
  .pc-pop::before {
    animation: borderRotate 8s linear infinite !important;
    opacity: 0.4 !important;
    filter: blur(3px);
  }
}


/* ════════════════════════════════════════════════════════════
   2. HERO SECTION — MOBILE TYPOGRAPHY FIX
   The hero title was too large and cramped. We use fluid
   clamp() for perfect scaling 320px→768px.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #hero {
    /* Unified navbar is sticky/in-flow — only a small visual gap needed */
    padding: 32px 0 32px !important;
    margin-bottom: 0 !important;
    min-height: auto !important;
    display: block !important;
  }

  /* Fixed font sizing using clamp for fluid scaling */
  #hero h1,
  #hero-title {
    font-size: clamp(24px, 7.5vw, 36px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    min-height: auto !important;
    margin-bottom: 12px;
  }

  /* Yellow accent line */
  .ht-line.ht-gold,
  .ht-line:last-child {
    font-size: clamp(24px, 7.5vw, 36px) !important;
  }

  /* Hero subtitle text */
  .hero-desc {
    font-size: clamp(13px, 3.5vw, 15px) !important;
    line-height: 1.55;
    margin-bottom: 20px !important;
    opacity: 0.85;
  }

  /* Personalization pill */
  .hero-personal {
    padding: 8px 16px !important;
    margin-bottom: 16px !important;
    border-radius: 24px;
  }
  .hp-text {
    font-size: clamp(11px, 3vw, 13px) !important;
  }

  /* Hero CTA stack */
  .hero-actions {
    gap: 10px !important;
    margin-bottom: 20px;
  }
  .hero-actions .btn-glow,
  .hero-actions .btn-outline {
    font-size: clamp(14px, 3.8vw, 16px) !important;
    padding: 14px 24px !important;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  /* Trust bar — fluid layout */
  .hero-trust {
    gap: 0 !important;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(17,11,46,0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(124,58,237,0.08);
  }
  .ht-item {
    font-size: clamp(10px, 2.8vw, 12px) !important;
    padding: 4px 10px !important;
    white-space: nowrap;
  }
  .ht-item strong {
    font-weight: 700;
  }

  /* Live counter pill */
  .hero-pill {
    font-size: clamp(10px, 2.8vw, 12px) !important;
    padding: 6px 14px !important;
    backdrop-filter: blur(8px);
  }
}

/* Extra small phones (≤380px) */
@media (max-width: 380px) {
  #hero h1,
  #hero-title {
    font-size: clamp(22px, 6.5vw, 28px) !important;
  }
  .hero-actions .btn-glow,
  .hero-actions .btn-outline {
    font-size: 14px !important;
    padding: 13px 20px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   3. CARDS & BOXES — MOBILE-FRIENDLY LAYOUT
   Fix cramped spacing, overflow, and poor readability.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Discovery cards: Better breathing room ── */
  .discover-item {
    padding: 10px 14px !important;
    border-radius: 12px;
    margin-bottom: 6px;
  }
  .di-text {
    font-size: 13px !important;
    line-height: 1.4;
  }

  /* ── Intent Cards: Touch-friendly with micro-animation ── */
  .intent-card {
    padding: 18px 14px !important;
    border-radius: 14px !important;
    gap: 10px !important;
    transition: transform 0.2s ease, border-color 0.3s ease !important;
    -webkit-tap-highlight-color: transparent;
  }
  .intent-card:active {
    transform: scale(0.97) !important;
    border-color: rgba(255,184,0,0.25) !important;
  }
  .ic-svg {
    width: 44px !important;
    height: 44px !important;
  }
  .ic-label {
    font-size: clamp(11px, 3vw, 13px) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .ic-category {
    font-size: 9px !important;
    padding: 3px 8px !important;
    border-radius: 6px;
  }

  /* ── Feature Bento Cards: Better padding & typography ── */
  .fb-card {
    padding: 22px 18px !important;
    border-radius: 16px !important;
    transition: border-color 0.3s ease !important;
    animation: mobileScaleIn 0.6s ease both;
  }
  .fb-card h3 {
    font-size: clamp(15px, 4vw, 18px) !important;
    margin-bottom: 6px;
    font-weight: 700;
  }
  .fb-card p {
    font-size: clamp(12px, 3.2vw, 14px) !important;
    line-height: 1.5;
    opacity: 0.75;
  }

  /* ── Pricing Cards: Compact but readable ── */
  .pc {
    padding: 22px 18px !important;
    border-radius: 18px !important;
  }
  .pc h3 {
    font-size: clamp(17px, 4.5vw, 20px) !important;
    margin-bottom: 4px;
  }
  .pc-price {
    font-size: clamp(30px, 8vw, 38px) !important;
    line-height: 1.1;
  }
  .pc-period {
    font-size: 12px;
  }
  .pc li {
    font-size: clamp(12px, 3.2vw, 14px) !important;
    padding: 4px 0 !important;
    line-height: 1.4;
  }
  .pc .btn-glow,
  .pc .btn-outline {
    font-size: 14px !important;
    padding: 13px 20px !important;
    border-radius: 12px;
  }

  /* Popular card: Slight elevation */
  .pc-pop {
    border: 1.5px solid rgba(255,184,0,0.3) !important;
    box-shadow: 0 4px 24px rgba(255,184,0,0.1), 
                0 8px 32px rgba(0,0,0,0.3) !important;
  }

  /* ── Lifetime Access Card: Fix countdown cramping ── */
  .lt-ribbon {
    white-space: normal !important;
  }
  .lt-content {
    padding: 20px 16px !important;
    gap: 24px !important;
    grid-template-columns: 1fr !important;
  }
  .lt-title {
    font-size: clamp(20px, 5.5vw, 26px) !important;
    line-height: 1.2;
  }
  .lt-amount {
    font-size: clamp(36px, 10vw, 48px) !important;
  }
  .lt-features-grid {
    gap: 8px !important;
    grid-template-columns: 1fr !important;
  }
  .lt-features-grid li {
    font-size: 13px;
    padding: 6px 0;
  }
  .lt-comparison {
    padding: 14px 12px !important;
    border-radius: 14px;
    gap: 10px !important;
  }
  .lt-emotion-row {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .lt-emotion-row span {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
  }
  .lt-price-block {
    padding: 18px 14px !important;
    border-radius: 14px;
  }

  /* ── Step Cards: Horizontal layout fix ── */
  .step-item {
    padding: 16px 14px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }
  .step-item:active {
    transform: scale(0.98) !important;
  }
  .si-num {
    width: 38px !important;
    height: 38px !important;
    font-size: 15px !important;
    flex-shrink: 0;
    border-radius: 10px;
  }
  .si-content h4 {
    font-size: 14px !important;
    font-weight: 600;
  }
  .si-content p {
    font-size: 12px !important;
    line-height: 1.45;
    opacity: 0.7;
  }

  /* ── Testimonial Cards: Breathing room ── */
  .test-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }
  .test-card blockquote,
  .test-card .tc-text {
    font-size: 13px !important;
    line-height: 1.55;
  }
  .test-card .tc-name {
    font-size: 13px !important;
    font-weight: 600;
  }
  .test-card .tc-role {
    font-size: 11px !important;
    opacity: 0.6;
  }
}


/* ════════════════════════════════════════════════════════════
   4. SECTION HEADERS — MOBILE TYPOGRAPHY HIERARCHY
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Section labels (small uppercase tags above headings) */
  .sec-label {
    font-size: 11px !important;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
  }

  /* Section headings — fluid scale */
  h2 {
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em;
    margin-bottom: 24px !important;
  }

  /* Section descriptions */
  .sec-desc,
  .intent-subtitle {
    font-size: clamp(13px, 3.5vw, 15px) !important;
    line-height: 1.55;
    opacity: 0.75;
  }

  /* Section padding — tighter but not suffocating */
  section {
    padding: 40px 0 !important;
  }

  /* Wrap padding — breathing room */
  .wrap {
    padding: 0 18px !important;
  }
}

@media (max-width: 380px) {
  .wrap {
    padding: 0 14px !important;
  }
  h2 {
    font-size: clamp(20px, 5.8vw, 24px) !important;
  }
}


/* ════════════════════════════════════════════════════════════
   5. DEMO / AI JYOTISHI SECTION — MOBILE FIX
   The planetary chart was too large and cut off.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .demo-chart-wrap {
    max-width: 260px !important;
    margin: 0 auto !important;
  }
  .demo-chart-wrap svg {
    width: 100%;
    height: auto;
  }

  /* AI Jyotishi chat — better mobile UX */
  .jyotishi-card {
    border-radius: 18px !important;
    overflow: hidden;
  }
  .jyotishi-header {
    padding: 14px 16px !important;
  }
  .jyotishi-chat-body {
    max-height: 280px;
    padding: 12px !important;
  }
  .jyotishi-msg {
    font-size: 13px !important;
    line-height: 1.5;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    max-width: 88% !important;
  }
  .jyotishi-input-wrap {
    padding: 10px 12px !important;
  }
  .jyotishi-input-wrap input {
    font-size: 14px !important;
    padding: 12px 14px !important;
  }
  .jyotishi-send-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
  }

  /* Chat suggestion chips */
  .jyotishi-chip-row {
    gap: 6px !important;
    flex-wrap: wrap;
    padding: 0 12px 10px !important;
  }
  .jyotishi-chip {
    font-size: 11px !important;
    padding: 6px 12px !important;
    border-radius: 20px;
    min-height: 32px;
  }

  /* Demo section description */
  .demo-sub {
    font-size: clamp(12px, 3.3vw, 14px) !important;
  }
}


/* ════════════════════════════════════════════════════════════
   6. BIRTH INPUT FORM — MOBILE POLISH
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .input-card {
    padding: 22px 16px !important;
    border-radius: 18px !important;
  }

  /* Form fields */
  .fld input,
  .fld select {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    font-size: 16px !important; /* Prevents iOS zoom */
  }

  .fld label {
    font-size: 12px !important;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  /* Submit button */
  .btn-glow.full {
    padding: 16px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
  }

  /* Destiny teaser */
  .destiny-teaser {
    padding: 10px 14px !important;
    border-radius: 12px;
    font-size: 12px;
  }

  /* Form trust badges */
  .form-trust {
    font-size: 11px !important;
    gap: 8px !important;
    flex-wrap: wrap;
    justify-content: center;
  }
}


/* ════════════════════════════════════════════════════════════
   7. NAVBAR / URGENCY BANNER — MOBILE POLISH
   Reduce vertical footprint, improve touch targets.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Urgency banner: Slimmer */
  #urgency-banner {
    padding: 5px 0 !important;
  }
  #urgency-banner .ub-inner {
    font-size: clamp(9px, 2.6vw, 11px) !important;
    gap: 6px !important;
  }
  .ub-cta {
    padding: 3px 10px !important;
    font-size: clamp(9px, 2.5vw, 11px) !important;
    border-radius: 6px;
    font-weight: 700;
  }

  /* Nav: Reduce height */
  #nav {
    padding: 10px 0 !important;
  }
  #nav.scrolled {
    padding: 8px 0 !important;
    backdrop-filter: blur(20px) saturate(130%);
  }

  /* Logo sizing */
  .logo-mandala {
    width: 30px !important;
    height: 30px !important;
  }
  .logo-text {
    font-size: clamp(14px, 4vw, 17px) !important;
  }

  /* Profile button */
  .nav-profile-btn {
    width: 38px !important;
    height: 38px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   8. FOOTER — MOBILE LAYOUT FIX
   Currently cramped 3-col. Switch to clean stacked layout.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  footer {
    padding: 40px 0 24px !important;
  }

  /* Footer brand */
  .foot-brand h3 {
    font-size: 22px !important;
  }
  .foot-brand p {
    font-size: 13px !important;
    line-height: 1.5;
  }

  /* Footer columns: 2-col grid instead of 3 */
  .foot-cols {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 28px 20px !important;
  }
  .foot-col {
    min-width: auto !important;
  }
  .foot-col h4 {
    font-size: 11px !important;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
  }
  .foot-col a {
    font-size: 13px !important;
    padding: 4px 0 !important;
    display: block;
    min-height: 32px;
    display: flex;
    align-items: center;
  }

  /* Legal section spans full width */
  .foot-col:last-child {
    grid-column: 1 / -1;
  }

  /* Trust badges */
  .foot-trust {
    flex-wrap: wrap;
    gap: 8px !important;
    justify-content: center;
  }
  .foot-trust span {
    font-size: 11px !important;
  }

  /* Copyright */
  .foot-bottom {
    padding-top: 20px !important;
    font-size: 11px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   9. MICRO-INTERACTIONS — MOBILE TOUCH FEEDBACK
   Replace hover with active/tap states.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Card active state: brief scale + border glow */
  .glass-card:active,
  .fb-card:active,
  .pc:active,
  .test-card:active {
    transform: scale(0.98) !important;
    border-color: rgba(255,184,0,0.2) !important;
    transition: transform 0.15s ease !important;
  }

  /* Links: Gold shift on tap */
  a:active {
    color: #FFB800 !important;
    transition: color 0.1s ease;
  }

  /* Input focus glow */
  .fld input:focus,
  .fld select:focus {
    border-color: rgba(255,184,0,0.4) !important;
    box-shadow: 0 0 0 3px rgba(255,184,0,0.08) !important;
    outline: none;
  }

  /* Button press feedback */
  .btn-glow:active,
  .shimmer-btn:active,
  .cta-btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
  }
  .btn-outline:active {
    transform: scale(0.97) !important;
    background: rgba(255,184,0,0.06) !important;
  }

  /* Nav drawer links: Active feedback */
  .mobile-nav-link:active {
    background: rgba(255,184,0,0.08) !important;
    transform: translateX(4px);
    transition: transform 0.15s ease, background 0.15s ease !important;
  }
}


/* ════════════════════════════════════════════════════════════
   10. LIVE ACTIVITY FEED — MOBILE ENHANCEMENT
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .la-feed {
    max-height: 80px !important;
  }
  .la-item {
    padding: 6px 12px !important;
    font-size: 12px !important;
    gap: 8px !important;
  }
  .la-flag {
    font-size: 16px !important;
  }
  .la-time {
    font-size: 10px !important;
    opacity: 0.5;
  }

  /* Recent activity section */
  .sec-stats {
    gap: 12px !important;
  }
  .sec-stats .stat-item {
    padding: 12px 16px !important;
    border-radius: 12px;
  }
}


/* ════════════════════════════════════════════════════════════
   11. SOCIAL PROOF STRIP — MOBILE FIX
   ════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .proof-strip {
    gap: 10px !important;
    padding: 16px !important;
    border-radius: 14px;
  }
  .ps-item {
    padding: 8px;
    text-align: center;
  }
  .ps-item strong {
    font-size: clamp(18px, 5vw, 24px) !important;
    display: block;
  }
  .ps-item span {
    font-size: 11px !important;
    opacity: 0.6;
  }
  .ps-sep {
    width: 50% !important;
    margin: 0 auto;
  }
}


/* ════════════════════════════════════════════════════════════
   12. AI PREVIEW BOX — MOBILE POLISH
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ai-preview {
    padding: 16px !important;
    border-radius: 16px !important;
  }
  .aip-q {
    font-size: 14px !important;
    padding: 10px 14px !important;
    border-radius: 12px;
    font-weight: 600;
  }
  .aip-body {
    font-size: 13px !important;
    line-height: 1.55;
    padding: 14px !important;
  }
  .aip-locked-result {
    padding: 16px !important;
    border-radius: 14px;
    gap: 10px;
  }
  .aip-lr-text {
    font-size: 13px !important;
    line-height: 1.5;
  }
}


/* ════════════════════════════════════════════════════════════
   13. TABLET BREAKPOINT (769px–1024px)
   2-column layouts instead of collapsing to 1-col.
   ════════════════════════════════════════════════════════════ */

@media (min-width: 769px) and (max-width: 1024px) {
  /* Keep 2-column for pricing */
  .price-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* Features: 2-col bento */
  .feat-bento {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  .fb-big {
    grid-column: span 2 !important;
  }

  /* Intent cards: 2×2 grid */
  .intent-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* Demo split: Side by side */
  .demo-split {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    align-items: center;
  }

  /* Steps: horizontal with connectors */
  .steps-row {
    grid-template-columns: 1fr auto 1fr auto 1fr !important;
  }
  .step-connector {
    display: block !important;
    width: 32px !important;
  }
  .step-item {
    flex-direction: column !important;
    text-align: center !important;
  }

  /* Single-column for testimonials & input-split to prevent orphans & clashing */
  .test-grid,
  .input-split {
    grid-template-columns: 1fr !important;
  }

  /* Section padding */
  section {
    padding: 56px 0 !important;
  }

  /* Hero — unified navbar is sticky, no large offset needed */
  #hero {
    padding: 32px 0 32px !important;
    margin-bottom: 0 !important;
    min-height: auto !important;
    display: block !important;
  }
  #hero h1,
  #hero-title {
    font-size: 40px !important;
  }
  .hero-desc {
    font-size: 16px !important;
    max-width: 560px;
  }

  /* Lifetime */
  .lt-content {
    padding: 32px 28px !important;
  }
  .lt-features-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* ════════════════════════════════════════════════════════════
   14. COUNTDOWN TIMER BOXES — FIX CRAMPING
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .countdown,
  .lt-countdown,
  .countdown-wrap {
    gap: 6px !important;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .countdown-box,
  .lt-cd-box,
  .cd-box {
    min-width: 52px !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
    text-align: center;
  }

  .countdown-num,
  .lt-cd-num,
  .cd-num {
    font-size: clamp(20px, 5.5vw, 28px) !important;
    font-weight: 800;
    line-height: 1;
  }

  .countdown-label,
  .lt-cd-label,
  .cd-label {
    font-size: 8px !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-top: 2px;
  }
}

@media (max-width: 380px) {
  .countdown-box,
  .lt-cd-box,
  .cd-box {
    min-width: 46px !important;
    padding: 8px 6px !important;
  }
  .countdown-num,
  .lt-cd-num,
  .cd-num {
    font-size: 20px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   15. PRESS / TRUST LOGOS — HORIZONTAL SCROLL
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .press-logos {
    gap: 16px !important;
    padding-bottom: 6px !important;
  }
  .press-logo {
    height: 20px !important;
    opacity: 0.5;
  }
  .press-label {
    font-size: 10px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   16. ORBITAL / HOW IT WORKS — MOBILE SIMPLIFICATION
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .orbital-container {
    max-width: 320px !important;
    margin: 0 auto;
  }
  .orbital-wrap svg {
    max-width: 100%;
    height: auto;
  }
  .orbital-node {
    font-size: clamp(8px, 2.5vw, 10px) !important;
    padding: 4px 10px !important;
  }
  .oc-pill {
    padding: 8px 14px !important;
    font-size: 10px !important;
    border-radius: 20px;
  }
}


/* ════════════════════════════════════════════════════════════
   17. GLOBAL MOBILE TYPOGRAPHY OVERRIDES
   Ensure consistent, readable type across all pages.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Body text baseline */
  body {
    font-size: 14px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }

  /* Paragraphs */
  p {
    font-size: clamp(13px, 3.5vw, 15px);
    line-height: 1.6;
  }

  /* Small text */
  small, .text-sm {
    font-size: 12px;
  }

  /* Strong accents */
  strong {
    font-weight: 700;
  }
}


/* ════════════════════════════════════════════════════════════
   18. BACK TO TOP BUTTON — MOBILE ONLY
   Helps navigation on the 7900px+ tall page.
   ════════════════════════════════════════════════════════════ */

.back-to-top {
  display: none;
}

@media (max-width: 768px) {
  .back-to-top {
    display: flex;
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17,11,46,0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,184,0,0.2);
    color: #FFB800;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    z-index: 90;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }

  .back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .back-to-top:active {
    transform: scale(0.9);
  }
}


/* ════════════════════════════════════════════════════════════
   19. LANDSCAPE MODE — PHONES
   ════════════════════════════════════════════════════════════ */

@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    padding: 70px 0 32px !important;
  }
  section {
    padding: 28px 0 !important;
  }
  h2 {
    font-size: 22px !important;
    margin-bottom: 16px !important;
  }
  .hero-actions {
    flex-direction: row !important;
  }
}


/* ════════════════════════════════════════════════════════════
   20. INFOGRAPHIC / HOW-IT-WORKS PANEL — MOBILE  
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .infographic-panel {
    padding: 18px 14px !important;
    border-radius: 16px !important;
  }
  .ig-header h3 {
    font-size: clamp(16px, 4.5vw, 20px) !important;
  }
  .ig-step {
    gap: 12px !important;
  }
  .ig-content h4 {
    font-size: 14px !important;
    font-weight: 600;
  }
  .ig-content p {
    font-size: 12px !important;
    line-height: 1.5;
    opacity: 0.7;
  }
  .ig-num {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
    border-radius: 10px;
    flex-shrink: 0;
  }
}


/* ════════════════════════════════════════════════════════════
   21. HERO — MOBILE COSMIC CONVERGENCE
   ────────────────────────────────────────────────────────
   The old scanner-stream + astrolabe dual animations have
   been replaced by a dedicated CSS-only "Cosmic Convergence"
   animation system in mobile-hero-cosmos.css.
   
   This section now only handles hero layout on mobile.
   Desktop/Tablet scanner remains completely untouched.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Kill scanner-stream completely on mobile */
  .scanner-stream-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Kill the old astrolabe on mobile */
  .mobile-astrolabe {
    display: none !important;
    visibility: hidden !important;
  }

  /* Remove scanner-active visual artifacts on mobile */
  .scanner-active .hero-wrap::before {
    display: none !important;
  }

  .scanner-active .hero-wrap {
    padding-left: 20px !important;
    padding-right: 20px !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .scanner-active .hero-content,
  .hero-content {
    position: relative !important;
    z-index: 8 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* No starfield/beam canvas on mobile */
  .scs-starfield-canvas,
  .scs-scanner-canvas,
  .scs-scanner-line,
  .scs-card-line-wrap,
  #scs-status-terminal {
    display: none !important;
  }
}


/* ════════════════════════════════════════════════════════════
   22. CART / PAYMENT DRAWER — FULL SCROLLABLE ON MOBILE
   The cart cuts off at the bottom. Fix by making the entire
   content area scrollable with proper height constraints.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Cart overlay: align to bottom (slide-up modal) */
  .cart-drawer-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
  }

  /* Cart drawer: full width, full height, proper scroll */
  .cart-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  /* Header: fixed at top, never scrolls */
  .cart-header {
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
  }

  /* Columns container: takes remaining space, scrolls */
  .cart-columns {
    flex: 1 1 auto !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 0 !important;
    scroll-behavior: smooth !important;
    overscroll-behavior-y: contain !important;
  }

  /* Individual columns: no own scroll, flow naturally */
  .cart-col-left,
  .cart-col-right {
    flex: none !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    max-height: none !important;
    padding: 14px 16px 16px !important;
  }

  /* Right column border fix */
  .cart-col-right {
    border-left: none !important;
    border-top: 1px solid rgba(255,255,255,0.04) !important;
  }

  /* Footer: sticky at bottom of cart */
  .cart-footer-inline {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(to top, #0C0A14 80%, transparent) !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Cart CTA button: fat touch target */
  .cart-pay-btn,
  .cart-footer-inline .btn-glow,
  .cart-footer-inline button {
    min-height: 52px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
    padding: 14px 24px !important;
  }

  /* Cart close button: proper touch target */
  .cart-close {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  /* Upsell card: better spacing */
  .cart-upsell {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }

  /* Coupon apply button */
  .cart-coupon-apply {
    min-height: 44px !important;
    padding: 10px 16px !important;
  }

  /* Step nav */
  .cart-step {
    min-height: 44px !important;
  }

  /* Cross-sell add button */
  .cart-xs-add {
    min-height: 40px !important;
    padding: 10px 12px !important;
  }

  /* Plan features single column */
  .cart-plan-features {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  /* Exit modal */
  .cart-exit-modal {
    width: 95vw !important;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .cart-header { padding: 12px 14px 0 !important; }
  .cart-col-left,
  .cart-col-right { padding: 12px 14px 14px !important; gap: 10px !important; }
  .cart-upsell-body { flex-direction: column !important; align-items: flex-start !important; }
  .cart-upsell-right { flex-direction: row !important; gap: 8px !important; }
}


/* ════════════════════════════════════════════════════════════
   23. GLOBAL OVERFLOW FIX — PREVENT HORIZONTAL BLEED
   Boxes, cards, and hero elements must not exceed viewport.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Hard containment on html/body */
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
  }

  /* All sections: contain overflow */
  section {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Hero section: no bleed from scanner */
  #hero {
    overflow: hidden !important;
    max-width: 100vw !important;
  }

  /* Scanner active hero wrap: contain within viewport */
  .scanner-active .hero-wrap {
    max-width: 100vw !important;
    padding-left: 18px !important;
    padding-right: 0 !important;
    overflow: hidden !important;
  }

  /* Wrap elements: clamp to viewport */
  .wrap {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Input card: contained */
  .input-card-wrap,
  .input-card {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Input split: column on mobile, no overflow */
  .input-split {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Jyotishi card: contain within viewport */
  .jyotishi-card,
  .demo-card,
  .cosmic-genesis-card {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Feature bento: prevent overflow */
  .feat-bento {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Intent grid: prevent overflow */
  .intent-grid {
    max-width: 100% !important;
  }

  /* Pricing row: prevent overflow */
  .price-row {
    max-width: 100% !important;
  }

  /* Footer: contain */
  footer {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Images: never exceed container */
  img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
  }

  /* Tables: horizontal scroll */
  table {
    display: block !important;
    overflow-x: auto !important;
    max-width: 100% !important;
  }

  /* Code blocks */
  pre, code {
    max-width: 100% !important;
    overflow-x: auto !important;
    word-break: break-all !important;
  }
}


/* ════════════════════════════════════════════════════════════
   24. FORM / BIRTH-INPUT — MOBILE OVERFLOW FIX
   The birth-details card was overflowing on small screens.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Birth input section */
  #birth-input {
    overflow: hidden !important;
  }

  /* Field grid: single column */
  .field-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Infographic panel: contained */
  .infographic-panel {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Infographic background SVG: don't cause overflow */
  .infographic-bg-svg {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Discovery items: prevent text overflow */
  .discover-item {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .di-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Live activity feed: contained */
  .live-activity {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .la-feed {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Destiny teaser: no bleed */
  .destiny-teaser {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Form trust badges: wrap gracefully */
  .form-trust {
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: 100% !important;
  }
}


/* ════════════════════════════════════════════════════════════
   25. CHECKOUT PAGE — MOBILE SCROLL FIX
   The checkout page (separate from cart drawer) needs
   the same scroll behaviour fixes.
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Checkout container: full height scroll */
  .checkout-wrap,
  .checkout-container {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: none !important;
  }

  /* Checkout steps: horizontal scroll if many */
  .checkout-steps {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
  }
  .checkout-steps::-webkit-scrollbar {
    display: none !important;
  }

  /* Add-on cards: proper width */
  .addon-card,
  .cart-xs-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
