/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.78rem/1.25 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; text-align: center; max-width: 100%; padding-block: 12px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: scale(0.97); }
/* Darker brand stops behind white text keep every point of the gradient at WCAG AA (≥ 4.5:1) */
.btn-primary { color: #fff; background: linear-gradient(90deg, #c01f74, #5b3fe0 55%, #0e7aa8); box-shadow: 0 0 26px rgba(255, 63, 164, 0.35); }
.btn-primary:hover { color: #fff; box-shadow: 0 0 40px rgba(255, 63, 164, 0.55), 0 0 18px rgba(34, 200, 255, 0.35); transform: translateY(-1px); }
.btn-ghost {
  color: var(--text); background: var(--glass); border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.1); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Language switch: segmented EN | RO pill */
.lang-switch {
  display: inline-flex; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lang-switch a {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--text-soft); text-decoration: none; font: 600 0.75rem/1 var(--font-body); letter-spacing: 0.12em;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="true"] { color: #fff; background: linear-gradient(90deg, #c01f74, #5b3fe0); }

/* Brand title: white → lavender */
.title-brand {
  /* Syne 800 is wide: "PAQUETT" ≈ 7.6em, so 11vw keeps it on one line down to 320px */
  font: 800 clamp(2.1rem, 11vw, 7rem)/0.95 var(--font-display);
  letter-spacing: 0.01em; margin: 0; overflow-wrap: normal;
  background: linear-gradient(180deg, #ffffff 30%, #c9c0ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Reveal on scroll. The hidden state is armed by initReveal() itself (html.reveal-ready), so content stays
   visible if JavaScript is off or a module fails to load — see tests/css.test.mjs */
.reveal-ready .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease var(--d, 0s), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }
.sweep::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.13) 50%, transparent 65%);
  transform: translateX(-120%);
}
.reveal-ready .reveal.is-in .sweep::after { animation: sweep 1.4s ease 0.3s 1 both; }
@keyframes sweep { to { transform: translateX(120%); } }

/* Panels */
.panel {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(30, 22, 58, 0.74), rgba(10, 8, 22, 0.82));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.section-head { margin-bottom: clamp(28px, 5vw, 56px); }
.section-head h2 { margin: 0; }

/* Hero */
.hero-inner { max-width: 1000px; display: grid; justify-items: center; }
.hero-inner > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-inner > :nth-child(2) { animation-delay: 0.08s; }
.hero-inner > :nth-child(3) { animation-delay: 0.18s; }
.hero-inner > :nth-child(4) { animation-delay: 0.28s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero-lead { margin: 1.4rem auto 2.2rem; }
.scroll-cue { position: absolute; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; place-items: center; width: 44px; height: 44px; }
.scroll-cue span { position: relative; width: 22px; height: 36px; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 12px; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* Glitch: brand title (rare) and "coming next" (on hover / focus / tap) */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-t); content: attr(data-t) / ""; position: absolute; inset: 0; pointer-events: none;
  background: none; -webkit-text-fill-color: currentColor; mix-blend-mode: screen; opacity: 0;
}
.glitch::before { color: var(--pink); }
.glitch::after { color: #22e6ff; }
.title-brand.glitch::before { animation: gl1 5.5s infinite steps(1); }
.title-brand.glitch::after { animation: gl2 5.5s infinite steps(1); }
.glitch-on-hover:hover .glitch::before, .glitch-on-hover:focus-visible .glitch::before, .glitch-on-hover.is-glitching .glitch::before { animation: glh1 0.7s infinite steps(1); }
.glitch-on-hover:hover .glitch::after, .glitch-on-hover:focus-visible .glitch::after, .glitch-on-hover.is-glitching .glitch::after { animation: glh2 0.7s infinite steps(1); }
@keyframes gl1 { 0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; } 94% { opacity: 0.9; transform: translate(-3px, 0); clip-path: inset(15% 0 55% 0); } 96% { opacity: 0.9; transform: translate(2px, 0); clip-path: inset(62% 0 10% 0); } }
@keyframes gl2 { 0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; } 95% { opacity: 0.9; transform: translate(3px, 0); clip-path: inset(40% 0 30% 0); } 97% { opacity: 0.9; transform: translate(-2px, 0); clip-path: inset(5% 0 72% 0); } }
@keyframes glh1 { 0%, 100% { opacity: 0; } 10% { opacity: 0.9; transform: translate(-4px, 0); clip-path: inset(10% 0 60% 0); } 35% { opacity: 0.9; transform: translate(3px, 0); clip-path: inset(55% 0 15% 0); } 60% { opacity: 0; } 80% { opacity: 0.9; transform: translate(-2px, 0); clip-path: inset(30% 0 45% 0); } }
@keyframes glh2 { 0%, 100% { opacity: 0; } 20% { opacity: 0.9; transform: translate(4px, 0); clip-path: inset(45% 0 25% 0); } 45% { opacity: 0.9; transform: translate(-3px, 0); clip-path: inset(5% 0 70% 0); } 70% { opacity: 0; } 90% { opacity: 0.9; transform: translate(2px, 0); clip-path: inset(65% 0 8% 0); } }

