/* Final responsive editorial system.
   This file is loaded after style.css and owns layout only. */

:root {
  --editorial-gap: clamp(2rem, 2.8vw, 5rem);
  --editorial-row-gap: clamp(3.5rem, 5vw, 6.5rem);
  --editorial-safe-bottom: clamp(4rem, 6vw, 7rem);
}

html,
body {
  overflow-x: visible;
}

.hero,
.language__heading,
.study-grid,
.objects-space__grid,
.gallery-grid,
.enter__content,
.hero__copy,
.hero__visual,
.objects-space__copy,
.space-scene {
  min-width: 0;
}

/* Large desktop: 1600px+ */

.hero {
  grid-template-columns: minmax(35rem, 0.9fr) minmax(47.5rem, 1.1fr);
  gap: clamp(3.5rem, 5vw, 10rem);
  align-items: center;
  min-height: 100svh;
}

.hero__copy {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 56rem;
}

.hero__title {
  width: 100%;
  max-width: 12ch;
  font-size: clamp(7rem, 6.6vw, 11rem);
  line-height: 0.9;
}

.hero__title span {
  margin-left: clamp(0.5rem, 1.5vw, 2.75rem);
  white-space: nowrap;
}

.hero__intro {
  grid-template-columns: minmax(20rem, 31rem) minmax(15.5rem, 18rem);
  gap: clamp(2rem, 3vw, 4rem);
  width: 100%;
}

.hero__visual {
  z-index: 1;
  justify-self: end;
  width: clamp(47.5rem, 46vw, 75rem);
  max-width: 100%;
}

.image-placeholder--hero {
  width: 100%;
  min-height: clamp(43rem, 70vh, 64rem);
}

.language__heading {
  grid-template-columns: minmax(34rem, 1.18fr) minmax(23rem, 0.62fr);
  gap: clamp(4rem, 8vw, 10rem);
  align-items: end;
  padding-top: clamp(5rem, 7vw, 8.5rem);
  padding-bottom: clamp(6rem, 8vw, 9rem);
}

.visual-language .language__heading .section-title {
  max-width: 11.5ch;
  font-size: clamp(4.8rem, 6.6vw, 7.7rem);
  line-height: 0.92;
}

.visual-language .section-note {
  align-self: end;
  width: min(100%, 28rem);
  margin: 0;
  padding-left: clamp(1.25rem, 1.8vw, 2rem);
  font-size: clamp(1rem, 1.05vw, 1.2rem);
  line-height: 1.58;
}

.language__heading,
.study-grid,
.gallery__heading,
.gallery-grid {
  width: min(100%, 120rem);
  margin-inline: auto;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: var(--editorial-gap);
  row-gap: var(--editorial-row-gap);
  align-items: start;
  min-height: 0;
  padding-bottom: var(--editorial-safe-bottom);
}

.study--form {
  grid-row: 1 / span 2;
  grid-column: 1 / span 5;
  justify-self: start;
  align-self: center;
  width: min(88%, 38rem);
}

.study--texture {
  grid-row: 1;
  grid-column: 7 / -1;
  justify-self: end;
  width: min(100%, 49rem);
  margin-top: 0;
}

.study--space {
  grid-row: 2;
  grid-column: 7 / -1;
  justify-self: end;
  width: min(92%, 46rem);
  margin-top: 0;
}

.study--form .image-placeholder {
  aspect-ratio: 0.82;
}

.study--texture .image-placeholder {
  aspect-ratio: 1.38;
}

.study--space .image-placeholder {
  aspect-ratio: 1.18;
}

.objects-space__grid {
  grid-template-columns: minmax(25rem, 4.5fr) minmax(45rem, 7.5fr);
  gap: clamp(4rem, 7vw, 10rem);
  align-items: start;
}

.objects-space__copy {
  max-width: 40rem;
}

.space-scene {
  justify-self: end;
  width: min(100%, 66rem);
}

