/* ==========================================================================
   Vasa Vasa Studio — foglio di stile del sito
   Lo studio è una cornice quieta (bianco, inchiostro, un solo rosso).
   I colori appartengono ai giochi: ogni gioco porta il suo tema
   (vedi games/<gioco>/theme.css) con le variabili --g-*.
   ========================================================================== */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #2a1b2d;
  --muted: #685b6b;
  --line: #ece6ec;
  --lipstick: #d6304c;
  --wash: #f8f4f7;

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);

  --header-bg: var(--paper);
}

/* --- Base --------------------------------------------------------------- */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

img { height: auto; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

a:hover { color: var(--lipstick); }

:focus-visible {
  outline: 3px solid var(--lipstick);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { text-wrap: balance; }

[id] { scroll-margin-top: 88px; }

p { margin: 0 0 1em; text-wrap: pretty; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { top: 12px; color: var(--paper); }

/* --- Lingue: ogni testo esiste in IT e EN, si mostra solo quello attivo -- */

html[lang="it"] body [lang="en"],
html[lang="en"] body [lang="it"] { display: none !important; }

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px 28px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark:hover { color: var(--ink); }

.wordmark__a { font-weight: 850; font-stretch: 78%; }

.wordmark__b { font-weight: 280; font-stretch: 125%; }

.wordmark__c {
  margin-left: 0.3em;
  font-size: 0.6em;
  font-weight: 560;
  color: var(--muted);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px 26px;
}

.site-nav__links {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__links a {
  font-size: var(--step--1);
  font-weight: 580;
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
}

.lang-switch button {
  min-width: 2.6em;
  padding: 0.3em 0.7em;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}

.lang-switch button:hover { color: var(--ink); }

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 680px) {
  .site-header { position: static; }
  .site-header__inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 10px; }
  .site-nav { display: contents; }
  .lang-switch { margin-left: auto; }
  .site-nav__links { order: 3; width: 100%; gap: 22px; }
}

/* --- Hero dello studio: il nome ripetuto, la seconda volta come un'eco -- */

.studio-hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 104px) var(--gutter) clamp(24px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 32px clamp(32px, 6vw, 96px);
}

.echo {
  margin: 0;
  font-size: clamp(5.25rem, 35vw, 14.5rem);
  font-weight: 850;
  line-height: 0.84;
  letter-spacing: -0.025em;
}

.echo__line { display: block; }

.echo__a { font-stretch: 75%; }

.echo__b {
  font-stretch: 125%;
  font-weight: 220;
  letter-spacing: -0.01em;
  animation: echo-out 1.6s cubic-bezier(0.22, 0.75, 0.1, 1) 0.3s both;
}

@keyframes echo-out {
  from { font-stretch: 75%; font-weight: 850; letter-spacing: -0.025em; }
  to { font-stretch: 125%; font-weight: 220; letter-spacing: -0.01em; }
}

.studio-hero__lead {
  max-width: 24em;
  margin: 0 0 0.4em;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink);
}

@media (max-width: 860px) {
  .studio-hero { grid-template-columns: 1fr; }
}

/* --- Sezioni -------------------------------------------------------------- */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}

.section__title {
  margin: 0 0 0.8em;
  font-size: var(--step-3);
  font-weight: 760;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 16px clamp(32px, 6vw, 96px);
  /* filetto allineato al contenuto, non al padding */
  background: linear-gradient(var(--line), var(--line)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px;
}

.section--split .section__title { margin: 0; }

.prose { max-width: 36em; }

.prose p:last-child { margin-bottom: 0; }

.prose--large { font-size: var(--step-1); line-height: 1.55; }

@media (max-width: 760px) {
  .section--split { grid-template-columns: 1fr; }
}

.contact-mail {
  display: inline-block;
  margin-top: 0.2em;
  font-size: clamp(1.6rem, 1rem + 2.6vw, 2.6rem);
  font-weight: 650;
  font-stretch: 108%;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

/* --- Catalogo giochi ------------------------------------------------------ */

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog > li:first-child { grid-column: 1 / -1; }

.game-tile {
  container-type: inline-size;
  height: 100%;
  border-radius: 32px;
  background: var(--g-bg);
  color: var(--g-ink);
  overflow: hidden;
}

.game-tile__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  min-height: 100%;
}

.game-tile__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(28px, 5cqi, 64px);
}

