:root {
  --content-max: 90rem;
  --page-gutter: clamp(1rem, 3vw, 2.5rem);
  --layout-gap: clamp(1.75rem, 5vw, 5.625rem);
  --touch-target: 2.75rem;
  --page: min(var(--content-max), calc(100vw - (2 * var(--page-gutter))));
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
}

.header__logo,
.header__cta,
.header__menu-button,
.menu-close,
.menu-link,
.project__visual,
.social-links a,
.contact__mail {
  min-height: var(--touch-target);
}

.project__visual,
.project__content,
.about__content,
.contact > * {
  min-width: 0;
}

@media (max-width: 60rem) {
  .hero {
    min-height: 100svh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(18rem, 1fr) auto;
    align-content: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
  }

  .hero__content {
    max-width: 52rem;
    transform: none;
  }

  .hero__visual {
    min-height: clamp(20rem, 44vh, 31rem);
    margin-left: 0;
    margin-top: clamp(-5rem, -8vw, -2rem);
  }

  .hero__action {
    padding-top: 0;
  }

  .hero__line-canvas {
    touch-action: pan-y;
  }

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

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

  .project--right .project__visual {
    order: 0;
  }

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

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

  .capability {
    min-height: auto;
  }

  .contact__links {
    justify-content: flex-start;
  }

  .about:not(:has(.about__portrait)) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 42.5rem) {
  :root {
    --page-gutter: 0.9375rem;
    --section-space: clamp(4.5rem, 18vw, 7rem);
    --header-height: clamp(3.875rem, 12vw, 4.5rem);
  }

  .header__logo img {
    max-width: clamp(4.75rem, 24vw, 6.5rem);
    max-height: 2.75rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header__cta {
    min-width: 6.75rem;
    height: 2.75rem;
    padding-inline: 1rem;
    font-size: 0.8rem;
  }

  .header__menu-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .menu-nav {
    padding-top: calc(var(--header-height) + 3rem);
  }

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--header-height) + 2.25rem);
    padding-bottom: 2rem;
    gap: 0.5rem;
  }

  .hero__title {
    width: auto;
    max-width: 100%;
    font-size: clamp(2.5rem, 10.8vw, 4.5rem);
  }

  .hero__title-line {
    width: auto;
    max-width: 100%;
    column-gap: 0.12em;
    white-space: normal;
  }

  .hero__title-line--two {
    margin-left: 0;
  }

  .hero__visual {
    min-height: clamp(15rem, 34svh, 22rem);
    margin-top: -2rem;
  }

  .hero__button {
    min-width: 8.75rem;
  }

  .photo-wall__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 9rem;
  }

  .photo-wall__item {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .photo-wall__item:nth-child(1),
  .photo-wall__item:nth-child(4) {
    grid-row: span 2 !important;
  }

  .statement-line__text {
    padding-block: 0.75rem 1rem;
    font-size: clamp(2.45rem, 14vw, 4.4rem);
  }

  .project__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.375rem;
  }

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

  .process-card {
    min-height: auto;
    padding: 1.375rem 0 2.625rem;
  }

  .process-card > span {
    margin-bottom: 2.625rem;
  }

  .contact__mail {
    font-size: clamp(1.1rem, 6vw, 1.65rem);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .project__open {
    display: inline-flex;
    opacity: 1;
    transform: none;
  }

  .project__visual:hover img {
    transform: none;
  }

  .button-content--next,
  .menu-lines--next {
    display: none;
  }

  .header__cta:hover .button-content--current,
  .header__menu-button:hover .menu-lines--current {
    transform: none;
  }
}

@media (orientation: landscape) and (max-height: 32rem) {
  .hero {
    min-height: 36rem;
  }
}


@media (prefers-reduced-motion: reduce) {
  .hero__line-canvas {
    transition: none;
  }
}


/* Refined hero composition */
@media (max-width: 60rem) {
  .hero__content {
    padding-top: clamp(6.5rem, 13vh, 8.5rem);
  }

  .hero__visual {
    margin-top: -4rem;
  }

  .hero__action {
    bottom: clamp(5rem, 12vh, 8rem);
  }
}

