/* Home, All work, About, Games and Pix pages.
   Colours, type, header and footer come from css/margo-system.css. */

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

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 8px;
  z-index: 60;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--card);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

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

.sec { padding-block: clamp(64px, 9vw, 116px); }
.sec-tight { padding-top: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 46px); }
.sec-head .ms-lead { margin-top: 12px; }
.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px); }
.page-head .ms-lead { margin-top: 16px; }

/* ---------- Home ---------- */
.hero { padding-block: clamp(44px, 6vw, 84px) clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero .ms-lead { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 38px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.jump a { color: var(--ink-2); font: 600 14px/1.2 var(--sans); text-decoration: none; }
.jump a:hover { color: var(--ink); }
.jump a::before { content: "→ "; color: var(--plum-2); }
html[dir="rtl"] .jump a::before { content: "← "; }
.hero-art { position: relative; aspect-ratio: 1 / 1.02; margin: 0; }
.hero-art img { position: absolute; width: 56%; border-radius: var(--r-sm); box-shadow: var(--shadow-lift); }
.hero-art .c1 { inset-inline-end: 0; top: 0; z-index: 2; }
.hero-art .c2 { inset-inline-start: 0; top: 14%; z-index: 1; }
.hero-art figcaption { position: absolute; inset-inline-end: 0; bottom: 0; width: 42%; color: var(--ink-2); font: 600 13px/1.45 var(--sans); }
.hero-art figcaption b { display: block; margin-bottom: 4px; color: var(--ink); font: 600 17px/1.3 var(--serif); }

.comics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.book { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; }
.book .cover { position: relative; overflow: hidden; aspect-ratio: 2 / 3; border-radius: var(--r-sm); background: var(--paper-2); box-shadow: var(--shadow); transition: box-shadow 0.3s ease; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.book:hover .cover { box-shadow: var(--shadow-lift); }
.book:hover .cover img { transform: scale(1.03); }
.book .tag { position: absolute; inset-inline-start: 12px; top: 12px; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(46, 36, 48, 0.8); color: var(--card); font: 700 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.book p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* Dark workshop band (home teaser) */
.pix-band { position: relative; overflow: hidden; }
.pix-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 4%, rgba(201, 178, 255, 0.22) 4% 20%, transparent 20%) 0 22% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 4%, rgba(201, 178, 255, 0.14) 4% 16%, transparent 16%) 0 36% / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)) 6% 44% / 10% 22% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.pix-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.pix-hero-stage { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1; margin-inline: auto; }
.pix-hero-stage::before { content: ""; position: absolute; inset: 14% 16% 20%; border-radius: 50%; background: radial-gradient(circle, rgba(142, 92, 240, 0.6), transparent 66%); filter: blur(32px); }
.pix-hero-stage::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 6%; height: 8%; border-radius: 50%; background: radial-gradient(ellipse, rgba(201, 178, 255, 0.38), transparent 70%); }
.pix-hero-stage img { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 0 28px rgba(142, 92, 240, 0.35)); animation: pix-float 6s ease-in-out infinite; }
@keyframes pix-float { 50% { transform: translateY(-10px); } }
.pix-band .ms-lead { margin-top: 18px; white-space: pre-line; }
.pix-band .hero-actions { margin-top: 28px; }

.print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); }
.print { display: grid; grid-template-columns: 42% 1fr; gap: 18px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: inherit; text-decoration: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.print:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.print img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-xs); }
.print p { margin: 8px 0 14px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.chip { display: inline-block; padding: 5px 9px; border-radius: var(--r-xs); background: var(--paper-2); color: var(--ink-2); font: 700 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.print .ms-more { font-size: 14px; }

.games-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game-mini { color: inherit; text-decoration: none; }
.game-mini img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); filter: saturate(0.88); transition: filter 0.3s ease; }
.game-mini:hover img { filter: none; }
.game-mini span { display: block; margin-top: 10px; font: 600 15px/1.3 var(--sans); }

