@media (max-width: 1119px) {
  .card-row,
  .wp-block-columns.card-row { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 14px; }
}

@media (max-width: 980px) {
  .logo img { height: 72px; }

  .site-header .gold-rule:not(.gold-rule-end) { margin-left: 0; }

  .nav-toggle {
    display: block;
    margin-left: auto;
    border: 1px solid var(--jsg-black);
    background: var(--jsg-white);
    padding: 10px 12px;
    min-height: 44px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .nav,
  .header-cta { display: none; }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 20px 16px;
    background: var(--jsg-white);
    border-bottom: 1px solid var(--jsg-border);
  }

  .nav.is-open a,
  .nav.is-open .nav-soon {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
  }

  .header-cta.is-open { display: inline-flex; margin: 8px 20px 16px; }

  .split,
  .restore-grid,
  .cta-row,
  .footer-row,
  .footer-base,
  .wp-block-columns.split,
  .wp-block-columns.restore-grid,
  .wp-block-columns.cta-row {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .hero h1,
  .hero .jsg-rotator { line-height: 0.98; }

  .hero-line-second { margin-left: clamp(0px, 2.4vw, 28px); }
  .section h2,
  .jsg-section-title { font-size: clamp(28px, 7vw, 44px); line-height: 1.08; }
  .jsg-body-copy,
  .who p,
  .community p { font-size: clamp(15px, 3.8vw, 17px); line-height: 1.6; }

  .hero-actions,
  .wp-block-buttons.hero-actions { flex-direction: column; align-items: stretch; }

  .hero-word-veil { display: none; }

  .project-preview {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .project-preview::-webkit-scrollbar { display: none; }

  .project-preview .project-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .project-strip {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 420px;
    scrollbar-width: none;
  }

  .project-strip::-webkit-scrollbar { display: none; }

  .project-strip > a,
  .project-strip > figure,
  .project-strip > .wp-block-image {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .strip-btn {
    display: grid;
    place-items: center;
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    border: 1px solid var(--jsg-border);
    background: var(--jsg-white);
    color: var(--jsg-black);
    cursor: pointer;
  }

  .strip-prev { left: 8px; }
  .strip-next { right: 8px; }

  .card-row,
  .wp-block-columns.card-row {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
  }

  .service-card,
  .wp-block-columns.card-row > .wp-block-column { min-width: 82%; scroll-snap-align: center; }

  .card-controls { display: flex; }

  .partner-stage { grid-template-columns: 1fr; }
  .partner-stage > img,
  .partner-stage > .partner-photo { display: none; }
  .partner-stage > img.is-lead,
  .partner-stage > .partner-photo.is-lead { display: block; }
  .partner-stage img,
  .community .partner-stage img,
  .community .photo-frame img,
  .who img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 210px;
    object-fit: contain;
  }

  .restore .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .restore .hero-actions .btn {
    width: 100%;
    height: 52px;
    min-height: 52px;
  }

  .partner-list { grid-template-columns: 1fr; }
  .way-viewport { height: 168px; overflow: visible; }
  .way .way-prev,
  .way .way-next { top: 52px; }
  .way-highlight { display: none; }
  .way li { opacity: 0; }
  .way li.is-active { opacity: 1; }
  .way li.is-active .emblem {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #b20731;
  }

  .project-grid,
  .wp-block-columns.project-grid { grid-template-columns: 1fr; display: grid; }

  .hero { margin: 0; min-height: 520px; }
  .hero-copy {
    left: 20px;
    right: 20px;
    width: auto;
    transform: translateY(-50%);
  }
  .hero-title { width: 100%; max-width: 100%; align-items: flex-start; }
  .hero-line { flex-wrap: wrap; width: 100%; max-width: 100%; min-width: 0; justify-content: flex-start; }
  .hero-kicker, .hero-build, .hero-community { min-width: 0; }
  .hero-kicker { white-space: nowrap; font-size: clamp(0.85rem, 2.4vw, 1.2rem); }
  .hero-build, .hero-community { font-size: clamp(1.55rem, 6.4vw, 3.1rem); }
  .service-line {
    display: block;
    max-width: 100%;
    white-space: normal;
    font-size: clamp(0.72rem, 2.5vw, 0.95rem);
    line-height: 1.45;
    letter-spacing: 0.03em;
  }
  .service-line i { display: inline-block; margin: 0 6px; vertical-align: middle; }
  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    padding: 12px 10px;
    font-size: 11px;
    letter-spacing: 0.05em;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .who img,
  .community img,
  .who .wp-block-image img,
  .community .wp-block-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 210px;
    object-fit: contain;
  }
}

@media (max-width: 430px) {
  .hero-frame { display: none; }
  .hero-copy { left: 14px; right: 14px; }
  .hero-line { flex-direction: column; align-items: flex-start; row-gap: 1px; width: max-content; max-width: 100%; }
  .hero-line-second { margin-left: 0; }
  .hero-kicker, .hero-build, .hero-community { display: block; white-space: normal; }
  .hero-kicker { font-size: 0.95rem; }
  .hero-build, .hero-community { font-size: 1.7rem; line-height: 0.95; }
  .service-line { font-size: 0.75rem; }
}

@media (max-width: 280px) {
  .site-header { padding: 10px 12px; gap: 8px; }
  .logo img { height: 48px; }
  .hero-build, .hero-community { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .who-copy, .who figure, .service-card { opacity: 1; transform: none; }
  .umbrella-canopy { transform: none !important; }
  .rain { display: none; }
  .v-track,
  .phrase-track { transition: none !important; transform: none !important; }
  .rolodex-track { transition: none !important; transform: none !important; }
  .rolodex-track span:not(:first-child) { display: none; }
  .community-title { animation: none; }
  .way .emblem,
  .way h3 { transition: none !important; }
  .hero-word { transition: none; }
  .hero-word-veil { display: none; }
}

@media (max-width: 767px) {
  .services .card-row,
  .services .wp-block-columns.card-row {
    display: flex;
    flex-direction: column;
    overflow: visible;
    width: 100%;
    min-width: 0;
    gap: 40px;
  }

  .services .service-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    min-height: 0;
  }

  .services .service-card .emblem { order: 1; margin-top: 0; }
  .services .service-card h3 { order: 2; }
  .services .service-card p { order: 3; }
  .services .service-card .go { order: 4; }
  .services .card-controls { display: none; }
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0a0a0a;
  cursor: pointer;
  flex: none;
}

.nav-sub-toggle::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}

