/* ==========================================================================
   Yarn Puzzle Journey — 3D pegboard / yarn skeuomorphic landing page
   Unique layout: thread spine + hex board + spool dock HUD nav
   ========================================================================== */

:root {
  --ypj-sky-top: #7ec8f0;
  --ypj-sky-mid: #b8e4ff;
  --ypj-sky-bottom: #e8f6ff;
  --ypj-panel: #2b6fd4;
  --ypj-panel-dark: #1e4fa8;
  --ypj-panel-light: #4a90e8;
  --ypj-orange: #ff8c42;
  --ypj-cyan: #22d3ee;
  --ypj-pink: #ff6b9d;
  --ypj-yellow: #ffd93d;
  --ypj-purple: #9b5de5;
  --ypj-green: #22c55e;
  --ypj-green-dark: #16a34a;
  --ypj-white: #ffffff;
  --ypj-text: #1a2b4a;
  --ypj-text-muted: #3d5278;
  --ypj-shadow: rgba(26, 43, 74, 0.18);
  --ypj-shadow-deep: rgba(26, 43, 74, 0.32);
  --ypj-radius: 1.25rem;
  --ypj-radius-lg: 1.75rem;
  --ypj-font-head: "Fredoka", system-ui, sans-serif;
  --ypj-font-body: "Nunito", system-ui, sans-serif;
  --ypj-header-h: 4.5rem;
  --ypj-dock-h: 4.75rem;
  --ypj-wrap: min(1120px, calc(100% - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--ypj-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ypj-text);
  background: var(--ypj-sky-bottom);
  overflow-x: hidden;
  padding-bottom: calc(var(--ypj-dock-h) + 1rem);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.ypj-wrap {
  width: var(--ypj-wrap);
  margin-inline: auto;
}

/* Skip link */
.ypj-skip {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--ypj-panel);
  color: var(--ypj-white);
  border-radius: 0.5rem;
  font-weight: 700;
}

.ypj-skip:focus {
  top: 1rem;
}

/* Lightweight scroll reveal (replaces AOS) */
.ypj-reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .ypj-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  }

  .ypj-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .ypj-hex-card.ypj-reveal:nth-child(1) { transition-delay: 0ms; }
  .ypj-hex-card.ypj-reveal:nth-child(2) { transition-delay: 60ms; }
  .ypj-hex-card.ypj-reveal:nth-child(3) { transition-delay: 120ms; }
  .ypj-hex-card.ypj-reveal:nth-child(4) { transition-delay: 180ms; }
  .ypj-hex-card.ypj-reveal:nth-child(5) { transition-delay: 240ms; }
}

/* Scene backdrop */
.ypj-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  contain: strict;
}

.ypj-scene__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--ypj-sky-top) 0%, var(--ypj-sky-mid) 45%, var(--ypj-sky-bottom) 100%);
}

.ypj-scene__pegboard {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}

.ypj-scene__bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 -4px 12px rgba(255, 255, 255, 0.3), 0 8px 24px var(--ypj-shadow);
}

.ypj-scene__bubble--1 { width: 90px; height: 90px; top: 8%; left: 6%; }
.ypj-scene__bubble--2 { width: 56px; height: 56px; top: 22%; right: 10%; }
.ypj-scene__bubble--3 { width: 120px; height: 120px; top: 48%; left: 3%; }
.ypj-scene__bubble--4 { width: 70px; height: 70px; top: 68%; right: 6%; }
.ypj-scene__bubble--5 { width: 44px; height: 44px; top: 85%; left: 18%; }

.ypj-scene__star {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--ypj-yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.85;
}

.ypj-scene__star--1 { top: 14%; right: 22%; }
.ypj-scene__star--2 { top: 38%; left: 12%; }
.ypj-scene__star--3 { top: 72%; right: 18%; }

@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .ypj-scene__bubble--1,
  .ypj-scene__bubble--3 {
    animation: ypj-float 12s ease-in-out infinite;
    will-change: transform;
  }

  .ypj-scene__bubble--2 {
    animation: ypj-float 14s ease-in-out infinite reverse;
    will-change: transform;
  }
}

@media (max-width: 767px) {
  .ypj-scene__bubble--3,
  .ypj-scene__bubble--4,
  .ypj-scene__bubble--5,
  .ypj-scene__star {
    display: none;
  }
}

@keyframes ypj-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

/* Thread spine — desktop only */
.ypj-thread-spine {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 100%;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  contain: strict;
}

@media (min-width: 1024px) {
  .ypj-thread-spine {
    display: block;
  }
}

