/* ================================================================
   FONTS
   ================================================================ */
@font-face {
  font-family: 'Damn';
  src: url('fonts/DAMN.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Formula Condensed';
  src: url('fonts/PPFormula-CondensedExtralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Formula Condensed';
  src: url('fonts/PPFormula-CondensedLightItalic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'PP Formula Condensed';
  src: url('fonts/PPFormula-CondensedBlack.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  margin: 0;
}

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

html,
body {
  margin: 0;
  height: 100%;
  width: 100%;
  background: #fff;
  overflow: hidden;
}

button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Hide any Squarespace-injected headers if this is loaded inside Squarespace */
header,
.Header,
.sqs-header,
#header,
.site-header,
.site-header-wrapper {
  display: none !important;
}

/* ================================================================
   LOADING SCREEN
   ================================================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #141414;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: 'PP Formula Condensed', sans-serif;
  font-weight: 200;
  font-size: 2vw;
  text-transform: uppercase;
  z-index: 9999;
  pointer-events: none;
  animation: fadeOut 1s ease 2s forwards;
}

.loading-screen__text {
  opacity: 0;
  animation: fadeInText 0.5s ease forwards;
}

/* Skipped on refresh — JS adds .is-skipped if it has played before in this session */
.loading-screen.is-skipped,
.loading-screen.is-skipped .loading-screen__text {
  animation: none;
  opacity: 0;
  visibility: hidden;
}

@keyframes fadeInText {
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

@media (max-width: 768px) {
  .loading-screen {
    font-size: 4vw;
  }

  .loading-screen__text {
    white-space: normal;
    text-align: center;
    padding: 0 1rem;
  }
}

/* ================================================================
   MENU WRAPPER
   ================================================================ */
.menu-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ================================================================
   MENU BLOCK
   ================================================================ */
.menu-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  position: relative;
  z-index: 2;
  transition: transform 1s ease;
}

/* Desktop state shifts (driven by body[data-state]) */
body[data-state="creative"] .menu-block {
  transform: translateX(74%);
}

body[data-state="photography"] .menu-block {
  transform: translateX(-58%);
}

body[data-state="home"] .menu-block {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .menu-block {
    flex-direction: column;
    gap: 4vh;
  }

  .menu-wrapper {
    padding-bottom: 5vh;
  }

  body[data-state="creative"] .menu-block {
    transform: translateY(80%);
  }

  body[data-state="photography"] .menu-block {
    transform: translateY(-50%);
  }

  body[data-state="home"] .menu-block {
    transform: translateY(0);
  }
}

/* ================================================================
   MENU WORDS
   Each .menu-word holds:
     - "open" button (visible in home state)
     - "back" button (visible only when its panel is active)
     - <h1> headline
   ================================================================ */
.menu-word {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.menu-word__action {
  position: absolute;
  inset: 0;
  cursor: pointer;
  display: block;
}

/* "Open" sits at z-index 1; "back" sits at z-index 2 (overlay when active) */
.menu-word__action--open {
  z-index: 1;
}

.menu-word__action--back {
  z-index: 2;
  display: none;
}

/* Heading text — visual only */
.menu-word h1 {
  font-size: 8vw;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #000;
  margin: 0;
  user-select: none;
  text-transform: uppercase;
  font-family: 'Damn', Helvetica, sans-serif;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media (max-width: 768px) {
  .menu-word h1 {
    font-size: 14vw;
  }
}

/* Hover dims the headline behind the active button */
.menu-word__action:hover ~ h1 {
  opacity: 0.5;
}

/* Show the "back" button only when its panel is the active state */
body[data-state="creative"] .menu-word--creative .menu-word__action--back,
body[data-state="photography"] .menu-word--photography .menu-word__action--back {
  display: block;
}

/* ================================================================
   ARROW DECORATIONS
   ================================================================ */
.menu-block::before,
.menu-block::after {
  content: "";
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 10px solid transparent;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-block::before {
  left: -40px;
  border-right-color: #000;
}

.menu-block::after {
  right: -40px;
  border-left-color: #000;
}

/* Real clickable hit-area around each arrow */
.arrow-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-label--creative {
  left: -55px;
}

.arrow-label--photography {
  right: -55px;
}

.menu-block:hover::before,
.menu-block:hover::after {
  opacity: 0.5;
}

/* Mobile: arrows on top/bottom */
@media (max-width: 768px) {
  .menu-block::before,
  .menu-block::after {
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
  }

  .menu-block::before {
    top: -30px;
    bottom: auto;
    border-bottom-color: #000;
    border-right-color: transparent;
  }

  .menu-block::after {
    bottom: -30px;
    top: auto;
    border-top-color: #000;
    border-left-color: transparent;
  }

  .arrow-label {
    width: 60px;
    height: 50px;
    left: 50%;
    transform: translateX(-50%);
  }

  .arrow-label--creative {
    top: -45px;
    bottom: auto;
    transform: translateX(-50%);
  }

  .arrow-label--photography {
    bottom: -45px;
    top: auto;
    transform: translateX(-50%);
  }
}

/* ================================================================
   LOGO
   ================================================================ */
.menu-logo-link {
  display: inline-block;
  position: relative;
}

.menu-logo {
  display: block;
  width: 160px;
  max-width: 20vw;
  height: auto;
}

.menu-logo-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('images/v-gif.gif') center/contain no-repeat;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.menu-logo-link:hover::after {
  opacity: 1;
}

/* ================================================================
   RETURN OVERLAY
   Full-screen catch — sits at z-index 1 so it's BEHIND the panels
   (z-index 3), letting their links work, while still catching
   clicks on empty space.
   ================================================================ */
.menu-return {
  position: absolute;
  inset: 0;
  cursor: pointer;
  display: none;
  z-index: 1;
}

body[data-state="creative"] .menu-return,
body[data-state="photography"] .menu-return {
  display: block;
}

/* ================================================================
   CREATIVE GRID
   ================================================================ */
.menu-creative-grid {
  position: absolute;
  left: -50%;
  top: 0;
  width: 45%;
  height: 100vh;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 3px;
  padding: 3px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  transition: left 1s ease;
}

body[data-state="creative"] .menu-creative-grid {
  left: 0;
}

.menu-creative-grid a {
  display: block;
  width: 100%;
  padding: 5px;
  text-decoration: none;
  position: relative;
}

.menu-creative-grid .creative-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-image: var(--gif);
  background-size: cover;
  background-position: center;
  aspect-ratio: 1 / 1;
}

/* Static <img> hidden on desktop — GIF lives on background */
.menu-creative-grid .creative-img-wrap img {
  display: none;
}

/* White hover overlay */
.menu-creative-grid .creative-img-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.menu-creative-grid a:hover .creative-img-wrap::before,
.menu-creative-grid a:focus-visible .creative-img-wrap::before {
  opacity: 1;
}

/* Hover text overlay */
.menu-creative-grid .creative-hover-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: 'PP Formula Condensed', sans-serif;
  font-weight: 200;
  font-size: 13px;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.menu-creative-grid a:hover .creative-hover-text,
.menu-creative-grid a:focus-visible .creative-hover-text {
  opacity: 1;
}

/* No caption on desktop */
.menu-creative-grid .photo-caption {
  display: none;
}

/* MOBILE creative grid — behaves like photography grid */
@media (max-width: 768px) {
  .menu-creative-grid {
    top: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 55vh;
    padding: 3px 3px 15.5vh 3px;
    grid-template-columns: repeat(2, 1fr);
    transition: top 0.8s ease;
  }

  body[data-state="creative"] .menu-creative-grid {
    top: 0;
    left: 0;
  }

  .menu-creative-grid .creative-img-wrap {
    background-image: none;
    aspect-ratio: unset;
  }

  .menu-creative-grid .creative-img-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .menu-creative-grid .creative-img-wrap::before,
  .menu-creative-grid .creative-hover-text {
    display: none;
  }

  .menu-creative-grid .photo-caption {
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-align: center;
    padding: 8px 2px;
    font-family: 'PP Formula Condensed', sans-serif;
    font-weight: 200;
    font-size: 11px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
    opacity: 0.75;
    transition: opacity 0.3s ease;
    word-break: break-word;
  }
}

/* ================================================================
   PHOTOGRAPHY GRID

   HOW TO ADD A NEW ALBUM:
     1. Add a new <a> at the TOP of #photographyPanel.
     2. Set data-gif on .photo-img-wrap and data-src on the <img>.
     3. Done — JS handles lazy-loading and hover GIF on first open.
   ================================================================ */
.menu-photography-grid {
  position: absolute;
  top: 0;
  right: -50%;
  width: 45%;
  height: 100vh;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: 3px;
  padding: 3px;
  background: #fff;
  transition: right 1s ease;
}

body[data-state="photography"] .menu-photography-grid {
  right: 0;
}

.menu-photography-grid a {
  display: block;
  width: 100%;
  text-decoration: none;
  position: relative;
}

.photo-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.photo-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* GIF hover overlay (URL set as inline style by JS once loaded) */
.photo-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gif);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.menu-photography-grid a:hover .photo-img-wrap::after,
.menu-photography-grid a:focus-visible .photo-img-wrap::after {
  opacity: 1;
}

/* Caption */
.photo-caption {
  display: flex;
  align-items: baseline;
  padding: 8px 2px;
  font-family: 'PP Formula Condensed', sans-serif;
  font-weight: 200;
  font-size: 13px;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.3;
  opacity: 0.75;
  transition: opacity 0.3s ease;
  word-break: break-word;
}

.menu-photography-grid a:hover .photo-caption,
.menu-photography-grid a:focus-visible .photo-caption {
  opacity: 1;
}

.caption-name {
  flex-shrink: 1;
}

.caption-type {
  opacity: 0.4;
  flex-shrink: 0;
}

.caption-arrow {
  flex-shrink: 0;
  margin-left: 4px;
  font-size: 11px;
  transition: transform 0.3s ease;
}

.menu-photography-grid a:hover .caption-arrow,
.menu-photography-grid a:focus-visible .caption-arrow {
  transform: translateX(3px);
}

/* ================================================================
   MOBILE PHOTOGRAPHY GRID
   ================================================================
   👉 ADJUST THE PANEL HEIGHT HERE
   The panel slides up from the bottom. Two values control the
   visible area:
     - height          : total panel height
     - padding-bottom  : empty space reserved at the bottom of the
                         panel for the menu words below it
   So the actual scrollable/visible image area = height − padding-bottom.
   The original 20vh / 15.5vh combo left only ~4.5vh of usable
   space, which is why the panel looked nearly empty.
   ================================================================ */
@media (max-width: 768px) {
  .menu-photography-grid {
    top: auto;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 45vh;                       /* ← total panel height */
    padding: 3px 3px 15.5vh 3px;        /* ← bottom padding reserves room for menu words */
    grid-template-columns: repeat(2, 1fr);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: bottom 1s ease;
  }

  body[data-state="photography"] .menu-photography-grid {
    bottom: 0;
  }

  /* On mobile: hide the static cover image and show the GIF as the
     wrap's background. The wrap gets an aspect-ratio so it has size
     even with the <img> hidden. */
  .photo-img-wrap {
    background-image: var(--gif);
    background-size: cover;
    background-position: center;
    aspect-ratio: 1 / 1;
  }

  .photo-img-wrap img {
    display: none;
  }

  /* Hover overlay is irrelevant on touch — keep it off */
  .photo-img-wrap::after {
    display: none;
  }

  .photo-caption {
    font-size: 11px;
  }
}
