:root {
  color-scheme: dark;
  --ink: #f7f4ff;
  --muted: #c1b8d0;
  --dim: #a89eb9;
  --base: #100d20;
  --panel: #191428;
  --line: #ffffff24;
  --lilac: #d7baff;
  --display: 'Century Gothic', 'Avenir Next', 'Trebuchet MS', sans-serif;
  --body: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 26px; }
body { margin: 0; background: var(--base); color: var(--ink); font-family: var(--body); line-height: 1.65; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand { font-family: var(--display); }
h1, h2, h3 { line-height: 1.07; font-weight: 750; text-wrap: balance; }
h1, h2 { letter-spacing: -.065em; }
h3 { letter-spacing: -.045em; }
em { color: var(--lilac); font-style: normal; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #e3c6ff; outline-offset: 5px; }
::selection { color: var(--base); background: var(--lilac); }

.wrap { width: min(100% - clamp(36px, 9vw, 144px), 1240px); margin-inline: auto; }
.skip { position: fixed; z-index: 4; inset: 12px auto auto 12px; padding: 10px 16px; background: var(--ink); color: var(--base); transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 2; background: #100d20; border-bottom: 1px solid #ffffff18; }
.nav-bar, .footer-bar { min-height: 75px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 1.2rem; font-weight: 750; letter-spacing: -.055em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e0c3ff83; border-radius: 11px; color: #f4e4ff; background: linear-gradient(145deg, #6636a2, #27163e 80%); font-size: 1.55rem; line-height: 1; box-shadow: inset 0 1px 12px #c28aff42; }
.brand-studio { margin-left: 4px; font-family: var(--body); font-size: .72rem; letter-spacing: .14em; font-weight: 650; color: #d9c4ee; }
nav { display: flex; align-items: center; gap: clamp(22px, 4.2vw, 60px); }
nav a, .footer-top { color: #e0d8eb; font-size: .92rem; font-weight: 620; }
nav a:hover, .footer-top:hover { color: var(--lilac); text-decoration: underline; text-underline-offset: 5px; }

.hero { position: relative; isolation: isolate; min-height: clamp(660px, 55vw, 820px); display: grid; align-items: center; overflow: hidden; background: #130e26; }
.hero-art, .hero-art::after, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -1; }
.hero-art img { object-fit: cover; object-position: 56% 52%; }
.hero-art::after { content: ''; background: linear-gradient(90deg, #100d22 0%, #100d22e0 14%, #110d2466 44%, transparent 69%), linear-gradient(0deg, var(--base), #100d2050 20%, transparent 45%); }
.hero-content { padding-block: 64px 110px; }
.hero-copy { max-width: 46rem; container-type: inline-size; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: #dbc7f7; font-size: .89rem; font-weight: 720; letter-spacing: .15em; text-transform: uppercase; }
.star { color: #e1b7ff; font-size: 1.15rem; line-height: 1; }
.hero h1 {
  --hero-font-size: clamp(4rem, 7.4vw, 6.5rem);
  font-size: var(--hero-font-size);
  font-size: min(var(--hero-font-size), 13.5cqi);
  line-height: .98;
}
.hero-line { display: block; }
.hero h1 span.hero-line { white-space: nowrap; }
.hero h1 em { color: #e1c4ff; text-shadow: 0 4px 35px #6f36b457; }
.hero-copy > p:not(.eyebrow) { max-width: clamp(29rem, 42vw, 40rem); margin-top: 26px; color: #e0d8ec; font-size: clamp(1rem, 1.35vw, 1.17rem); }
.button { display: inline-flex; justify-content: center; align-items: center; width: fit-content; min-height: 49px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; font-size: .94rem; font-weight: 740; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.button-primary { margin-top: 28px; color: #180f27; background: #dfc2ff; box-shadow: 0 6px 35px #a471f059; }
.button-primary:hover { background: #eddcff; box-shadow: 0 6px 40px #a471f089; }
.hero-footer { position: absolute; inset: auto 0 19px; display: flex; align-items: center; gap: 11px; color: #b79add; }
.hero-footer b { font-size: .76rem; font-weight: 400; }
.hero-footer span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #bc9ed757); }
.hero-footer span:last-child { transform: scaleX(-1); }

.section { padding-block: clamp(60px, 7.6vw, 114px); }
.games { padding-top: clamp(52px, 6vw, 88px); }
.section-head { display: grid; grid-template-columns: 1fr minmax(220px, 310px); align-items: end; gap: 26px 50px; margin-bottom: 32px; }
.section-head h2, .studio h2 { font-size: clamp(2.5rem, 5vw, 4.55rem); text-wrap: initial; }
.section-head > p, .studio-copy > p:not(.eyebrow) { color: var(--muted); }
.section-head > p { padding-bottom: 2px; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 36px); }
.game-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.game-art { position: relative; overflow: hidden; background: #271b38; }
.game-art img { width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; transition: transform .35s ease; }
.game-card:has(.game-link:hover) .game-art img { transform: scale(1.035); }
.availability { position: absolute; left: 18px; top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid #ffffff39; border-radius: 30px; font-size: .84rem; font-weight: 680; background: #160f27ed; color: #fff9ff; }
.availability > span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.matheo, .project-violet { --accent: #e0b7ff; }
.odyssey, .project-peach { --accent: #ffd197; }
.project-mint { --accent: #9ae9cf; }
.game-copy { padding: clamp(22px, 3vw, 38px); }
.category { margin-bottom: 8px; color: var(--accent); font-size: .88rem; font-weight: 730; letter-spacing: .045em; }
.game-copy h3 { margin-bottom: 12px; font-size: clamp(1.85rem, 3vw, 3rem); text-wrap: initial; }
.game-copy > p:not(.category), .project-card p:not(.category), .dialog-copy p:not(.category) { color: var(--muted); }
.game-copy .button { margin-top: 23px; }
.button-outline { border-color: #ffffff31; color: var(--ink); background: #ffffff08; }
.button-outline:hover { border-color: var(--accent); background: #ffffff12; }

.roadmap { background: radial-gradient(ellipse at 26% 100%, #27203b 0, transparent 60%), #171225; border-block: 1px solid #ffffff16; }
.roadmap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.project-card { min-width: 0; overflow: hidden; border-radius: 15px; border: 1px solid var(--line); background: #181327; }
.project-card img { width: 100%; height: auto; aspect-ratio: 1.7; object-fit: cover; }
.project-card > div { padding: clamp(19px, 2.35vw, 29px); }
.project-card h3 { margin-bottom: 10px; font-size: clamp(1.55rem, 2.45vw, 2.25rem); }
.project-note { margin-top: 19px; color: var(--dim); font-size: .87rem; }

.studio { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; gap: clamp(26px, 6vw, 98px); }
.studio-art { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #21162a; }
.studio-art img { width: 100%; height: auto; aspect-ratio: 1.25; object-fit: cover; }
.studio-copy > p:not(.eyebrow) { margin-top: 20px; }
.site-footer { border-top: 1px solid var(--line); background: #0e0b19; }
.footer-bar { min-height: 104px; }
.footer-bar small { color: var(--dim); font-size: .84rem; }

.game-dialog { max-width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #977abc; border-radius: 20px; color: var(--ink); background: #1a1529; box-shadow: 0 24px 100px #000a; }
.game-dialog::backdrop { background: #0b071cce; backdrop-filter: blur(5px); }
.dialog-inner { position: relative; }
.dialog-inner img { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; }
.close { position: absolute; inset: 14px 14px auto auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #ffffff70; border-radius: 50%; color: white; background: #180e29; cursor: pointer; font-size: 1.75rem; line-height: 1; }
.close:hover { background: #412b5b; }
.dialog-copy { padding: clamp(22px, 5vw, 35px); }
.dialog-copy h2 { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 14px; }
.dialog-copy p + p:not(.category) { margin-top: 12px; }
.dialog-copy small { display: block; margin-top: 20px; color: var(--accent); }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr minmax(190px, 254px); gap: 16px 28px; }
  .hero h1 { --hero-font-size: clamp(3.8rem, 9vw, 5.75rem); }
  .hero-art img { object-position: 60% center; }
  .hero-art::after { background: linear-gradient(90deg, #100d22eb, #110d2490 31%, #110d242e 62%, transparent 80%), linear-gradient(0deg, var(--base), transparent 30%); }
}

@media (max-width: 650px) {
  .nav-bar { gap: 12px; min-height: auto; padding-block: 11px 9px; flex-direction: column; align-items: flex-start; }
  .brand-mark { width: 32px; height: 32px; }
  nav { width: 100%; gap: 25px; }
  nav a { display: inline-flex; align-items: center; min-height: 39px; }
  .hero { display: block; min-height: 0; }
  .hero-art { inset: 0 0 auto; height: clamp(310px, 83vw, 440px); }
  .hero-art img { object-position: 50% 52%; }
  .hero-art::after { background: linear-gradient(0deg, var(--base), #100d205c 27%, transparent 55%), linear-gradient(90deg, #130e2650, transparent 70%); }
  .hero-content { padding-block: clamp(226px, 62vw, 342px) 68px; }
  .hero h1 { --hero-font-size: clamp(2.75rem, 11vw, 4.4rem); }
  .hero-copy > p:not(.eyebrow) { margin-top: 20px; }
  .section-head, .game-grid, .roadmap-grid, .studio { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 22px; }
  .eyebrow { margin-bottom: 12px; }
  .studio-copy { grid-row: 1; }
  .studio-art img { aspect-ratio: 1.55; }
  .footer-bar { flex-wrap: wrap; justify-content: flex-start; gap: 12px 23px; padding-block: 21px; }
  .footer-bar .brand { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.nav-bar nav { margin-inline-start: auto; gap: clamp(12px, 2.8vw, 42px); }
.language-picker { position: relative; z-index: 1; }
.language-picker summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding-inline: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 720;
  list-style: none;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after {
  width: 7px;
  height: 7px;
  margin-block-start: -4px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  content: '';
  transform: rotate(45deg);
}
.language-picker[open] summary::after { margin-block-start: 4px; transform: rotate(225deg); }
.language-picker ul {
  position: absolute;
  inset: calc(100% + 7px) 0 auto auto;
  min-width: 155px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 12px 30px #0007;
  list-style: none;
}
.language-picker a { display: block; padding: 7px 12px; border-radius: 6px; font-size: .92rem; }
.language-picker a:hover, .language-picker a[aria-current="page"] { color: var(--lilac); background: #ffffff12; }
.contact { border-block-start: 1px solid var(--line); background: radial-gradient(ellipse at 12% 100%, #29203e, transparent 60%), #171225; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: clamp(26px, 6vw, 88px); }
.contact-copy h2 { font-size: clamp(2.5rem, 5vw, 4.55rem); text-wrap: initial; }
.contact-copy > p:not(.eyebrow) { margin-top: 20px; color: var(--muted); }
.contact-form { display: grid; gap: 16px; padding: clamp(16px, 3vw, 29px); border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-form label { display: grid; min-width: 0; gap: 6px; font-size: .94rem; font-weight: 690; }
.contact-form input, .contact-form textarea {
  min-width: 0;
  width: 100%;
  min-height: 45px;
  padding: 9px 11px;
  border: 1px solid #ffffff42;
  border-radius: 8px;
  background: #110d20;
  color: var(--ink);
  font: 400 1rem/1.45 var(--body);
}
.contact-form textarea { resize: vertical; }
.contact-note { color: var(--muted); font-size: .87rem; }
.contact-note a { color: var(--lilac); text-decoration: underline; text-underline-offset: 2px; }
.contact-form .button { margin: 0; text-align: center; }
.contact-form button:disabled { opacity: .73; cursor: wait; }
.form-status { color: #a9ecd4; }
.form-status[data-state="error"] { color: #ffbda9; }
.form-status:empty { margin-top: -16px; }

@media (max-width: 760px) {
  .nav-bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-height: auto; padding-block: 10px 7px; }
  .nav-bar nav { grid-column: 1 / -1; grid-row: 2; width: auto; flex-wrap: wrap; margin-inline-start: 0; gap: 0 clamp(13px, 4vw, 31px); }
  .nav-bar nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .language-picker { grid-column: 2; grid-row: 1; }
}

@media (max-width: 650px) {
  .contact-grid, .contact-fields { grid-template-columns: 1fr; }
}
