/* ==========================================================================
   WorldSoftNet — inner pages: about, game detail, games, questionnaire, articles, legal, 404
   ========================================================================== */

/* ---------- Home: hero stats on small screens ---------- */
@media (max-width: 560px) {
  .hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
  .hero__stats dd { font-size: 1.8rem; }
  .hero__stats dt { font-size: 11px; letter-spacing: .04em; }
}

/* ---------- Home: merge showcase ---------- */
.merge-showcase { display: grid; gap: var(--space-5); justify-items: center; }
.merge-showcase__chain { width: 100%; background: rgba(255, 255, 255, .95); border-radius: var(--radius-lg); padding: var(--space-4); }
.merge-showcase__phones { display: flex; gap: var(--space-5); justify-content: center; }
.merge-showcase__phones .phone { --phone-w: 170px; }
.merge-showcase__phones .phone:last-child { transform: translateY(28px); }
@media (max-width: 520px) { .merge-showcase__phones .phone { --phone-w: 132px; } }

/* ---------- About ---------- */
.collage { position: relative; min-height: 360px; }
.collage__tile { position: absolute; width: 58%; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 4px solid rgba(255, 255, 255, .9); }
.collage__tile svg { width: 100%; height: 100%; }
.collage__tile--1 { left: 0; top: 0; transform: rotate(-4deg); }
.collage__tile--2 { right: 0; top: 30px; transform: rotate(5deg); }
.collage__tile--3 { left: 8%; bottom: 0; transform: rotate(3deg); }
.collage__tile--4 { right: 6%; bottom: 20px; transform: rotate(-3deg); z-index: 1; }
@media (max-width: 959px) { .collage { display: none; } }

.facts { display: grid; gap: var(--space-4); margin: 0; }
.facts__item { display: flex; flex-direction: column-reverse; padding: var(--space-5); border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); }
.facts__item dd { margin: 0; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--primary); }
.facts__item dt { color: var(--text-muted); font-weight: 600; margin-top: .35rem; }

.statement { padding: var(--space-6); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.statement p { font-size: var(--fs-xl); font-family: var(--font-display); font-weight: 600; color: var(--navy-900); line-height: 1.3; }
.statement h3 { color: var(--text-muted); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; }
.statement--mission { border-top: 4px solid var(--blue-500); }
.statement--vision { border-top: 4px solid var(--teal-500); }
.section--dark .art--chain { background: rgba(255, 255, 255, .95); border-radius: var(--radius-lg); padding: var(--space-4); }

/* ---------- Games page ---------- */
.chains { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.chains__item { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.chains__item figcaption { margin-top: var(--space-2); font-weight: 700; text-align: center; }
.chains__item figcaption a { text-decoration: none; }

/* ---------- Game detail ---------- */
.game-hero .page-hero__bg > svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .2; }
.game-hero .page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 15, 36, .92) 30%, rgba(7, 15, 36, .55)); }
.game-hero--egypt { --game-accent: #ffb35c; }
.game-hero--ocean { --game-accent: #5cc2e8; }
.game-hero--fruit { --game-accent: #9fdc6e; }
.game-hero--coins { --game-accent: #5cc6cf; }
.game-hero .eyebrow { color: var(--game-accent, var(--teal-500)); }
.game-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: var(--space-4); }
.game-hero__meta .badge--outline { color: rgba(255, 255, 255, .85); }
.game-hero__meta .platform-icon { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: var(--white); }
.game-hero__phones { position: relative; min-height: 480px; }
.game-hero__phone { position: absolute; left: 50%; }
.game-hero__phone--front { --phone-w: 230px; top: 0; transform: translateX(-20%); z-index: 1; }
.game-hero__phone--back { --phone-w: 180px; top: 70px; transform: translateX(-95%) rotate(-7deg); opacity: .92; }
@media (max-width: 959px) {
  .game-hero__phones { min-height: 440px; }
  .game-hero__phone--front { --phone-w: 200px; }
  .game-hero__phone--back { --phone-w: 160px; }
}

.mechanic-box { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-left: 4px solid var(--primary); background: var(--blue-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--navy-900); }
.chain-card h3 { margin-bottom: .25rem; }
.chain-list { margin: var(--space-4) 0 0; display: grid; gap: .6rem; }
.chain-list li { display: flex; align-items: center; gap: var(--space-3); padding: .45rem .6rem; border-radius: var(--radius-sm); background: var(--gray-25); border: 1px solid var(--border); }
.chain-list__icon { width: 54px; height: 54px; flex-shrink: 0; }
.chain-list__icon svg { width: 100%; height: 100%; }
.chain-list__lvl { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; background: var(--navy-900); color: var(--white); flex-shrink: 0; }
.chain-list__name { font-weight: 600; color: var(--navy-900); }

.screens { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6); }
.screens__item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.screens__item .phone { --phone-w: 230px; }
.screens__item figcaption { font-weight: 700; color: var(--navy-900); }
@media (max-width: 520px) { .screens__item .phone { --phone-w: 200px; } }

.swatches-label { font-weight: 700; color: var(--navy-900) !important; margin-top: var(--space-4); margin-bottom: var(--space-2) !important; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-4); }
.swatch { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--gray-200); }
.art-chain svg { width: 100%; height: auto; }
.spec-list { margin: 0 0 var(--space-3); display: grid; }
.spec-list > div { display: grid; grid-template-columns: minmax(130px, .8fr) 1.2fr; gap: var(--space-3); padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.spec-list dt { color: var(--text-muted); font-weight: 600; }
.spec-list dd { margin: 0; color: var(--navy-900); font-weight: 600; }
.card > .demo-note { margin-top: var(--space-4); }

/* ---------- Questionnaire ---------- */
.quiz { max-width: 760px; margin-inline: auto; }
.quiz__form { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); padding: var(--space-6) var(--space-5); }
@media (min-width: 640px) { .quiz__form { padding: var(--space-7); } }
.quiz__progress { height: 8px; border-radius: 8px; background: var(--gray-100); overflow: hidden; margin-bottom: var(--space-6); }
.quiz__progress span { display: block; height: 100%; background: var(--grad-accent); border-radius: 8px; transition: width .4s var(--ease); }
.quiz__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__question { padding: 0; margin-bottom: var(--space-2); display: flex; flex-direction: column; gap: .3rem; }
.quiz__question:focus { outline: none; }
.quiz__count { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); }
.quiz__title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--navy-900); line-height: 1.25; }
.quiz__hint { color: var(--text-muted); font-size: var(--fs-sm); }
.quiz__options { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); margin-top: var(--space-4); }
.quiz__option {
  position: relative; display: flex; align-items: center; gap: var(--space-3); padding: .85rem 1rem; border-radius: var(--radius);
  border: 2px solid var(--gray-100); background: var(--gray-25); cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
}
.quiz__option:hover { border-color: var(--gray-200); transform: translateY(-1px); }
.quiz__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz__option:has(.quiz__input:checked) { border-color: var(--primary); background: var(--blue-100); }
.quiz__option:has(.quiz__input:focus-visible) { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.quiz__icon { width: 46px; height: 46px; flex-shrink: 0; }
.quiz__icon svg { width: 100%; height: 100%; }
.quiz__key { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-600); flex-shrink: 0; }
.quiz__label { font-weight: 600; color: var(--navy-900); line-height: 1.3; }
.quiz__check { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--white); display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; flex-shrink: 0; }
.quiz__check svg { width: 15px; height: 15px; }
.quiz__option:has(.quiz__input:checked) .quiz__check { opacity: 1; transform: none; }
.quiz__error { margin-top: var(--space-3); }
.quiz__nav { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-6); }

