/* ============================================
   Μεζεδοφωλιά — homepage scroll scene
   Loaded only on index.html (Greek homepage).
   ============================================ */

/* Commissioner: Greek-designed variable face, self-hosted (GDPR). */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/commissioner-var-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/commissioner-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --display: 'Commissioner', ui-sans-serif, system-ui, sans-serif;
  --hh: 119px; /* header height; the stage pins right under it */
  --night: #12100d;
  --pad-x: clamp(1.25rem, 5vw, 5.5rem);
}

/* ---------- scene ---------- */
.scene {
  position: relative;
  height: var(--scene-len, 600vh);
  background: var(--night);
  color: #fff;
}

.scene-sticky {
  position: sticky;
  top: var(--hh);
  height: calc(100vh - var(--hh));
  height: calc(100svh - var(--hh));
  overflow: hidden;
  isolation: isolate;
}

.scene-poster,
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scene-poster {
  object-fit: cover;
}

.scene canvas {
  z-index: 1;
  opacity: 0;
  transition: opacity 300ms ease;
}

.scene.is-live canvas {
  opacity: 1;
}

/* darkening only at the bottom, where the copy sits */
.scene-sticky::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(14, 11, 8, 0.82) 0%, rgba(14, 11, 8, 0.5) 24%, rgba(14, 11, 8, 0) 48%);
}

/* one editorial layout for every beat: headline bottom left,
   supporting line + actions bottom right, same baseline */
.scene-copy {
  position: absolute;
  z-index: 3;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: clamp(2.5rem, 7vh, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
  visibility: hidden;
  opacity: 0;
  will-change: opacity, transform;
}

.scene-copy .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.9rem;
}

.scene-copy h1,
.scene-copy h2 {
  font-family: var(--display);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.04;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.scene-copy h1 {
  font-size: clamp(2.8rem, 5.6vw, 5.4rem);
}

.scene-copy h2 {
  font-size: clamp(2.3rem, 4.3vw, 4.3rem);
}

.copy-aside {
  padding-bottom: 0.45rem;
}

.copy-aside p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  line-height: 1.6;
  max-width: 36ch;
  margin: 0;
}

.copy-aside .hero__cta {
  margin: 1.5rem 0 0;
}

.scene-progress {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.scene-progress i {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  transform: scaleX(0);
  transform-origin: left;
}

.scene-note {
  position: absolute;
  z-index: 3;
  right: var(--pad-x);
  top: 1rem;
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* last beat: the full table sits bottom-left, so the copy moves to the right half */
@media (min-width: 901px), (orientation: landscape) {
  .scene-copy--right {
    left: auto;
    width: min(560px, 42vw);
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .scene-copy--right h2 {
    font-size: clamp(2.1rem, 3.4vw, 3.5rem);
  }
}

/* ---------- static fallback (reduced motion / no JS) ---------- */
.scenes-static .scene {
  height: auto;
}

.scenes-static .scene-sticky {
  position: relative;
  top: 0;
  height: auto;
  min-height: 80svh;
  padding: 50vh 0 3rem;
}

.scenes-static .scene canvas,
.scenes-static .scene-progress {
  display: none;
}

.scenes-static .scene-copy {
  position: relative;
  inset: auto;
  visibility: visible;
  opacity: 1;
  padding: 0 var(--pad-x);
  margin-top: 2rem;
}

/* ---------- section headings in the display face ---------- */
.h2,
.h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- final call with the full-table frame ---------- */
.feast {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(7rem, 16vw, 12rem) 0;
  background: var(--night);
  color: #fff;
}

.feast__media,
.feast__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.feast::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 11, 8, 0.82) 0%, rgba(14, 11, 8, 0.5) 45%, rgba(14, 11, 8, 0.12) 100%);
}

.feast .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.9rem;
}

.feast h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.012em;
  line-height: 1.04;
  max-width: 14ch;
  margin: 0;
}

.feast p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  max-width: 40ch;
  margin: 1.2rem 0 0;
}

.feast .hero__cta {
  margin: 2rem 0 0;
}

/* ---------- portrait phones and tablets: frame band on top, copy below ---------- */
@media (max-width: 900px) and (orientation: portrait) {
  .scene-sticky {
    background: var(--night);
  }

  .scene-poster,
  .scene canvas {
    height: 52%;
  }

  .scene-sticky::after {
    inset: auto 0 auto 0;
    top: calc(52% - 3rem);
    height: 3rem;
    background: linear-gradient(180deg, rgba(18, 16, 13, 0) 0%, var(--night) 100%);
  }

  .scene-copy {
    top: calc(52% + 1rem);
    bottom: auto;
    left: 1.25rem;
    right: 1.25rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .scene-copy .eyebrow {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .scene-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .scene-copy h2 {
    font-size: clamp(1.8rem, 7.6vw, 2.4rem);
  }

  .scene-copy h1,
  .scene-copy h2 {
    text-shadow: none;
  }

  .copy-aside p {
    font-size: 0.98rem;
  }

  .copy-aside .hero__cta {
    margin-top: 1rem;
  }

  .copy-aside .hero__cta .btn {
    flex: 1 1 0;
    min-width: max-content;
  }

  .scene-progress {
    top: calc(52% - 2px);
    bottom: auto;
  }

  .feast::before {
    background: linear-gradient(0deg, rgba(14, 11, 8, 0.88) 0%, rgba(14, 11, 8, 0.5) 60%, rgba(14, 11, 8, 0.2) 100%);
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .scene-copy {
    grid-template-columns: 1fr 1fr;
  }
}

/* short phones: keep only the main action inside the scene */
@media (max-width: 900px) and (orientation: portrait) and (max-height: 740px) {
  .scene-copy .hero__cta .btn--ghost {
    display: none;
  }
}
