html { scroll-padding-top: 92px; }

@media (max-width: 1120px) {
  .nav-tagline {
    font-size: 15px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-copy {
    order: 1;
    justify-self: start;
    max-width: 740px;
  }

  .case-wall {
    order: 2;
    transform: none;
    grid-auto-rows: minmax(128px, 18vw);
  }

  .method {
    grid-template-columns: 1fr;
  }

  .home-case-grid {
    grid-template-columns: none;
    grid-template-rows: repeat(2, clamp(138px, 18vw, 185px));
    grid-auto-columns: clamp(170px, 24vw, 215px);
    grid-auto-rows: clamp(138px, 18vw, 185px);
  }

  .method-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    overflow-x: auto;
    padding-bottom: 10px;
  }
}

@media (max-width: 1024px) {
  .site-header {
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 10px;
  }

  .wordmark,
  .menu-button {
    flex: 0 0 auto;
  }

  .wordmark {
    height: 30px;
    gap: 6px;
  }

  .wordmark img {
    width: 33px;
    height: 30px;
  }

  .wordmark span {
    max-width: 43px;
    font-size: 15px;
  }

  .nav-tagline {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: none;
    width: max-content;
    max-width: calc(100% - 130px);
    min-width: 0;
    font-size: clamp(11px, 3vw, 13px);
    letter-spacing: -0.03em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 160ms ease, font-size 160ms ease;
  }

  .site-header.is-scrolled .nav-tagline {
    position: static;
    left: auto;
    transform: none;
    flex: 1;
    width: auto;
    max-width: none;
    margin-left: 4px;
    text-align: left;
    font-size: clamp(11px, 3vw, 13px);
    letter-spacing: -0.03em;
    opacity: 0.82;
  }

  .nav-links {
    position: absolute;
    inset: 62px var(--pad) auto;
    display: none;
    grid-template-columns: 1fr;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(247, 246, 241, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open { display: grid; }
  .menu-button {
    display: grid;
    width: 34px;
    height: 34px;
    gap: 3px;
  }

  .menu-button span {
    width: 15px;
    height: 1.5px;
  }

  .hero {
    position: relative;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: visible;
    padding-top: 50px;
    padding-bottom: 28px;
    background:
      linear-gradient(180deg, rgba(247, 246, 241, 0) 0 235px, #f7f6f1 310px),
      radial-gradient(520px 280px at 24% 4%, rgba(44, 143, 216, 0.18), transparent 64%),
      radial-gradient(420px 250px at 92% 8%, rgba(255, 90, 44, 0.1), transparent 64%),
      #f7f6f1;
  }

  .hero-inner {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    gap: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: stretch;
  }

  h1 {
    max-width: 360px;
    font-size: clamp(34px, 10.5vw, 48px);
    letter-spacing: -0.055em;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(23px, 6vw, 32px);
    line-height: 1;
  }

  .work-line {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1;
    gap: 0.12em;
  }

  .work-line span,
  .work-line em {
    margin-right: 0;
  }

  .manual-line {
    width: fit-content;
    max-width: 100%;
    flex-wrap: nowrap;
    margin: 24px auto 0;
    padding-top: 0.24em;
    white-space: nowrap;
  }

  .not-stamp {
    top: -1.55em;
    padding: 0.22em 0.62em 0.24em;
    border-width: 2.5px;
    font-size: 0.38em;
    font-weight: 900;
    letter-spacing: 0.15em;
  }

  .hero-subtext {
    margin-top: clamp(18px, 2.5svh, 26px);
    width: auto;
    max-width: 34rem;
    gap: 9px;
  }

  .subtext-lead {
    font-size: 16px;
    line-height: 1.18;
    white-space: normal;
  }

  .subtext-support {
    font-size: 14px;
    line-height: 1.4;
  }

  .case-wall {
    order: 1;
    justify-self: center;
    width: min(100%, 340px);
    align-self: start;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(3, clamp(44px, 12.5vw, 58px));
    grid-auto-rows: auto;
    gap: 7px;
    padding: 0 9px 8px;
    overflow: hidden;
    transform: none;
  }

  .case-tile.is-active-case .case-tile-title {
    font-size: clamp(24px, 8vw, 32px);
    max-width: 12ch;
  }

  .case-tile.is-active-case .case-business {
    max-width: 22ch;
    white-space: normal;
    line-height: 1.16;
  }

  .case-tile .case-tile-title {
    font-size: clamp(13px, 3.6vw, 19px);
    padding: 6px 8px 7px;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .case-tile .case-business,
  .case-tile-horizontal .case-business {
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
  }

  .case-tile-body {
    padding: 10px;
    gap: 8px;
  }

  .hero-copy {
    order: 2;
    justify-self: center;
    width: min(100%, 350px);
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(18px, 3.4svh, 28px) var(--pad) clamp(56px, 9svh, 88px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(247, 246, 241, 0.88), #f7f6f1 28%);
  }

  .show-card,
  .show-card-large,
  .show-card-tall {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 0;
    padding: 8px;
    background: #101418;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    color: rgba(255, 255, 255, 0.82);
  }

  .show-card::before {
    opacity: 0.07;
  }

  .show-card::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.18));
    opacity: 1;
  }

  .show-card:nth-child(1) {
    grid-column: 1 / span 3;
    grid-row: 1 / span 1;
  }

  .show-card:nth-child(2) {
    grid-column: 4 / span 2;
    grid-row: 1 / span 1;
  }

  .show-card:nth-child(3) {
    grid-column: 6 / span 1;
    grid-row: 1 / span 2;
    padding: 8px;
  }

  .show-card:nth-child(4) {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
  }

  .show-card:nth-child(5) {
    grid-column: 3 / span 3;
    grid-row: 2 / span 1;
  }

  .show-card:nth-child(6) {
    grid-column: 3 / span 4;
    grid-row: 3 / span 1;
  }

  .show-card strong {
    font-size: clamp(7.5px, 2.15vw, 10.5px);
    padding: 3px 5px 4px;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .case-wall::after {
    inset: -6px 4px 0;
    border-radius: 10px;
    opacity: 0.54;
  }

  .show-card:nth-child(3) strong {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    max-width: none;
    max-height: 100%;
    padding: 7px 5px 8px;
    transform: rotate(-1.5deg);
  }

  .work-line span:last-child {
    flex-basis: auto;
  }

  .hero-copy p:not(.kicker, .hero-subtext) {
    margin-top: 14px;
    font-size: 15px;
  }

  .hero-actions {
    width: 100%;
    max-width: 34rem;
    min-width: 0;
    margin-top: clamp(20px, 3svh, 30px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .button {
    width: 100%;
    min-width: 0;
    min-height: 47px;
  }

  .hero-note {
    width: 100%;
    max-width: 34rem;
    margin-top: clamp(16px, 2.4svh, 24px);
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .hero-note-lead,
  .hero-note-end {
    display: block;
  }

  .hero-note-rail {
    width: 100%;
    margin: clamp(10px, 1.8svh, 16px) auto clamp(9px, 1.4svh, 14px);
    grid-template-columns: 1fr;
    gap: clamp(7px, 1.3svh, 11px);
  }

  .hero-note-rail::before {
    left: 50%;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(255, 90, 44, 0.28), transparent);
    transform: translateX(-50%);
  }

  .hero-note-rail span {
    min-width: min(100%, 220px);
    min-height: 29px;
    padding: 0 10px;
    font-size: 13px;
    justify-self: center;
  }

  .hero-scroll-cue {
    position: static;
    flex: none;
    margin: 12px auto 0;
    display: block;
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(9, 17, 27, 0.24);
    border-bottom: 2px solid rgba(9, 17, 27, 0.24);
    transform: rotate(45deg);
  }

  .cases-head {
    margin-bottom: 16px;
    gap: 14px;
  }

  .cases-title {
    white-space: normal;
  }

  .case-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .page-section {
    min-height: auto;
    place-items: start;
    padding-top: clamp(48px, 10vw, 76px);
    padding-bottom: clamp(44px, 8vw, 64px);
  }

  html { scroll-padding-top: 66px; }

  .cases-section {
    min-height: auto;
    justify-content: flex-start;
    padding-top: clamp(56px, 14vw, 82px);
    padding-bottom: clamp(36px, 7vw, 56px);
    border-top: 1px solid rgba(9, 17, 27, 0.1);
    background: #ece8df;
  }

  .case-carousel {
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .case-carousel__arrow {
    width: 34px;
    height: 34px;
    background: rgba(247, 246, 241, 0.94);
  }

  .case-carousel__arrow--left {
    left: -8px;
  }

  .case-carousel__arrow--right {
    right: -8px;
  }

  .case-controls .case-search {
    width: 100%;
  }

  .filter-row {
    align-items: flex-start;
    gap: 8px;
  }

  .home-case-grid {
    grid-template-columns: none;
    grid-template-rows: repeat(2, clamp(142px, 42vw, 188px));
    grid-auto-columns: minmax(158px, 46vw);
    grid-auto-rows: clamp(142px, 42vw, 188px);
    gap: 10px;
  }

  .case-tile,
  .case-tile-large,
  .case-tile-tall,
  .case-tile-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .case-tile:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }

  .case-tile.case-tile-vertical {
    grid-row: span 2;
  }

  .filter-group {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 4px;
  }

  .filter { flex: none; }
  .method-grid { grid-template-columns: 1fr; overflow: visible; }
  .site-footer { display: grid; }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .hero {
    min-height: 0;
    padding: 78px 0 40px;
  }

  .hero-inner {
    align-items: start;
    align-content: start;
    gap: 26px;
  }

  .hero-copy,
  .case-wall {
    width: min(100%, 640px);
  }

  .case-wall {
    grid-template-rows: repeat(3, clamp(88px, 11vw, 116px));
    gap: 12px;
    padding: 0 12px 12px;
  }

  .show-card strong {
    font-size: clamp(12px, 1.5vw, 15px);
    padding: 6px 9px 7px;
  }

  .show-card:nth-child(3) strong {
    padding: 9px 6px 10px;
  }
}

@media (max-width: 720px) and (max-height: 820px) {
  .site-header {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .hero {
    padding-top: 46px;
    padding-bottom: 24px;
  }

  .case-wall {
    grid-template-rows: repeat(3, clamp(32px, 10vw, 42px));
    gap: 5px;
    padding-bottom: 7px;
  }

  .show-card,
  .show-card-large,
  .show-card-tall {
    padding: 7px;
  }

  .show-card strong {
    font-size: clamp(7px, 1.9vw, 9px);
  }

  .hero-copy {
    padding-top: 13px;
    padding-bottom: 28px;
  }

  .hero-title {
    font-size: clamp(22px, 5.8vw, 30px);
  }

  .manual-line {
    margin-top: 22px;
  }

  .hero-subtext {
    margin-top: 14px;
    gap: 7px;
  }

  .subtext-lead {
    font-size: 15px;
  }

  .subtext-support {
    font-size: 13px;
    line-height: 1.34;
  }

  .hero-actions {
    margin-top: 14px;
    gap: 8px;
  }

  .button {
    min-height: 43px;
  }

  .hero-note {
    margin-top: 10px;
    padding-top: 8px;
    font-size: 12px;
  }

  .hero-note-rail {
    margin: 8px auto 7px;
    gap: 5px;
  }

  .hero-note-rail span {
    min-height: 24px;
    min-width: min(100%, 198px);
    font-size: 12px;
  }

  .hero-scroll-cue {
    display: block;
    width: 16px;
    height: 16px;
    border-width: 1.5px;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 22px;
  }

  .work-line {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .draft-page {
    overflow-x: hidden;
  }

  .draft-page article {
    width: min(100%, 350px);
    min-width: 0;
  }

  .draft-page h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(31px, 8vw, 42px);
    letter-spacing: -0.055em;
  }

  .draft-page p,
  .draft-page li {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