/* Featured game card */
.game-card {
  display: grid;
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}
.game-card.is-tilting { transition-duration: 0.08s, 0.4s; box-shadow: 0 40px 100px rgba(123, 92, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.game-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(520px circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.09), transparent 45%);
}
@media (min-width: 860px) { .game-card { grid-template-columns: 1.25fr 1fr; } }
.game-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0820; }
@media (min-width: 860px) { .game-media { aspect-ratio: auto; min-height: 380px; } }
.game-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.game-card:hover .game-media img { transform: scale(1.04); }
.seal {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 207, 122, 0.6); background: rgba(10, 8, 20, 0.72); color: var(--gold);
  font: 600 0.7rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.seal svg { width: 14px; height: 14px; }
.game-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(22px, 4vw, 44px); }
.game-body h3 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.game-body h3 a { color: inherit; text-decoration: none; }
.game-body p { margin: 0; color: var(--text-soft); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.platforms li { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-soft); font: 600 0.72rem/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; }
.btn-row.start { justify-content: flex-start; }

/* Coming next */
.next-card { display: grid; align-content: end; gap: 10px; min-height: 280px; padding: clamp(28px, 5vw, 56px); outline-offset: 4px; }
.next-silhouette {
  position: absolute; inset: -10%; z-index: 0; filter: blur(30px); opacity: 0.85;
  background: radial-gradient(35% 45% at 72% 38%, rgba(123, 92, 255, 0.55), transparent 70%),
              radial-gradient(28% 38% at 30% 62%, rgba(255, 63, 164, 0.38), transparent 70%),
              radial-gradient(20% 30% at 55% 70%, rgba(34, 200, 255, 0.3), transparent 70%);
}
.next-card > :not(.next-silhouette) { position: relative; z-index: 1; }
.next-card h3 { margin: 0; font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
.next-card p { margin: 0; color: var(--text-soft); max-width: 36em; }

/* Studio */
.studio-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .studio-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; } }
.values { display: grid; gap: 16px; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .values { grid-template-columns: repeat(3, 1fr); } }
.values li { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.values strong { display: block; margin-bottom: 6px; font: 700 1.1rem/1.2 var(--font-display); }
.values span { color: var(--text-soft); font-size: 0.95rem; }

/* Contact */
.contact-card { display: grid; justify-items: center; text-align: center; padding: clamp(32px, 6vw, 72px); }
.contact-card .lead { margin-inline: auto; }
.contact-email {
  display: inline-block; margin: 6px 0 20px; text-decoration: none; overflow-wrap: anywhere;
  font: 800 clamp(1.3rem, 5.5vw, 2.6rem)/1.15 var(--font-display);
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-report { margin: 0; color: var(--text-soft); }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0 0 18px; padding: 0; list-style: none; }
.social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.site-footer .social { justify-content: flex-start; margin: 0; }
.site-footer .social a { color: var(--text-soft); text-decoration: none; }
.site-footer .social a:hover { color: #fff; }

/* Game page */
.page-game main { padding-top: 0; }
.game-hero { position: relative; display: grid; align-items: end; min-height: min(92svh, 920px); overflow: hidden; }
.game-hero-media { position: absolute; inset: 0; }
.game-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.game-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 3, 8, 0.25) 0%, rgba(4, 3, 8, 0.55) 55%, var(--bg) 100%); }
.game-hero-inner { position: relative; padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 80px); padding-bottom: clamp(40px, 7vw, 84px); }
.app-icon { width: 88px; height: 88px; margin-bottom: 18px; border-radius: 22%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.title-game { margin: 0 0 0.3em; font: 800 clamp(2.4rem, 9vw, 6rem)/0.95 var(--font-display); }
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.store-badges a { display: inline-flex; align-items: center; min-height: 44px; border-radius: 10px; }
.store-badges img { height: 50px; width: auto; }
/* The Play badge PNG carries its own transparent padding; scale it so both badges look the same size */
.store-badges .badge-google { height: 74px; margin: -12px -10px; }

.about-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; } }
.about-text { color: var(--text-soft); font-size: 1.05rem; max-width: 62ch; }
.facts { display: grid; gap: 0; margin: 0; padding: 8px 24px; }
.facts div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--text-dim); font: 600 0.72rem/1.2 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; }
.facts dd { margin: 0; font-weight: 500; }

