:root {
  --site-divider-color: rgba(243, 239, 231, 0.34);
  --site-grid-color: rgba(243, 239, 231, 0.12);
  --site-content-max: 1320px;
  --site-page-gutter: 28px;
  --site-mobile-gutter: 20px;
}

/* The grid now belongs to deliberate sections instead of sitting behind the
   entire document. This keeps it stable while scrolling and clarifies rhythm. */
.bg-grid {
  display: none !important;
}

.commercial-preview .hero,
.commercial-preview .banner,
.commercial-preview .preview-featured-work,
.commercial-preview .statement,
.commercial-preview #services,
.commercial-preview #our-work,
.commercial-preview .motion-studies,
.commercial-preview #featured-in,
.commercial-preview #contact,
.commercial-preview footer,
.work-draft .work-hero,
.work-draft .work-overview,
.work-draft .work-cta,
.work-draft footer,
.contact-preview .contact-hero,
.contact-preview .contact-page,
.contact-preview .contact-channel,
.contact-preview footer {
  background-color: var(--paper);
  background-image: none;
}

/* Keep ordinary reading areas clean. The grid is now a faint architectural
   rail at the page edges instead of a texture behind headings and copy. */
.commercial-preview main > section:not(#future-field),
.work-draft main > section,
.contact-preview main > section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.commercial-preview main > section:not(#future-field)::before,
.work-draft main > section::before,
.contact-preview main > section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--site-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--site-grid-color) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.68;
  -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.86) 5%, transparent 14%, transparent 86%, rgba(0,0,0,.86) 95%, #000 100%);
  mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.86) 5%, transparent 14%, transparent 86%, rgba(0,0,0,.86) 95%, #000 100%);
}

.commercial-preview main > section:not(#future-field) > *:not(.hero-distort):not(.hero-meta),
.work-draft main > section > *,
.contact-preview main > section > * {
  position: relative;
  z-index: 1;
}

.commercial-preview .hero-distort {
  position: absolute;
  z-index: 0;
}

/* The image-led future field keeps its own image and receives a persistent grid. */
.commercial-preview #future-field {
  background-image:
    linear-gradient(to right, rgba(243,239,231,0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243,239,231,0.18) 1px, transparent 1px),
    linear-gradient(rgba(10,10,10,0.58), rgba(10,10,10,0.66)),
    url('../images/optimized/adaptive-shell-1920.webp');
  background-position: 0 0, 0 0, center, center;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-size: 8.333vw 120px, 8.333vw 120px, auto, cover;
}

