/* Shared mobile layer for the static preview and WordPress theme.
 * Loaded after the page-specific styles so touch and safe-area rules win
 * without changing the approved desktop presentation. */

@media (max-width: 620px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    font-size: 1rem;
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .header-inner {
    min-height: 68px;
    gap: 14px;
  }

  .site-header .logo {
    width: 124px;
  }

  .menu-button {
    min-width: 64px;
    min-height: 48px;
    padding: 9px 14px;
  }

  .nav {
    max-height: calc(100dvh - 82px - env(safe-area-inset-top, 0px));
    gap: 0;
    padding: 12px;
    border-radius: 14px;
    background: rgb(27 49 75 / 98%);
    box-shadow: 0 20px 44px rgb(0 0 0 / 52%);
  }

  /* Project pages keep their canonical project color on the collapsed mobile
   * navigation instead of inheriting the shared blue menu surface. */
  .v2-project-page .nav {
    border-color: rgb(var(--project-nav-border) / 44%);
    background:
      radial-gradient(ellipse at 50% -85%, rgb(var(--project-nav-glow) / 34%), transparent 72%),
      linear-gradient(180deg, rgb(var(--project-nav-top) / 99%), rgb(var(--project-nav-bottom) / 99%));
    box-shadow:
      0 20px 44px rgb(0 0 0 / 52%),
      0 0 28px rgb(var(--project-tone) / 18%);
  }

  .v2-project-page .menu-button {
    border-color: rgb(var(--project-nav-border) / 74%);
    background: rgb(var(--project-tone) / 14%);
  }

  .v2-project-page .nav a:hover,
  .v2-project-page .nav a:focus-visible,
  .v2-project-page .nav a[aria-current="page"] {
    border-bottom-color: rgb(var(--project-nav-border) / 88%);
    color: rgb(var(--project-nav-border));
  }

  /* Garon Foods uses the original case-study template rather than the shared
   * project-page shell, so retain its established purple treatment explicitly. */
  .v2-case-page .nav {
    border-color: rgb(161 116 190 / 44%);
    background:
      radial-gradient(ellipse at 50% -85%, rgb(113 69 145 / 34%), transparent 72%),
      linear-gradient(180deg, rgb(43 27 57 / 99%), rgb(27 18 39 / 99%));
    box-shadow:
      0 20px 44px rgb(0 0 0 / 52%),
      0 0 28px rgb(87 38 139 / 18%);
  }

  .v2-case-page .menu-button {
    border-color: rgb(187 164 201 / 74%);
    background: rgb(87 38 139 / 14%);
  }

  .v2-case-page .nav a:hover,
  .v2-case-page .nav a:focus-visible,
  .v2-case-page .nav a[aria-current="page"] {
    border-bottom-color: rgb(187 164 201 / 88%);
    color: rgb(213 194 225);
  }

  .nav a {
    min-height: 52px;
    padding-inline: 4px;
    border-bottom-color: rgb(255 255 255 / 10%);
    font-size: 0.95rem;
  }

  .nav a:last-child {
    border-bottom-color: transparent;
  }

  .button,
  .text-link,
  .carousel-button,
  .lightbox-toolbar button {
    min-height: 48px;
  }

  input,
  select,
  textarea {
    font-size: 1rem;
  }

  .carousel-status,
  .footer-bottom {
    font-size: 0.8rem;
  }

  .footer-grid {
    gap: 26px;
    padding-bottom: 30px;
  }

  .footer-grid nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 360px) {
  .contact,
  .shell {
    width: min(var(--max), calc(100% - 22px));
  }

  .site-header .logo {
    width: 116px;
  }

  .menu-button {
    min-width: 60px;
  }
}
