@import "resend-inspired.css";

@media (max-width: 64rem) {
  :root {
    --space-7: 5rem;
    --space-8: 6.5rem;
  }

  .hero__grid,
  .section-heading,
  .problem-layout,
  .solution-layout,
  .about-layout,
  .contact-layout,
  .form-page-layout {
    grid-template-columns: 1fr;
  }

  .hero__qualifier,
  .section-heading > :last-child {
    max-width: 42rem;
    justify-self: start;
  }

  .capability-grid .card,
  .capability-grid .card:nth-child(1),
  .capability-grid .card:nth-child(2),
  .capability-grid .card:nth-child(4),
  .capability-grid .card:nth-child(5) {
    grid-column: span 6;
  }

  .grid-4,
  .metric-list,
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-main {
    grid-template-columns: 1.5fr repeat(2, 1fr);
  }

  .footer-main > :last-child {
    grid-column: 2;
  }

  .phase {
    grid-template-columns: 6rem minmax(0, 0.75fr) minmax(18rem, 1fr);
  }

  .principles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-aside,
  .legal-nav {
    position: static;
  }
}

@media (max-width: 50rem) {
  :root {
    --header-height: 4.1rem;
  }

  .site-header {
    background: #07090d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .container {
    width: min(calc(100% - 2.25rem), var(--container));
  }

  .site-header .brand {
    gap: 0.48rem;
  }

  .site-header .brand__text {
    width: 8.1rem;
    height: 2.6rem;
  }

  .js .menu-toggle {
    display: block;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav__list {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .js .primary-nav {
    position: fixed;
    z-index: 99;
    top: var(--header-height);
    right: 0;
    bottom: auto;
    left: 0;
    display: none;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.25rem max(1.125rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.125rem, env(safe-area-inset-left));
    background: var(--white);
    -webkit-overflow-scrolling: touch;
  }

  .js .primary-nav[data-open="true"] {
    display: block;
  }

  .js .primary-nav__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    align-content: start;
    justify-content: stretch;
  }

  .js .primary-nav li {
    border-bottom: 1px solid var(--silver);
  }

  .js .primary-nav li:last-child {
    margin-top: 1.2rem;
    border-bottom: 0;
  }

  .js .primary-nav a:not(.button) {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    padding: 0.85rem 0.25rem;
    font-size: 1.1rem;
  }

  .js .primary-nav .button {
    width: 100%;
    min-height: 3.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .fit-grid,
  .service-group__content,
  .insights-featured,
  .articles-grid,
  .form-grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .capability-grid .card,
  .capability-grid .card:nth-child(1),
  .capability-grid .card:nth-child(2),
  .capability-grid .card:nth-child(4),
  .capability-grid .card:nth-child(5) {
    grid-column: 1 / -1;
  }

  .qualifier-strip__inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .qualifier-strip ul {
    display: grid;
    justify-content: stretch;
  }

  .fit-panel + .fit-panel {
    border-top: 1px solid var(--silver);
    border-left: 0;
  }

  .cta-panel {
    grid-template-columns: 1fr;
  }

  .service-group,
  .phase {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .phase__label {
    margin-bottom: 0.5rem;
  }

  .principles-grid,
  .metric-list {
    grid-template-columns: 1fr;
  }

  .insights-featured__visual {
    min-height: 14rem;
  }

  .field--full {
    grid-column: auto;
  }

  .logo-showcase {
    grid-template-columns: minmax(8rem, 12rem) 1fr;
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-main > :last-child {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
  }

}

@media (max-width: 34rem) {
  :root {
    --space-5: 2.5rem;
    --space-6: 3.25rem;
    --space-7: 4.25rem;
    --space-8: 5rem;
  }

  .container {
    width: min(calc(100% - 2rem), var(--container));
  }

  .brand__text span {
    display: none;
  }

  .logo-showcase {
    grid-template-columns: 1fr;
  }

  .logo-showcase img {
    max-width: 12rem;
  }

  .hero__actions,
  .page-hero__actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero__actions .button,
  .page-hero__actions .button,
  .form-actions .button {
    width: 100%;
  }

  .process-step {
    grid-template-columns: 3.3rem 1fr;
  }

  .process-step:not(:last-child)::before {
    left: 1.1rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-main > :last-child {
    grid-column: auto;
  }
}

/* Keep the luminous navigation treatment above the mobile layout overrides. */
@media (max-width: 50rem) {
  .js .primary-nav {
    background:
      radial-gradient(circle at 80% 10%, rgb(36 84 214 / 18%), transparent 20rem),
      #0a0c10;
  }

  .js .primary-nav li {
    border-bottom-color: rgb(255 255 255 / 10%);
  }
}