/* One responsive-safe alignment system for primary labels and headings. */
.commercial-preview .hero-headline,
.commercial-preview .hero-bottom,
.commercial-preview .preview-featured-work__header,
.commercial-preview .services-header,
.commercial-preview .gallery-header,
.commercial-preview .motion-studies__header,
.commercial-preview .statement-inner,
.commercial-preview .future-field__content,
.work-draft .work-hero__inner,
.work-draft .featured-work-list,
.contact-preview .contact-hero__inner {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
  max-width: var(--site-content-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.commercial-preview .hero-meta {
  left: max(var(--site-page-gutter), calc((100vw - var(--site-content-max)) / 2));
}

.commercial-preview .gallery-header {
  margin-top: 0;
  margin-bottom: 28px;
}

/* Later homepage sections use the same centered frame as sections 001/002. */
.commercial-preview .banner-label {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
  max-width: var(--site-content-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.commercial-preview #contact > .cta-eyebrow,
.commercial-preview #contact > .cta-title {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
  max-width: var(--site-content-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.commercial-preview #contact > .cta-button {
  margin-left: max(var(--site-page-gutter), calc((100vw - var(--site-content-max)) / 2));
}

.contact-preview .contact-hero__inner {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
}

/* One divider treatment across Home, Work and Contact. */
.commercial-preview .preview-featured-work,
.commercial-preview .banner,
.commercial-preview .future-field,
.commercial-preview .statement,
.commercial-preview .services,
.commercial-preview .gallery,
.commercial-preview .motion-studies,
.commercial-preview .cta,
.commercial-preview footer,
.work-draft .page-hero,
.work-draft .work-overview,
.work-draft .work-cta,
.work-draft footer,
.contact-preview .contact-hero,
.contact-preview .contact-page,
.contact-preview .contact-channel,
.contact-preview footer {
  border-top: 1px solid var(--site-divider-color) !important;
  border-bottom: 0 !important;
}

.work-draft .featured-work-list {
  border-top: 1px solid var(--site-divider-color);
}

.work-draft .featured-work-item,
.commercial-preview .foot-grid,
.work-draft .foot-grid,
.contact-preview .foot-grid {
  border-bottom-width: 1px !important;
  border-bottom-color: var(--site-divider-color) !important;
}

/* Homepage section hierarchy: orange index first, title directly below, left aligned. */
.commercial-preview .preview-featured-work__header,
.commercial-preview .services-header,
.commercial-preview .gallery-header,
.commercial-preview .motion-studies__header {
  align-items: flex-start;
}

.commercial-preview .hero-meta span:first-child {
  color: var(--accent);
}

.commercial-preview .preview-featured-work__header > div,
.commercial-preview .services-header,
.commercial-preview .gallery-header,
.commercial-preview .motion-studies__header {
  display: flex;
  flex-direction: column;
}

.commercial-preview .section-label-master,
.commercial-preview .preview-kicker,
.commercial-preview .gallery-kicker,
.commercial-preview .motion-studies__meta,
.commercial-preview .cta-eyebrow {
  order: -1;
  width: 100%;
  margin: 0 0 20px;
  text-align: left;
  color: var(--accent);
}

.commercial-preview .banner-label.section-label-master {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.commercial-preview #recent-clients .banner-label.section-label-master,
.commercial-preview #featured-in .banner-label.section-label-master {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
  max-width: var(--site-content-max);
  margin: 0 auto 20px;
  padding: 0 0 28px;
}

.commercial-preview .banner-label .section-heading-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.commercial-preview .services-header .services-meta {
  order: -1;
}

.commercial-preview .gallery-header {
  gap: 0;
}

.commercial-preview .gallery-title > span {
  display: block;
}

.commercial-preview .gallery-kicker {
  align-self: auto;
}

.commercial-preview .motion-studies__header h2 {
  max-width: 18ch;
}

.commercial-preview .preview-manifesto .statement-inner > .section-label-master {
  display: block;
}

.commercial-preview #services .service-grid {
  width: min(var(--site-content-max), calc(100vw - (var(--site-page-gutter) * 2)));
  max-width: var(--site-content-max);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .commercial-preview .preview-featured-work__header {
    align-items: end;
  }

  .commercial-preview .preview-featured-work__header > p {
    margin-bottom: 0;
  }
}

@media (max-width: 980px) {
  /* Identical navigation geometry on every page. */
  .chrome {
    padding: 10px 12px !important;
  }

  .chrome__glass {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    height: 60px !important;
    min-height: 60px !important;
    gap: 16px !important;
    padding: 7px 12px !important;
    border-radius: 16px !important;
    transform: translateY(0) !important;
    background:
      linear-gradient(145deg, rgba(243,239,231,0.10), rgba(243,239,231,0.028) 42%, rgba(10,10,10,0.40)),
      rgba(10,10,10,0.30) !important;
    border-color: rgba(243,239,231,0.12) !important;
    backdrop-filter: blur(16px) saturate(1.14) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.14) !important;
  }

  .brand-logo {
    height: 24px !important;
    width: auto !important;
  }

  .chrome nav {
    justify-self: center !important;
    margin: 0 !important;
    gap: 18px !important;
    font-size: 11px !important;
    letter-spacing: 0.16em !important;
  }

  .chrome .clock,
  .clock {
    display: flex !important;
    justify-self: end !important;
    gap: 8px !important;
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .commercial-preview main > section:not(#future-field)::before,
  .work-draft main > section::before,
  .contact-preview main > section::before {
    background-size: 40px 40px;
    opacity: 0.48;
    -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.78) 4%, transparent 11%, transparent 89%, rgba(0,0,0,.78) 96%, #000 100%);
    mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.78) 4%, transparent 11%, transparent 89%, rgba(0,0,0,.78) 96%, #000 100%);
  }

  .commercial-preview .hero,
  .commercial-preview #recent-clients,
  .commercial-preview .motion-studies,
  .commercial-preview .preview-manifesto,
  .work-draft .work-hero,
  .work-draft .work-cta,
  .contact-preview .contact-hero {
    background-size: 40px 40px;
  }

  .commercial-preview #future-field {
    background-image:
      linear-gradient(to right, rgba(243,239,231,0.22) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(243,239,231,0.22) 1px, transparent 1px),
      linear-gradient(rgba(10,10,10,0.66), rgba(10,10,10,0.72)),
      url('../images/optimized/adaptive-shell-1920.webp');
    background-size: 40px 40px, 40px 40px, auto, cover;
  }

  /* Consistent breathing room at both edges. */
  .commercial-preview .hero,
  .commercial-preview .preview-featured-work,
  .commercial-preview .services,
  .commercial-preview .motion-studies,
  .commercial-preview .statement,
  .commercial-preview .cta,
  .work-draft .page-hero,
  .work-draft .page-section,
  .contact-preview .contact-hero,
  .contact-preview .contact-page,
  .contact-preview .contact-channel {
    padding-left: var(--site-mobile-gutter) !important;
    padding-right: var(--site-mobile-gutter) !important;
  }

  .commercial-preview .gallery-header,
  .commercial-preview .banner-label {
    width: calc(100% - (var(--site-mobile-gutter) * 2)) !important;
    margin-left: var(--site-mobile-gutter) !important;
    margin-right: var(--site-mobile-gutter) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .commercial-preview .hero-headline,
  .commercial-preview .hero-bottom,
  .commercial-preview .preview-featured-work__header,
  .commercial-preview .services-header,
  .commercial-preview .gallery-header,
  .commercial-preview .motion-studies__header,
  .commercial-preview .statement-inner,
  .commercial-preview .future-field__content,
  .work-draft .work-hero__inner,
  .work-draft .featured-work-list,
  .contact-preview .contact-hero__inner {
    width: 100%;
    max-width: 100%;
  }

  .commercial-preview .hero-meta {
    position: static;
    top: auto;
    left: var(--site-mobile-gutter);
    margin-bottom: 32px;
  }

  .commercial-preview .future-field__content {
    width: calc(100vw - (var(--site-mobile-gutter) * 2)) !important;
  }

  .commercial-preview .section-label-master,
  .commercial-preview .preview-kicker,
  .commercial-preview .gallery-kicker,
  .commercial-preview .motion-studies__meta,
  .commercial-preview .cta-eyebrow {
    margin-bottom: 14px;
    font-size: 9px;
    line-height: 1.45;
    letter-spacing: 0.12em;
  }

  .commercial-preview .preview-featured-work__header,
  .commercial-preview .services-header,
  .commercial-preview .gallery-header,
  .commercial-preview .motion-studies__header {
    width: 100%;
    max-width: calc(100vw - (var(--site-mobile-gutter) * 2));
    margin-left: auto;
    margin-right: auto;
  }

  .commercial-preview .preview-featured-work__header h2,
  .commercial-preview .services-header h2,
  .commercial-preview .gallery-title,
  .commercial-preview .motion-studies__header h2,
  .commercial-preview .future-field__headline,
  .commercial-preview .cta-title {
    max-width: 100%;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .commercial-preview .future-field__headline {
    font-size: clamp(29px, 7.6vw, 38px) !important;
  }

  .commercial-preview .banner-label .section-heading-title {
    font-size: clamp(30px, 10vw, 42px);
  }

  .work-draft footer,
  .commercial-preview footer,
  .contact-preview footer {
    position: relative;
    z-index: 3;
    background: var(--paper) !important;
    background-image: none !important;
    isolation: isolate;
  }

  /* Project-name calibration for the mobile Work page. */
  .work-draft .featured-work-item:nth-child(1) .project-client h2 {
    font-size: clamp(24px, 6.5vw, 29px) !important;
    line-height: 1.02;
  }

  .work-draft .featured-work-item:nth-child(2) .project-client h2 {
    font-size: clamp(18px, 5.1vw, 22px) !important;
    line-height: 1.06;
  }

  .work-draft .featured-work-item:nth-child(5) .project-client h2 {
    font-size: clamp(21px, 5.8vw, 25px) !important;
    line-height: 1.04;
  }

  .work-draft .project-client,
  .work-draft .project-client h2 {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .chrome__glass {
    grid-template-columns: auto auto auto !important;
    gap: 9px !important;
    padding: 7px 10px !important;
  }

  .chrome nav {
    gap: 12px !important;
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
  }

  .chrome .clock,
  .clock {
    gap: 6px !important;
    font-size: 8px !important;
    letter-spacing: 0.1em !important;
  }
}