.image-placeholder--scene {
  min-height: clamp(44rem, 70vh, 64rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: var(--editorial-gap);
  row-gap: var(--editorial-row-gap);
  align-items: start;
}

.gallery-item--group {
  grid-row: 1 / span 2;
  grid-column: 1 / span 7;
  justify-self: start;
  align-self: center;
  width: min(100%, 58rem);
}

.gallery-item--atmosphere {
  grid-row: 1;
  grid-column: 9 / -1;
  justify-self: end;
  align-self: start;
  width: min(100%, 38rem);
  max-width: 31rem;
  margin-top: 0;
}

.gallery-item--glimpse {
  grid-row: 2;
  grid-column: 8 / -1;
  justify-self: end;
  width: min(100%, 46rem);
  margin-top: 0;
}

.gallery-item--group .image-placeholder {
  aspect-ratio: 1.32;
}

.gallery-item--atmosphere .image-placeholder {
  aspect-ratio: 0.78;
}

.gallery-item--glimpse .image-placeholder {
  aspect-ratio: 1.34;
}

.gallery__closing {
  max-width: 15ch;
  margin-top: clamp(5rem, 7vw, 8rem);
  margin-right: clamp(2rem, 8vw, 12rem);
}

.enter__content {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--editorial-gap);
}

.enter__title {
  grid-column: 1 / span 7;
}

.enter__action {
  grid-column: 9 / -1;
  min-width: 0;
}

/* Standard desktop: 1440px–1599px */