.game-tile__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 0 0 2px var(--g-ink);
}

.game-tile__title { margin: 4px 0 0; }

.game-tile__title a { display: block; }

.game-tile__title img { width: min(320px, 78cqi); }

.game-tile__pitch {
  max-width: 26em;
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.45;
}

.game-tile__facts {
  margin: -6px 0 0;
  font-size: var(--step--1);
  color: color-mix(in srgb, var(--g-ink) 78%, transparent);
}

.game-tile__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: auto;
  padding-top: 10px;
}

.game-tile__art {
  position: relative;
  min-height: 420px;
}

.game-tile__hero {
  position: absolute;
  left: 4%;
  bottom: -3%;
  width: 74%;
}

.game-tile__friend {
  position: absolute;
  top: 7%;
  right: 6%;
  width: 30%;
  animation: float 6s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-14px) rotate(2deg); }
}

@container (max-width: 760px) {
  .game-tile__inner { grid-template-columns: 1fr; }
  .game-tile__body { gap: 14px; }
  .game-tile__icon { width: 56px; height: 56px; border-radius: 14px; }
  .game-tile__title img { width: min(230px, 70cqi); }
  .game-tile__art { order: -1; min-height: 0; aspect-ratio: 5 / 4; }
  .game-tile__hero { left: 16%; width: 54%; bottom: -10%; }
  .game-tile__friend { width: 24%; right: 9%; }
}

.link-more {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.link-more:hover { color: inherit; text-decoration-color: var(--g-accent, var(--lipstick)); }

/* --- Pulsante store (prende i colori del gioco) --------------------------- */

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 16px;
  border: 2px solid var(--g-ink, var(--ink));
  border-radius: 999px;
  background: var(--g-accent, var(--ink));
  color: var(--g-accent-ink, var(--paper));
  box-shadow: 0 4px 0 var(--g-ink, var(--ink));
  text-decoration: none;
  line-height: 1.15;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-store:hover {
  color: var(--g-accent-ink, var(--paper));
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--g-ink, var(--ink));
}

.btn-store:active { transform: translateY(4px); box-shadow: 0 0 0 var(--g-ink, var(--ink)); }

.btn-store__icon { width: 26px; height: 26px; flex: none; }

.btn-store__label { display: flex; flex-direction: column; }

.btn-store__label small { font-size: 0.75rem; font-weight: 600; }

.btn-store__label strong {
  font-family: var(--g-heading, var(--font));
  font-size: 1.1875rem;
  font-weight: 700;
}

.btn-store .when-soon { display: none; }

/* Gioco non ancora pubblicato: data-status="soon" */
.btn-store[data-status="soon"] {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  color: var(--g-ink, var(--ink));
  cursor: default;
  transform: none;
}

.btn-store[data-status="soon"] .when-soon { display: inline; }

.btn-store[data-status="soon"] .when-live { display: none; }

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.site-footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer__inner .wordmark { font-size: 1.125rem; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.site-footer a { color: var(--ink); }

.site-footer a:hover { color: var(--lipstick); }

/* --- Pagine di testo (privacy, 404) --------------------------------------- */

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 112px);
}

.page h1 {
  margin: 0 0 0.4em;
  font-size: clamp(2.4rem, 1.4rem + 4vw, 4rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.page h2 {
  margin: 2em 0 0.5em;
  font-size: var(--step-2);
  font-weight: 720;
  font-stretch: 108%;
  line-height: 1.2;
}

.page .updated { color: var(--muted); font-size: var(--step--1); }

.page ul { padding-left: 1.2em; }

.page li { margin-bottom: 0.4em; }

/* --- Movimento ridotto ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
