/* ============================================================
   THE LANDING (5/11/26 rebuild) — a page you scroll.
   Built for a classroom screen first: the logo and «Παίξε Αρχαία» at the
   top, the story below for whoever scrolls. Markup: #lpMain in index.html;
   the two motions (the sideways photo track, the ship building itself) are
   the small script after it. Without .lp-armed (no JS, reduced motion)
   everything is drawn and stacked.
   ============================================================ */

/* The old tap-through stage owned the viewport; the new page just flows.
   The sky (Ptolemy's 45, .landing-sky in styles.css) stays behind it. */
#landingView.landing-view {
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  gap: 0;
}

.lp {
  --lp-gold: #E2B75F;
  --lp-gold-2: #F4D98C;
  --lp-cyan: #00f2fe;
  --lp-electric: #7c6bff;
  --lp-star: #22e6f5;
  --lp-line: #22c7d6;
  --lp-ink: #f8fafc;
  --lp-muted: rgba(248, 250, 252, 0.66);
  --lp-bg: #060814;
  position: relative;
  z-index: 1;
  color: var(--lp-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-x: clip;
}

/* The heavy Greek face of the Instagram posts (Segoe UI Black there); the
   app's Outfit has no Greek, so this is what a Greek line falls back to. */
.lp-word,
.lp-beat__big,
.lp-panel__q,
.lp-play {
  font-family: 'Segoe UI Black', 'Segoe UI', 'Arial Black', system-ui, -apple-system, Roboto, sans-serif;
}

/* ---------- The top ---------- */
.lp-hero {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 2rem 16px 1.5rem;
  text-align: center;
}

.lp-logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: inherit;
}

.lp-logo__ship {
  width: clamp(150px, 30vmin, 260px);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(34, 230, 245, 0.35));
}

.lp-word {
  font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--lp-ink);
}

.lp-word__k {
  background: linear-gradient(90deg, var(--lp-electric), var(--lp-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-hero__line {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--lp-muted);
}

.lp-play {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.8rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0cb77 0%, #c9962e 100%);
  color: #1a1205;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 30px rgba(226, 183, 95, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lp-play:hover { transform: translateY(-2px); box-shadow: 0 10px 38px rgba(226, 183, 95, 0.65); }
.lp-play:active { transform: translateY(1px); }
.lp-play:focus-visible { outline: 3px solid var(--lp-cyan); outline-offset: 4px; }

.lp-hero__more {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--lp-muted);
  text-decoration: none;
}
.lp-hero__more span { display: inline-block; animation: lpNudge 2.2s ease-in-out infinite; }
.lp-hero__more:hover { color: var(--lp-cyan); }
@keyframes lpNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Γιατί; Ποιοι; Πώς; ---------- */
.lp-why__pin { padding: 2rem 0; }
.lp-why__track { display: flex; flex-direction: column; gap: 3.5rem; }

.lp-panel {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 16px;
  text-align: center;
}

.lp-panel__q {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  line-height: 1;
}
.lp-panel__q em { font-style: normal; color: var(--lp-gold); }

.lp-panel__img {
  display: block;
  width: auto;
  max-width: min(88vw, 680px);
  max-height: 52vh;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lp-panel__cap {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
}
.lp-panel__cap b { color: var(--lp-gold); }

.lp-why__dots { display: none; }

/* Armed: the section is three screens tall, its window is pinned, and the
   track slides right-to-left as you scroll (the script sets translateX). */
.lp-armed .lp-why { height: 300vh; height: 300svh; }
.lp-armed .lp-why__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lp-armed .lp-why__track {
  flex-direction: row;
  gap: 0;
  will-change: transform;
}
.lp-armed .lp-panel { flex: 0 0 100%; }
.lp-armed .lp-why__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.lp-why__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.3s ease, transform 0.3s ease;
}
.lp-why__dots i.on { background: var(--lp-gold); transform: scale(1.3); }

/* ---------- The Argonauts ---------- */
.lp-story {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 16px 0;
}

/* Unarmed (no JS, reduced motion): the ship, drawn whole, above the chapters. */
.lp-ship {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1rem 0 1.5rem;
  pointer-events: none;
}

.lp-ship__frame {
  position: relative;
  width: clamp(150px, 27vh, 300px);
  aspect-ratio: 1;
}
.lp-ship__ghost,
.lp-ship__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.lp-ship__ghost { opacity: 0.16; }
.lp-ship__svg { color: var(--lp-line); }
.lp-ship__svg .ship-lines { opacity: 0.7; }
.lp-ship__svg .ship-stars { color: var(--lp-star); filter: drop-shadow(0 0 5px rgba(34, 230, 245, 0.7)); }
.lp-ship__svg .canopus-core { fill: var(--lp-gold); }
.lp-ship__svg .canopus-halo { fill: none; stroke: var(--lp-gold); stroke-width: 2.5; opacity: 0.85; }

.lp-beats { position: relative; z-index: 1; }

.lp-beat {
  min-height: 70vh;
  min-height: 70svh;
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
}

.lp-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--lp-cyan);
}
.lp-kicker--bronze { color: var(--lp-gold); }

