/* =========================================================
   YAKISOBA
   MAIN STYLES
========================================================= */

:root {
  --bg: #f0eee8;
  --paper: #f7f5ef;
  --ink: #0d0d0d;
  --muted: #77736d;
  --line: rgba(13, 13, 13, 0.18);

  --acid: #ff5a36;
  --dark: #090909;
  --white: #f7f5ef;

  --pad: clamp(20px, 3.4vw, 58px);
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /*
    Lenis가 smooth scroll을 담당하므로
    native smooth scroll은 사용하지 않습니다.
  */
  scroll-behavior: auto;
}

body {
  margin: 0;

  background: var(--bg);
  color: var(--ink);

  font-family:
    Arial,
    "Noto Sans KR",
    sans-serif;

  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
  position: fixed;

  top: 0;
  left: 0;
  right: 0;

  z-index: 80;

  height: 72px;

  display: flex;
  align-items: center;

  padding: 0 var(--pad);

  color: #fff;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.2);

  transition:
    height 0.3s,
    background 0.3s,
    backdrop-filter 0.3s;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.28),
      transparent
    );
}

.site-header.scrolled {
  height: 62px;

  background:
    rgba(9, 9, 9, 0.91);

  backdrop-filter:
    blur(14px);
}

.brand {
  font-size: 21px;
  font-weight: 950;

  letter-spacing: -0.07em;
}

.desktop-nav {
  margin-left: auto;

  display: flex;
  gap: 28px;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.12em;
}

.desktop-nav a {
  position: relative;
}

.desktop-nav a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 100%;

  bottom: -6px;

  height: 1px;

  background: #fff;

  transition: 0.2s;
}

.desktop-nav a:hover::after {
  right: 0;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.menu-button {
  display: none;

  margin-left: auto;

  width: 44px;
  height: 44px;

  border: 0;

  background: transparent;

  padding: 10px;
}

.menu-button span {
  display: block;

  height: 1px;

  margin: 6px 0;

  background: #fff;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
  position: fixed;

  z-index: 70;

  inset: 0;

  padding:
    110px
    var(--pad)
    40px;

  display: flex;
  flex-direction: column;

  gap: 10px;

  background: #090909;
  color: #fff;

  transform:
    translateY(-102%);

  transition:
    0.45s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-menu.open {
  transform: none;
}

.mobile-menu a {
  padding: 12px 0;

  border-bottom:
    1px solid #333;

  font-size:
    clamp(42px, 13vw, 74px);

  font-weight: 950;

  line-height: 0.95;

  letter-spacing: -0.07em;
}


/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;

  height: 100svh;
  min-height: 620px;

  overflow: hidden;

  background: #111;
  color: #fff;
}

.hero-video {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.hero-shade {
  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.22),
      rgba(0, 0, 0, 0.05) 45%,
      rgba(0, 0, 0, 0.55)
    );
}

.hero-noise {
  position: absolute;

  inset: 0;

  opacity: 0.08;

  pointer-events: none;

  background-image:
    url(
      "data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"
    );
}

.hero-copy {
  position: absolute;

  inset:
    auto
    var(--pad)
    58px;
}

.eyebrow,
.section-no {
  margin: 0;

  font-size: 9px;
  font-weight: 900;

  letter-spacing: 0.18em;
}

.light {
  color:
    rgba(255, 255, 255, 0.75);
}

.hero .eyebrow {
  margin-bottom: 20px;
}

.hero-bottom {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;

  padding-top: 16px;

  border-top:
    1px solid rgba(255, 255, 255, 0.4);
}

.hero-bottom p {
  margin: 0;

  font-size: 10px;

  line-height: 1.7;

  letter-spacing: 0.08em;
}

.hero-arrow {
  font-size: 40px;
  line-height: 1;
}

.hero-meta {
  position: absolute;

  top: 92px;
  right: var(--pad);

  display: flex;

  gap: 24px;

  font-size: 8px;

  letter-spacing: 0.14em;
}


/* =========================================================
   COMMON SECTION
========================================================= */

.section-pad {
  padding:
    clamp(80px, 10vw, 160px)
    var(--pad);
}


/* =========================================================
   INTRO
========================================================= */

.intro {
  border-bottom:
    1px solid var(--line);
}

.intro-grid {
  display: grid;

  grid-template-columns:
    1.2fr 0.8fr;

  gap: 7vw;

  align-items: end;

  margin-top: 50px;
}

