/* Only the homepage project-experience section. Shared typography stays intact. */
html#atlas-site body.home-page main.home-rebuild > .experience-gallery {
  padding-block: clamp(2rem, 3vw, 2.5rem) !important;
}

html#atlas-site body.home-page main.home-rebuild > .experience-gallery .experience-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

html#atlas-site body.home-page main.home-rebuild > .experience-gallery .experience-heading > div:first-child {
  min-width: 0;
}

html#atlas-site body.home-page main.home-rebuild > .experience-gallery .home-kicker {
  margin: 0 0 .5rem;
  font-size: .75rem !important;
  line-height: 1.4 !important;
  letter-spacing: .08em !important;
}

html#atlas-site body.home-page main.home-rebuild > .experience-gallery #experience-title {
  max-width: none;
  margin: 0 !important;
  font-size: clamp(1.625rem, 1.25rem + 1.2vw, 2.25rem) !important;
  line-height: 1.25 !important;
}

@media (max-width: 52rem) {
  html#atlas-site body.home-page main.home-rebuild > .experience-gallery .experience-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
  }

  html#atlas-site body.home-page main.home-rebuild > .experience-gallery .experience-controls {
    justify-self: end;
  }
}

/* One fluid hero system for every language. Width drives type and spacing;
   content drives height, with no viewport-height minimum on the photo. */
html#atlas-site body.home-page .home-first {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  height: auto;
  min-height: 0;
  align-items: stretch;
}
html#atlas-site body.home-page .home-first > * { min-width: 0; }
html#atlas-site body.home-page .home-first-copy {
  container-type: inline-size;
  max-width: 100%;
  padding: clamp(1.25rem, 2.8vw, 3rem);
}
html#atlas-site body.home-page main .home-first h1 {
  max-width: none !important;
  margin: 0 !important;
  font-size: clamp(1.875rem, 3vw, 3.44rem) !important;
  font-size: clamp(1.875rem, 7.05cqi, 3.44rem) !important;
  line-height: 1.1 !important;
  overflow-wrap: break-word;
}
html#atlas-site body.home-page main .home-first .home-kicker {
  font-size: clamp(.7rem, 1vw, .84rem) !important;
  line-height: 1.4 !important;
  margin-bottom: .8rem;
}
html#atlas-site body.home-page main .home-brand-line {
  white-space: normal;
  font-size: clamp(1.1rem, 1.8vw, 1.65rem) !important;
  line-height: 1.35 !important;
  margin-top: .65rem;
}
html#atlas-site body.home-page main .home-first-lead {
  font-size: clamp(1rem, 1.25vw, 1.125rem) !important;
  line-height: 1.5 !important;
  margin: 1rem 0 .75rem;
}
html#atlas-site body.home-page main .home-trust-line {
  font-size: .8rem !important;
  line-height: 1.5 !important;
  margin-top: .8rem;
}
/* Predictable placement across EN / 中文 / ES: two actions, then Studio. */
html#atlas-site body.home-page .home-cta-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  width: 100%;
  max-width: 100%;
}
html#atlas-site body.home-page .home-cta-row > a {
  min-width: 0;
  max-width: 100%;
  padding: .7rem .65rem;
  min-height: 48px;
  font-size: .875rem;
  white-space: normal;
}
html#atlas-site body.home-page .home-cta-row .home-studio-trigger {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: .65rem 3.1rem;
  justify-content: center;
}
html#atlas-site body.home-page .home-studio-label {
  min-width: 0;
  width: 100%;
  align-items: center;
  text-align: center;
}
html#atlas-site body.home-page .home-studio-label strong {
  white-space: nowrap;
  font-size: clamp(.875rem, 2.2cqi, 1rem) !important;
  line-height: 1.25 !important;
}
html#atlas-site body.home-page .home-studio-label small { white-space: normal; }
html#atlas-site body.home-page .home-studio-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
}
html#atlas-site body.home-page .home-studio-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
.studio-tm { font-size: .55em; line-height: 0; vertical-align: super; margin-left: .1em; }
html#atlas-site body.home-page .home-first-image {
  min-height: 0;
  height: auto;
}
html#atlas-site body.home-page .home-application-carousel figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem .75rem;
  padding: .85rem 1rem;
}
html#atlas-site body.home-page .home-slide-caption { min-width: 0; }
html#atlas-site body.home-page .home-slide-link {
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}
html#atlas-site body.home-page .home-slide-description {
  grid-column: 1 / -1;
  max-width: none;
}
@media (max-width: 959px) {
  html#atlas-site body.home-page .home-first { grid-template-columns: minmax(0, 1fr); }
  html#atlas-site body.home-page main .home-first h1 {
    font-size: clamp(1.85rem, 4.75vw, 2.75rem) !important;
  }
  html#atlas-site body.home-page .home-first-image {
    height: auto;
    aspect-ratio: 3 / 2;
    min-height: 22rem;
  }
}
@media (min-width: 601px) and (max-width: 1366px) {
  html#atlas-site body.home-page .floating-contact-label { display: none; }
  html#atlas-site body.home-page .floating-contact-toggle {
    width: 48px; min-width: 48px; height: 48px; padding: 0;
  }
}

/* Industry heading uses the full section width rather than an 18ch column. */
html#atlas-site body.home-page main.home-rebuild > .home-industries {
  padding-block: clamp(2rem, 4vw, 3rem) !important;
}
html#atlas-site body.home-page .home-industries .home-section-heading {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  margin-bottom: 1.5rem;
}
html#atlas-site body.home-page main .home-industries #home-work-title {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  font-size: clamp(1.625rem, 2.4vw, 2.25rem) !important;
  font-size: clamp(1.625rem, 2.75cqi, 2.25rem) !important;
  line-height: 1.2 !important;
  white-space: normal;
}
html#atlas-site body.home-page main .home-industries .home-kicker {
  margin: 0 0 .75rem;
}

/* Non-phone hero leaves a glimpse of the next section below the masthead.
   Minimum height preserves natural content growth at zoom / short windows.
   Header offsets mirror the existing shell; no shell styles are changed. */
@media (min-width: 601px) {
  html#atlas-site body.home-page main .home-first {
    --home-masthead-height: 76px;
    min-height: calc(90vh - var(--home-masthead-height));
    min-height: calc(90svh - var(--home-masthead-height));
    min-height: calc(90dvh - var(--home-masthead-height));
  }
}
@media (min-width: 681px) and (max-width: 1180px) {
  html#atlas-site body.home-page main .home-first {
    --home-masthead-height: 72px;
  }
}
@media (min-width: 1181px) {
  html#atlas-site body.home-page main .home-first {
    --home-masthead-height: 82px;
  }
}

/* Stronger card labels carry the middle of the page across languages. */
html#atlas-site body.home-page main.home-rebuild .home-work-card-copy strong {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}
@media(max-width:600px) {
  html#atlas-site body.home-page main.home-rebuild .home-work-card-copy strong { font-size:15px; }
}

/* Frame both hero columns with breathing room, including above the photo. */
html#atlas-site body.home-page main.home-rebuild > .home-first {
  padding:clamp(20px,2.5vw,40px);
  gap:clamp(20px,2.5vw,40px);
}
html#atlas-site body.home-page main.home-rebuild .home-first-image { margin:0; }
@media(max-width:600px) {
  html#atlas-site body.home-page main.home-rebuild > .home-first { padding:20px;gap:20px; }
  html#atlas-site body.home-page main.home-rebuild .home-first-copy { padding:8px 0 0; }
}

@media(min-width:1024px){
html#atlas-site body.home-page main.home-rebuild > .home-first {gap:clamp(16px,2vw,28px)}
html#atlas-site body.home-page main.home-rebuild > .home-first > .home-first-copy {padding-left:clamp(48px,6.5vw,112px);padding-right:clamp(16px,1.5vw,24px)}
}