@media (max-width: 1599px) {
  .hero {
    grid-template-columns: minmax(32rem, 0.92fr) minmax(40rem, 1.08fr);
    gap: clamp(3rem, 4vw, 4.5rem);
  }

  .hero__copy {
    max-width: 38rem;
  }

  .hero__title {
    max-width: 10.8ch;
    font-size: clamp(5.8rem, 6.5vw, 7rem);
  }

  .hero__title span {
    margin-left: clamp(0.4rem, 1vw, 1rem);
    white-space: normal;
  }

  .hero__intro {
    grid-template-columns: 1fr;
    width: min(100%, 31rem);
  }

  .hero__visual {
    width: min(100%, 50rem);
    transform: none;
  }

  .image-placeholder--hero {
    min-height: clamp(34rem, 66vh, 44rem);
  }

  .study--form {
    grid-column: 1 / span 5;
  }

  .study--texture {
    grid-column: 7 / -1;
    margin-top: 0;
  }

  .study--space {
    grid-column: 7 / -1;
  }

  .objects-space__grid {
    grid-template-columns: minmax(21rem, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(3rem, 5vw, 5.5rem);
  }

  .image-placeholder--scene {
    min-height: clamp(35rem, 66vh, 47rem);
  }

  .gallery-item--group {
    grid-column: 1 / span 7;
  }

  .gallery-item--atmosphere {
    grid-column: 9 / -1;
    margin-top: 0;
  }

  .gallery-item--glimpse {
    grid-column: 8 / -1;
  }

  .gallery__closing {
    margin-right: clamp(1rem, 4vw, 5rem);
  }
}

/* Laptop-safe: 1280px–1439px */

@media (max-width: 1439px) {
  :root {
    --editorial-gap: clamp(1.5rem, 2.4vw, 2.5rem);
    --editorial-row-gap: clamp(3.5rem, 5vw, 5rem);
  }

  .hero {
    grid-template-columns: minmax(29rem, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2.25rem, 3.2vw, 3.25rem);
    min-height: max(100svh, 45rem);
    padding-top: clamp(8.5rem, 12vh, 9.5rem);
  }

  .hero__copy {
    max-width: 32rem;
  }

  .hero__title {
    max-width: 9.6ch;
    font-size: clamp(4.8rem, 6.1vw, 5.75rem);
    line-height: 0.92;
  }

  .hero__visual {
    width: min(100%, 43rem);
    transform: none;
  }

  .image-placeholder--hero {
    min-height: clamp(30rem, 64vh, 39rem);
  }

  .language__heading {
    grid-template-columns: minmax(30rem, 1.1fr) minmax(19rem, 0.7fr);
    gap: clamp(3rem, 5vw, 5rem);
  }

  .study--form {
    grid-column: 1 / span 5;
  }

  .study--texture {
    grid-column: 7 / -1;
    margin-top: 0;
  }

  .study--space {
    grid-column: 7 / -1;
  }

  .objects-space__grid {
    grid-template-columns: minmax(19rem, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(2.5rem, 4vw, 4rem);
    padding-top: clamp(4rem, 7vw, 6rem);
  }

  .space-list {
    margin-top: clamp(3rem, 5vw, 4.5rem);
  }

  .image-placeholder--scene {
    min-height: clamp(31rem, 65vh, 41rem);
  }

  .gallery-item--group {
    grid-column: 1 / span 7;
  }

  .gallery-item--atmosphere {
    grid-column: 9 / -1;
    margin-top: 0;
  }

  .gallery-item--glimpse {
    grid-column: 8 / -1;
  }

  .enter__title {
    grid-column: 1 / span 7;
    font-size: clamp(5rem, 8vw, 7rem);
  }

  .enter__action {
    grid-column: 9 / -1;
  }
}

/* Compact desktop/tablet: 1024px–1279px */

@media (max-width: 1279px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 4rem;
    min-height: 0;
    padding-top: 8.5rem;
  }

  .hero__copy {
    width: min(100%, 45rem);
    max-width: 45rem;
  }

  .hero__title {
    max-width: 10.5ch;
    font-size: clamp(5rem, 9vw, 6.75rem);
  }

  .hero__visual {
    justify-self: stretch;
    width: 100%;
    max-width: none;
    transform: none;
  }

  .image-placeholder--hero {
    min-height: clamp(34rem, 62vw, 46rem);
  }

  .language__heading {
    grid-template-columns: minmax(27rem, 1.05fr) minmax(18rem, 0.8fr);
    gap: 3rem;
  }

  .study--form {
    grid-column: 1 / span 6;
  }

  .study--texture {
    grid-column: 7 / -1;
    margin-top: 0;
  }

  .study--space {
    grid-column: 7 / -1;
  }

  .objects-space__grid {
    grid-template-columns: 1fr;
    gap: 5rem;
  }

  .objects-space__copy {
    display: grid;
    grid-template-columns: minmax(16rem, 0.8fr) minmax(22rem, 1.2fr);
    gap: 4rem;
    align-items: end;
    max-width: none;
  }

  .space-list {
    margin-top: 0;
  }

  .space-scene {
    position: relative;
    top: auto;
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }

  .image-placeholder--scene {
    min-height: clamp(36rem, 62vw, 46rem);
  }

  .gallery-item--group {
    grid-column: 1 / span 7;
  }

  .gallery-item--atmosphere {
    grid-row: 1;
    grid-column: 8 / -1;
    align-self: start;
    margin-top: 0;
  }

  .gallery-item--glimpse {
    grid-row: 2;
    grid-column: 8 / -1;
  }

  .enter__title {
    grid-column: 1 / span 7;
    font-size: clamp(4.6rem, 9vw, 6.5rem);
  }

  .enter__action {
    grid-column: 8 / -1;
  }
}

/* Mobile: below 768px */

@media (max-width: 768px) {
  .hero,
  .language__heading,
  .objects-space__grid,
  .enter__content {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 3.25rem;
    padding-top: 7.5rem;
  }

  .hero__copy {
    width: 100%;
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(3.2rem, 15vw, 4.9rem);
  }

  .hero__visual,
  .image-placeholder--hero {
    min-height: 34rem;
  }

  .language__heading {
    gap: 2rem;
    align-items: start;
  }

  .visual-language .language__heading .section-title {
    max-width: 100%;
    font-size: clamp(3.15rem, 14vw, 4.8rem);
  }

  .visual-language .section-note {
    width: 100%;
    max-width: 30rem;
    margin: 0;
    font-size: 1rem;
  }

  .study-grid,
  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-bottom: 0;
  }

  .study,
  .gallery-item,
  .study--texture,
  .study--space,
  .gallery-item--atmosphere,
  .gallery-item--glimpse {
    width: 100%;
    margin: 0;
  }

  .study .image-placeholder,
  .study--texture .image-placeholder,
  .study--space .image-placeholder,
  .gallery-item--group .image-placeholder,
  .gallery-item--atmosphere .image-placeholder,
  .gallery-item--glimpse .image-placeholder {
    min-height: 0;
  }

  .study--form .image-placeholder {
    aspect-ratio: 0.88;
  }

  .study--texture .image-placeholder,
  .study--space .image-placeholder,
  .gallery-item--group .image-placeholder,
  .gallery-item--glimpse .image-placeholder {
    aspect-ratio: 1.1;
  }

  .gallery-item--atmosphere .image-placeholder {
    aspect-ratio: 0.82;
  }

  .objects-space__copy {
    display: block;
  }

  .space-list {
    margin-top: 4rem;
  }

  .image-placeholder--scene {
    min-height: 38rem;
  }

  .gallery__closing {
    margin-right: 0;
  }

  .enter__title,
  .enter__action {
    grid-column: auto;
  }
}