.intro h2,
.section-head h2,
.work-heading h2,
.contact-title h2 {
  margin: 0;

  font-size:
    clamp(58px, 9vw, 150px);

  line-height: 0.78;

  letter-spacing: -0.085em;
}

.intro h2 em {
  font-style: normal;

  color: var(--acid);
}

.intro-copy {
  max-width: 580px;
}

.intro-copy p {
  font-size:
    clamp(18px, 2vw, 30px);

  line-height: 1.3;

  letter-spacing: -0.03em;
}

.intro-copy .muted {
  max-width: 420px;

  margin-top: 30px;

  font-size: 12px;

  line-height: 1.7;

  color: var(--muted);
}


/* =========================================================
   SELECTED WORK
========================================================= */

.selected-work {
  position: relative;

  background: var(--dark);
  color: var(--white);

  overflow: hidden;
}

.work-heading {
  display: grid;

  grid-template-columns:
    1fr minmax(220px, 32vw);

  gap: 50px;

  align-items: end;

  padding-bottom: 70px;
}

.work-heading h2 {
  margin-top: 26px;
}

.work-note {
  max-width: 400px;

  margin:
    0
    0
    6px;

  font-size: 11px;

  line-height: 1.7;

  color: #aaa;
}


/* =========================================================
   CODROPS VARIATION 1
   GALLERY SHELL
========================================================= */

.rotation-gallery-shell {
  position: relative;

  width: 100%;

  /*
    이전 버전의 8vh / 14vh padding 제거.
    원본은 gallery 자체의 margin으로 공간을 만듭니다.
  */
  padding: 0;

  overflow: hidden;
}


/* =========================================================
   CODROPS VARIATION 1
   GALLERY

   Original:
   margin-top: 25vh
   margin-bottom: 35vh
========================================================= */

.rotation-gallery {
  position: relative;

  display: flex;
  flex-direction: column;

  align-items: center;

  /*
    원본에는 별도의 gap이 없습니다.
    wrapper의 negative margin이
    이미지 간격을 결정합니다.
  */
  gap: 0;

  /*
    중요:
    perspective를 gallery 전체에 두지 않습니다.
    각 wrapper에 개별 perspective를 줍니다.
  */
  perspective: none;

  transform-style:
    preserve-3d;

  margin-top: 25vh;
  margin-bottom: 35vh;

  padding: 0;

  min-height: 0;
}

.gallery-loading {
  width: 100%;
  height: 50vh;

  display: grid;
  place-items: center;

  font-size: 10px;

  letter-spacing: 0.18em;

  color: #777;
}


/* =========================================================
   CODROPS VARIATION 1
   ITEM WRAPPER

   Original Demo 1:
   width:100%
   max-width:600px
   perspective:900px
   margin-bottom:-5rem
========================================================= */

.gallery-item-wrap {
  width: 100%;
  max-width: 600px;

  perspective: 900px;

  margin-bottom: -5rem;

  position: relative;

  will-change: transform;
}


/* =========================================================
   CODROPS VARIATION 1
   ITEM

   Original Demo 1:
   aspect-ratio:14/9
========================================================= */

.gallery-item {
  position: relative;

  width: 100%;

  aspect-ratio: 14 / 9;

  background-color: #1c1c1c;

  background-position: center;

  background-size: cover;

  background-repeat: no-repeat;

  transform-style:
    preserve-3d;

  will-change:
    transform,
    filter;

  /*
    원본 Variation 1에는
    border-radius가 없습니다.
  */
  border-radius: 0;

  /*
    원본 데모 느낌을 방해하는
    강한 shadow를 제거합니다.
  */
  box-shadow: none;
}


/* =========================================================
   IMAGE BORDER
========================================================= */

.gallery-item::after {
  content: "";

  position: absolute;

  inset: 0;

  border:
    1px solid rgba(255, 255, 255, 0.12);

  pointer-events: none;
}


/* =========================================================
   CAPTION
   YAKISOBA 기능은 유지
========================================================= */

.gallery-caption {
  position: absolute;

  left: 0;
  right: 0;

  bottom: -28px;

  display: flex;

  justify-content: space-between;

  gap: 20px;

  font-size: 8px;

  letter-spacing: 0.16em;

  color: #8d8d8d;

  text-transform: uppercase;

  pointer-events: none;
}


/* =========================================================
   MARQUEE
========================================================= */