.ypj-thread-spine__path {
  fill: none;
  stroke: url(#ypj-thread-grad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 18 10;
}

/* Bolt corners (pegboard screws) */
.ypj-bolt {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8ecf0 0%, #a8b4c0 50%, #d0d8e0 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -2px 3px rgba(0, 0, 0, 0.15),
    0 2px 4px var(--ypj-shadow);
  z-index: 2;
}

.ypj-bolt::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(80, 90, 100, 0.35);
}

.ypj-bolt--tl { top: 10px; left: 10px; }
.ypj-bolt--tr { top: 10px; right: 10px; }
.ypj-bolt--bl { bottom: 10px; left: 10px; }
.ypj-bolt--br { bottom: 10px; right: 10px; }

/* Header */
.ypj-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 2rem), 1080px);
  transition: top 0.25s ease, box-shadow 0.25s ease;
}

.ypj-header.is-scrolled {
  top: 0.5rem;
}

.ypj-header__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem 0.65rem 1rem;
  background: linear-gradient(180deg, var(--ypj-panel-light) 0%, var(--ypj-panel) 55%, var(--ypj-panel-dark) 100%);
  border-radius: var(--ypj-radius-lg);
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 0 var(--ypj-panel-dark),
    0 16px 32px var(--ypj-shadow-deep),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.ypj-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  min-width: 0;
}

.ypj-brand__icon {
  border-radius: 0.65rem;
  box-shadow: 0 4px 8px var(--ypj-shadow);
  flex-shrink: 0;
}

.ypj-brand__name {
  font-family: var(--ypj-font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ypj-white);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ypj-nav {
  display: none;
  gap: 0.25rem;
}

.ypj-nav__link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.ypj-nav__link:hover,
.ypj-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: var(--ypj-white);
  outline: none;
}

.ypj-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ypj-menu-btn span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--ypj-white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ypj-menu-btn.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.ypj-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.ypj-menu-btn.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.ypj-drawer {
  margin-top: 0.5rem;
  padding: 1rem;
  background: linear-gradient(180deg, var(--ypj-panel-light), var(--ypj-panel-dark));
  border-radius: var(--ypj-radius);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px var(--ypj-shadow-deep);
}