.about-row { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.about-row blockquote { margin: 0; font: 500 clamp(22px, 2.4vw, 30px)/1.4 var(--serif); letter-spacing: -0.01em; }

/* ---------- All work ---------- */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 32px); }
.work { position: relative; display: grid; grid-template-columns: 44% 1fr; gap: 22px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: inherit; text-decoration: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.work:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.work img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-sm); }
.work .ms-h3 { font-size: 26px; }
.work p { margin: 8px 0 16px; color: var(--ink-2); font-size: 15px; }
.work.ms-dark { border-color: transparent; }
.work.ms-dark img { object-fit: contain; background: transparent; }
.work.ms-dark p { color: var(--on-dark-2); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.about-hero .about-hello { margin: 18px 0 0; font: 600 clamp(22px, 2.4vw, 28px)/1.3 var(--serif); }
.about-hero .about-lead { margin: 14px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.65; }
.about-film { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-md); background: var(--graphite); box-shadow: var(--shadow-lift); object-fit: cover; }
.about-blocks { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-block h2 { margin: 0 0 12px; font: 600 clamp(24px, 2.6vw, 32px)/1.15 var(--serif); }
.about-block p { margin: 0; color: var(--ink-2); line-height: 1.7; }

.lego-album { margin-top: 24px; }
.lego-frame { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.lego-stage { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-md); background: var(--paper-2); box-shadow: var(--shadow); cursor: zoom-in; }
.lego-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.lego-stage img.is-on { opacity: 1; }
.lego-arrow { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; transition: border-color 0.2s ease; }
.lego-arrow:hover { border-color: var(--ink); }
html[dir="rtl"] .lego-arrow { transform: scaleX(-1); }
.lego-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.lego-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.lego-dots button.is-on { width: 20px; border-radius: 4px; background: var(--ink); }
.lego-light { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.lego-light[hidden] { display: none; }
.lego-light-back { position: absolute; inset: 0; border: 0; background: rgba(46, 36, 48, 0.86); cursor: zoom-out; }
.lego-light-panel { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; max-width: min(1000px, 100%); max-height: 100%; padding: 52px 14px 14px; }
.lego-light-img { max-width: 100%; max-height: 82vh; border-radius: var(--r-sm); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.lego-light-x { position: absolute; top: 0; inset-inline-end: 14px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }
.lego-light .lego-arrow { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
html.viewer-lock, html.viewer-lock body { overflow: hidden; }

/* ---------- Games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.8vw, 32px); }
.game-card { display: block; color: inherit; text-decoration: none; }
.game-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); background: var(--paper-2); box-shadow: var(--shadow-sm); filter: saturate(0.9); transition: box-shadow 0.3s ease, filter 0.3s ease; }
.game-card:hover img { box-shadow: var(--shadow-lift); filter: none; }
.game-card h2 { margin: 14px 0 0; font: 600 20px/1.25 var(--serif); }
.game-card img.pix-cover { object-fit: cover; object-position: center 30%; background: var(--graphite); }

/* ---------- Pix page ---------- */
.pix-page { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.pix-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.pix-page-head .ms-lead { margin-top: 14px; max-width: 34em; }
.pix-page .pix-blurb { margin: clamp(28px, 4vw, 40px) auto 0; max-width: 40em; color: var(--on-dark-2); text-align: center; white-space: pre-line; line-height: 1.7; }
.pix-stage { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .pix-grid, .about-row, .about-hero, .about-blocks { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; width: 100%; margin-inline: auto; }
  .comics-grid { grid-template-columns: 1fr 1fr; }
  .comics-grid .book:nth-child(3) { grid-column: 1 / -1; display: grid; grid-template-columns: 40% 1fr; align-items: center; }
  .print-grid, .works { grid-template-columns: 1fr; }
  .games-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .game-mini { scroll-snap-align: start; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .about-row img { max-width: 220px; }
  .pix-hero-stage { max-width: 340px; }
  .about-film { max-width: 520px; }
}
@media (max-width: 560px) {
  .sec-head, .pix-page-head { flex-direction: column; align-items: flex-start; }
  .print, .work { grid-template-columns: 36% 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .lego-frame { grid-template-columns: 1fr; }
  .lego-frame .lego-arrow { display: none; }
  .lego-light-panel { grid-template-columns: 1fr; padding-inline: 0; }
  .lego-light-panel .lego-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pix-hero-stage img, .book .cover img, .lego-stage img { animation: none; transition: none; }
}

/* Refinement 2: a calmer first screen */
.hero { padding-block: clamp(40px, 5vw, 72px) clamp(48px, 7vw, 92px); }
@media (min-width: 981px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); }
  .hero-art { max-width: 470px; justify-self: end; width: 100%; }
}
.hero .ms-lead { margin-top: 20px; max-width: 32em; }
.hero-actions { margin-top: 28px; }
.about-row blockquote { font-weight: 500; font-size: clamp(21px, 2.1vw, 27px); }
.about-hero .about-hello { font-weight: 500; }
.about-block h2, .game-card h2 { font-weight: 500; }
@media (max-width: 980px) { .hero-art { justify-self: center; max-width: 420px; } }
@media (max-width: 560px) { .hero-art figcaption { display: none; } }

/* Home "About me": the promo film plays as a quiet, silent loop in place of the still image */
.about-row .about-row-film { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); background: var(--paper-2); pointer-events: none; }
@media (max-width: 980px) { .about-row .about-row-film { max-width: 220px; } }

/* ---------- Home page (23.10.2026): showcase → games → coloring & stickers → about ---------- */
body[data-page="home"] .home-hero { padding-block: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); }
body[data-page="home"] .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(28px, 5vw, 64px); }
body[data-page="home"] .hero-copy .ms-lead { margin-top: 18px; max-width: 30em; }
body[data-page="home"] .hero-actions { margin-top: 28px; }
body[data-page="home"] .home-sec { padding-block: clamp(36px, 5vw, 64px); }
body[data-page="home"] .sec-head { align-items: center; margin-bottom: clamp(18px, 2.4vw, 28px); }

/* showcase: one cover at a time */
.showcase { width: 100%; justify-self: end; }
.showcase-stage { position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-md); overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow-lift); }
.showcase-slide { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
.showcase-slide.is-on { opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0s; }
.showcase-slide img { width: 100%; height: 100%; object-fit: cover; }
.showcase-slide.is-tall img { object-fit: contain; padding: 18px 18px 64px; }
.showcase-cap { position: absolute; inset-inline: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: rgba(255, 250, 243, 0.92); box-shadow: var(--shadow-sm); }
.showcase-cap b { font: 600 15px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-cap .chip { flex: none; }
.showcase-slide:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.showcase-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.showcase-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.showcase-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width 0.3s ease, background 0.3s ease; }
.showcase-dots button.is-on::before { width: 22px; background: var(--ink); }

/* coloring & stickers: compact cards */
.print-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.print-mini { display: grid; grid-template-rows: auto auto 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: inherit; text-decoration: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.print-mini:hover { border-color: var(--gold-line, var(--ink)); box-shadow: var(--shadow-sm); }
.print-mini img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--r-xs); background: var(--paper-2); }
.print-mini.is-sticker img { object-fit: contain; padding: 10px; }
.print-mini .chip { justify-self: start; margin-top: 4px; }
.print-mini b { font: 600 15px/1.35 var(--serif); }

