/* ============================================================
   mobile.css, Squatch mobile overrides (max-width: 820px)
   Loads after layout.css + components.css so it wins the cascade.
   Layout at 850px is already single-column; these rules tighten
   rhythm for phones, keep art fully visible, and keep the menu
   opaque with a page scrim.
   ============================================================ */

/* ---------- 1. Header & nav ---------- */

@media (max-width: 820px) {
  .site-header { padding-inline: 1rem; z-index: 45; }

  .brand-mark { width: 2.3rem; border-radius: 9px; }
  .brand span { font-size: 1.05rem; }

  .menu-button {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--paper);
    background: rgba(7, 18, 15, 0.72);
    border: 1px solid rgba(255, 244, 216, 0.42);
    border-radius: 50%;
    backdrop-filter: blur(8px);
  }
  .menu-line { display: block; width: 18px; height: 2px; background: currentColor; transition-property: transform; transition-duration: 180ms; }
  .menu-button[aria-expanded="true"] .menu-line:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-button[aria-expanded="true"] .menu-line:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    inset-block-start: calc(var(--header-height) - 1px);
    inset-inline: 0;
    display: grid;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    background: rgba(7, 18, 15, 1);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition-property: opacity, transform;
    transition-duration: 180ms;
  }
  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav a { padding: 0.8rem; }
  .nav-cta { margin-top: 0.4rem; text-align: center; }

  /* Full-viewport scrim behind the open menu */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(7, 18, 15, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease);
  }
  body:has(.site-nav.is-open)::after { opacity: 1; pointer-events: auto; }

  /* Player table: hide the playtime column on narrow screens so rows stay one line */
  .players-row { grid-template-columns: 1fr 3.5rem; }
  .players-row > span:nth-child(3) { display: none; }

  /* Lock page scroll while the menu is open (set by main.js). */
  html.menu-locked { overflow: hidden; }
}

/* ---------- 2. Hero: mascot face visible, content bottom-anchored ---------- */

@media (max-width: 820px) {
  .hero { display: flex; flex-direction: column; }
  .hero-image { background-position: left 12% center; }
  .hero-shade {
    background:
      linear-gradient(0deg,
        rgba(7, 18, 15, 0.96) 0%,
        rgba(7, 18, 15, 0.86) 30%,
        rgba(7, 18, 15, 0.34) 58%,
        rgba(7, 18, 15, 0.06) 100%);
  }
  .hero-content {
    flex: 1;
    justify-content: flex-end;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: calc(var(--header-height) + 1rem) 1.25rem 1.5rem;
  }
  .hero .eyebrow { margin-bottom: 0.9rem; font-size: 0.72rem; }
  .hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.6rem, 12.5vw, 4.2rem);
    line-height: 0.98;
  }
  .hero-copy { max-width: 36ch; margin-bottom: 1.4rem; font-size: 0.98rem; line-height: 1.55; }
  .hero-actions { gap: 0.6rem; }
  .hero-actions .button { min-height: 52px; }
  .permission-note { margin-top: 1rem; color: rgba(255, 244, 216, 0.92); font-weight: 600; font-size: 0.74rem; }

  .scroll-cue { inset-inline: 0; inset-block-end: 0.9rem; inset-inline-start: 0; transform: none; justify-items: center; font-size: 0.62rem; }
  .scroll-cue span { display: none; }
  .scroll-cue i { height: 26px; }

  /* Anchored sections stay clear of the fixed header */
  #meet, #platforms, #features, #analytics, #preview, .trust-section, .final-cta {
    scroll-margin-top: calc(var(--header-height) + 0.75rem);
  }
}

/* ---------- 3. Meet + platforms ---------- */

@media (max-width: 820px) {
  .meet-section, .platforms-section, .preview-section { padding: 4rem 0 4.5rem; }
  .section-kicker { margin-bottom: 2rem; gap: 0.9rem; }
  .meet-copy h2, .platforms-head h2 { font-size: clamp(2.1rem, 9.4vw, 3.2rem); }
  .meet-copy > p, .platforms-head p { font-size: 0.98rem; }
  .field-notes div { padding: 0.9rem 0.85rem; }

  .trail-divider { width: calc(100% - 2.5rem); }
  .platform-grid { grid-template-columns: 1fr; width: calc(100% - 2.5rem); }
  .platform-name { font-size: 1.2rem; }
  .platform-grid li:last-child .platform-name::after { display: none; }
}

/* ---------- 4. Feature rounds: art tile + card, no scrim ---------- */

@media (max-width: 820px) {
  .rounds { padding-block: 3.5rem 4.5rem; }
  .rounds-head { width: calc(100% - 2.5rem); }
  .rounds-head h2 { font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .feature { margin-bottom: 3rem; }
  .feature .feature-art { aspect-ratio: 16 / 10; border-radius: 1.1rem; margin-bottom: -1.9rem; }
  .feature-number { font-size: 3.2rem; inset-block-start: 0.35rem; }
  .feature-card { width: calc(100% - 4.4rem); margin: 0 2.2rem; padding: 1.35rem 1.25rem 1.5rem; border-radius: 1.3rem; background: rgba(13, 34, 28, 0.95); }
  .feature-card h3 { font-size: clamp(1.9rem, 7.6vw, 2.6rem); margin-bottom: 0.9rem; }
  .feature-label { margin-bottom: 0.6rem; }
  .detail-list { grid-template-columns: 1fr; gap: 0.45rem; padding-top: 1rem; margin-top: 1rem; }
  .detail-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--mist);
  }
  .detail-list li::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--sun);
  }
}

/* ---------- 5. Discord preview + CTA + footer ---------- */

@media (max-width: 820px) {
  .preview-copy h2 { font-size: clamp(2.1rem, 9.4vw, 3.2rem); }
  .discord-post { max-width: none; width: calc(100% - 2.5rem); justify-self: center; }
  .embed-fields { grid-template-columns: 1fr; }
  .embed-fields div:nth-child(4) { grid-column: auto; }

  .trust-section { padding: 4.5rem 0 5rem; }
  .permission-grid div { padding: 1.15rem; }
  .permission-grid dt { font-size: 1.45rem; }

  .final-cta { min-height: 100svh; display: flex; align-items: center; background-position: 62% center; }
  .cta-mountains {
    background:
      linear-gradient(0deg, rgba(7, 18, 15, 0.88), rgba(7, 18, 15, 0.18) 62%),
      linear-gradient(90deg, rgba(7, 18, 15, 0.3), rgba(7, 18, 15, 0.42));
  }
  .cta-content { width: 100%; margin: 0; padding: calc(var(--header-height) + 1rem) 1.25rem 3rem; }
  .cta-badge { width: 72px; margin-bottom: 1.2rem; }
  .cta-content h2 { font-size: clamp(2.2rem, 10vw, 3.4rem); margin-bottom: 1rem; }
  .cta-content > p:not(.eyebrow):not(.cta-note) { margin-bottom: 1.6rem; font-size: 0.98rem; text-shadow: 0 1px 12px rgba(7, 18, 15, 0.9); }
  .cta-content .eyebrow { text-shadow: 0 1px 10px rgba(7, 18, 15, 0.9); }
  .cta-content .button { min-height: 54px; }
  .cta-note { text-shadow: 0 1px 10px rgba(7, 18, 15, 0.9); }

  footer { align-items: flex-start; flex-direction: column; padding: 1.75rem 1.25rem 2rem; gap: 1rem; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- 6. One-hand reachability ---------- */

@media (max-width: 820px) {
  .hero-actions .button-primary,
  .cta-content .button-primary { width: 100%; }
}
