/* zyro.games — studio site */

:root {
  --paper: #f3f1ec;
  --paper-2: #e9e6df;
  --ink: #111111;
  --ink-2: #4f4c46;
  --ink-3: #8a867e;
  --rule: rgba(17, 17, 17, 0.12);
  --accent: #2f4bff;
  --live: #15803d;
  --display: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --max: 1280px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
ol, ul { list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 600; }
.skip:focus { top: 12px; }

.ic { width: 18px; height: 18px; flex: none; }

.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.u:hover { color: var(--accent); }
.muted { color: var(--ink-2); margin-top: 16px; }

/* ---------- logo ---------- */

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; }
.logo-word { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.logo-word i { font-style: normal; color: var(--accent); }

.logo-invert { --logo-bg: var(--paper); --logo-fg: var(--ink); color: var(--paper); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 241, 236, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.menu { display: flex; align-items: center; gap: 30px; }
.menu a:not(.btn) { font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color 0.15s; }
.menu a:not(.btn):hover { color: var(--ink); }

.menu-toggle { display: none; font-size: 15px; font-weight: 600; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm { padding: 11px 18px; font-size: 14px; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); }
.btn-line { border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }
.btn .ic { transition: transform 0.2s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }

.more { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more .ic { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.more:hover { color: var(--accent); }
.more:hover .ic { transform: translateX(3px); }

/* ---------- type helpers ---------- */

.label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 20px; }
.label-gap { margin-top: 64px; }

.h2,
.section-top h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.num { font-family: var(--display); font-size: 14px; font-weight: 500; color: var(--ink-3); }

/* ---------- hero ---------- */

.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }

.hero-label { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 28px; }
.hero-label span + span::before { content: "/"; margin-right: 14px; color: var(--ink-3); }

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 7.2vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 13ch;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px 64px;
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.hero-foot p { max-width: 540px; font-size: 19px; color: var(--ink-2); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- shelf (game tiles) ---------- */

.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.shelf-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.shelf-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 5;
  padding: 18px;
  border-radius: 22px;
  background: var(--tile);
  color: var(--ink);
  overflow: hidden;
}
.shelf-genre { font-size: 13px; font-weight: 600; opacity: 0.75; }
.shelf-tile img {
  width: 56%;
  margin: auto;
  border-radius: 22%;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s var(--ease);
}
.shelf-tile:hover img { transform: translateY(-6px) rotate(-2deg); }
.shelf-title { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; line-height: 1.2; }

/* ---------- sections ---------- */

.section { padding-top: clamp(88px, 11vw, 160px); }
.section-sm { padding-top: clamp(56px, 7vw, 96px); }

.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
.section-top sup { font-size: 0.34em; font-weight: 500; color: var(--ink-3); vertical-align: top; position: relative; top: 0.3em; margin-left: 4px; letter-spacing: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { font-size: 15px; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); transition: all 0.15s; }
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- game cards ---------- */

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 32px; }

.game-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  background: var(--tile);
  overflow: hidden;
}
.game-art img { width: 30%; border-radius: 22%; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25); transition: transform 0.4s var(--ease); }
.game-card:hover .game-art img { transform: scale(1.06) rotate(-2deg); }

.game-info { padding-top: 22px; }

.game-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.status.is-live { color: var(--live); }
.status.is-live::before { opacity: 1; }

.game-card h3 { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.04em; line-height: 1.1; margin-top: 10px; }
.game-card h3 a:hover { color: var(--accent); }
.game-tagline { font-size: 17px; font-weight: 500; margin-top: 6px; }
.game-desc { color: var(--ink-2); margin-top: 12px; max-width: 56ch; font-size: 16px; }
.game-card .more { margin-top: 20px; }

.game-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: center;
  gap: 48px;
}
.game-card.is-featured .game-art { aspect-ratio: 16 / 9; }
.game-card.is-featured .game-art img { width: 26%; }
.game-card.is-featured .game-info { padding-top: 0; }
.game-card.is-featured h3 { font-size: clamp(32px, 3.6vw, 48px); }
.game-card.is-featured .game-meta::before { content: "Featured"; color: var(--accent); font-weight: 600; }

/* ---------- studio ---------- */

.statement {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.5vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
  max-width: 1080px;
}
.statement em { font-style: normal; color: var(--accent); }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 88px); }
.principles li { border-top: 1px solid var(--ink); padding-top: 18px; }
.principles h3 { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.03em; margin-top: 36px; }
.principles p { color: var(--ink-2); font-size: 16px; margin-top: 8px; }

/* ---------- process / faq ---------- */

.split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.split > div:first-child { position: sticky; top: calc(var(--header-h) + 32px); }

.steps li { display: grid; grid-template-columns: 72px 1fr; padding: 28px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .num { color: var(--accent); padding-top: 4px; }
.steps h3 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; }
.steps p { color: var(--ink-2); margin-top: 6px; max-width: 52ch; }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .ic { transition: transform 0.25s var(--ease); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { padding-bottom: 26px; color: var(--ink-2); max-width: 62ch; }

/* ---------- contact ---------- */

.contact { margin-top: clamp(96px, 12vw, 176px); padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 7vw, 96px); background: var(--ink); color: var(--paper); }
.contact .label { color: #8d8a83; }

.contact-mail {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 6.2vw, 88px);
  letter-spacing: -0.05em;
  line-height: 1.05;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  padding-bottom: 6px;
  transition: background-size 0.4s var(--ease), color 0.2s;
}
.contact-mail:hover { background-size: 100% 3px; }