@media (max-width: 42.5rem) {
  .hero__content {
    padding-top: clamp(5.75rem, 12vh, 7rem);
  }

  .hero__title {
    width: 100%;
    max-width: 100%;
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero__title-line {
    width: auto;
    max-width: 100%;
    white-space: normal;
  }

  .hero__title-line--two,
  .hero__title-line--three,
  .hero__title-line--four {
    margin-left: 0;
  }

  .hero__visual {
    margin-top: -6rem;
  }

  .hero__action {
    bottom: 4rem;
  }
}

/* July design update — responsive */
@media (max-width: 72rem) {
  .hero__content {
    width: 59%;
  }

  .hero__title {
    font-size: clamp(3.7rem, 7.4vw, 6.3rem);
  }

  .hero__visual {
    width: 60vw;
    right: -9vw;
  }

  .hero__action {
    left: 58%;
  }
}

@media (max-width: 60rem) {
  .header__logo {
    width: clamp(6.25rem, 17vw, 8rem);
  }

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--header-height) + 2rem);
  }

  .hero__content {
    width: 72%;
    padding-top: clamp(5.5rem, 12vh, 8rem);
  }

  .hero__title {
    font-size: clamp(3.25rem, 9vw, 5.4rem);
  }

  .hero__title-line--two,
  .hero__title-line--four {
    margin-left: clamp(2rem, 7vw, 4.25rem);
  }

  .hero__visual {
    top: 15%;
    right: -18%;
    width: 77vw;
    height: 67%;
    min-height: 25rem;
  }

  .hero__action {
    left: 61%;
    top: 76%;
  }

  .menu__line-field {
    width: 88vw;
    right: -24vw;
  }
}

@media (max-width: 44rem) {
  .hero {
    overflow: hidden;
  }

  .hero__content {
    width: 100%;
    padding-top: clamp(5rem, 11vh, 7rem);
  }

  .hero__title {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
    line-height: 0.9;
  }

  .hero__title-line {
    white-space: normal;
    width: auto;
  }

  .hero__title-line--two,
  .hero__title-line--three,
  .hero__title-line--four {
    margin-left: 0;
  }

  .hero__visual {
    top: 37%;
    right: -24%;
    width: 112vw;
    height: 49%;
    min-height: 19rem;
  }

  .hero__action {
    left: 50%;
    top: 82%;
  }

  .menu__line-field {
    top: 18%;
    right: -42%;
    width: 138vw;
    height: 72%;
  }

  .project:nth-child(odd) .project__visual,
  .project:nth-child(even) .project__visual {
    border-radius: 2.25rem;
  }
}

/* Header, hero and about refinement */
@media (max-width: 60rem) {
  .header__logo {
    width: clamp(4.75rem, 11vw, 6rem);
  }

  .hero__content {
    width: 76%;
  }

  .hero__visual {
    top: 29%;
    right: -18%;
    width: 82vw;
    height: 58%;
  }

  .hero__action {
    left: 62%;
    top: 78%;
  }

  .about {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.75fr);
    gap: clamp(2rem, 5vw, 4rem);
  }
}

@media (max-width: 44rem) {
  .header__name {
    max-width: 5.4rem;
    font-size: 0.82rem;
    line-height: 1.05;
  }

  .header__logo {
    width: 4.4rem;
    height: 2.8rem;
  }

  .hero__content {
    width: 100%;
    padding-top: clamp(4.5rem, 10vh, 6rem);
  }

  .hero__visual {
    top: 40%;
    right: -27%;
    width: 116vw;
    height: 46%;
  }

  .hero__action {
    left: 50%;
    top: 83%;
  }

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

  .about__portrait,
  .about__content {
    order: initial;
  }

  .about__portrait img {
    border-radius: 0 0 2.5rem 0;
  }
}

/* Latest update */
@media (max-width: 44rem) {
  .header__name {
    font-size: 0.82rem;
  }

  .header__logo {
    width: clamp(4.3rem, 18vw, 5.25rem);
  }

  .hero__visual {
    top: 39%;
  }

  .contact__portrait {
    width: 4.5rem;
    height: 4.5rem;
  }
}

/* V4 responsive refinements */
@media (max-width: 60rem) {
  .contact__links {
    align-items: center;
    justify-content: center;
  }

  .contact__portrait {
    width: min(72vw, 21rem);
  }
}