.gallery-marquee {
  position: fixed;

  left: 0;
  right: 0;

  top: 50vh;

  z-index: 100;

  width: 100vw;

  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  mix-blend-mode: plus-lighter;

  transform:
    translateY(-50%);

  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.gallery-marquee.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-marquee-inner {
  position: relative;

  width: max-content;

  white-space: nowrap;

  font-size:
    clamp(2rem, 16vw, 8rem);

  font-weight: 950;

  line-height: 1;

  letter-spacing: -0.07em;

  color:
    rgb(190, 175, 110);

  opacity: 1;

  will-change: transform;
}


/*
  중앙 고정 marquee가 회전 이미지보다 항상 위에 표시됩니다.
*/

.rotation-gallery-shell {
  z-index: 3;
}

.rotation-gallery > * {
  position: relative;

  z-index: 1;
}


/* =========================================================
   AGENCY
========================================================= */

.agency {
  border-bottom:
    1px solid var(--line);
}

.section-head {
  display: grid;

  grid-template-columns:
    1fr auto;

  gap: 40px;

  align-items: end;

  margin-bottom: 70px;
}

.section-head h2 {
  margin-top: 24px;
}

.section-head > p {
  margin:
    0
    0
    7px;

  text-align: right;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.6;
}


/* =========================================================
   SERVICES
========================================================= */

.service-list {
  border-top:
    1px solid var(--ink);
}

.service-row {
  display: grid;

  grid-template-columns:
    60px
    1fr
    minmax(230px, 0.65fr)
    30px;

  gap: 20px;

  align-items: center;

  padding:
    27px
    4px;

  border-bottom:
    1px solid var(--line);
}

.service-row span {
  font-size: 9px;

  color: var(--muted);
}

.service-row h3 {
  margin: 0;

  font-size:
    clamp(28px, 4vw, 68px);

  letter-spacing: -0.055em;
}

.service-row p {
  margin: 0;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.6;
}

.service-row b {
  font-size: 22px;
}

.service-row:hover h3 {
  font-style: italic;

  color: var(--acid);
}


/* =========================================================
   PROCESS
========================================================= */

.process {
  background: #dfddd6;
}

.process-grid {
  list-style: none;

  padding: 0;

  margin:
    70px
    0
    0;

  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  border-top:
    1px solid var(--ink);

  border-left:
    1px solid var(--ink);
}

.process-grid li {
  min-height: 260px;

  padding: 22px;

  border-right:
    1px solid var(--ink);

  border-bottom:
    1px solid var(--ink);

  display: flex;
  flex-direction: column;
}

.process-grid span {
  font-size: 9px;

  color: var(--muted);
}

.process-grid strong {
  margin-top: auto;

  font-size: 24px;

  letter-spacing: -0.04em;
}

.process-grid p {
  margin:
    12px
    0
    0;

  font-size: 10px;

  line-height: 1.6;

  color: #625f59;
}


/* =========================================================
   CONTACT
========================================================= */

.contact {
  background: var(--acid);
  color: #101010;
}

.contact-grid {
  display: grid;

  grid-template-columns:
    0.9fr 1.1fr;

  gap: 8vw;
}

.contact-title h2 {
  margin-top: 25px;
}

.contact-title > p:last-child {
  max-width: 430px;

  margin-top: 40px;

  font-size: 12px;

  line-height: 1.7;
}


/* =========================================================
   CONTACT FORM
========================================================= */

.contact-form {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap:
    18px
    14px;

  padding-top: 10px;
}

.contact-form label {
  display: grid;

  gap: 7px;
}

.contact-form label span {
  font-size: 8px;
  font-weight: 900;

  letter-spacing: 0.12em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;

  padding:
    10px
    0;

  border: 0;

  border-bottom:
    1px solid rgba(0, 0, 0, 0.6);

  border-radius: 0;

  background: transparent;

  outline: none;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color:
    rgba(0, 0, 0, 0.45);
}

.contact-form .full {
  grid-column:
    1 / -1;
}

.submit-button {
  grid-column:
    1 / -1;

  display: flex;

  justify-content: space-between;
  align-items: center;

  padding:
    17px
    20px;

  border:
    1px solid #111;

  background: #111;
  color: #fff;

  font-size: 9px;
  font-weight: 900;

  letter-spacing: 0.12em;
}

.submit-button b {
  font-size: 20px;
}

.submit-button:disabled {
  opacity: 0.5;
}

.form-status {
  grid-column:
    1 / -1;

  min-height: 18px;

  margin: 0;

  font-size: 9px;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
  padding:
    60px
    var(--pad)
    26px;

  background: #090909;
  color: #f4f1e9;
}

.footer-logo {
  padding-bottom: 45px;

  border-bottom:
    1px solid #383838;

  font-size:
    clamp(70px, 15vw, 240px);

  line-height: 0.7;

  letter-spacing: -0.095em;

  font-weight: 950;
}

.footer-grid {
  display: grid;

  grid-template-columns:
    2fr 1fr 1fr;

  gap: 40px;

  padding:
    30px
    0
    80px;

  font-size: 9px;

  line-height: 1.7;

  color: #aaa;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  color: #fff;
}

.footer small {
  font-size: 7px;

  color: #575757;

  letter-spacing: 0.12em;
}


/* =========================================================
   TOAST
========================================================= */

.toast {
  position: fixed;

  z-index: 100;

  right: 22px;
  bottom: 22px;

  padding:
    15px
    18px;

  background: #111;
  color: #fff;

  font-size: 9px;

  box-shadow:
    0
    20px
    60px
    rgba(0, 0, 0, 0.25);
}


/* =========================================================
   REVEAL
========================================================= */

.reveal {
  opacity: 0;

  transform:
    translateY(28px);

  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
  opacity: 1;

  transform: none;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;

    transform: none;

    transition: none;
  }

  .gallery-item-wrap,
  .gallery-item,
  .gallery-marquee-inner {
    transform: none !important;
  }

  .hero-video {
    display: none;
  }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }


  .intro-grid,
  .work-heading,
  .contact-grid {
    grid-template-columns:
      1fr;
  }

  .intro-grid {
    gap: 25px;
  }

  .work-note {
    max-width: 520px;
  }


  /*
    중요:
    여기서 gallery width를 78vw로
    덮어쓰지 않습니다.

    Codrops Demo 1 구조 그대로
    width:100%, max-width:600px 유지.
  */


  .section-head {
    grid-template-columns:
      1fr;
  }

  .section-head > p {
    text-align: left;
  }


  .service-row {
    grid-template-columns:
      38px 1fr 28px;
  }

  .service-row p {
    grid-column:
      2 / 3;
  }


  .process-grid {
    grid-template-columns:
      1fr 1fr;
  }


  .contact-grid {
    gap: 60px;
  }


  .footer-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .footer-grid p:last-child {
    grid-column:
      1 / -1;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 560px) {

  :root {
    --pad: 18px;
  }


  .site-header {
    height: 60px;
  }

  .brand {
    font-size: 18px;
  }


  /* -------------------------------------------------------
     HERO
  ------------------------------------------------------- */

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    bottom: 34px;
  }

  .hero-meta {
    top: 78px;

    right: 18px;
    left: 18px;

    justify-content:
      space-between;
  }

  .hero-bottom p {
    font-size: 8px;
  }

  .hero-arrow {
    font-size: 28px;
  }


  /* -------------------------------------------------------
     SECTIONS
  ------------------------------------------------------- */

  .section-pad {
    padding-top: 85px;
    padding-bottom: 85px;
  }

  .intro h2,
  .section-head h2,
  .work-heading h2,
  .contact-title h2 {
    font-size:
      clamp(52px, 18vw, 92px);
  }


  /* -------------------------------------------------------
     VARIATION 1 GALLERY

     width를 86vw로 바꾸지 않습니다.
     원본 구조를 유지합니다.
  ------------------------------------------------------- */

  .rotation-gallery {
    margin-top: 25vh;
    margin-bottom: 35vh;
  }

  .gallery-item-wrap {
    width: 100%;
    max-width: 600px;

    perspective: 900px;

    margin-bottom: -5rem;
  }

  .gallery-item {
    aspect-ratio: 14 / 9;
  }

  .gallery-caption {
    bottom: -22px;

    padding:
      0
      8px;

    font-size: 6px;
  }

  .gallery-marquee-inner {
    font-size:
      clamp(2rem, 16vw, 8rem);
  }


  /* -------------------------------------------------------
     SERVICE
  ------------------------------------------------------- */

  .service-row {
    padding:
      20px
      2px;
  }

  .service-row h3 {
    font-size: 34px;
  }


  /* -------------------------------------------------------
     PROCESS
  ------------------------------------------------------- */

  .process-grid {
    grid-template-columns:
      1fr;
  }

  .process-grid li {
    min-height: 190px;
  }


  /* -------------------------------------------------------
     CONTACT
  ------------------------------------------------------- */

  .contact-form {
    grid-template-columns:
      1fr;
  }

  .contact-form .full,
  .submit-button,
  .form-status {
    grid-column: auto;
  }


  /* -------------------------------------------------------
     FOOTER
  ------------------------------------------------------- */

  .footer-grid {
    grid-template-columns:
      1fr;

    padding-bottom:
      50px;
  }

  .footer-grid p:last-child {
    grid-column: auto;
  }

}