.gallery { position: relative; }
.gallery-track {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding: 2px 2px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.shot { flex: none; margin: 0; scroll-snap-align: start; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #0b0820; }
/* Portrait store screenshots: tall on phones (swipe through them), capped on desktop */
.shot img { height: clamp(320px, 120vw, 460px); width: auto; max-width: none; }
.gallery-btn {
  position: absolute; top: calc(50% - 7px); z-index: 2; transform: translateY(-50%);
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); color: #fff;
  background: rgba(10, 8, 20, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.gallery-btn svg { width: 22px; height: 22px; }
.gallery-btn:disabled { opacity: 0.35; cursor: default; }
.gallery-btn.prev { left: -12px; }
.gallery-btn.next { right: -12px; }
@media (max-width: 899px) { .gallery-btn { display: none; } }

.official-card { display: grid; justify-items: start; gap: 18px; padding: clamp(24px, 5vw, 48px); border-color: rgba(255, 207, 122, 0.35); }
.official-head { display: flex; align-items: center; gap: 14px; }
.official-head h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.official-icon { width: 44px; height: 44px; flex: none; color: var(--gold); }
.official-text { margin: 0; max-width: 62ch; font-size: 1.05rem; }
.official-list { display: grid; gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; }
.official-list li { display: grid; gap: 2px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.official-list span { color: var(--text-dim); font: 600 0.72rem/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; }
.official-list a { overflow-wrap: anywhere; }
.play-card h2 { margin: 0; font-size: clamp(1.6rem, 4.5vw, 2.6rem); }

/* Legal pages and report page */
.translation-notice {
  margin-top: 24px; margin-bottom: 0; padding: 14px 18px !important; border-radius: 12px;
  border: 1px solid rgba(255, 207, 122, 0.45); background: rgba(255, 207, 122, 0.08); color: var(--gold); font-weight: 500;
}
.legal { max-width: 860px; padding-block: clamp(40px, 7vw, 88px); }
.legal-head h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin-bottom: 0.3em; }
.updated { color: var(--text-dim); font-size: 0.9rem; }
.toc { margin: 28px 0; padding: 4px 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.toc summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.toc ol { margin: 0 0 14px; padding-left: 1.3em; columns: 2 240px; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { display: inline-block; padding: 4px 0; }
.prose {
  padding: clamp(22px, 5vw, 48px); border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(10, 8, 22, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #ddd8f2; font-size: 1rem; line-height: 1.75;
}
.prose h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 2em 0 0.6em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose strong { color: #fff; }
.prose a { overflow-wrap: anywhere; }
.report-steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.report-steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 56px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.report-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 999px; background: var(--grad-brand); color: #fff; font-weight: 700; font-size: 0.85rem;
}