.lp-beat__big {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.55rem, 4.6vw, 2.5rem);
  line-height: 1.3;
  text-wrap: balance;
}
.lp-beat__big em {
  font-style: normal;
  background: linear-gradient(90deg, var(--lp-cyan), var(--lp-electric));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-beat__small {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
  color: var(--lp-muted);
  text-wrap: pretty;
}
.lp-beat__small strong { color: var(--lp-gold); }

/* ---------- The crew wall ----------
   Every Argonaut, in caps, like a marathon's finishers' wall. Still: a
   wrapped wall of names. Armed (.is-rows): four rows drifting sideways,
   alternating, each belt doubled so -50% loops without a seam. They never
   stop: no pause on hover or touch (he wants them always moving). */
.lp-crew {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.72);
}
.lp-crew li.is-captain { color: var(--lp-gold); }
/* every few names a brighter one, so the wall shimmers like a scoreboard */
.lp-crew li:nth-child(7n+3):not(.is-captain) { color: var(--lp-star); }

.lp-crew.is-rows {
  display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.lp-crew__row {
  overflow: hidden;
  padding: 0.28rem 0;
  border-top: 1px solid rgba(34, 230, 245, 0.08);
}
.lp-crew__row:last-child { border-bottom: 1px solid rgba(34, 230, 245, 0.08); }
.lp-crew__belt {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: max-content;
  animation: lpCrew 40s linear infinite;
}
.lp-crew__belt.is-back { animation-direction: reverse; }
/* spacing lives inside each name (not a flex gap), so the two halves of a
   belt are exactly equal and the -50% loop has no seam */
.lp-crew__belt li { white-space: nowrap; padding-right: 1.4rem; }
.lp-crew__belt li::after {
  content: "·";
  margin-left: 1.4rem;
  color: rgba(226, 183, 95, 0.5);
}
@keyframes lpCrew { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Armed: chapters light up as they cross the middle; the ship builds.
   The paths carry pathLength="1", so a dash of 1 draws them whole (the dashed
   ones are faded in instead). Not [pathLength]: CSS lowercases it and an SVG
   attribute match is case-sensitive, so it never matches. */
.lp-armed .lp-beat { opacity: 0.22; transition: opacity 0.6s ease; }
.lp-armed .lp-beat.is-in { opacity: 1; }

.lp-armed .lp-ship path:not(.ship-dashed) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s ease;
}
.lp-armed .lp-ship .ship-dashed,
.lp-armed .lp-ship .ship-stars { opacity: 0; transition: opacity 1s ease 0.4s; }

/* 1 · the keel */
.lp-armed .lp-ship:not([data-step="0"]) .ship-carina path:not(.ship-dashed) { stroke-dashoffset: 0; }
.lp-armed .lp-ship:not([data-step="0"]) .stars-carina { opacity: 1; }
/* 2 · the shipyard: the prow, drawn unfinished (dashed) */
.lp-armed .lp-ship:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"]) .ship-prow .ship-dashed { opacity: 1; }
/* 3 · the sails */
.lp-armed .lp-ship:is([data-step="3"], [data-step="4"], [data-step="5"]) .ship-vela path:not(.ship-dashed) { stroke-dashoffset: 0; }
.lp-armed .lp-ship:is([data-step="3"], [data-step="4"], [data-step="5"]) .ship-vela .ship-dashed,
.lp-armed .lp-ship:is([data-step="3"], [data-step="4"], [data-step="5"]) .stars-vela { opacity: 1; }
/* 4 · the stern */
.lp-armed .lp-ship:is([data-step="4"], [data-step="5"]) .ship-puppis path:not(.ship-dashed) { stroke-dashoffset: 0; }
.lp-armed .lp-ship:is([data-step="4"], [data-step="5"]) .stars-puppis { opacity: 1; }
/* 5 · the sky: the whole constellation glows */
.lp-ship .ship-stars { transition: filter 1s ease; }
.lp-armed .lp-ship[data-step="5"] .ship-stars { filter: drop-shadow(0 0 9px rgba(34, 230, 245, 0.95)); }
.lp-ship .canopus-halo { transform-origin: 210px 145px; transform-box: view-box; }
.lp-armed .lp-ship[data-step="5"] .canopus-halo { animation: lpCanopus 2.4s ease-in-out infinite; }
@keyframes lpCanopus { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.25); opacity: 0.4; } }

/* A wide screen (the classroom board): the ship on the left, pinned in the
   middle; the chapters on the right. */