/* =========================================================
   NEW WEBGL SHOWCASE
   ---------------------------------------------------------
   히어로 바로 아래 추가되는 별도 WebGL Carousel 섹션.
   기존 Codrops Variation 1 스타일은 위에서 그대로 유지됩니다.
========================================================= */

.webgl-showcase {
  position: relative;
  isolation: isolate;

  background:
    #050505;

  color:
    #f7f5ef;

  overflow:
    hidden;

  border-top:
    1px solid rgba(255, 255, 255, 0.08);

  border-bottom:
    1px solid rgba(255, 255, 255, 0.08);
}


/*
  BLACK + GLOW
  배경 이미지는 사용하지 않습니다.
*/
.webgl-showcase::before {
  content: "";

  position:
    absolute;

  inset:
    -18% -10%;

  z-index:
    -2;

  background:
    radial-gradient(
      circle at 18% 28%,
      rgba(255, 255, 255, 0.105) 0%,
      rgba(255, 255, 255, 0.045) 18%,
      rgba(255, 255, 255, 0) 42%
    ),
    radial-gradient(
      circle at 82% 54%,
      rgba(255, 255, 255, 0.085) 0%,
      rgba(255, 255, 255, 0.034) 20%,
      rgba(255, 255, 255, 0) 44%
    ),
    radial-gradient(
      ellipse at 52% 92%,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.018) 25%,
      rgba(255, 255, 255, 0) 52%
    );

  filter:
    blur(28px);

  transform:
    scale(1.08);

  opacity:
    0.95;

  pointer-events:
    none;

  animation:
    yakisobaWebglGlow 12s ease-in-out infinite alternate;
}