@media (max-width: 42.5rem) {
  .photo-wall__item--7 {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .project__visual img {
    filter: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .project__open {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
  }

  .project__visual:hover img {
    filter: none;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .write-on-heading,
  .write-on-heading.is-written {
    clip-path: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* V5 responsive refinements */
@media (max-width: 60rem) {
  .contact__portrait {
    width: min(60vw, 18rem);
    transform: translateX(-5%);
  }
}

@media (max-width: 42.5rem) {
  .hero__small-word {
    font-size: 0.58em;
  }

  .contact__portrait {
    width: min(72vw, 16rem);
    transform: none;
  }

  .project__open {
    min-height: 3rem;
    padding: 0.82rem 1.25rem;
    font-size: 1rem;
  }
}


/* V6 cleanup */
.header__name { display: none !important; }
.photo-wall__item--7 { display: none !important; }

/* V7 mobile refinements */
@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(16rem, 1fr);
  }

  .hero__prompt {
    top: auto;
    right: clamp(0.5rem, 4vw, 2rem);
    bottom: clamp(6rem, 14vh, 10rem);
    width: min(7ch, 46vw);
    transform: none;
  }
}

@media (max-width: 42.5rem) {
  .header__brand {
    max-width: 8.25rem;
    font-size: 0.76rem;
    line-height: 1.05;
    white-space: normal;
  }

  .header__logo img {
    max-width: clamp(3.8rem, 17vw, 5.25rem);
  }

  .header__cta {
    min-width: 5.9rem;
    padding-inline: 0.8rem;
    font-size: 0.72rem;
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(2.55rem, 10.4vw, 4.35rem);
  }

  .hero__title-line {
    white-space: normal;
  }

  .hero__title-line--indent {
    margin-left: clamp(1rem, 7vw, 2.25rem);
  }

  .hero__prompt {
    right: 0;
    bottom: clamp(3.5rem, 10vh, 6rem);
    font-size: clamp(2.75rem, 13vw, 4.75rem);
  }
}

@media (max-width: 60rem) {
  .project-story,
  .project-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-gallery figure,
  .project-gallery__wide,
  .project-result figure {
    min-height: clamp(20rem, 55vw, 34rem) !important;
  }
}

@media (max-width: 42.5rem) {
  .project-hero {
    padding-top: 3.5rem;
  }

  .project-hero h1 {
    font-size: clamp(3.2rem, 16vw, 5.6rem);
  }

  .project-hero__image {
    height: 62svh;
  }

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

  .project-gallery__wide {
    grid-column: auto;
  }

  .project-next a {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-next strong {
    text-align: left;
  }
}

/* V8 responsive refinements */
@media (max-width: 60rem) {
  .hero__prompt {
    right: clamp(0.75rem, 4vw, 2rem);
    top: 30%;
  }
}

@media (max-width: 42.5rem) {
  .hero__small-word {
    font-size: 0.62em;
    vertical-align: 0.1em;
  }

  .hero__prompt {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    margin: -1rem 0 0 auto;
    font-size: clamp(2.6rem, 13vw, 4.5rem);
    transform: none;
  }

  .hero__prompt-arrow {
    position: relative;
    top: auto;
    right: auto;
    margin: 1rem 0 0 auto;
  }

  .project-hero h1 {
    max-width: none;
    font-size: clamp(2.8rem, 13vw, 4.8rem);
  }

  .project-story,
  .project-result {
    grid-template-columns: 1fr;
  }

  .project-story__copy h2,
  .project-result h2 {
    max-width: none;
    font-size: clamp(2.1rem, 10vw, 3.5rem);
  }

  .project-next {
    flex-direction: column;
  }

  .project-next__button {
    width: 100%;
  }
}

/* V9 responsive refinements */
@media (max-width: 60rem) {
  .menu-list {
    width: min(38rem, 62vw);
  }

  .menu__line-field {
    left: -18%;
    width: 78vw;
  }
}

@media (max-width: 42.5rem) {
  .menu-list {
    width: 100%;
  }

  .menu__line-field {
    left: -40%;
    width: 110vw;
    opacity: 0.55;
  }

  .project-result,
  .project-result figure {
    min-height: clamp(28rem, 120vw, 38rem) !important;
  }

  .project-result__copy {
    width: calc(100% - 2rem);
    margin: 1rem;
  }
}