/* A wide screen (the classroom board): the ship on the left, pinned in the
   middle; the chapters scroll past on the right. Side by side, never over. */
@media (min-width: 900px) {
  .lp-story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
  .lp-armed .lp-ship {
    position: sticky;
    top: 0;
    height: 100vh;
    align-items: center;
    padding: 0;
  }
  .lp-ship__frame { width: clamp(260px, 30vw, 420px); }
  .lp-beat { min-height: 90vh; text-align: left; margin: 0; }
}

/* A phone or a narrow window: the ship is pinned at the top and the chapters
   scroll freely beneath it, always moving. They must never show behind the
   ship, so the chapter column wears a mask whose cut follows the ship's lower
   edge (--lp-cut, set by the script every scroll frame, in the column's own
   pixels): every line fades out just as it reaches the constellation. */
@media (max-width: 899px) {
  .lp-armed .lp-ship {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.8rem 0 0.6rem;
  }
  .lp-armed .lp-beats {
    --lp-cut: -200px;
    /* the fade ends at the ship's lower edge (the cut sits 60px above it), so
       a chapter resting right under the ship reads at full strength */
    -webkit-mask-image: linear-gradient(180deg, transparent var(--lp-cut), #000 calc(var(--lp-cut) + 60px));
    mask-image: linear-gradient(180deg, transparent var(--lp-cut), #000 calc(var(--lp-cut) + 60px));
  }
}

/* ---------- The end ----------
   The ending, «Άλλα παιχνίδια» and the footer fill (at least) one screen,
   so the last stop shows them alone: the ship stays wholly above it. The
   ending takes the spare room and centres itself in it. */
.lp-end {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.lp-final {
  flex: 1 0 auto;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 16px 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

/* ---------- Άλλα παιχνίδια · Σύντομα ---------- */
.lp-games {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 2.5rem 16px 2rem;
  border-top: 1px solid rgba(226, 183, 95, 0.16);
  max-width: 40rem;
  margin: 0 auto;
}
.lp-games__label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lp-gold);
}
.lp-game {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.lp-game__mark { display: inline-flex; white-space: nowrap; opacity: 0.75; }
.lp-game__soon {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-muted);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* ---------- Footer ---------- */
.lp-footer {
  padding: 1.2rem 16px calc(1.4rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text-muted, #6b7c96);
  text-align: center;
}
.lp-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-bottom: 0.5rem;
}
.lp-footer__links a { color: inherit; text-decoration: none; }
.lp-footer__links a:hover { color: var(--lp-cyan); }
.lp-footer__legal { opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .lp-hero__more span { animation: none; }
}

/* ---------- The stopper (5/11/26) ----------
   A swipe or a wheel step settles on the next stop, one at a time
   (scroll-snap-stop: always), so nobody has to aim. Stops: the top, each
   photo, each chapter, the ending, the footer. Only while the landing shows
   (html.lp-snap, toggled by the script) — the game shares this page. */
html.lp-snap {
  scroll-snap-type: y mandatory;
  /* styles.css gives html scroll-padding-top: 84px for the game's sticky
     header; on the landing it shifted every stop 84px high and doubled them */
  scroll-padding-top: 0;
}

.lp-armed .lp-hero,
.lp-armed .lp-why__stop,
.lp-armed .lp-beat,
.lp-armed .lp-footer {
  scroll-snap-stop: always;
}
.lp-armed .lp-hero { scroll-snap-align: start; }
.lp-armed .lp-end { scroll-snap-align: start; scroll-snap-stop: always; }
.lp-armed .lp-footer { scroll-snap-align: end; }

/* the track's stops: invisible marks one screen apart inside the pinned
   section; at stop k the script has slid the track to photo k */
.lp-why { position: relative; }
.lp-why__stop { display: none; }
.lp-armed .lp-why__stop {
  display: block;
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  scroll-snap-align: start;
  pointer-events: none;
}
.lp-armed .lp-why__stop:nth-child(1) { top: 0; }
.lp-armed .lp-why__stop:nth-child(2) { top: 100vh; top: 100svh; }
.lp-armed .lp-why__stop:nth-child(3) { top: 200vh; top: 200svh; }

/* chapters: centred on a wide screen; on a narrow one each fills exactly the
   space under the pinned ship and lands there */
.lp-armed .lp-beat { scroll-snap-align: center; }
@media (max-width: 899px) {
  .lp-armed .lp-beat {
    --lp-ship-h-safe: var(--lp-ship-h, 38svh);
    scroll-snap-align: start;
    scroll-margin-top: var(--lp-ship-h-safe);
    /* the text sits right under the constellation, not centred below it */
    justify-content: flex-start;
    padding-top: 1.25rem;
    min-height: calc(100vh - var(--lp-ship-h-safe));
    min-height: calc(100svh - var(--lp-ship-h-safe));
  }
}
