/* Ateliê: coleção de jogos + laboratório de protótipos. */
.atelier {
  --at-bg: #151a32;
  --at-panel: #232747;
  --at-line: #626692;
  --at-mint: #8cf1db;
  --at-gold: #ffd18a;
  color: #fff;
  background: radial-gradient(circle at 90% 8%, #524291 0, transparent 36%),
    radial-gradient(circle at 4% 46%, #17626864 0, transparent 29%), var(--at-bg);
}
.atelier__wrap { width: min(100%, 1240px); margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) calc(90px + var(--safe-b)); }
.atelier__hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 24px;
  min-height: 330px; padding: clamp(24px, 4vw, 48px);
  border: 1px solid #8c83ba; border-radius: 27px;
  background: linear-gradient(125deg, #282448 0%, #312957 60%, #453279 100%);
  box-shadow: 0 26px 48px #080c2380;
  overflow: hidden;
}
.atelier__hero-copy { position: relative; z-index: 1; align-self: center; }
.atelier__eyebrow { color: var(--at-mint); font: 900 11px/1.3 var(--font); letter-spacing: .2em; text-transform: uppercase; }
.atelier__hero h1 { max-width: 670px; margin: 16px 0 15px; font: 400 clamp(34px, 4.5vw, 60px)/1.06 var(--font-game); text-wrap: balance; }
.atelier__hero-copy > p:not(.atelier__eyebrow) { max-width: 580px; color: #e5e0f8; font: 600 clamp(15px, 1.7vw, 18px)/1.45 var(--font); }
.atelier__hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.atelier__counter { padding: 10px 15px; border: 1px solid #c6a9ff; border-radius: 99px; color: #fff; background: #6851ad88; font: 800 13px/1.2 var(--font); }
.atelier__next { min-height: 43px; padding: 10px 14px; border: 1px solid #bbfff1; border-radius: 12px; background: #8cf1db; color: #163544; font: 900 13px/1.2 var(--font); cursor: pointer; }
.atelier__next:hover { background: #b6ffeb; }
.atelier__hero-art {
  position: relative; display: flex; flex-direction: column; justify-content: end;
  min-height: 240px; padding: 26px; border: 1px solid #e7d8ff8a; border-radius: 18px;
  background: linear-gradient(0deg, #111733ed 3%, #11173320 72%), url("../img/world-w8.png") center / cover;
  transform: rotate(2deg); box-shadow: 0 20px 35px #070b267c;
}
.atelier__hero-art span { color: var(--at-mint); font: 900 10px/1.2 var(--font); letter-spacing: .19em; }
.atelier__hero-art strong { margin-top: 7px; font: 400 27px/1.1 var(--font-game); }
.atelier__hero-art small { margin-top: 8px; color: #e9e5fc; font: 700 13px/1.3 var(--font); }
.atelier__vault, .atelier__lab { margin-top: clamp(34px, 5vw, 62px); }
.atelier__section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.atelier__section-head h2 { margin-top: 7px; font: 400 clamp(27px, 3.4vw, 42px)/1.15 var(--font-game); }
.atelier__section-head > p { max-width: 350px; color: #d4d7ed; font: 600 14px/1.4 var(--font); }
.atelier__games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.atelier-game {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; min-height: 244px; padding: 15px; overflow: hidden;
  border: 1px solid #8e94b6; border-bottom: 5px solid #515b79; border-radius: 18px;
  background: #222947; color: #fff; text-align: left; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.atelier-game:hover { transform: translateY(-5px); border-color: var(--at-mint); box-shadow: 0 20px 30px #080c2388; }
.atelier-game--open { border-color: var(--at-mint); border-bottom-color: #26b89c; }
.atelier-game img, .atelier-game__scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.atelier-game img { object-fit: cover; opacity: .85; transition: transform .3s ease; }
.atelier-game:hover img { transform: scale(1.06); }
.atelier-game__scrim { background: linear-gradient(0deg, #111529 4%, #111529bd 43%, #11152918 78%); }
.atelier-game__top, .atelier-game__body { position: relative; z-index: 1; }
.atelier-game__top { align-self: start; padding: 6px 8px; border-radius: 8px; background: #18203acb; color: var(--at-mint); font: 900 10px/1.2 var(--font); letter-spacing: .07em; }
.atelier-game__body { display: flex; flex-direction: column; gap: 5px; }
.atelier-game__body strong { font: 400 clamp(17px, 1.6vw, 21px)/1.2 var(--font-game); text-wrap: balance; }
.atelier-game__body small { color: #e9e9f5; font: 600 12px/1.3 var(--font); }
.atelier-game__body em { margin-top: 5px; color: var(--at-gold); font: 900 11px/1.1 var(--font); font-style: normal; letter-spacing: .09em; }
.atelier-game--open .atelier-game__body em { color: var(--at-mint); }
.atelier__lab { padding: 24px; border: 1px solid #626994; border-radius: 24px; background: #222544e8; box-shadow: 0 26px 48px #080c2380; }
.atelier__lab .seg { margin: 20px 0 18px; border: 1px solid #747aa7; background: #191d36; }
.atelier__lab .seg button { color: #cfd1e8; }
.atelier__lab .seg button[aria-selected="true"] { border-color: #a998ff; background: #765cf0; color: #fff; }
.atelier__workbench { min-width: 0; }
.atelier__scenes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.atelier-scene {
  position: relative; display: flex; align-items: end; min-width: 0; min-height: 110px;
  overflow: hidden; padding: 10px; border: 1px solid #898ba9; border-bottom: 4px solid #565879;
  border-radius: 13px; background: #161c36; color: #fff; text-align: left; cursor: pointer;
}
.atelier-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .65; }
.atelier-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0d142af2, #0d142a06 90%); }
.atelier-scene__copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.atelier-scene strong { font: 400 15px/1.2 var(--font-game); }
.atelier-scene small { color: #a8f7e8; font: 900 9px/1.2 var(--font); letter-spacing: .04em; }
.atelier-scene--active { border-color: var(--at-mint); border-bottom-color: #2ab99e; box-shadow: 0 0 0 3px #8cf1db34; }
.atelier__brief { margin: 3px 0 14px; color: #e4e5f4; font: 700 15px/1.4 var(--font); }
.atelier__lab .hero-row { margin-bottom: 16px; }
.atelier__lab .hero-row .pick { min-height: 70px; }
.atelier__lab .hero-row .pick > span { margin: auto; }
.atelier__play { max-width: 860px; margin: 0 auto; }
.atelier__lab .toolbar { justify-content: center; }
.atelier__lab .console { margin-top: 12px; }
.atelier :is(button, [role="tab"]):focus-visible { outline: 3px solid var(--at-mint); outline-offset: 3px; }
@media (max-width: 960px) {
  .atelier__games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atelier__hero { grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); }
}
@media (max-width: 640px) {
  .atelier__wrap { padding: 14px 12px calc(80px + var(--safe-b)); }
  .atelier__hero { display: flex; flex-direction: column; gap: 20px; padding: 22px; border-radius: 18px; }
  .atelier__hero h1 { font-size: clamp(31px, 9vw, 42px); }
  .atelier__hero-art { min-height: 150px; transform: none; }
  .atelier__section-head { display: block; }
  .atelier__section-head > p { margin-top: 9px; }
  .atelier__games { gap: 10px; }
  .atelier-game { min-height: 215px; padding: 10px; }
  .atelier-game__body strong { font-size: 16px; }
  .atelier__lab { padding: 15px; border-radius: 17px; }
  .atelier__scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .atelier__games { grid-template-columns: 1fr; }
  .atelier-game { min-height: 235px; }
}
@media (prefers-reduced-motion: reduce) {
  .atelier-game, .atelier-game img { transition: none; }
}