/* about + collection slideshow */
.home-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(28px, 5vw, 64px); align-items: center; }
.home-about-me { display: grid; grid-template-columns: 150px 1fr; gap: clamp(18px, 3vw, 32px); align-items: start; }
.home-portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.home-about-text { margin: 12px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 34em; }
.home-about-me .ms-btn { margin-top: 20px; }
.home-album { margin: 0; }
.home-album-title { margin: 0 0 10px; color: var(--ink-2); font: 600 13px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }
.home-album .lego-frame { grid-template-columns: auto minmax(0, 320px) auto; justify-content: center; gap: 12px; }
.home-album .lego-stage { max-width: 320px; justify-self: center; }
.home-album-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.home-album-bar .lego-dots { margin: 0; flex-wrap: wrap; max-width: 260px; }
.lego-pause { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 11px; cursor: pointer; }
.lego-pause .i-play { display: none; }
.lego-pause.is-paused .i-play { display: inline; }
.lego-pause.is-paused .i-pause { display: none; }
.home-album .lego-dots button { width: 6px; height: 6px; }
.home-album .lego-dots button.is-on { width: 16px; }
.lego-arrow:focus-visible, .lego-pause:focus-visible, .showcase-dots button:focus-visible, .lego-stage:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (min-width: 981px) {
  /* the footer's "Sections" column repeated the main menu and is not shown on the home page */
  body[data-page="home"] .ms-footer-grid { grid-template-columns: 1.5fr repeat(2, 1fr); }
}
@media (max-width: 980px) {
  body[data-page="home"] .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .showcase { max-width: 460px; justify-self: center; }
  .print-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-about { grid-template-columns: 1fr; }
  .home-album { max-width: 400px; width: 100%; justify-self: center; }
}
@media (max-width: 560px) {
  body[data-page="home"] .home-hero { padding-block: 22px 12px; }
  body[data-page="home"] .hero-copy .ms-lead { margin-top: 12px; }
  body[data-page="home"] .hero-actions { margin-top: 18px; }
  .showcase-stage { aspect-ratio: 16 / 10; }
  .showcase-slide.is-tall img { padding: 10px 10px 54px; }
  .showcase-cap { inset-inline: 8px; bottom: 8px; padding: 6px 10px; }
  .home-about-me { grid-template-columns: 96px 1fr; }
  /* keep arrows on the home slideshow: the stage stays small and centred */
  .home-album .lego-frame { grid-template-columns: auto minmax(0, 240px) auto; gap: 8px; }
  .home-album .lego-frame .lego-arrow { display: grid; width: 38px; height: 38px; }
  .home-album .lego-stage { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-slide, .showcase-slide.is-on { transition: none; }
}

/* Featured game: Midnight Mayhem — a night-themed card above the games row on the home page. */
.ush-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: clamp(18px, 3vw, 40px); margin-bottom: clamp(22px, 3vw, 34px); padding: clamp(12px, 1.6vw, 18px); border-radius: var(--r-lg); background: radial-gradient(120% 140% at 85% 0%, #3a2350 0%, #1d1626 55%, #120e18 100%); color: var(--on-dark); text-decoration: none; box-shadow: var(--shadow-lift); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.ush-feature:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(75, 61, 47, 0.08), 0 28px 54px rgba(46, 36, 48, 0.3); }
.ush-feature:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.ush-feature img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: var(--r-md); }
.ush-feature-text { display: grid; gap: 12px; justify-items: start; padding-inline-end: clamp(4px, 2vw, 24px); }
.ush-feature-chip { padding: 6px 10px; border-radius: 999px; background: rgba(125, 255, 168, 0.14); color: #a8ffc4; font: 700 12px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.ush-feature b { font: 600 clamp(26px, 3.2vw, 40px)/1.12 var(--serif); color: #fff6ec; }
.ush-feature-lead { max-width: 26em; color: var(--on-dark-2); font: 500 16px/1.55 var(--sans); }
.ush-feature .ush-feature-btn { margin-top: 6px; background: #7dffa0; color: #0b1a10; }
.ush-feature:hover .ush-feature-btn { background: #a8ffc4; }
html[dir="rtl"] .ush-feature-chip { letter-spacing: 0.02em; }
@media (max-width: 760px) {
  .ush-feature { grid-template-columns: 1fr; }
  .ush-feature-text { padding: 4px 6px 8px; }
  .ush-feature .ush-feature-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ush-feature { transition: none; }
  .ush-feature:hover { transform: none; }
}

/* ---------- Home page v3 (25.10.2026): hero → main game + new chapter → more games → to print → about ---------- */
.hp-hero { padding-block: clamp(28px, 4.5vw, 64px) clamp(24px, 3.5vw, 48px); overflow: hidden; }
.hp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hp-kicker { margin: 0 0 14px; color: var(--gold); font: 700 13px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
html[dir="rtl"] .hp-kicker { letter-spacing: 0.02em; }
.hp-hero-copy .ms-lead { margin-top: 18px; max-width: 31em; }
.hp-hero-copy .hero-actions { margin-top: 28px; }

/* three real covers laid out like paper cards on a table */
.hp-collage { position: relative; aspect-ratio: 5 / 4; width: 100%; }
.hp-tile { position: absolute; display: block; padding: 8px 8px 34px; border-radius: var(--r-sm); background: var(--card); box-shadow: var(--shadow-lift); color: var(--ink); text-decoration: none; transition: transform 0.35s ease, box-shadow 0.35s ease; animation: hp-float 7s ease-in-out infinite; }
.hp-tile img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-xs); background: var(--paper-2); }
.hp-tile-cap { position: absolute; inset-inline: 10px; bottom: 9px; font: 700 11px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
html[dir="rtl"] .hp-tile-cap { letter-spacing: 0.02em; }
.hp-tile-game { inset-inline-start: 0; top: 10%; width: 66%; height: 56%; --r: -3deg; z-index: 2; }
.hp-tile-book { inset-inline-end: 2%; top: 0; width: 36%; height: 66%; --r: 4deg; animation-delay: -2.3s; z-index: 1; }
.hp-tile-sticker { inset-inline-end: 14%; bottom: 0; width: 34%; height: 50%; --r: -5deg; animation-delay: -4.6s; z-index: 3; }
.hp-tile-sticker img { object-fit: contain; background: #fff; }
.hp-tile:hover, .hp-tile:focus-visible { z-index: 4; box-shadow: 0 2px 4px rgba(75, 61, 47, 0.08), 0 30px 60px rgba(75, 61, 47, 0.22); animation-play-state: paused; transform: rotate(0deg) scale(1.03); }
.hp-tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@keyframes hp-float { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-6px); } }

.hp-sec { padding-block: clamp(36px, 5vw, 68px); }
.hp-sec-lead { margin: 8px 0 0; color: var(--ink-2); font: 500 16px/1.5 var(--sans); max-width: 36em; }
.hp-main-game { padding-block: clamp(12px, 2vw, 24px) 0; }

/* Midnight Mayhem: the big night card */
.hp-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 3.4vw, 48px); padding: clamp(12px, 1.6vw, 20px); border-radius: var(--r-lg); background: radial-gradient(120% 140% at 85% 0%, #3a2350 0%, #1d1626 55%, #120e18 100%); color: var(--on-dark); text-decoration: none; box-shadow: var(--shadow-lift); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.hp-feature:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(75, 61, 47, 0.08), 0 28px 54px rgba(46, 36, 48, 0.3); }
.hp-feature:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.hp-feature-art { display: block; overflow: hidden; border-radius: var(--r-md); }
.hp-feature-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.6s ease; }
.hp-feature:hover .hp-feature-art img { transform: scale(1.03); }
.hp-feature-text { display: grid; gap: 14px; justify-items: start; padding-inline-end: clamp(4px, 2vw, 28px); }
.hp-chip-night { padding: 6px 10px; border-radius: 999px; background: rgba(125, 255, 168, 0.14); color: #a8ffc4; font: 700 12px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.hp-feature b { font: 600 clamp(30px, 3.8vw, 48px)/1.08 var(--serif); color: #fff6ec; }
.hp-feature-lead { max-width: 26em; color: var(--on-dark-2); font: 500 16px/1.55 var(--sans); }
.hp-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-facts span { padding: 6px 11px; border: 1px solid rgba(246, 238, 228, 0.18); border-radius: 999px; color: var(--on-dark); font: 500 13px/1.3 var(--sans); }
.hp-btn-night { margin-top: 4px; background: #7dffa0; color: #0b1a10; }
.hp-feature:hover .hp-btn-night { background: #a8ffc4; }
html[dir="rtl"] .hp-chip-night, html[dir="rtl"] .hp-chip-new { letter-spacing: 0.02em; }

/* chapter 2 announcement: real level shots, no promises beyond the published build */
.hp-ch2 { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(20px, 3.4vw, 48px); align-items: center; margin-top: clamp(16px, 2vw, 24px); padding: clamp(18px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.hp-chip-new { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #f6dfd2; color: #9a3d22; font: 700 11px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.hp-ch2-title { margin: 12px 0 0; color: var(--title); font: 600 clamp(24px, 2.6vw, 32px)/1.15 var(--serif); }
.hp-ch2-text p { margin: 10px 0 14px; color: var(--ink-2); font: 500 15px/1.6 var(--sans); max-width: 30em; }
.hp-ch2-shots { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.hp-ch2-shots img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); background: #1d1626; box-shadow: var(--shadow-sm); }
.hp-ch2-shots img:first-child { grid-row: span 2; aspect-ratio: auto; }

/* more games: one big tile and four small ones */
.hp-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; gap: clamp(12px, 1.8vw, 20px); }
.hp-game { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md); background: var(--paper-2); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); transition: box-shadow 0.25s ease, transform 0.25s ease; }
.hp-game img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hp-game span { position: absolute; inset-inline: 0; bottom: 0; padding: 26px 14px 12px; background: linear-gradient(to top, rgba(28, 20, 26, 0.82), rgba(28, 20, 26, 0)); font: 600 16px/1.25 var(--sans); }
.hp-game-xl { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.hp-game-xl span { padding: 40px 20px 18px; font: 600 clamp(20px, 2.2vw, 26px)/1.2 var(--serif); }
.hp-game:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hp-game:hover img { transform: scale(1.04); }
.hp-game:focus-visible, .hp-book:focus-visible, .hp-sticker:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* to print: book covers stand like books, stickers look die-cut */
.hp-print { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 28px); align-items: start; }
.hp-book, .hp-sticker { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.hp-book img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; border-radius: 3px var(--r-sm) var(--r-sm) 3px; background: var(--paper-2); box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.06), var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
html[dir="rtl"] .hp-book img { border-radius: var(--r-sm) 3px 3px var(--r-sm); }
.hp-sticker img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; padding: 14px; border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--card); transition: transform 0.3s ease, border-color 0.3s ease; }
.hp-book:hover img { transform: translateY(-4px) rotate(-1deg); box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.06), var(--shadow-lift); }
.hp-sticker:hover img { transform: rotate(2deg); border-color: var(--gold-line); }
.hp-book .chip, .hp-sticker .chip { justify-self: start; margin-top: 6px; }
.hp-book b, .hp-sticker b { font: 600 15px/1.35 var(--serif); }

@media (max-width: 980px) {
  .hp-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hp-collage { max-width: 520px; width: 100%; justify-self: center; }
  .hp-feature, .hp-ch2 { grid-template-columns: 1fr; }
  .hp-feature-text { padding: 4px 6px 10px; }
  .hp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-game-xl { grid-row: auto; aspect-ratio: 16 / 9; }
  .hp-print { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hp-hero { padding-block: 20px 16px; }
  .hp-kicker { margin-bottom: 10px; font-size: 12px; }
  .hp-hero-copy .ms-lead { margin-top: 12px; }
  .hp-hero-copy .hero-actions { margin-top: 18px; }
  .hp-hero-copy .hero-actions .ms-btn { flex: 1 1 100%; justify-content: center; }
  .hp-tile { padding: 6px 6px 26px; }
  .hp-tile-cap { font-size: 10px; bottom: 7px; }
  .hp-btn-night { width: 100%; justify-content: center; }
  .hp-ch2-shots { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .hp-ch2-shots img:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .hp-game span { padding: 22px 10px 9px; font-size: 14px; }
  .hp-print { gap: 14px; }
  .hp-sticker img { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-tile { animation: none; transform: rotate(var(--r)); transition: none; }
  .hp-feature, .hp-feature-art img, .hp-game, .hp-game img, .hp-book img, .hp-sticker img { transition: none; }
  .hp-feature:hover, .hp-game:hover { transform: none; }
  .hp-feature:hover .hp-feature-art img, .hp-game:hover img { transform: none; }
}