/* Horizontal editorial strips: remove triangular three-point compositions. */
@media (min-width: 769px) {
  .study-grid {
    grid-template-columns:
      minmax(0, 0.78fr)
      minmax(0, 1.18fr)
      minmax(0, 1.04fr);
    grid-template-rows: auto;
    align-items: center;
    column-gap: clamp(2rem, 3.5vw, 5rem);
  }

  .study--form,
  .study--texture,
  .study--space {
    grid-row: 1;
    align-self: center;
    margin: 0;
  }

  .study .image-placeholder,
  .gallery-item .image-placeholder {
    width: 100%;
    min-height: 0;
  }

  .study--form {
    grid-column: 1;
    justify-self: start;
    width: min(92%, 35rem);
  }

  .study--texture {
    grid-column: 2;
    justify-self: center;
    width: 100%;
  }

  .study--space {
    grid-column: 3;
    justify-self: end;
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns:
      minmax(0, 1.2fr)
      minmax(0, 0.72fr)
      minmax(0, 1.08fr);
    grid-template-rows: auto;
    align-items: center;
    column-gap: clamp(2rem, 3.5vw, 5rem);
  }

  .gallery-item--group,
  .gallery-item--atmosphere,
  .gallery-item--glimpse {
    grid-row: 1;
    align-self: center;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .gallery-item--group {
    grid-column: 1;
    justify-self: start;
  }

  .gallery-item--atmosphere {
    grid-column: 2;
    justify-self: center;
  }

  .gallery-item--glimpse {
    grid-column: 3;
    justify-self: end;
  }

  .gallery__closing-row {
    display: grid;
    grid-template-columns:
      minmax(0, 1.2fr)
      minmax(0, 0.72fr)
      minmax(0, 1.08fr);
    column-gap: clamp(2rem, 3.5vw, 5rem);
    width: min(100%, 120rem);
    margin: clamp(2.75rem, 4vw, 4.5rem) auto 0;
  }

  .gallery__closing {
    grid-column: 2 / -1;
    justify-self: start;
    width: 100%;
    max-width: 34ch;
    margin: 0;
    padding-top: 1.35rem;
    font-size: clamp(1.65rem, 2.15vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
  }

  .gallery__closing span {
    display: block;
  }

  .gallery__closing::before {
    width: clamp(2.5rem, 3vw, 3.5rem);
  }
}

@media (min-width: 769px) and (max-width: 1279px) {
  .enter__orb {
    right: 0;
    width: min(60vw, 38rem);
  }
}

@media (max-width: 768px) {
  .gallery__closing-row {
    width: 100%;
    margin-top: 3rem;
  }

  .gallery__closing {
    width: 100%;
    max-width: 22ch;
    margin: 0;
    padding-top: 1.25rem;
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .gallery__closing span {
    display: inline;
  }

  .gallery__closing span + span::before {
    content: " ";
  }
}