.quiz-result { outline: none; }
.quiz-result__head { text-align: center; margin-bottom: var(--space-6); }
.quiz-result__head .eyebrow { justify-content: center; }
.quiz-result__game { display: grid; gap: var(--space-6); align-items: center; padding: var(--space-6); }
@media (min-width: 700px) { .quiz-result__game { grid-template-columns: auto 1fr; } }
.quiz-result__phone { display: flex; justify-content: center; }
.quiz-result__phone .phone { --phone-w: 200px; }
.quiz-result__name { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.quiz-result__game h4 { margin-top: var(--space-4); }
.quiz-result__also { margin: var(--space-7) 0 var(--space-4); }

/* ---------- Article ---------- */
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-5); font-size: var(--fs-sm); color: rgba(255, 255, 255, .78); }
.article-meta__author { display: flex; align-items: center; gap: var(--space-3); }
.article-meta__author > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.article-meta__author strong { color: var(--white); }
.article-meta .badge--outline { color: rgba(255, 255, 255, .85); }
.article { padding-top: var(--space-6); }
.article__cover { margin: 0 0 var(--space-6); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.article__cover svg { width: 100%; height: 100%; }
.prose { font-size: 1.1rem; line-height: 1.75; color: var(--gray-800); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--space-6); }
.prose ul { padding-left: 1.3rem; margin: 0 0 var(--space-4); }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--primary); }
.prose blockquote { margin: var(--space-6) 0; padding: var(--space-4) var(--space-5); border-left: 4px solid var(--teal-500); background: var(--teal-100); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--navy-900); }

/* ---------- Legal ---------- */
.legal-layout { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 960px) { .legal-layout { grid-template-columns: 260px 1fr; } .toc { position: sticky; top: calc(var(--header-h) + 20px); } }
.toc__title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: var(--fs-sm); }
.legal-banner { padding: var(--space-4) var(--space-5); border-radius: var(--radius); background: #fffaeb; border: 1px dashed #e0b04a; color: #6b4700; font-size: var(--fs-sm); line-height: 1.6; }
.legal-layout .prose section h2 { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: var(--space-9); }
.not-found__art { max-width: 520px; margin: 0 auto var(--space-5); }
.not-found__code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; line-height: 1; margin: 0; background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Game logos (app icons) ---------- */
.game-logo { display: inline-block; flex-shrink: 0; border-radius: 24%; box-shadow: 0 6px 16px rgba(11, 24, 56, .18); }
.game-logo svg { width: 100%; height: 100%; }
.game-logo--sm { width: 44px; height: 44px; }
.game-logo--md { width: 52px; height: 52px; }
.game-logo--lg { width: 84px; height: 84px; margin-bottom: var(--space-4); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.game-card__head { display: flex; align-items: center; gap: var(--space-3); }
.quiz-result__name { display: flex; align-items: center; gap: var(--space-3); }

/* ---------- Illustrated scenes (studio, team at work, UI/UX example) ---------- */
.scene-figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.scene-figure svg { width: 100%; height: auto; display: block; }
.scene-figure figcaption { padding: var(--space-3) var(--space-4); font-size: var(--fs-xs); color: var(--text-muted); }
.scene-figure--hero { box-shadow: var(--shadow-lg); border: 4px solid rgba(255, 255, 255, .9); }
.scene-figure--wide { max-width: 900px; margin: 0 auto var(--space-6); }
.scene-figure--ux { box-shadow: none; background: var(--gray-25); border: 1px solid var(--border); padding: var(--space-4); }
.who-aside { display: grid; gap: var(--space-4); }
.facts--row { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.facts--row .facts__item { padding: var(--space-4); justify-content: flex-end; }
.facts--row .facts__item dd { font-size: 2rem; }
.facts--row .facts__item dt { font-size: var(--fs-xs); }
@media (max-width: 480px) { .facts--row { grid-template-columns: 1fr; } }
.office-card__studio { margin: 0; border-radius: var(--radius); overflow: hidden; }
.office-card__studio svg { width: 100%; height: auto; display: block; }

.ux-points { display: grid; gap: var(--space-4); margin: 0; }
.ux-points li { display: flex; gap: var(--space-3); align-items: flex-start; }
.ux-points li > span:last-child { display: flex; flex-direction: column; color: var(--text-muted); font-size: var(--fs-sm); }
.ux-points strong { color: var(--navy-900); font-size: var(--fs-md); }
.ux-points__num { width: 30px; height: 30px; border-radius: 50%; background: var(--coral-500); color: var(--white); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
