/* Lawless & Co: responsive styles
   Loaded after style.css. Everything that changes with screen width lives here:
   desktop only, then tablet, then phones, then small phones.
   Reduced-motion rules stay in style.css, next to the animations they switch off. */

/* ---------- desktop (1025px and up) ---------- */
/* desktop: intro on the left, form on the right. The intro stays in view */
/* while the form scrolls. Below 1025px the two simply stack. */
@media (min-width: 1025px) {
  .contact-columns {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 96px;
    align-items: start;
  }

  .contact-columns .form-wrap {
    margin-top: 0;
    padding-top: 12px;
    /* first label lines up with the heading's cap height */
  }

  .contact-intro {
    position: sticky;
    top: 140px;
  }
}

/* ---------- tablet ---------- */
@media (min-width: 769px) and (max-width: 1024px) {

  /* the 1/3 panel is too narrow at this width */
  .menu-overlay {
    width: 50%;
  }

  /* step the type down between desktop and mobile */
  h1 {
    font-size: 4rem;
    /* 64px */
    line-height: 1;
    /* 64px */
  }

  .masthead:not(:has(form)) .content-wrapper-outset>p {
    font-size: 1.25rem;
    /* 20px */
    line-height: 1.4;
    /* 28px */
  }

  div.content-wrapper-inset {
    width: 90%;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 768px) {

  /* layout */
  div.content-wrapper-inset {
    width: 100%;
    margin-left: 0;
  }

  div.content-wrapper-outset {
    width: 100%;
    margin-right: 0;
  }

  div.masthead {
    padding: 100px 0;
  }

  /* banner: a closer 4:3 crop so Jim isn't tiny on a phone */
  div.full-width-hero {
    aspect-ratio: 4 / 3;
  }

  div.bio {
    margin: 40px auto 0 auto;
  }

  /* menu: panel is full width, 100% avoids the scrollbar that 100vw includes */
  .menu-overlay {
    width: 100%;
    padding: 120px 24px;
  }

  .menu-overlay>a {
    font-size: 1.5rem;
    /* 24px */
    line-height: 1.25;
    /* 30px */
  }

  /* stack the copyright and email so they never collide on a narrow screen */
  .menu-meta {
    left: 24px;
    right: 24px;
    bottom: 32px;
    flex-direction: column;
    gap: 6px;
  }

  /* hide the dark logo on the dark full-width panel */
  body:has(.menu-overlay.is-open) a.logo {
    opacity: 0;
  }

  /* typography */
  h1 {
    font-size: 2.75rem;
    /* 44px */
    line-height: 1.0909;
    /* 48px */
  }

  h2 {
    font-size: 2rem;
    /* 32px */
    line-height: 1.25;
    /* 40px */
  }

  h3 {
    font-size: 1.5rem;
    /* 24px */
    line-height: 1.25;
    /* 30px */
  }

  p {
    font-size: 1rem;
    /* 16px */
    line-height: 1.625;
    /* 26px */
  }

  /* pattern band: half height */
  div.pattern-band {
    height: 200px;
  }

  /* header: shorter bar, same 24px side margins as the page */
  .topbar {
    padding: 12px 24px;
    /* 44px burger + 24px = 68px bar */
  }

  body {
    padding-top: 68px;
    /* matches the shorter header */
  }

  /* the burger's lines sit 9px inside its 44px tap area, so pull it out */
  /* to line the lines up with the 24px margin instead of the button's edge */
  .burger {
    margin-right: -9px;
  }

  /* bio: full width, like the masthead on mobile */
  .bio .content-wrapper>* {
    max-width: none;
  }

  /* 24px gutters, per the 393 frames */
  div.content-wrapper,
  div.document-wrapper {
    width: auto;
    margin-left: 24px;
    margin-right: 24px;
  }

  /* masthead lead: 20/28 */
  .masthead:not(:has(form)) .content-wrapper-outset>p {
    font-size: 1.25rem;
    /* 20px */
    line-height: 1.4;
    /* 28px */
  }

  /* section rhythm */

  div.bottom-cta {
    padding: 48px 0;
  }

  div.bio div.content-wrapper {
    padding: 100px 0;
  }

  div.content-wrapper-inset {
    padding: 64px 0;
  }

  /* privacy and cookies: same top and bottom space as the masthead on mobile */
  div.document-wrapper {
    margin-top: 100px;
    margin-bottom: 100px;
  }

  div.pattern-rocker {
    height: 200px;
  }

  /* about: gallery stacks */
  div.image-gallery {
    flex-direction: column;
    gap: 16px;
  }

  div.image-gallery img {
    width: 100%;
  }

  /* contact */
  .form-wrap {
    margin-top: 64px;
  }

  /* footer badge: 60% size (200px to 120px) */
  div.badge {
    width: 120px;
    height: 120px;
  }

  /* footer: links stack, 14/22 */
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .footer-links a {
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.5714;
    /* 22px */
  }
}

/* ---------- small phones ---------- */
/* name fields stack */
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}