.nav-item.is-open .nav-sub-toggle::before {
  transform: rotate(225deg);
  margin-top: 2px;
}

.nav-item:hover > .nav-sub-toggle,
.nav-item:focus-within > .nav-sub-toggle,
.nav-item > a[aria-current="page"] + .nav-sub-toggle {
  color: #b20731;
}

.nav-sub {
  display: grid;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 320px;
  margin-top: 0;
  padding: 6px 0;
  background: #ffffff;
  border: 1px solid #e4dfd6;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.nav-sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
  pointer-events: none;
}

.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub,
.nav-item.is-open .nav-sub {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.nav-sub a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  color: #0a0a0a;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.nav-sub a[aria-current="page"] { color: #b20731; }

@media (max-width: 980px) {
  .nav.is-open .nav-soon {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
  }

  .nav.is-open .nav-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .nav.is-open .nav-item > a { flex: 0 1 auto; }

  .nav-sub-toggle {
    width: 32px;
    height: 32px;
    margin-left: 2px;
  }

  .nav.is-open .nav-sub { display: none; }

  .nav.is-open .nav-item.is-open .nav-sub {
    display: grid;
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0 0 8px;
  }

  .nav.is-open .nav-sub::before { display: none; }
  .nav.is-open .nav-sub a { min-height: 44px; padding: 8px 8px 8px 14px; }
}

@media (min-width: 981px) and (max-width: 1280px) {
  .site-header { gap: 12px; padding: 16px 16px; }
  .nav { gap: 8px; }
  .nav a,
  .nav-soon { letter-spacing: 0.05em; }
}

@media (max-width: 980px) {
  .site-footer {
    padding: 32px 0 28px;
    overflow-x: clip;
  }

  .site-footer .container {
    width: min(100% - 40px, 1440px);
  }

  .site-footer .footer-row,
  .site-footer .footer-base {
    align-items: center;
    width: 100%;
    text-align: center;
  }

  .site-footer .footer-row { gap: 22px; }

  .site-footer .logo {
    display: block;
    margin-inline: auto;
    max-width: 100%;
  }

  .site-footer .logo img {
    display: block;
    height: 120px;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
  }

  .site-footer .footer-nav {
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    column-gap: 16px;
    row-gap: 2px;
  }

  .site-footer .footer-nav li { display: flex; }

  .site-footer .footer-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 2px;
  }

  .site-footer .footer-icons {
    justify-content: center;
    gap: 22px;
  }

  .site-footer .footer-icons a {
    min-width: 44px;
    min-height: 44px;
  }

  .site-footer .footer-base {
    gap: 4px;
    margin-top: 4px;
  }

  .site-footer .footer-base > span {
    display: block;
    min-height: 0;
    padding: 12px 0;
    line-height: 1.45;
    text-align: center;
    white-space: normal;
  }

  .site-footer .footer-base a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }
}