.webgl-showcase::after {
  content: "";

  position:
    absolute;

  inset:
    0;

  z-index:
    -1;

  background:
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 38%,
      rgba(0, 0, 0, 0.18) 72%,
      rgba(0, 0, 0, 0.46) 100%
    );

  pointer-events:
    none;
}


@keyframes yakisobaWebglGlow {

  0% {
    transform:
      translate3d(-1.5%, -1%, 0)
      scale(1.08);

    opacity:
      0.78;
  }

  100% {
    transform:
      translate3d(1.5%, 1%, 0)
      scale(1.12);

    opacity:
      1;
  }

}


@media (prefers-reduced-motion: reduce) {

  .webgl-showcase::before {
    animation:
      none;

    transform:
      scale(1.08);
  }

}


/* =========================================================
   WEBGL SHOWCASE HEADING
========================================================= */

.webgl-showcase-head {
  position: relative;

  z-index: 5;

  padding:
    clamp(70px, 8vw, 130px)
    var(--pad)
    clamp(34px, 5vw, 76px);

  border-bottom:
    1px solid rgba(255, 255, 255, 0.14);
}

.webgl-showcase-head .section-no {
  color:
    rgba(255, 255, 255, 0.48);
}

.webgl-showcase-title {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(190px, 28vw);

  align-items: end;

  gap:
    clamp(28px, 6vw, 90px);

  margin-top:
    clamp(26px, 4vw, 54px);
}

.webgl-showcase-title h2 {
  margin: 0;

  font-size:
    clamp(64px, 10.2vw, 170px);

  line-height: 0.76;

  letter-spacing: -0.09em;

  font-weight: 950;
}

.webgl-showcase-title p {
  max-width: 320px;

  margin:
    0
    0
    8px;

  font-size: 9px;

  font-weight: 800;

  line-height: 1.8;

  letter-spacing: 0.14em;

  color:
    rgba(255, 255, 255, 0.52);
}


/* =========================================================
   WEBGL CAROUSEL SHELL
========================================================= */

.webgl-carousel-shell {
  position: relative;

  width: 100%;

  min-height: 100svh;

  background: transparent;

  overflow: hidden;
}


/* =========================================================
   WEBGL ROOT
========================================================= */

