@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&display=swap");

/* ============================================================
   menu-only.css  –  existing styles + Splitting.js flip anim
   ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background-color: #000;
  color: #fff;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.6s ease-in-out;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: clip; /* clip right-side 3D overflow without creating scroll */
  }
}

body {
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
}

#bg-video {
  position: fixed;
  top: -4%; left: -4%;      /* bleed so scaled edges never show */
  width: 108%; height: 108%;
  object-fit: cover;
  z-index: 0;
  display: none;
  transform: translate(0, 0);
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Parallax wrapper for image backgrounds */
#bg-parallax-layer {
  position: fixed;
  inset: -4%;                /* same bleed */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ── Center menu container ── */
.center-menu {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 30vh;      /* offsets center upward */
  perspective: 700px;        /* depth stage for 3D tilt */
  padding-top: 0;            /* ← removed top offset */
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #666 #000;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.center-menu::-webkit-scrollbar       { width: 10px; }
.center-menu::-webkit-scrollbar-thumb { background-color: #666; border-radius: 4px; }

.center-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 60%;
  max-width: 900px;
  text-align: center;
  will-change: transform;
}

.center-menu li {
  width: 100%;
  margin: 0.2rem 0;
  transform-style: flat;     /* prevent Z-fighting between items */
}

/* ── nav__link wrapper (replaces old .center-menu a) ── */
.center-menu a.nav__link {
  display: inline-grid;     /* shrinks to text width */
  font-size: 9rem;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  padding: 0;
  line-height: 1;

  font-style: italic;      /* matches the example aesthetic */
  --link-translate-x: 1.5rem;
}

/* ── The two text spans ── */
.nav__link--text {
  grid-area: 1 / 1;        /* overlap in the same grid cell */
  transition:
    opacity   0.4s cubic-bezier(0.445, 0.05, 0.55, 0.95),
    transform 0.4s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nav__link--text .word { white-space: nowrap; }

/* Individual characters */
.nav__link--text .char {
  display: inline-block;
  transform-origin: 50% 50% 0.4em;
  transition: transform 0.5s cubic-bezier(0.5, 0, 0, 1);
  transition-delay: calc(0ms + var(--char-index) * 25ms);
  backface-visibility: hidden;
  margin: 0 -0.02em;
}

/* Span 1 – visible at rest (Playfair Display italic) */
.nav__link--text:nth-child(1) {
  font-family: 'DT-Barbura', serif;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Span 2 – hidden at rest, revealed on hover (Roboto italic) */
.nav__link--text:nth-child(2) {
  font-family: 'DTShapesB', sans-serif;
  font-weight: 500;
  opacity: 0;
  color: #ffcc00;           /* accent colour on hover reveal */
}
.nav__link--text:nth-child(2) .char {
  transform: rotate3d(1, -0.5, 0, 90deg);
}

/* ── Hover state ── */
.nav__link:hover .nav__link--text {
  transform: translateX(var(--link-translate-x));
}
.nav__link:hover .nav__link--text:nth-child(1) {
  opacity: 0;
}
.nav__link:hover .nav__link--text:nth-child(1) .char {
  transform: rotate3d(1, 0.3, 0, -90deg);
}
.nav__link:hover .nav__link--text:nth-child(2) {
  opacity: 1;
}
.nav__link:hover .nav__link--text:nth-child(2) .char {
  transform: rotate3d(0, 0, 0, 0deg);
}

/* ── Parent / child / single weight rules ── */
.center-menu li.is-parent > a.nav__link,
.center-menu li.is-single  > a.nav__link {
  font-weight: 800;
}

.center-menu li.is-child > a.nav__link {
  font-weight: 400;
  font-size: 2rem;
  padding-left: 90px;
  --link-translate-x: 0.8rem; /* smaller shift for children */
}

/* ── Mobile "Go to project" button ── */
.go-btn {
  background: none;
  border: 2px solid #ffcc00;
  color: #ffcc00;
  font-size: 1rem;
  font-weight: 600;
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.go-btn:hover {
  background: #ffcc00;
  color: #000;
}

/* Hide go-btn on desktop */
@media (min-width: 769px) {
  .go-btn { display: none !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .center-menu a.nav__link {
    font-size: 2rem;
  }
  .center-menu li.is-child > a.nav__link {
    font-size: 1.4rem;
    padding-left: 40px;
  }
  .center-menu {
    padding: 1vh 6vw;
  }
}

@media only screen and (max-width: 20rem) {
  :root { --link-translate-x: 0.8rem; }
}

/* ── Google Fonts import for the two animation typefaces ── */
@font-face {
  font-family: 'DT-Barbura';
  src: url('https://www.24lemons.gr/fonts/nority.demo.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DTShapesB';
  src: url('https://www.24lemons.gr/fonts/nority.demo.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Secondary menu — top right, burger + dropdown ─────── */
.secondary-menu {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: row-reverse; /* burger rightmost */
  align-items: center;
  gap: 0.6rem;
}

/* Burger circle */
.sec-burger {
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: none;
  padding: 0;
  color: #000;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  font-family: 'Noto Sans', sans-serif;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.sec-burger:hover {
  background: #ffcc00;
  transform: scale(1.05);
}

/* Dropdown — hidden, slides from right, opens left */
.sec-burger-menu {
  pointer-events: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sec-burger-menu.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}

/* Dropdown links inherit shared pill style */
.sec-burger-menu a {
  font-family: 'Noto Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 999px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}
.sec-burger-menu a:hover {
  background: #ffcc00;
  color: #000;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .secondary-menu {
    top: 1rem;
    right: 1rem;
  }
  .sec-burger {
    width: 30px; height: 30px;
    min-width: 30px; min-height: 30px;
    font-size: 1.1rem;
  }
}

/* ── Shared pill style ── */
.pill-base,
.secondary-menu a,
.sfh-close,
.sfh-chip,
.sfh-pill,
.srp-pill {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.45rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.secondary-menu a:hover,
.sfh-close:hover,
.sfh-chip:hover,
.sfh-pill:hover,
.srp-pill:hover {
  background: #ffcc00 !important;
  color: #000 !important;
  transform: translateY(-2px);
}

/* Close button — larger symbol, same pill */
.sfh-close,
.srp-archive-close {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

/* Title — yellow pill */
.sfh-title,
.srp-archive-title,
.srp-pill--yellow {
  background: #ffcc00 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: .04em !important;
  color: #000 !important;
}

.sfh-title:hover,
.srp-archive-title:hover,
.srp-pill--yellow:hover {
  background: #fff !important;
}

/* ── Responsive pill scaling ── */
@media (max-width: 600px) {
  .secondary-menu a,
  .sfh-close, .sfh-chip, .sfh-pill,
  .srp-pill {
    font-size: 0.65rem;
    padding: 0.35rem 0.8rem;
  }
}


/* ══════════════════════════════════════════════════════
   CUBE MENU v2 — S=480px, all faces flush, no overflow
   ══════════════════════════════════════════════════════ */

.center-menu {
  perspective: 1000px !important;
  perspective-origin: 50% 50% !important;
  align-items: center;
  justify-content: center;
}

.cube-wrap {
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

.cube {
  position: relative;
  width: min(480px, calc(var(--vmin, 1vmin) * 60));
  height: min(480px, calc(var(--vmin, 1vmin) * 60));
  transform-style: preserve-3d;
  will-change: transform;
}

.side {
  position: absolute;
  width: min(480px, calc(var(--vmin, 1vmin) * 60));
  height: min(480px, calc(var(--vmin, 1vmin) * 60));
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  line-height: 0.88;
  letter-spacing: -1px;
  backface-visibility: hidden;
  overflow: visible;
}

/* Bottom face — rotateX(-90deg), translateZ = S/2 */
.side.top {
  transform: rotateX(-90deg) translateZ(min(240px, calc(var(--vmin, 1vmin) * 30)));
  font-size: min(76px, calc(var(--vmin, 1vmin) * 9.5));
  justify-content: flex-start;
  padding: 4px 4px 0 0;
  text-align: right;
  align-items: flex-end;
}

/* Left face — rotateY(0deg), translateZ = S/2 */
.side.left {
  height: min(480px, calc(var(--vmin, 1vmin) * 60));
  transform: rotateY(0deg) translateZ(min(240px, calc(var(--vmin, 1vmin) * 30)));
  font-size: min(76px, calc(var(--vmin, 1vmin) * 9.5));
  text-align: right;
  align-items: flex-end;
  padding: 0 4px 4px 0;
  justify-content: flex-end;
}

/* Right face — rotateY(90deg), translateZ = S/2 */
.side.right {
  height: min(480px, calc(var(--vmin, 1vmin) * 60));
  transform: rotateY(90deg) translateZ(min(240px, calc(var(--vmin, 1vmin) * 30)));
  font-size: min(76px, calc(var(--vmin, 1vmin) * 9.5));
  padding: 0 0 4px 4px;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-end;
}

/* ── Cube links ── */
.cube-link {
  display: block;
  font-size: inherit;
  font-weight: 900;
  font-style: normal;
  font-family: 'Arial Black', Arial, sans-serif;
  line-height: inherit;
  color: inherit;
  text-decoration: none;
  padding: 0;
  text-transform: uppercase;
  transition: color 0.25s ease;
  cursor: pointer;
  width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}
.cube-link:hover {
  color: #ffcc00;
}

#cube-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: opacity 0.6s;
}

@media (max-width: 768px) {
  .cube-wrap {
    perspective: 1000px;
  }

  .cube {
    width: calc(var(--vmin, 1vmin) * 140);
    height: calc(var(--vmin, 1vmin) * 140);
  }

  .side {
    width: calc(var(--vmin, 1vmin) * 140);
    height: calc(var(--vmin, 1vmin) * 140);
  }

  .side.top {
    transform: rotateX(-90deg) translateZ(calc(var(--vmin, 1vmin) * 70));
    font-size: calc(var(--vmin, 1vmin) * 25);
  }

  .side.left {
    height: calc(var(--vmin, 1vmin) * 140);
    transform: rotateY(0deg) translateZ(calc(var(--vmin, 1vmin) * 70));
    font-size: calc(var(--vmin, 1vmin) * 25);
  }

  .side.right {
    height: calc(var(--vmin, 1vmin) * 140);
    transform: rotateY(90deg) translateZ(calc(var(--vmin, 1vmin) * 70));
    font-size: calc(var(--vmin, 1vmin) * 25);
  }
}
