@layer components {
  .preview-notice {
    position: sticky;
    z-index: 110;
    top: 0;
    padding: 10px 16px;
    background: #e5d4aa;
    color: #1b1711;
    font: 600 14px/1.4 system-ui, sans-serif;
    text-align: center;
  }

  .button {
    display: inline-grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
      background-color var(--duration-fast) var(--ease-standard),
      border-color var(--duration-fast) var(--ease-standard),
      color var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .button--booking {
    min-width: 118px;
    padding-inline: 20px;
    background: var(--gold-500);
    color: var(--ink-950);
  }

  .button--booking:hover {
    background: var(--gold-400);
    transform: translateY(-2px);
  }

  .site-header {
    position: fixed;
    z-index: 100;
    inset: 0 0 auto;
    top: var(--preview-notice-height, 40px);
    height: 92px;
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgb(9 8 6 / 0.58), transparent);
    transition:
      background-color var(--duration-medium) var(--ease-standard),
      border-color var(--duration-medium) var(--ease-standard),
      backdrop-filter var(--duration-medium) var(--ease-standard);
  }

  .site-header--scrolled,
  .site-header--menu-open {
    border-color: color-mix(in srgb, var(--gold-500) 18%, transparent);
    background: color-mix(in srgb, var(--ink-950) 91%, transparent);
    backdrop-filter: blur(14px);
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
    align-items: center;
    height: 100%;
    gap: clamp(20px, 3vw, 48px);
  }

  .wordmark {
    display: inline-flex;
    width: max-content;
    align-items: center;
    color: var(--cream-100);
    line-height: 1;
    text-decoration: none;
  }

  .wordmark__mark {
    position: relative;
    isolation: isolate;
    display: block;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
  }

  .wordmark__mark::before {
    position: absolute;
    z-index: -1;
    inset: -16px;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgb(238 227 209 / 0.18) 0%,
      rgb(212 172 103 / 0.12) 46%,
      transparent 76%
    );
    content: '';
    filter: blur(14px);
    pointer-events: none;
  }

  .wordmark__mark img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    filter: brightness(1.04) contrast(1.02) drop-shadow(0 0 7px rgb(212 172 103 / 0.14));
    object-fit: contain;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2.3vw, 36px);
  }

  .desktop-nav__link {
    position: relative;
    padding-block: 24px;
    color: var(--cream-300);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-standard);
  }

  .desktop-nav__link::after {
    position: absolute;
    right: 0;
    bottom: 17px;
    left: 0;
    height: 1px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--gold-500);
    content: '';
    transition: transform var(--duration-fast) var(--ease-standard);
  }

  .desktop-nav__link:hover,
  .desktop-nav__link:focus-visible {
    color: var(--cream-100);
  }

  .desktop-nav__link:hover::after,
  .desktop-nav__link:focus-visible::after {
    transform: scaleX(1);
  }

  .site-header__booking {
    justify-self: end;
  }

  .menu-trigger,
  .mobile-menu {
    display: none;
  }

  .hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(760px, 92svh, 880px);
    overflow: hidden;
    background: var(--ink-950);
  }

  [data-motion-layer] {
    --motion-x: 0px;
    --motion-y: 0px;
    --motion-scroll-y: 0px;
  }

  .hero__base,
  .hero__texture,
  .hero__illumination,
  .hero__grain,
  .hero__vignette,
  .hero__bottom-fade {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .hero__base {
    z-index: 0;
    background:
      linear-gradient(90deg, rgb(9 8 6 / 0.54), rgb(9 8 6 / 0.08) 48%, rgb(9 8 6 / 0.64)),
      linear-gradient(180deg, var(--brown-900), var(--ink-950));
  }

  .hero__texture {
    z-index: 1;
    inset: -18px;
    transform: translate3d(
        var(--motion-x),
        calc(var(--motion-y) + var(--motion-scroll-y)),
        0
      )
      scale(1.025);
    background-image: url('/06studio/assets/textures/wall-dark-01.webp');
    background-position: center 42%;
    background-size: cover;
    opacity: 0.92;
    transition: transform 240ms var(--ease-standard);
  }

  .hero__illumination {
    z-index: 2;
    transform: translate3d(
      var(--motion-x),
      calc(var(--motion-y) + var(--motion-scroll-y)),
      0
    );
    background:
      linear-gradient(90deg, rgb(9 8 6 / 0.36), transparent 24% 72%, rgb(9 8 6 / 0.52)),
      radial-gradient(ellipse at 50% 35%, rgb(212 172 103 / 0.2), transparent 38%),
      radial-gradient(circle at 91% 28%, rgb(128 96 46 / 0.18), transparent 29%),
      radial-gradient(circle at 10% 62%, rgb(74 51 32 / 0.36), transparent 34%);
  }

  .hero__grain {
    z-index: 3;
    background-image: url('/06studio/assets/textures/grain-01.png');
    background-repeat: repeat;
    background-size: 256px 256px;
    mix-blend-mode: soft-light;
    opacity: 0.2;
  }

  .hero__scene {
    position: relative;
    z-index: auto;
    min-height: inherit;
  }

  .hero__display {
    --hero-title-gap: clamp(112px, 8vw, 124px);
    --hero-title-x-adjust: 0px;
    --title-offset-x: 7px;
    --title-offset-y: 10px;
    position: absolute;
    z-index: 3;
    top: clamp(124px, 15svh, 145px);
    left: calc(49.5% + var(--hero-title-x-adjust));
    display: grid;
    width: min(100%, 1280px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: var(--hero-title-gap);
    margin: 0;
    transform: translateX(-50%);
    color: var(--cream-100);
    font-family: var(--font-display);
    font-size: clamp(144px, 18.5vw, 270px);
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.92;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .hero__display-line {
    display: block;
    padding: 0 0.07em 0.08em 0;
    overflow: visible;
  }

  .hero__display-stack {
    position: relative;
    display: block;
    font: inherit;
    transform: translateY(18%);
    opacity: 0;
    clip-path: inset(82% -0.18em -0.2em -0.18em);
    animation: hero-title-reveal var(--duration-reveal) var(--ease-out-editorial) both;
  }

  .hero__display-ink {
    display: block;
    font: inherit;
  }

  .hero__display-ink--offset {
    position: absolute;
    z-index: 0;
    inset: 0;
    transform: translate(var(--title-offset-x), var(--title-offset-y));
    color: rgb(8 6 4 / 0.94);
    -webkit-text-stroke: 1px rgb(195 151 76 / 0.14);
  }

  .hero__display-ink--main {
    position: relative;
    z-index: 1;
    color: var(--cream-100);
  }

  .hero__display-ink--main::after {
    position: absolute;
    inset: 0;
    background: url('/06studio/assets/textures/grain-01.png') repeat;
    background-size: 112px 112px;
    background-clip: text;
    color: transparent;
    content: attr(data-text);
    mix-blend-mode: multiply;
    opacity: 0.22;
    pointer-events: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero__display-line--number .hero__display-stack {
    animation-delay: 230ms;
  }

  .hero__display-line--number {
    justify-self: end;
  }

  .hero__display-line--studio .hero__display-stack {
    animation-delay: 150ms;
  }

  .hero__display-line--studio {
    justify-self: start;
  }

  .hero__display-line--number::after {
    content: none;
  }

  @media (min-width: 1121px) {
    .hero__display {
      --hero-title-number-x: clamp(-132px, -9.17vw, -103px);
    }

    .hero__display-line--number {
      transform: translateX(var(--hero-title-number-x));
    }
  }

  .hero__subject {
    position: absolute;
    z-index: 4;
    top: 18px;
    bottom: auto;
    left: 50%;
    height: clamp(660px, 86svh, 780px);
    aspect-ratio: 2 / 3;
    margin: 0;
    transform: translateX(-50%);
    filter: drop-shadow(0 32px 35px rgb(0 0 0 / 0.52));
    pointer-events: none;
  }

  .hero__subject-motion,
  .hero__subject picture {
    width: 100%;
    height: 100%;
  }

  .hero__subject-motion,
  .hero__motion-layer {
    transform: translate3d(
      var(--motion-x),
      calc(var(--motion-y) + var(--motion-scroll-y)),
      0
    );
    transition: transform 240ms var(--ease-standard);
  }

  .hero__subject img {
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: contain;
    transform: translateY(28px) scale(0.985);
    opacity: 0;
    animation: hero-subject-rise 780ms 300ms var(--ease-out-editorial) both;
  }

  .hero__decorative {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .hero__decorative--back {
    z-index: 2;
  }

  .hero__decorative--front {
    z-index: 5;
  }

  .hero__decorative-object {
    --decorative-x: var(--desktop-x);
    --decorative-y: var(--desktop-y);
    --decorative-width: var(--desktop-width);
    --decorative-rotation: var(--desktop-rotation);
    --decorative-scale: var(--desktop-scale);
    --decorative-opacity: var(--desktop-opacity);
    position: absolute;
    top: var(--decorative-y);
    left: var(--decorative-x);
    width: var(--decorative-width);
    aspect-ratio: var(--decorative-aspect);
    transform: rotate(var(--decorative-rotation)) scale(var(--decorative-scale));
    transform-origin: 50% 50%;
    opacity: 0;
    animation: hero-decorative-reveal 620ms var(--ease-out-editorial) both;
    animation-delay: var(--decorative-delay);
  }

  .hero__decorative-object picture,
  .hero__decorative-object img,
  .hero__motion-layer {
    display: block;
    width: 100%;
    height: 100%;
  }

  .hero__decorative-object img {
    max-width: none;
    object-fit: contain;
    filter: brightness(1.12) drop-shadow(0 20px 18px rgb(0 0 0 / 0.58));
  }

  .hero__decorative--back .hero__decorative-object img {
    filter: brightness(0.94) saturate(0.82) drop-shadow(0 18px 16px rgb(0 0 0 / 0.48));
  }

  .hero__decorative--front .hero__decorative-object img {
    filter: brightness(1.12) saturate(0.94) drop-shadow(0 22px 18px rgb(0 0 0 / 0.62));
  }

  .hero__support {
    position: absolute;
    z-index: 11;
    right: 0;
    bottom: 56px;
    left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: end;
    gap: 40px;
    opacity: 0;
    transform: translateY(18px);
    animation: hero-support-reveal 620ms var(--ease-out-editorial) both;
    animation-delay: 800ms;
  }

  .hero__microcopy {
    margin: 0;
  }

  .hero__microcopy {
    color: var(--cream-100);
    font-family: var(--font-ui);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-shadow: 0 2px 14px rgb(0 0 0 / 0.9);
    text-transform: uppercase;
  }

  .hero__microcopy span {
    margin-inline: 0.52em;
    color: var(--gold-400);
  }

  .hero__vignette {
    z-index: 9;
    background:
      linear-gradient(to bottom, rgb(9 8 6 / 0.22), transparent 18%),
      radial-gradient(ellipse at 50% 42%, transparent 38%, rgb(9 8 6 / 0.65) 100%);
  }

  .hero__bottom-fade {
    z-index: 10;
    top: 64%;
    background: linear-gradient(to bottom, transparent, rgb(9 8 6 / 0.28) 46%, var(--ink-950) 100%);
  }

  @keyframes hero-title-reveal {
    from {
      transform: translateY(18%);
      opacity: 0;
      clip-path: inset(82% -0.18em -0.2em -0.18em);
    }

    to {
      transform: translateY(0);
      opacity: 1;
      clip-path: inset(-0.12em -0.18em -0.2em -0.18em);
    }
  }

  @keyframes hero-subject-rise {
    to {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
  }

  @keyframes hero-decorative-reveal {
    from {
      opacity: 0;
    }

    to {
      opacity: var(--decorative-opacity);
    }
  }

  @keyframes hero-support-reveal {
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @media (max-width: 1120px) and (min-width: 768px) {
    .site-header__inner {
      grid-template-columns: 128px 1fr 112px;
      gap: 16px;
    }

    .desktop-nav {
      gap: 22px;
    }

    .desktop-nav__link {
      font-size: 0.7rem;
      letter-spacing: 0.1em;
    }

    .desktop-nav__link:nth-child(2) {
      display: none;
    }

    .button--booking {
      min-width: 106px;
      padding-inline: 12px;
    }

    .hero__display {
      --hero-title-gap: clamp(88px, 10vw, 112px);
      --hero-title-x-adjust: 0.5%;
      top: 158px;
      font-size: clamp(138px, 15vw, 168px);
    }

    .hero__subject {
      top: 44px;
      left: 50%;
    }

    .hero__decorative-object {
      --decorative-x: var(--tablet-x);
      --decorative-y: var(--tablet-y);
      --decorative-width: var(--tablet-width);
      --decorative-rotation: var(--tablet-rotation);
      --decorative-scale: var(--tablet-scale);
      --decorative-opacity: var(--tablet-opacity);
    }

    .hero__decorative-object[data-decorative-visibility='desktop'] {
      display: none;
    }
  }

  @media (max-width: 767px) {
    .site-header {
      height: 76px;
      background: linear-gradient(to bottom, rgb(9 8 6 / 0.72), transparent);
    }

    .site-header__inner {
      display: flex;
      justify-content: space-between;
      gap: 20px;
    }

    .wordmark__mark {
      width: 64px;
      height: 64px;
      flex-basis: 64px;
    }

    .desktop-nav,
    .site-header__booking {
      display: none;
    }

    .menu-trigger {
      display: inline-flex;
      min-width: 76px;
      min-height: 44px;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--cream-100);
      cursor: pointer;
    }

    .menu-trigger__label {
      font-family: var(--font-ui);
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .menu-trigger__icon {
      display: grid;
      width: 24px;
      gap: 6px;
    }

    .menu-trigger__icon i {
      display: block;
      width: 100%;
      height: 1px;
      background: var(--gold-400);
      transition: transform var(--duration-fast) var(--ease-standard);
    }

    .site-header--menu-open .menu-trigger__icon i:first-child {
      transform: translateY(3.5px) rotate(45deg);
    }

    .site-header--menu-open .menu-trigger__icon i:last-child {
      transform: translateY(-3.5px) rotate(-45deg);
    }

    .mobile-menu {
      position: fixed;
      z-index: -1;
      inset: 0;
      display: grid;
      min-height: calc(100svh - var(--preview-notice-height, 40px));
      grid-template-rows: auto 1fr;
      padding-top: max(64px, env(safe-area-inset-top));
      transform: translateY(-102%);
      visibility: hidden;
      background:
        linear-gradient(125deg, rgb(33 22 14 / 0.82), transparent 50%),
        var(--ink-950);
      opacity: 0;
      transition:
        transform 520ms var(--ease-out-editorial),
        opacity 380ms var(--ease-standard),
        visibility 0s 520ms;
    }

    .site-header--menu-open .mobile-menu {
      transform: translateY(0);
      visibility: visible;
      opacity: 1;
      transition:
        transform 520ms var(--ease-out-editorial),
        opacity 380ms var(--ease-standard),
        visibility 0s;
    }

    .mobile-menu__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 28px;
    }

    .mobile-menu__eyebrow,
    .mobile-menu__close {
      font-family: var(--font-ui);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.18em;
      text-transform: uppercase;
    }

    .mobile-menu__eyebrow {
      color: var(--gold-400);
    }

    .mobile-menu__close {
      min-height: 44px;
      padding: 0 0 0 20px;
      border: 0;
      background: transparent;
      color: var(--cream-100);
      cursor: pointer;
    }

    .mobile-menu__nav {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding-block: 24px;
    }

    .mobile-menu__link,
    .mobile-menu__booking {
      display: flex;
      min-height: 58px;
      align-items: center;
      border-bottom: 1px solid rgb(195 151 76 / 0.19);
      color: var(--cream-100);
      font-family: var(--font-display);
      font-size: clamp(2.25rem, 10vw, 3.25rem);
      font-weight: 900;
      letter-spacing: -0.035em;
      line-height: 1;
      text-decoration: none;
      text-transform: uppercase;
    }

    .mobile-menu__booking {
      justify-content: space-between;
      margin-top: 14px;
      border-bottom: 0;
      color: var(--gold-400);
    }

    .mobile-menu__booking span {
      font-family: var(--font-body);
      font-size: 1.5rem;
      font-weight: 400;
    }

    .menu-is-open {
      overflow: hidden;
    }

    .hero {
      min-height: clamp(720px, 100svh, 820px);
    }

    .hero__texture {
      background-position: 54% center;
      opacity: 0.96;
    }

    .hero__illumination {
      background:
        linear-gradient(90deg, rgb(9 8 6 / 0.28), transparent 42% 68%, rgb(9 8 6 / 0.42)),
        radial-gradient(ellipse at 56% 31%, rgb(212 172 103 / 0.2), transparent 38%),
        radial-gradient(circle at 97% 30%, rgb(128 96 46 / 0.18), transparent 31%);
    }

    .hero__grain {
      background-size: 220px 220px;
      opacity: 0.17;
    }

    .hero__display {
      --hero-title-gap: 24px;
      --hero-title-number-x: 35px;
      --hero-title-x-adjust: -2px;
      --title-offset-x: 4px;
      --title-offset-y: 6px;
      top: 112px;
      display: grid;
      width: 100%;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      column-gap: var(--hero-title-gap);
      align-items: start;
      justify-content: stretch;
      justify-items: stretch;
      row-gap: 0;
      font-size: clamp(112px, 35vw, 150px);
      line-height: 0.92;
      white-space: normal;
    }

    .hero__display-line--number {
      z-index: 1;
      justify-self: start;
      transform: translateX(var(--hero-title-number-x));
      color: var(--gold-400);
    }

    .hero__display-line--number::after {
      content: none;
    }

    .hero__display-line--studio {
      justify-self: end;
      margin-top: 0;
      font-size: 0.72em;
      letter-spacing: -0.045em;
    }

    .hero__subject {
      top: 86px;
      bottom: auto;
      left: 49%;
      width: min(108vw, 445px);
      height: auto;
      transform: translateX(-50%);
      filter: drop-shadow(0 26px 28px rgb(0 0 0 / 0.48));
    }

    .hero__subject img {
      width: 100%;
      height: auto;
    }

    .hero__decorative-object {
      --decorative-x: var(--mobile-x);
      --decorative-y: var(--mobile-y);
      --decorative-width: var(--mobile-width);
      --decorative-rotation: var(--mobile-rotation);
      --decorative-scale: var(--mobile-scale);
      --decorative-opacity: var(--mobile-opacity);
    }

    .hero__decorative-object:not([data-decorative-visibility='all']) {
      display: none;
    }

    .hero__decorative--front .hero__decorative-object img {
      filter: brightness(1.12) saturate(0.9) drop-shadow(0 12px 12px rgb(0 0 0 / 0.5));
    }

    .hero__support {
      right: 0;
      bottom: 24px;
      left: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }

    .hero__microcopy {
      font-size: 0.62rem;
      letter-spacing: 0.13em;
    }

    .hero__microcopy span {
      margin-inline: 0.32em;
    }

    .hero__vignette {
      background:
        linear-gradient(to bottom, rgb(9 8 6 / 0.22), transparent 16%),
        radial-gradient(ellipse at 55% 40%, transparent 35%, rgb(9 8 6 / 0.6) 100%);
    }

    .hero__bottom-fade {
      top: 57%;
      background: linear-gradient(to bottom, transparent, rgb(9 8 6 / 0.56) 40%, var(--ink-950) 100%);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero__texture,
    .hero__illumination,
    .hero__subject-motion,
    .hero__motion-layer {
      transition: none;
    }

    .hero__texture {
      transform: scale(1.025);
    }

    .hero__illumination,
    .hero__subject-motion,
    .hero__motion-layer {
      transform: none;
    }

    .hero__display-stack,
    .hero__subject img,
    .hero__support {
      transform: none;
      opacity: 1;
      animation: none;
    }

    .hero__display-stack {
      clip-path: none;
    }

    .hero__decorative-object {
      opacity: var(--decorative-opacity);
      animation: none;
    }
  }
}

@layer components {
  /* Frame the portrait at the requested height while keeping the title in front. */
  .hero {
    --preview-title-top: clamp(112px, 13svh, 125px);
    --preview-title-size: clamp(96px, 12vw, 180px);
  }

  /* Keep a centered opening for the portrait on larger screens. */
  .hero__display {
    left: 50%;
    display: grid;
    top: var(--preview-title-top);
    z-index: 5;
    width: min(100%, 960px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(160px, 16vw, 240px);
    font-size: var(--preview-title-size);
  }

  .hero__display-line {
    flex: 0 0 auto;
    padding-inline: 0.035em;
  }

  .hero__display-line--number {
    justify-self: start;
    transform: none;
  }

  .hero__display-line--studio {
    justify-self: end;
    font-size: 1em;
  }

  @media (min-width: 768px) {
    .hero__display-line--studio {
      transform: translateX(clamp(16px, 2vw, 30px));
    }
  }

  @media (max-width: 767px) {
    .hero {
      --preview-title-top: 112px;
      --preview-title-size: clamp(90px, 25vw, 110px);
    }

    .hero__display {
      display: flex;
      column-gap: 12px;
      justify-content: center;
      white-space: nowrap;
    }

    .hero__subject {
      top: calc(var(--preview-title-top) + var(--preview-title-size) - 16px);
    }
  }
}
