/* Tinkerlight studio site. Night workshop, warm spark light, electric violet. */

@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-cyrillic-500.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-cyrillic-700.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/fonts/onest-cyrillic-400.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/fonts/onest-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/fonts/onest-cyrillic-500.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/fonts/onest-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/fonts/onest-cyrillic-600.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/fonts/onest-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #09070f;
  --bg-2: #110d1c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(177, 140, 255, 0.28);
  --text: #f3f0fa;
  --muted: #a39cb8;
  --dim: #6f6886;
  --violet: #8a5cff;
  --violet-2: #b08cff;
  --violet-3: #6a3cf0;
  --amber: #ffc56b;
  --ember: #ff8f5a;
  --radius: 22px;
  --max: 1160px;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 620px at 78% -10%, rgba(138, 92, 255, 0.22), transparent 70%),
    radial-gradient(700px 500px at 8% 8%, rgba(255, 170, 90, 0.07), transparent 70%),
    radial-gradient(1200px 800px at 50% 120%, rgba(106, 60, 240, 0.12), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header.site, footer.site { position: relative; z-index: 1; }

a { color: var(--violet-2); text-decoration: none; transition: color .2s; }
a:hover { color: #d6c4ff; }
::selection { background: rgba(138, 92, 255, .45); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(36px, 5.4vw, 72px); }
h2 { font-size: clamp(28px, 3.8vw, 46px); }
h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 620px; }
.warm {
  background: linear-gradient(100deg, #fff1cc 0%, var(--amber) 35%, var(--ember) 70%, var(--violet-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(9, 7, 15, 0.62); border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo img { width: 34px; height: 34px; display: block; }
.logo span { font: 700 19px/1 var(--display); letter-spacing: -0.03em; }
nav.main { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
nav.main a { color: var(--muted); }
nav.main a:hover { color: var(--text); }
nav.main a.lang {
  color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; letter-spacing: .06em;
}
nav.main a.lang:hover { border-color: var(--line-2); }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--body); color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-3) 100%);
  box-shadow: 0 10px 30px -10px rgba(138, 92, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(138, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.ghost { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.store { background: #fff; color: #0b0912; box-shadow: none; }
.btn.store.soon { background: var(--surface-2); color: var(--muted); cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(60px, 8vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 40px; }
.hero h1 { margin: 22px 0 26px; font-size: clamp(34px, 4.6vw, 60px); }
.hero .lead { margin-bottom: 36px; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-art::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 48% 40%, rgba(255, 197, 107, .35), rgba(255, 143, 90, .12) 35%, rgba(138, 92, 255, .18) 60%, transparent 72%);
  filter: blur(10px); animation: breathe 6s ease-in-out infinite;
}
.hero-art .mark { position: absolute; inset: 14%; width: 72%; height: 72%; }
.hero-art .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); }
.hero-art .ring.r2 { inset: 12%; border-style: dashed; border-color: rgba(177, 140, 255, .14); animation: spin 80s linear infinite; }

@keyframes breathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* fireflies */
.fireflies { position: absolute; inset: 0; pointer-events: none; }
.fireflies i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #ffe2a6; box-shadow: 0 0 10px 3px rgba(255, 197, 107, .55);
  animation: float 9s ease-in-out infinite, flicker 3.2s ease-in-out infinite; opacity: 0;
}
@keyframes float { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(14px, -18px); } 66% { transform: translate(-10px, -6px); } }
@keyframes flicker { 0%, 100% { opacity: 0; } 30%, 60% { opacity: .95; } 45% { opacity: .5; } }

/* ---------- sections ---------- */
section.block { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { margin-top: 14px; }
.section-head p { color: var(--muted); max-width: 440px; margin: 0; }

.card {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}

/* games */
.games { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.game, .post { color: var(--text); }
.game:hover, .post:hover { color: var(--text); }
.game { display: flex; flex-direction: column; transition: transform .3s, border-color .3s; }
.game:hover { transform: translateY(-4px); border-color: var(--line-2); }
.game .cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0f2a1c; }
.game .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.game:hover .cover img { transform: scale(1.03); }
.game .body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; height: 28px;
  font: 500 12px/1 var(--body); letter-spacing: .05em; padding: 0 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tag.live { color: #b9f5c8; border-color: rgba(120, 220, 150, .3); background: rgba(80, 200, 120, .08); }
.tag.wip { color: #ffd9a0; border-color: rgba(255, 197, 107, .3); background: rgba(255, 197, 107, .08); }
.game p { color: var(--muted); margin: 0; }
.game .go { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--violet-2); }
.game.featured { grid-row: span 2; }
.game.featured h3 { font-size: 30px; }
.game.soon .cover {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(138, 92, 255, .35), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(255, 143, 90, .18), transparent 50%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px),
    #120e1f;
}
.game.soon .cover img { width: 30%; height: auto; opacity: .35; filter: grayscale(.2) blur(.3px); }
.game.soon.alt .cover { background:
    radial-gradient(circle at 70% 30%, rgba(255, 197, 107, .22), transparent 55%),
    radial-gradient(circle at 25% 75%, rgba(106, 60, 240, .35), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px),
    #110d1c; }

/* studio / principles */
.studio { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.studio .text p { color: var(--muted); font-size: 18px; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.principle { padding: 26px; }
.principle .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(145deg, rgba(138, 92, 255, .28), rgba(138, 92, 255, .08)); border: 1px solid var(--line-2);
}
.principle .ic svg { width: 22px; height: 22px; stroke: var(--violet-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.principle h3 { margin-bottom: 8px; }
.principle p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* numbers strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 56px; }
.facts div { background: var(--bg-2); padding: 26px 24px; }
.facts b { display: block; font: 700 30px/1.1 var(--display); letter-spacing: -0.02em; margin-bottom: 6px; }
.facts span { color: var(--muted); font-size: 14.5px; }

/* news */
.news { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post { padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color .3s, transform .3s; }
.post:hover { border-color: var(--line-2); transform: translateY(-3px); }
.post time { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.post p { color: var(--muted); margin: 0; }
.post a.more { margin-top: auto; font-weight: 600; }

/* press + contact band */
.band {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: clamp(32px, 5vw, 56px);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 197, 107, .14), transparent 70%),
    radial-gradient(700px 400px at 0% 100%, rgba(138, 92, 255, .22), transparent 70%),
    var(--bg-2);
}
.band h2 { margin: 14px 0 16px; }
.band p { color: var(--muted); margin: 0; }
.band .mail { font: 500 clamp(20px, 2.4vw, 28px)/1.2 var(--display); color: var(--text); letter-spacing: -0.02em; word-break: break-all; }
.band .mail:hover { color: var(--amber); }
.band .side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* ---------- article pages ---------- */
.page-head { padding: clamp(48px, 7vw, 90px) 0 30px; }
.page-head h1 { font-size: clamp(34px, 5vw, 60px); margin: 18px 0 16px; }
.doc { max-width: 780px; padding-bottom: 40px; }
.doc > h1 { font-size: clamp(30px, 4vw, 50px); margin: clamp(48px, 6vw, 80px) 0 14px; }
.doc > h1 + p.muted { margin-bottom: 8px; }
.doc h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 2em 0 .7em; }
.doc h3 { margin: 1.6em 0 .5em; }
.doc p, .doc li { color: #d3cde2; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .45em; }
.doc li::marker { color: var(--violet-2); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 14px 0 22px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 12px 12px 12px 0; text-align: left; vertical-align: top; }
.doc th { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.muted { color: var(--muted); }
.note { padding: 18px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }

.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 10px; }
.dl a { display: flex; flex-direction: column; gap: 12px; padding: 18px; color: var(--text); }
.dl a:hover { border-color: var(--line-2); }
.dl .prev { aspect-ratio: 16 / 10; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #0d0a16; border: 1px solid var(--line); }
.dl .prev.light { background: #f4f1fa; }
.dl .prev img { max-width: 70%; max-height: 70%; }
.dl .prev img.full { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.dl small { color: var(--dim); }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; margin: 16px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Purti page: the game keeps its own green-felt look inside the studio shell */
.purti-hero {
  margin-top: 36px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
  background: radial-gradient(800px 400px at 20% 0%, #2c8a55, transparent 70%), linear-gradient(160deg, #134a2f, #07261a);
  border-color: rgba(242, 193, 78, .25);
}
.purti-hero img.icon { width: 148px; height: 148px; border-radius: 34px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.purti-hero h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0; color: #f2c14e; font-size: clamp(44px, 6vw, 72px); }
.purti-hero p { color: #d9eadf; margin: 10px 0 22px; font-size: 18px; }
.purti-hero .tag { background: rgba(0, 0, 0, .25); color: #e6f2ea; border-color: rgba(255, 255, 255, .15); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 0; }
.shots img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--line); }
.age { display: inline-block; font: 700 12px/1 var(--body); padding: 4px 7px; border-radius: 6px; border: 1.5px solid currentColor; vertical-align: middle; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 56px 0 44px; color: var(--muted); font-size: 14.5px; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer.site h4 { font: 500 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0 0 16px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }
footer.site .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }
footer.site .logo { margin-bottom: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .studio, .band { grid-template-columns: 1fr; }
  .hero-art { max-width: 320px; order: -1; }
  .games { grid-template-columns: 1fr; }
  .game.featured { grid-row: auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  footer.site .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 28px; }
  .hero .wrap { gap: 8px; }
  .hero-art { max-width: 190px; }
  nav.main { gap: 16px; }
  nav.main a:not(.lang):not(.keep) { display: none; }
  .principles, .news, .dl, .shots { grid-template-columns: 1fr; }
  .purti-hero { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  h1 { overflow-wrap: anywhere; }
  .page-head h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fireflies i { opacity: .7; }
}

/* Purti gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--line); }
.gallery figcaption { margin-top: 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gallery figcaption b { color: #f2c14e; font-weight: 600; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }
