/*
 * responsive.css
 * OWNS: every breakpoint override, largest to smallest, then reduced motion.
 *   <= 1100  tablet / small laptop: lead columns stack, grids go to two
 *   <= 1023  solid nav collapses to its menu button
 *   <=  899  overlay nav collapses to the hamburger sheet; hero centres,
 *            as resend.com's does on narrow screens
 *   <=  767  phone: single column, pipeline stacks vertically
 *   <=  480  small phone
 */

/* ----------------------------------------------------- tablet, small laptop */

@media (max-width: 1100px) {
  .problem__lead,
  .trust__lead,
  .faq__lead {
    position: static;
    grid-column: 1 / -1;
    margin-bottom: var(--s-9);
  }

  .ledger,
  .trust__lists,
  .faq__list {
    grid-column: 1 / -1;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiers {
    grid-template-columns: minmax(0, 1fr);
    max-width: 36rem;
    margin-inline: auto;
  }

  .quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .finding {
    grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .finding__hash {
    display: none;
  }
}

/* -------------------------------------------------------------- solid nav */

@media (max-width: 1023px) {
  .nav__inner {
    grid-template-columns: 1fr auto;
  }

  .nav__menu {
    display: inline-flex;
    align-items: center;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-2) var(--gutter) var(--s-5);
    background-color: var(--sheet-fill);
    background-image: var(--texture);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
  }

  .nav__links[data-open="true"] {
    display: flex;
  }

  .nav__link {
    height: auto;
    padding: var(--s-3) 0;
    border-bottom: var(--hairline) solid var(--line-hairline);
    font-size: var(--text-base);
  }

  .nav__actions .btn--primary {
    display: none;
  }
}

/* ---------------------------------------------------------- overlay nav */

@media (max-width: 899px) {
  .navx {
    grid-template-columns: 1fr auto;
  }

  .navx__links,
  .navx__actions {
    display: none;
  }

  .navx__burger {
    display: block;
  }

  /* Hero centres and the cube sits above the copy. */
  .hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + var(--s-9));
    padding-bottom: var(--s-11);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
  }

  .hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero__title {
    max-width: 12ch;
  }

  .hero__sub {
    margin-inline: auto;
  }

  .hero__cta,
  .hero__proof {
    justify-content: center;
  }

  .hero__visual {
    --cube: clamp(140px, 36vw, 220px);
    order: -1;
    justify-self: center;
    aspect-ratio: auto;
    height: calc(var(--cube) * 1.75);
    max-width: 360px;
  }
}

@media (min-width: 900px) {
  .navx-menu {
    display: none;
  }
}

/* ---------------------------------------------------------------- phone */

@media (max-width: 767px) {
  .section__title,
  .testimonials__kicker {
    max-width: none;
  }

  .section__intro,
  .prose {
    font-size: var(--text-base);
  }

  .frameworks {
    padding-top: var(--s-9);
  }

  .frameworks__panel {
    padding-block: var(--s-9);
  }

  .fw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The pin only runs at >= 768 (scroll.js), so here the track stacks. */
  .pipe__pin {
    display: block;
    min-height: 0;
    overflow: visible;
    padding-block: var(--section-y);
  }

  .pipe__track {
    flex-direction: column;
    width: auto;
    padding-inline: var(--gutter);
  }

  .pipe__intro {
    width: 100%;
    padding-inline-end: 0;
    margin-bottom: var(--s-6);
  }

  .pipe__step {
    width: 100%;
    min-height: 0;
  }

  .pipe__progress {
    display: none !important;
  }

  .features,
  .quotes {
    grid-template-columns: minmax(0, 1fr);
  }

  .features > :nth-child(1),
  .features > :nth-child(4) {
    grid-column: auto;
  }

  .features .card {
    min-height: 0;
  }

  .evidence__readout {
    flex-basis: 100%;
  }

  .scan__out {
    min-height: 22rem;
    font-size: 12px;
  }

  .scan__line {
    padding-left: 40px;
    padding-right: var(--s-4);
  }

  .scan__line::before {
    width: 26px;
  }

  .scan__verdict {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--s-4);
  }

  .scan__verdict-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .term-window__foot {
    padding: var(--s-3);
  }

  .scan__actions {
    width: 100%;
  }

  .scan__actions .btn {
    flex: 1;
  }

  .finding {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s-1) var(--s-3);
    padding-inline: var(--s-4);
  }

  .finding__id {
    grid-column: 1 / -1;
  }

  .finding__type {
    grid-column: 1;
  }

  .finding__weight {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  .tabs--tiles {
    gap: var(--s-3);
  }

  .board__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board__fields > div {
    border-right: 0 !important;
    border-bottom: var(--hairline) solid var(--line-hairline) !important;
  }

  .board__fields > div:nth-child(odd) {
    border-right: var(--hairline) solid var(--line-hairline) !important;
  }

  .board__fields > div:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  .storage__row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-1);
    padding-inline: var(--s-5);
  }

  .ledger__row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .tier__copy {
    min-height: 0;
  }

  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta {
    padding-block: var(--s-12);
  }

  .auth__home {
    top: var(--s-4);
    left: var(--s-2);
  }
}

/* ----------------------------------------------------------- small phone */

@media (max-width: 480px) {
  .terms {
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence__readout-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__cta {
    width: 100%;
    flex-direction: column;
  }

  .hero__cta .herobtn {
    width: 100%;
  }

  .step-rail {
    display: none;
  }

  ul.auth__scope {
    padding: var(--s-4);
  }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .pipe__pin {
    display: block;
    min-height: auto;
    overflow: visible;
    padding-block: var(--section-y);
  }

  .pipe__track {
    flex-direction: column;
    width: auto;
    max-width: calc(var(--page-max) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .pipe__intro {
    width: 100%;
    padding-inline-end: 0;
    margin-bottom: var(--s-6);
  }

  .pipe__step {
    width: 100%;
    min-height: 0;
  }

  .pipe__progress {
    display: none !important;
  }
}
