/* ==========================================================================
   Responsive Styles
   Keep breakpoint-specific layout changes here for easy maintenance.
   ========================================================================== */

@media (max-width: 1080px) {
  .nav-menu {
    gap: 13px;
  }

  .nav-menu a {
    font-size: 0.7rem;
  }

  .feature-grid,
  .discipline-grid,
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 860px) {
  .site-header {
    background: rgba(247, 242, 233, 0.96);
    box-shadow: 0 1px 0 var(--line);
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    background: var(--bg);
    border-top: 1px solid var(--line);
    display: none;
    flex-direction: column;
    gap: 0;
    left: 0;
    padding: 20px;
    position: absolute;
    right: 0;
    top: 100%;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: 12px 0;
  }

  .hero-content,
  .split-layout,
  .two-column,
  .contact-layout,
  .product-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 130px;
  }

  .hero-content {
    min-height: auto;
  }

  .placeholder-art.large,
  .device-placeholder {
    min-height: 420px;
  }

  .hero-logo-card {
    height: 104px;
    width: 104px;
  }

  .section {
    padding: 78px 0;
  }

  .page-hero {
    padding-top: 140px;
  }

  .three-column,
  .masonry-grid,
  .editorial-gallery,
  .media-grid,
  .behind-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .brand-text {
    display: none;
  }

  .feature-grid,
  .discipline-grid,
  .artwork-grid,
  .three-column,
  .masonry-grid,
  .editorial-gallery,
  .media-grid,
  .behind-grid,
  .footer-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .image-placeholder.wide {
    grid-column: auto;
  }

  .hero-artwork-frame figcaption {
    bottom: 14px;
    left: 14px;
    right: 14px;
  }

  .button-row,
  .filter-bar,
  .category-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .filter-btn {
    width: 100%;
  }

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

  .contact-details,
  .contact-form,
  .callout {
    padding: 22px;
  }
}

/* Dark redesign responsive refinements. */
@media (max-width: 1080px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 560px;
  }
}

@media (max-width: 860px) {
  .site-header {
    background: rgba(32, 33, 38, 0.96);
  }

  .nav-menu {
    background: #25272d;
    border-top: 1px solid var(--line);
  }

  .hero {
    padding-top: 112px;
  }
}