.ypj-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ypj-drawer a {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: var(--ypj-white);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ypj-drawer a:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Buttons */
.ypj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: var(--ypj-font-head);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.ypj-btn:focus-visible {
  outline: 3px solid var(--ypj-yellow);
  outline-offset: 2px;
}

.ypj-btn--cta {
  background: linear-gradient(180deg, #34d96e 0%, var(--ypj-green) 50%, var(--ypj-green-dark) 100%);
  color: var(--ypj-white);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 5px 0 var(--ypj-green-dark),
    0 8px 16px rgba(34, 197, 94, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ypj-btn--cta:hover {
  transform: translateY(-2px);
}

.ypj-btn--cta:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ypj-green-dark);
}

.ypj-btn--store {
  background: linear-gradient(180deg, #fff 0%, #e8f0ff 100%);
  color: var(--ypj-panel-dark);
  border: 2px solid rgba(43, 111, 212, 0.25);
  box-shadow: 0 5px 0 #b8cce8, 0 8px 16px var(--ypj-shadow);
}

.ypj-btn--store-alt {
  background: linear-gradient(180deg, var(--ypj-panel-light), var(--ypj-panel));
  color: var(--ypj-white);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 0 var(--ypj-panel-dark), 0 8px 16px var(--ypj-shadow);
}

.ypj-btn--store:hover,
.ypj-btn--withdraw:hover {
  transform: translateY(-2px);
}

.ypj-btn--withdraw {
  background: linear-gradient(180deg, #34d96e 0%, var(--ypj-green) 50%, var(--ypj-green-dark) 100%);
  color: var(--ypj-white);
  font-size: 1.1rem;
  padding: 0.9rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 6px 0 var(--ypj-green-dark),
    0 0 24px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ypj-btn--block {
  width: 100%;
}

.ypj-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* Hero */
.ypj-hero {
  padding: calc(var(--ypj-header-h) + 2.5rem) 0 4rem;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.ypj-hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.ypj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 2px dashed rgba(155, 93, 229, 0.35);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ypj-purple);
}

.ypj-eyebrow svg {
  width: 1rem;
  height: 1rem;
}

.ypj-eyebrow--purple { color: var(--ypj-purple); border-color: rgba(155, 93, 229, 0.4); }
.ypj-eyebrow--cyan { color: #0891b2; border-color: rgba(34, 211, 238, 0.45); }

/* Knitted-style colorful title */
.ypj-title {
  margin: 0 0 1.25rem;
  line-height: 1.05;
}

.ypj-title__yarn {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.15rem;
}

.ypj-title__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ypj-font-head);
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: 700;
  width: 1.05em;
  height: 1.1em;
  border-radius: 0.35em;
  color: var(--ypj-white);
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.15),
    0 6px 12px var(--ypj-shadow);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.ypj-title__letter--o { background: linear-gradient(145deg, #ffb07a, var(--ypj-orange)); }
.ypj-title__letter--c { background: linear-gradient(145deg, #6ee8f7, var(--ypj-cyan)); }
.ypj-title__letter--p { background: linear-gradient(145deg, #ff9bbb, var(--ypj-pink)); }
.ypj-title__letter--y { background: linear-gradient(145deg, #ffe97a, var(--ypj-yellow)); color: #7a5a00; text-shadow: 0 2px 0 rgba(0,0,0,0.1); }

.ypj-title__block {
  display: block;
  font-family: var(--ypj-font-head);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--ypj-white);
  letter-spacing: 0.06em;
  text-shadow:
    0 0 0 var(--ypj-panel-dark),
    2px 2px 0 var(--ypj-panel-dark),
    4px 4px 0 rgba(30, 79, 168, 0.5),
    0 8px 16px var(--ypj-shadow);
  -webkit-text-stroke: 2px var(--ypj-panel-dark);
  paint-order: stroke fill;
}

.ypj-title__banner {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 1.25rem;
  font-family: var(--ypj-font-head);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--ypj-yellow);
  background: linear-gradient(180deg, #b07cf0, var(--ypj-purple));
  border-radius: 0.75rem;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 0 #7c3aed, 0 10px 20px var(--ypj-shadow);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.ypj-lead {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: var(--ypj-text-muted);
  max-width: 34rem;
}

.ypj-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ypj-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ypj-hero__tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ypj-text-muted);
  box-shadow: 0 2px 8px var(--ypj-shadow);
}

.ypj-hero__tags svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--ypj-orange);
}

/* Puzzle frame + phone */
.ypj-puzzle-frame {
  position: relative;
  padding: 2rem 1.5rem 2.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, rgba(220, 240, 255, 0.82) 100%);
  border-radius: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 16px 40px var(--ypj-shadow-deep),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.ypj-puzzle-frame__slots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ypj-slot {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.5);
}

.ypj-slot--1 { top: 8%; right: 6%; background: rgba(255, 140, 66, 0.25); }
.ypj-slot--2 { top: 30%; left: 4%; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border-radius: 0; }
.ypj-slot--3 { bottom: 18%; right: 8%; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border-radius: 0; background: rgba(255, 107, 157, 0.25); }
.ypj-slot--4 { bottom: 8%; left: 10%; background: rgba(34, 211, 238, 0.25); }

.ypj-phone {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin: 0 auto;
}

.ypj-phone__bezel {
  padding: 0.65rem;
  border-radius: 2rem;
  background: linear-gradient(180deg, #3a3a3a, #1a1a1a);
  box-shadow:
    0 20px 40px var(--ypj-shadow-deep),
    inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.ypj-phone__bezel img {
  border-radius: 1.5rem;
  width: 100%;
}

/* Decorative yarn spools */
.ypj-spool {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 6px 12px var(--ypj-shadow);
}

.ypj-spool::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35);
}

.ypj-spool--blue { background: linear-gradient(145deg, #6eb5ff, #2563eb); bottom: -12px; left: -8px; }
.ypj-spool--pink { background: linear-gradient(145deg, #ff9bbb, var(--ypj-pink)); top: -10px; right: 20px; }
.ypj-spool--yellow { background: linear-gradient(145deg, #ffe97a, var(--ypj-yellow)); bottom: 20px; right: -14px; }

/* Section headers */
.ypj-section-head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.ypj-section-head--left { margin-right: auto; text-align: left; }
.ypj-section-head--right { margin-left: auto; text-align: right; }

.ypj-section-title {
  margin: 0 0 0.75rem;
  font-family: var(--ypj-font-head);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--ypj-text);
  line-height: 1.15;
}

.ypj-section-desc {
  margin: 0;
  color: var(--ypj-text-muted);
  font-size: 1.05rem;
}

/* Features — hex board zigzag */
.ypj-features,
.ypj-showcase,
.ypj-download {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.ypj-features {
  padding: 4rem 0;
}

.ypj-hex-board {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.ypj-hex-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 248, 255, 0.88) 100%);
  border-radius: var(--ypj-radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 8px 0 rgba(43, 111, 212, 0.12),
    0 12px 28px var(--ypj-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}

.ypj-hex-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(43, 111, 212, 0.1), 0 20px 36px var(--ypj-shadow-deep);
}

.ypj-hex-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--ypj-font-head);
  font-size: 1.15rem;
  color: var(--ypj-text);
}

.ypj-hex-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ypj-text-muted);
}

.ypj-hex-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ypj-hex-card__icon svg {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--ypj-white);
}

.ypj-hex-card__icon--orange { background: linear-gradient(145deg, #ffb07a, var(--ypj-orange)); }
.ypj-hex-card__icon--cyan { background: linear-gradient(145deg, #6ee8f7, #06b6d4); }
.ypj-hex-card__icon--pink { background: linear-gradient(145deg, #ff9bbb, var(--ypj-pink)); }
.ypj-hex-card__icon--yellow { background: linear-gradient(145deg, #ffe97a, #f59e0b); }
.ypj-hex-card__icon--purple { background: linear-gradient(145deg, #c4a0ff, var(--ypj-purple)); }

/* Zigzag offset on tablet+ */
@media (min-width: 640px) {
  .ypj-hex-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .ypj-hex-card--1,
  .ypj-hex-card--3,
  .ypj-hex-card--5 {
    transform: translateX(0);
  }

  .ypj-hex-card--2,
  .ypj-hex-card--4 {
    transform: translateY(1.5rem);
  }

  .ypj-hex-card--2:hover,
  .ypj-hex-card--4:hover {
    transform: translateY(calc(1.5rem - 4px));
  }
}

@media (min-width: 1024px) {
  .ypj-hex-board {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }

  .ypj-hex-card--1 { grid-column: 1 / 3; }
  .ypj-hex-card--2 { grid-column: 3 / 5; transform: translateY(2rem); }
  .ypj-hex-card--3 { grid-column: 5 / 7; }
  .ypj-hex-card--4 { grid-column: 2 / 4; transform: translateY(1rem); }
  .ypj-hex-card--5 { grid-column: 4 / 6; transform: translateY(2.5rem); }

  .ypj-hex-card--2:hover { transform: translateY(calc(2rem - 4px)); }
  .ypj-hex-card--4:hover { transform: translateY(calc(1rem - 4px)); }
  .ypj-hex-card--5:hover { transform: translateY(calc(2.5rem - 4px)); }
}

/* Showcase — banner + horizontal filmstrip */
.ypj-showcase {
  padding: 3rem 0 4rem;
}

.ypj-gallery__banner {
  position: relative;
  margin: 0 0 2rem;
  padding: 0.75rem;
  background: linear-gradient(180deg, var(--ypj-panel-light), var(--ypj-panel));
  border-radius: var(--ypj-radius-lg);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 0 var(--ypj-panel-dark), 0 16px 32px var(--ypj-shadow-deep);
  overflow: hidden;
}

.ypj-gallery__banner img {
  border-radius: calc(var(--ypj-radius-lg) - 0.5rem);
  width: 100%;
}

.ypj-gallery__banner figcaption {
  padding: 0.65rem 0.5rem 0.25rem;
  font-family: var(--ypj-font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.ypj-filmstrip {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 0.25rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ypj-panel-light) transparent;
}

.ypj-filmstrip::-webkit-scrollbar {
  height: 6px;
}

.ypj-filmstrip::-webkit-scrollbar-thumb {
  background: var(--ypj-panel-light);
  border-radius: 999px;
}

.ypj-filmstrip__card {
  position: relative;
  flex: 0 0 min(220px, 72vw);
  margin: 0;
  padding: 0.65rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(232, 246, 255, 0.9));
  border-radius: 1.25rem;
  border: 2px solid rgba(43, 111, 212, 0.15);
  box-shadow: 0 8px 0 rgba(43, 111, 212, 0.1), 0 12px 24px var(--ypj-shadow);
  scroll-snap-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.ypj-filmstrip__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 0 rgba(43, 111, 212, 0.08), 0 18px 32px var(--ypj-shadow-deep);
}

.ypj-filmstrip__card img {
  border-radius: 0.85rem;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  background: rgba(200, 230, 255, 0.5);
}

.ypj-filmstrip__card img:not([src]) {
  min-height: 280px;
}

.ypj-filmstrip__card figcaption {
  padding: 0.55rem 0.25rem 0.15rem;
  font-family: var(--ypj-font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ypj-text);
  text-align: center;
}

@media (min-width: 768px) {
  .ypj-filmstrip__card {
    flex-basis: 200px;
  }

  .ypj-filmstrip__card--lift {
    transform: translateY(1.25rem);
  }

  .ypj-filmstrip__card--lift:hover {
    transform: translateY(calc(1.25rem - 6px));
  }
}

@media (min-width: 1024px) {
  .ypj-filmstrip {
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: visible;
    padding-bottom: 2rem;
  }

  .ypj-filmstrip__card {
    flex-basis: 190px;
  }
}

/* Download reward panel */
.ypj-download {
  padding: 2rem 0 5rem;
}

.ypj-reward-panel {
  position: relative;
  padding: 2.5rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, #1e4fa8 0%, #2b6fd4 40%, #3b82f6 100%);
  border-radius: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 0 #1a3d7a,
    0 24px 48px var(--ypj-shadow-deep),
    inset 0 2px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.ypj-reward-panel__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(255, 217, 61, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.ypj-reward-panel__badge {
  position: relative;
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 1.5rem;
  font-family: var(--ypj-font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--ypj-yellow);
  background: linear-gradient(180deg, #7c3aed, var(--ypj-purple));
  border-radius: 0.5rem;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 0 #6d28d9;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.ypj-reward-panel__title {
  position: relative;
  margin: 0 0 1rem;
  font-family: var(--ypj-font-head);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--ypj-white);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.ypj-reward-panel__desc {
  position: relative;
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.ypj-reward-panel__cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* Spool dock HUD nav */
.ypj-spool-dock {
  position: fixed;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: min(calc(100% - 1.5rem), 480px);
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 246, 255, 0.95));
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px var(--ypj-shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ypj-spool-dock__list {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ypj-spool-dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.ypj-spool-dock__item:hover,
.ypj-spool-dock__item.is-active {
  background: rgba(43, 111, 212, 0.1);
}

.ypj-spool-dock__item.is-active {
  transform: translateY(-3px);
}

.ypj-spool-dock__spool {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.ypj-spool-dock__spool--orange { background: linear-gradient(145deg, #ffb07a, var(--ypj-orange)); }
.ypj-spool-dock__spool--cyan { background: linear-gradient(145deg, #6ee8f7, #06b6d4); }
.ypj-spool-dock__spool--pink { background: linear-gradient(145deg, #ff9bbb, var(--ypj-pink)); }
.ypj-spool-dock__spool--purple { background: linear-gradient(145deg, #c4a0ff, var(--ypj-purple)); }

.ypj-spool-dock__label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--ypj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ypj-spool-dock__item.is-active .ypj-spool-dock__label {
  color: var(--ypj-panel);
}

/* Footer */
.ypj-footer {
  padding: 1.5rem 0 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(43, 111, 212, 0.12);
}

.ypj-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.ypj-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ypj-text-muted);
}

.ypj-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
}

.ypj-footer__links a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ypj-panel);
  cursor: pointer;
  transition: color 0.2s ease;
}

.ypj-footer__links a:hover {
  color: var(--ypj-purple);
}

/* Modal */
.ypj-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100% - 2rem);
  width: 400px;
}

.ypj-modal::backdrop {
  background: rgba(26, 43, 74, 0.6);
}

.ypj-modal__panel {
  position: relative;
  padding: 2rem 1.75rem;
  background: linear-gradient(180deg, #fff 0%, #e8f6ff 100%);
  border-radius: var(--ypj-radius-lg);
  border: 3px solid rgba(43, 111, 212, 0.2);
  box-shadow: 0 16px 48px var(--ypj-shadow-deep);
  text-align: center;
}

.ypj-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(43, 111, 212, 0.1);
  color: var(--ypj-panel);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ypj-modal__close:hover {
  background: rgba(43, 111, 212, 0.2);
}

.ypj-modal__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.ypj-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, var(--ypj-panel-light), var(--ypj-panel));
  color: var(--ypj-white);
  box-shadow: 0 6px 0 var(--ypj-panel-dark);
}

.ypj-modal__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.ypj-modal__title {
  margin: 0 0 0.75rem;
  font-family: var(--ypj-font-head);
  font-size: 1.5rem;
  color: var(--ypj-text);
}

.ypj-modal__text {
  margin: 0 0 1.5rem;
  color: var(--ypj-text-muted);
  font-size: 0.95rem;
}

/* Responsive — tablet & desktop */
@media (min-width: 768px) {
  .ypj-nav {
    display: flex;
  }

  .ypj-menu-btn {
    display: none;
  }

  .ypj-header__panel {
    grid-template-columns: auto 1fr auto auto;
  }

  .ypj-hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .ypj-hero__visual {
    order: 2;
  }

  .ypj-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .ypj-thread-spine {
    width: 100px;
    opacity: 0.55;
  }

  .ypj-hero__copy {
    padding-right: 1rem;
  }

  .ypj-phone {
    max-width: 300px;
  }
}
