/* RISV2 mobile performance and proportion overrides. Desktop remains unchanged. */

html { overflow-x: hidden; }
body { overflow-x: hidden; }

@media (max-width: 820px) {
  :root {
    --radius: 15px;
    --shadow: 0 12px 30px rgba(0, 0, 0, .32);
  }

  body {
    font-size: 15px;
    line-height: 1.55;
  }

  body::before {
    position: absolute;
    background:
      radial-gradient(700px 460px at 90% 0%, rgba(57,166,125,.16), transparent 60%),
      linear-gradient(160deg, #121c17 0%, #0d1512 55%, #101a15 100%);
  }

  body::after,
  html::after {
    display: none;
  }

  h1 { font-size: clamp(2.15rem, 11vw, 3.15rem); }
  h2 { font-size: clamp(1.65rem, 8vw, 2.35rem); }
  h3 { font-size: 1.15rem; }

  .site-header {
    min-height: 68px;
    gap: 10px;
    padding: 10px 14px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(13, 21, 18, .97);
  }

  .brand { min-width: 0; gap: 9px; }
  .brand-seal { width: 40px; height: 40px; }
  .brand-name strong { font-size: .9rem; letter-spacing: .1em; }
  .brand-name small { font-size: .5rem; letter-spacing: .25em; }
  .menu-toggle { min-height: 44px; padding: .65em 1em; }

  .site-header nav {
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .glass,
  .invitation,
  .mission-band article,
  .welcome-choice,
  .room-card,
  .study-method,
  .site-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: var(--shadow);
  }

  .page-wrap { padding-inline: 14px; }

  .home-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 16px 38px;
    min-height: 0;
  }

  .hero-brand-art { order: -1; }
  .hero-brand-art img { width: min(64vw, 245px); }
  .hero-wordmark { margin-top: -25px; }
  .hero-wordmark .wm-main { font-size: 1.8rem; }
  .hero-wordmark .wm-sub { font-size: 1rem; }
  .hero-wordmark .wm-tag { letter-spacing: .2em; }
  .hero-copy { width: 100%; }
  .hero-copy h1 { overflow-wrap: anywhere; }
  .hero-intro { font-size: .98rem; }
  .hero-actions { gap: 10px; margin-top: 22px; }

  .button {
    min-height: 46px;
    max-width: 100%;
    padding: .8em 1.15em;
    white-space: normal;
    text-align: center;
  }

  .study-method,
  .home-invitations {
    margin-inline: 12px;
    padding: 30px 14px;
  }

  .mission-band,
  .invitation-grid,
  .study-choice-grid,
  .hub-grid,
  .store-grid,
  .product-grid,
  .journal-head,
  .connection-map,
  .life-topics {
    grid-template-columns: 1fr !important;
  }

  .mission-band img { max-height: 210px; }
  .invitation { min-height: 0; padding: 23px 20px; }
  .site-footer { margin-top: 52px; padding: 32px 18px; }
  .site-footer::after { display: none; }

  img,
  video,
  canvas,
  svg,
  iframe {
    max-width: 100% !important;
  }

  video,
  iframe { height: auto; }

  table { display: block; max-width: 100%; overflow-x: auto; }
  input,
  select,
  textarea,
  button { max-width: 100%; font-size: 16px; }
}

@media (max-width: 480px) {
  .brand-name small { display: none; }
  .home-hero { padding-top: 20px; }
  .hero-brand-art img { width: min(62vw, 215px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .welcome-choice-copy { padding: 24px 18px; }
  .welcome-choice-actions { flex-direction: column; }
  .welcome-choice-actions .button { width: 100%; }
}

@media (max-width: 820px), (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