.webgl-carousel {
  position: relative;

  width: 100%;
  height: 100svh;
  min-height: 650px;

  overflow: hidden;

  outline: none;

  background: transparent;

  user-select: none;

  -webkit-user-select: none;

  touch-action: pan-y;
}

.webgl-carousel:focus-visible {
  outline:
    1px solid rgba(255, 255, 255, 0.45);

  outline-offset:
    -1px;
}


/* =========================================================
   THREE.JS CANVAS
========================================================= */

.webgl-canvas {
  position: absolute;

  inset: 0;

  z-index: 1;

  width: 100%;
  height: 100%;

  overflow: hidden;
}

.webgl-canvas canvas,
.webgl-renderer {
  display: block;

  width: 100% !important;
  height: 100% !important;

  cursor: grab;

  touch-action: pan-y;
}

.webgl-carousel.is-dragging .webgl-canvas canvas,
.webgl-carousel.is-dragging .webgl-renderer {
  cursor: grabbing;
}


/* =========================================================
   WEBGL LOADING
========================================================= */

.webgl-loading {
  position: absolute;

  inset: 0;

  z-index: 8;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 10px;

  background: #090909;

  color:
    rgba(255, 255, 255, 0.56);

  font-size: 9px;

  font-weight: 900;

  letter-spacing: 0.2em;

  pointer-events: none;
}

.webgl-loading[hidden] {
  display: none;
}

.webgl-loading-dot {
  display: inline-block;

  animation:
    webglLoadingPulse
    0.8s
    ease-in-out
    infinite
    alternate;
}

@keyframes webglLoadingPulse {

  from {
    opacity: 0.2;
    transform: scale(0.75);
  }

  to {
    opacity: 1;
    transform: scale(1.15);
  }

}


/* =========================================================
   WEBGL FALLBACK
========================================================= */

.webgl-fallback {
  position: absolute;

  inset: 0;

  z-index: 9;

  display: grid;

  place-items: center;

  padding: 30px;

  background: #090909;

  color:
    rgba(255, 255, 255, 0.6);

  text-align: center;

  font-size: 10px;

  font-weight: 900;

  line-height: 1.6;

  letter-spacing: 0.16em;
}

.webgl-fallback[hidden] {
  display: none;
}

.webgl-fallback p {
  margin: 0;
}


/* =========================================================
   PROJECT INFORMATION
========================================================= */

.webgl-project-info {
  position: absolute;

  z-index: 6;

  left: var(--pad);
  right: var(--pad);
  bottom:
    clamp(28px, 5vw, 62px);

  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;

  pointer-events: none;
}

.webgl-project-counter {
  display: flex;

  align-items: baseline;

  gap: 7px;

  flex: 0 0 auto;

  font-size: 10px;

  font-weight: 900;

  letter-spacing: 0.14em;

  color:
    rgba(255, 255, 255, 0.62);
}

.webgl-project-counter #webglCurrent {
  color: #fff;

  font-size: 15px;
}

.webgl-project-divider {
  opacity: 0.35;
}

.webgl-project-title {
  min-width: 0;

  max-width: 64vw;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  text-align: right;

  color: #fff;

  font-size:
    clamp(18px, 2.5vw, 42px);

  font-weight: 900;

  line-height: 1;

  letter-spacing: -0.045em;

  text-transform: uppercase;
}


/* =========================================================
   INTERACTION GUIDE
========================================================= */