@media (max-width: 620px) {
  .brand-text {
    display: inline;
    font-size: 0.92rem;
  }

  .brand-text::before,
  .footer-brand span:last-child::before {
    height: 26px;
    margin-right: 8px;
    transform: translateY(6px);
    width: 26px;
  }

  h1 {
    font-size: clamp(3.2rem, 14vw, 4.45rem);
  }

  .hero {
    padding-top: 150px;
  }

  .hero-content {
    gap: 42px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .hero-ring {
    border-width: 58px;
    width: min(92%, 420px);
  }

  .hero-media-placeholder {
    height: 320px;
    width: 48%;
  }

  .skill-badge {
    font-size: 1.45rem;
    height: 66px;
    width: 66px;
  }

  .badge-top-left { left: 2%; top: 20%; }
  .badge-top-right { right: 3%; top: 20%; }
  .badge-bottom-left { bottom: 22%; left: 0; }
  .badge-bottom-right { bottom: 22%; right: 0; }
}

/* Minimal portfolio responsive layer. */
@media (max-width: 1120px) {
  .nav-menu {
    gap: 12px;
  }

  .nav-menu a {
    font-size: 0.78rem;
  }
}

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 760px;
  }

  .feature-grid .project-card,
  .feature-grid .project-card:first-child,
  .feature-grid .project-card:nth-child(2) {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .site-header {
    background: rgba(247, 245, 239, 0.96);
  }

  .nav-menu {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  .nav-menu a {
    color: var(--ink);
    font-size: 0.95rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading .eyebrow {
    margin-top: 0;
  }

  .section-heading h2,
  .section-heading p:not(.eyebrow) {
    grid-column: auto;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-services {
    grid-template-columns: 1fr;
  }

  .hero-services li {
    min-height: 56px;
  }

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

@media (max-width: 680px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  h1 {
    font-size: clamp(3.05rem, 15vw, 4.7rem);
    line-height: 0.96;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.35rem);
  }

  .brand-text {
    display: inline;
    font-size: 0.92rem;
  }

  .hero-content {
    gap: 28px;
  }

  .hero-media-placeholder {
    height: 320px;
  }

  .practice-list div {
    grid-template-columns: 42px 1fr;
  }

  .feature-grid,
  .discipline-grid,
  .artwork-grid,
  .three-column,
  .masonry-grid,
  .editorial-gallery,
  .media-grid,
  .behind-grid,
  .footer-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .project-card,
  .feature-grid .project-card:first-child,
  .feature-grid .project-card:nth-child(2) {
    grid-column: auto;
  }

  .button-row,
  .filter-bar,
  .category-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .filter-btn {
    width: 100%;
  }

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

/* ==========================================================================
   Final Responsive Hardening Layer
   This sits last so it overrides older experimental responsive rules above.
   It keeps the static GitHub Pages site stable across phones, tablets,
   laptops, desktops and very narrow mobile browsers.
   ========================================================================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

h1,
h2,
h3,
p,
li,
dd,
dt,
label,
a,
button {
  min-width: 0;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
  word-break: normal;
}

.nav,
.hero-content,
.split-layout,
.two-column,
.contact-layout,
.product-hero,
.footer-grid,
.section-heading,
.project-grid,
.discipline-grid,
.artwork-grid,
.process-grid,
.case-grid,
.three-column,
.media-grid,
.behind-grid,
.editorial-gallery,
.masonry-grid {
  min-width: 0;
}

.project-card,
.discipline-card,
.artwork-card,
.info-block,
.case-card,
.contact-details,
.contact-form,
.callout,
.newsletter,
.text-stack {
  min-width: 0;
  overflow-wrap: anywhere;
}

.btn,
.filter-btn,
.nav-menu a,
.category-strip span {
  min-height: 44px;
}

@media (max-width: 1180px) {
  .shell {
    width: min(100% - 40px, var(--max));
  }

  .nav {
    align-items: center;
  }

  .nav-menu {
    gap: 12px;
  }

  .nav-menu a {
    font-size: 0.8rem;
  }

  .hero-content,
  .product-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy,
  .hero-copy h1,
  .page-hero h1 {
    max-width: 900px;
  }

  .hero-visual,
  .device-placeholder {
    width: 100%;
  }

  .feature-grid .project-card,
  .feature-grid .project-card:first-child,
  .feature-grid .project-card:nth-child(2) {
    grid-column: span 6;
  }

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

@media (max-width: 960px) {
  .site-header,
  .site-header.scrolled,
  .site-header.solid {
    padding: 12px 0;
  }

  .brand-text {
    font-size: 0.95rem;
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    height: 44px;
    justify-content: center;
    margin-left: auto;
    width: 44px;
  }

  .nav-toggle span {
    margin: 3px 0;
    transition: background 180ms ease, transform 180ms ease;
    width: 24px;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible,
  .nav-toggle[aria-expanded="true"] {
    background: var(--ink);
    border-color: var(--ink);
  }

  .nav-toggle:hover span,
  .nav-toggle:focus-visible span,
  .nav-toggle[aria-expanded="true"] span {
    background: var(--gold);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: scaleX(0);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    box-shadow: 0 22px 42px rgba(17, 17, 17, 0.12);
    display: none;
    flex-direction: column;
    gap: 0;
    left: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 10px 20px 18px;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 120;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    font-size: 1rem;
    justify-content: space-between;
    padding: 14px 0;
    width: 100%;
  }

  .nav-menu a::after {
    display: none;
  }

  .hero,
  .page-hero,
  .product-hero {
    padding-top: 112px;
  }

  .hero-content,
  .split-layout,
  .two-column,
  .contact-layout,
  .product-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-heading {
    display: block;
  }

  .section-heading h2,
  .section-heading p:not(.eyebrow) {
    grid-column: auto;
  }

  .feature-grid,
  .discipline-grid,
  .process-grid,
  .case-grid,
  .three-column,
  .media-grid,
  .behind-grid,
  .editorial-gallery,
  .masonry-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout,
  .product-hero {
    gap: 34px;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  .site-header,
  .site-header.scrolled,
  .site-header.solid {
    padding: 10px 0;
  }

  .brand-text {
    font-size: 0.9rem;
    max-width: 66vw;
  }

  h1,
  .hero-copy h1 {
    font-size: 3.35rem;
    line-height: 0.98;
    hyphens: auto;
  }

  h2 {
    font-size: 2.25rem;
    hyphens: auto;
    line-height: 1.04;
  }

  h3 {
    font-size: 1.18rem;
  }

  .lead {
    font-size: 1.08rem;
  }

  .hero {
    padding-bottom: 52px;
  }

  .hero-content {
    gap: 26px;
  }

  .hero-copy {
    padding-top: 8px;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .hero-intro {
    font-size: 1rem;
  }

  .hero-visual {
    padding: 16px;
  }

  .hero-media-placeholder {
    height: auto;
    min-height: 260px;
    width: 100%;
  }

  .practice-list div {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .section {
    padding: 64px 0;
  }

  .page-hero,
  .product-hero {
    padding-bottom: 54px;
  }

  .feature-grid,
  .discipline-grid,
  .artwork-grid,
  .process-grid,
  .case-grid,
  .three-column,
  .media-grid,
  .behind-grid,
  .editorial-gallery,
  .masonry-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid .project-card,
  .feature-grid .project-card:first-child,
  .feature-grid .project-card:nth-child(2),
  .image-placeholder.wide {
    grid-column: auto;
  }

  .project-card,
  .discipline-card,
  .artwork-card,
  .info-block,
  .case-card,
  .contact-details,
  .contact-form,
  .callout {
    padding: 20px;
  }

  .image-placeholder,
  .media-placeholder,
  .portrait-placeholder,
  .device-placeholder {
    min-height: 220px;
  }

  .image-placeholder.tall,
  .placeholder-art.large {
    min-height: 300px;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .filter-bar,
  .category-strip {
    align-items: stretch;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-inline: -14px;
    overflow-x: auto;
    padding: 0 14px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn,
  .category-strip span {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: auto;
    white-space: nowrap;
  }

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

  .stats-grid div {
    border-left: 1px solid var(--line);
  }

  .callout {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea,
  .newsletter input {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .shell {
    width: min(100% - 22px, var(--max));
  }

  .brand-text {
    font-size: 0.84rem;
    max-width: 68vw;
  }

  h1,
  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero,
  .page-hero,
  .product-hero {
    padding-top: 98px;
  }

  .nav-menu {
    padding-inline: 14px;
  }

  .hero-media-placeholder {
    min-height: 220px;
  }

  .project-card,
  .discipline-card,
  .artwork-card,
  .info-block,
  .case-card,
  .contact-details,
  .contact-form,
  .callout {
    padding: 16px;
  }

  .site-footer {
    padding-top: 52px;
  }
}

@media (max-width: 360px) {
  h1,
  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.12rem;
  }
}