.contact-sub { margin-top: 20px; font-size: 19px; color: #bdb9b0; max-width: 560px; }

.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; margin-top: clamp(48px, 6vw, 80px); }
.topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
  transition: color 0.15s;
}
.topics a:hover { color: #9fb0ff; }
.topics .ic { transition: transform 0.2s var(--ease); }
.topics a:hover .ic { transform: translate(2px, -2px); }

/* ---------- footer ---------- */

.footer { background: var(--ink); color: #bdb9b0; padding-top: 24px; overflow: hidden; }

.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-about p { margin-top: 18px; font-size: 15px; max-width: 300px; }
.footer h4 { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #77746d; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; font-size: 15px; }
.footer ul a:hover { color: var(--paper); }

.footer-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(96px, 27vw, 380px);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: #1d1d1d;
  margin: 64px 0 0 -0.04em;
  user-select: none;
}
.footer-word i { font-style: normal; color: var(--accent); }

.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0 32px; font-size: 14px; color: #77746d; }
.footer-bottom a:hover { color: var(--paper); }

/* ---------- game page ---------- */

.crumbs { display: flex; gap: 10px; padding-top: 28px; padding-bottom: 20px; font-size: 14px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.g-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 40px;
  padding: clamp(32px, 6vw, 88px);
  border-radius: 32px;
  background: var(--tile);
  color: var(--ink);
}
.g-hero .game-meta { color: inherit; opacity: 0.75; }
.g-hero .status.is-live { color: inherit; }
.g-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.05em; margin-top: 16px; }
.g-tagline { font-size: clamp(18px, 2vw, 22px); font-weight: 500; margin-top: 14px; opacity: 0.85; }
.g-icon { width: min(100%, 300px); justify-self: center; border-radius: 22%; box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}
.store .ic { width: 24px; height: 24px; }
.store span { display: flex; flex-direction: column; }
.store small { font-size: 10.5px; font-weight: 500; opacity: 0.8; }
a.store:hover { background: #222; }
.store.is-soon { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }

.g-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 72px; align-items: start; }
.g-lead { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.45; letter-spacing: -0.01em; max-width: 34ch; }

.g-features li { display: grid; grid-template-columns: 56px 1fr; padding: 22px 0; border-top: 1px solid var(--rule); }
.g-features li:last-child { border-bottom: 1px solid var(--rule); }
.g-features .num { color: var(--accent); padding-top: 3px; }
.g-features h3 { font-size: 19px; font-weight: 600; }
.g-features p { color: var(--ink-2); margin-top: 4px; }

.g-facts { position: sticky; top: calc(var(--header-h) + 24px); padding: 8px 24px 24px; border: 1px solid var(--rule); border-radius: 20px; background: #f8f7f3; }
.g-facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.g-facts dt { color: var(--ink-3); }
.g-facts dd { font-weight: 600; text-align: right; }
.g-facts .btn { margin-top: 20px; }

.notfound { padding-top: 120px; padding-bottom: 40px; }
.notfound .btn { margin-top: 32px; }

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .hero-foot { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split > div:first-child { position: static; }
  .game-card.is-featured { grid-template-columns: 1fr; gap: 0; }
  .game-card.is-featured .game-info { padding-top: 22px; }
  .g-body { grid-template-columns: 1fr; gap: 56px; }
  .g-facts { position: static; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }

  .menu-toggle { display: block; }
  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px clamp(20px, 4vw, 48px) 32px;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.2s, visibility 0.2s;
  }
  body:has(.site-header.is-open) { overflow: hidden; }
  .site-header.is-open .menu { visibility: visible; opacity: 1; }
  .site-header.is-open { border-bottom-color: var(--rule); background: var(--paper); }
  .menu a:not(.btn) { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .menu .btn { margin-top: 28px; padding: 18px; font-size: 16px; }

  .hero-foot p { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; }

  .shelf, .shelf-4 {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 46%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
    padding: 0 clamp(20px, 4vw, 48px) 4px;
    scrollbar-width: none;
  }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf-tile { scroll-snap-align: start; }

  .tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tab { flex: none; }

  .game-grid { grid-template-columns: 1fr; gap: 56px; }
  .game-art img { width: 34%; }
  .game-card.is-featured .game-art { aspect-ratio: 16 / 10; }
  .game-card.is-featured .game-art img { width: 34%; }

  .principles { grid-template-columns: 1fr; }
  .principles h3 { margin-top: 16px; }
  .steps li { grid-template-columns: 48px 1fr; }
  .faq summary { font-size: 17px; }

  .topics { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }

  .g-hero { grid-template-columns: 1fr; gap: 28px; border-radius: 24px; }
  .g-icon { order: -1; width: 128px; justify-self: start; border-radius: 26%; }
  .store { flex: 1 1 auto; }
}

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