.webgl-interaction-guide {
  position: absolute;

  z-index: 6;

  top:
    clamp(25px, 4vw, 54px);

  left: 50%;

  transform:
    translateX(-50%);

  display: flex;

  align-items: center;

  gap: 12px;

  padding:
    9px
    13px;

  border:
    1px solid rgba(255, 255, 255, 0.18);

  border-radius: 999px;

  background:
    rgba(9, 9, 9, 0.36);

  backdrop-filter:
    blur(10px);

  color:
    rgba(255, 255, 255, 0.58);

  font-size: 8px;

  font-weight: 900;

  letter-spacing: 0.14em;

  white-space: nowrap;

  pointer-events: none;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.webgl-close {
  position: absolute;

  z-index: 12;

  top:
    clamp(20px, 3vw, 40px);

  right:
    var(--pad);

  min-width: 92px;

  padding:
    12px
    14px;

  border:
    1px solid rgba(255, 255, 255, 0.46);

  border-radius: 999px;

  background:
    rgba(9, 9, 9, 0.5);

  backdrop-filter:
    blur(12px);

  color: #fff;

  font-size: 8px;

  font-weight: 900;

  letter-spacing: 0.14em;
}

.webgl-close:hover {
  background: #fff;

  color: #090909;
}

.webgl-close[hidden] {
  display: none;
}


/* =========================================================
   CUSTOM DRAG CURSOR
========================================================= */

.webgl-drag-cursor {
  position: fixed;

  z-index: 110;

  left: 0;
  top: 0;

  width: 62px;
  height: 62px;

  display: grid;

  place-items: center;

  border:
    1px solid rgba(255, 255, 255, 0.7);

  border-radius: 50%;

  background:
    rgba(9, 9, 9, 0.35);

  backdrop-filter:
    blur(8px);

  color: #fff;

  font-size: 7px;

  font-weight: 900;

  letter-spacing: 0.12em;

  opacity: 0;

  transform:
    translate(-50%, -50%)
    scale(0.75);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;

  pointer-events: none;
}

.webgl-carousel.is-hovering-project
.webgl-drag-cursor,
.webgl-carousel.is-dragging
.webgl-drag-cursor {
  opacity: 1;

  transform:
    translate(-50%, -50%)
    scale(1);
}

.webgl-carousel.is-dragging
.webgl-drag-cursor {
  transform:
    translate(-50%, -50%)
    scale(0.88);
}


/* =========================================================
   READY STATE
========================================================= */

.webgl-carousel:not(.is-ready)
.webgl-project-info,
.webgl-carousel:not(.is-ready)
.webgl-interaction-guide {
  opacity: 0;
}

.webgl-carousel.is-ready
.webgl-project-info,
.webgl-carousel.is-ready
.webgl-interaction-guide {
  opacity: 1;

  transition:
    opacity 0.5s ease;
}


/* =========================================================
   ZOOMED STATE
========================================================= */

body.webgl-project-open {
  overflow: hidden;
}

.webgl-carousel.is-zoomed
.webgl-project-info {
  opacity: 0;

  transition:
    opacity 0.25s ease;
}

.webgl-carousel.is-zoomed
.webgl-canvas canvas,
.webgl-carousel.is-zoomed
.webgl-renderer {
  cursor: default;
}


/* =========================================================
   WEBGL REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .webgl-loading-dot {
    animation: none;
  }

  .webgl-drag-cursor {
    display: none;
  }

  .webgl-interaction-guide {
    opacity: 0.75;
  }

}


/* =========================================================
   WEBGL TABLET
========================================================= */

@media (max-width: 900px) {

  .webgl-showcase-title {
    grid-template-columns: 1fr;

    gap: 24px;
  }

  .webgl-showcase-title p {
    max-width: 500px;
  }

  .webgl-carousel {
    min-height: 600px;
  }

  .webgl-project-info {
    bottom: 28px;
  }

  .webgl-project-title {
    max-width: 58vw;
  }

}


/* =========================================================
   WEBGL MOBILE
========================================================= */

@media (max-width: 560px) {

  .webgl-showcase-head {
    padding:
      72px
      var(--pad)
      34px;
  }

  .webgl-showcase-title {
    margin-top: 24px;

    gap: 20px;
  }

  .webgl-showcase-title h2 {
    font-size:
      clamp(58px, 19vw, 98px);

    line-height: 0.76;
  }

  .webgl-showcase-title p {
    font-size: 7px;

    line-height: 1.65;
  }

  .webgl-carousel-shell {
    min-height: 76svh;
  }

  .webgl-carousel {
    height: 76svh;
    min-height: 520px;
  }

  .webgl-interaction-guide {
    top: 20px;

    gap: 8px;

    padding:
      8px
      10px;

    font-size: 6px;
  }

  .webgl-project-info {
    left: 18px;
    right: 18px;
    bottom: 20px;

    align-items: flex-end;

    gap: 14px;
  }

  .webgl-project-counter {
    gap: 5px;

    font-size: 7px;
  }

  .webgl-project-counter #webglCurrent {
    font-size: 11px;
  }

  .webgl-project-title {
    max-width: 60vw;

    font-size:
      clamp(15px, 5vw, 24px);
  }

  .webgl-close {
    top: 18px;
    right: 18px;

    min-width: 78px;

    padding:
      10px
      12px;

    font-size: 7px;
  }

  .webgl-drag-cursor {
    display: none;
  }

}



/* =========================================================
   MULTI-PAGE ROUTING UI
========================================================= */

.desktop-nav a[aria-current="page"]::after {
  right: 0;
}

.page-hero {
  min-height: min(72vh, 760px);
  display: flex;
  align-items: flex-end;
  padding-top: 72px;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  width: 100%;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
  margin-top: clamp(50px, 9vh, 110px);
}

.page-hero h1,
.home-routes h2 {
  margin: 0;
  font-size: clamp(66px, 12vw, 190px);
  line-height: .76;
  letter-spacing: -.09em;
  font-weight: 950;
}

.page-hero-grid > p {
  max-width: 430px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.home-routes {
  background: var(--bg);
}

.home-routes-head {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 70px;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.route-card {
  min-height: clamp(280px, 34vw, 520px);
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--ink);
  transition: background .3s ease, color .3s ease;
}

.route-card:last-child { border-right: 0; }
.route-card:hover { background: #111; color: #fff; }
.route-card > span { font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.route-card strong {
  align-self: center;
  font-size: clamp(30px, 4vw, 62px);
  line-height: .9;
  letter-spacing: -.06em;
}
.route-card b { justify-self: end; font-size: 30px; }

.page-next {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.page-next-link {
  margin-top: 35px;
  padding: 24px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;
  border-top: 1px solid var(--ink);
}

.page-next-link span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.page-next-link b {
  font-size: clamp(40px, 7vw, 112px);
  line-height: .8;
  letter-spacing: -.07em;
}

body[data-page="work"] .webgl-showcase {
  border-top: 0;
}

/* Codrops “Entrance Animation for Images” — Variation 1 */
.work-entrance {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: url('/assets/work-entrance-noise.png'), radial-gradient(circle, #e3efed 0%, #8ca9af 100%);
  background-size: 150px, 100% 100vh;
  color: #111;
  isolation: isolate;
  perspective: 1000px;
}

.work-entrance-headings {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #000;
  text-transform: uppercase;
  pointer-events: none;
}

.work-entrance-headings h2 {
  margin: .67em 0;
  font-family: "Gloock", serif;
  font-size: clamp(2.5rem, 1.59rem + 3.883vw, 6.25rem);
  font-style: normal;
  font-weight: 400;
  line-height: .5;
  letter-spacing: normal;
}

.work-entrance-headings .work-entrance-year {
  margin: 1.67em 0;
  font-family: "Gloock", serif;
  font-size: clamp(1rem, .757rem + 1.036vw, 2rem);
  font-style: normal;
  font-weight: 400;
  line-height: .5;
}

.work-entrance-group {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.work-entrance-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  margin: 0;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.work-entrance-image {
  width: 5em;
  max-width: none;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  object-fit: cover;
}

.work-entrance-loading {
  position: absolute;
  width: max-content;
  translate: -50% -50%;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

@media (min-width: 53em) {
  .work-entrance-image { width: 6em; }
}

@media (prefers-reduced-motion: reduce) {
  .work-entrance-group {
    width: min(76vw, 430px);
    height: min(76vw, 430px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    transform: translate(-50%, -50%);
  }

  .work-entrance-card {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
  }
}

body[data-page="contact"] .contact {
  border-top: 0;
}

@media (max-width: 900px) {
  .page-hero-grid,
  .home-routes-head,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-grid { gap: 30px; }
  .route-card { border-right: 0; border-bottom: 1px solid var(--ink); }
  .route-card:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .page-hero { min-height: 620px; }
  .page-hero h1,
  .home-routes h2 { font-size: clamp(58px, 21vw, 100px); }
  .page-next-link { align-items: flex-end; }
}


/* =========================================================
   LIGHT MULTI-PAGE UI
   HOME hero remains visual; navigation chrome becomes light.
========================================================= */

.site-header.scrolled {
  color: var(--ink);
  background: rgba(247, 245, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header.scrolled .desktop-nav a::after {
  background: var(--ink);
}

.site-header.scrolled .menu-button span {
  background: var(--ink);
}

body:not([data-page="home"]) .site-header {
  color: var(--ink);
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

body:not([data-page="home"]) .site-header .desktop-nav a::after {
  background: var(--ink);
}

body:not([data-page="home"]) .site-header .menu-button span {
  background: var(--ink);
}

.mobile-menu {
  background: var(--paper);
  color: var(--ink);
}

body[data-page="work"] .page-hero,
body[data-page="agency"] .page-hero,
body[data-page="contact"] .page-hero {
  background: var(--paper);
  color: var(--ink);
}
