/* B-flat look of the game: cream surfaces, kraft frame, denim ribbon, azure buttons, ink #1B2550.
   Tokens come from Art/Source/Concepts/UI (REVIEW.md, Redesign/UI_REDESIGN_SPEC.md). No external requests. */

@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Nunito-Regular.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Nunito-Bold.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-style: normal; font-display: swap; src: url("/fonts/Nunito-Black.ttf") format("truetype"); }

:root {
	color-scheme: light;
	--bg: #FBF3E4;
	--bg-deep: #F4E3C3;
	--paper-top: #FFF9EE;
	--paper-bottom: #FDF0DA;
	--ink: #1B2550;
	--muted: #6F5240;
	--edge: #86512A;
	--lip: #D9AE7A;
	--frame-top: #F6D6A6;
	--frame-mid: #EBC48F;
	--frame-bottom: #D9A970;
	--groove: #C9955F;
	--stitch: #C9A273;
	--azure-top: #2B8FEA;
	--azure-bottom: #0F6FD6;
	--azure-edge: #0B3E96;
	--azure-lip: #0A62C8;
	--ribbon-top: #3F70B8;
	--ribbon-mid: #3463AA;
	--ribbon-bottom: #2A5398;
	--ribbon-lip: #22488A;
	--ribbon-edge: #14336B;
	--gold-top: #FFE680;
	--gold-bottom: #FFC83D;
	--gold-edge: #A2600A;
	--link: #0A57B8;
	--shadow: rgba(74, 44, 22, .26);
	--radius: 28px;
	--gutter: 16px;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font: 400 1.0625rem/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--ink);
	background:
		radial-gradient(120% 60% at 15% -10%, #FFFFFF 0%, rgba(255, 255, 255, 0) 60%),
		linear-gradient(180deg, #FFF8EA 0%, var(--bg) 35%, var(--bg-deep) 100%);
	background-color: var(--bg);
}

main { flex: 1 0 auto; padding-bottom: 48px; }

img { max-width: 100%; height: auto; }

.wrap { width: min(100% - 2 * var(--gutter), 1040px); margin-inline: auto; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--azure-edge); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-weight: 900; line-height: 1.12; margin: 0; overflow-wrap: break-word; hyphens: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
p { margin: 0 0 .9em; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 10px 16px; background: var(--paper-top); border: 2px solid var(--edge); border-radius: 14px; font-weight: 900; }
.skip:focus { left: 8px; }

/* ---------- header and footer ---------- */

.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 1.45rem; font-weight: 900; color: var(--ink); text-decoration: none; }
.brand img { display: block; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.site-header nav a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
	font-size: .95rem; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 14px;
}
.site-header nav a:hover { background: rgba(134, 81, 42, .12); color: var(--ink); }
.site-header nav a.lang { margin-left: 4px; background: var(--paper-top); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--lip); font-weight: 900; }

.site-footer { flex-shrink: 0; margin-top: 24px; padding: 28px 0 32px; background: linear-gradient(180deg, #F3DDB8, #EBCB9B); border-top: 4px solid var(--frame-mid); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .55); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.foot-brand img { display: block; }
.foot-links { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-block; padding: 8px 0; font-weight: 700; color: var(--ink); }
.nocookies { font-weight: 700; margin-bottom: .4em; }
.rights { font-size: .875rem; color: var(--muted); margin: 0; }

/* ---------- shared surfaces ---------- */

/* cream card: top rim, bottom lip, soft drop shadow */
.card {
	position: relative;
	padding: 22px 20px 24px;
	background: linear-gradient(180deg, var(--paper-top), var(--paper-bottom));
	border: 2px solid var(--edge);
	border-radius: var(--radius);
	box-shadow: inset 0 3px 0 #fff, 0 6px 0 var(--lip), 0 14px 22px var(--shadow);
}
.card h2, .card h3 { margin-bottom: .35em; }
.card h2 { font-size: 1.35rem; }
.card h3 { font-size: 1.2rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

/* kraft frame around a big cream body, with one dashed stitch line inside */
.frame {
	position: relative;
	padding: 26px 22px 28px;
	border: 10px solid transparent;
	border-radius: 34px;
	background:
		linear-gradient(180deg, var(--paper-top), var(--paper-bottom)) padding-box,
		linear-gradient(180deg, var(--frame-top), var(--frame-mid) 45%, var(--frame-bottom)) border-box;
	box-shadow: 0 0 0 2px var(--edge), 0 8px 0 2px var(--lip), 0 16px 26px var(--shadow);
}
.frame::before, .prose-body::before {
	content: ""; position: absolute; inset: 8px; border: 2px dashed var(--stitch); border-radius: 22px; pointer-events: none;
}

/* denim ribbon with notched ends */
.ribbon {
	display: inline-block; margin: 0 0 14px; padding: 8px 30px 9px;
	font-size: 1.17rem; font-weight: 900; line-height: 1.2; color: #fff;
	text-shadow: 0 2px 0 var(--ribbon-edge), 0 0 3px var(--ribbon-edge);
	background: linear-gradient(180deg, var(--ribbon-top), var(--ribbon-mid) 55%, var(--ribbon-bottom));
	border-bottom: 5px solid var(--ribbon-lip);
	clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%);
}

.pill {
	display: inline-block; padding: 5px 14px; font-size: .95rem; font-weight: 900; color: var(--ink);
	background: var(--paper-top); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 0 3px 0 var(--lip);
}
.pill-gold { background: linear-gradient(180deg, var(--gold-top), var(--gold-bottom)); border-color: var(--gold-edge); box-shadow: 0 3px 0 #E0A21E; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 26px;
	font-size: 1.2rem; font-weight: 900; line-height: 1.2; color: #fff; text-decoration: none; text-align: center;
	text-shadow: 0 2px 0 var(--azure-edge);
	background: linear-gradient(180deg, var(--azure-top), var(--azure-bottom));
	border: 3px solid var(--azure-edge); border-radius: 18px;
	box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--azure-lip), 0 12px 16px rgba(32, 48, 74, .28);
	transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { color: #fff; filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 1px 0 var(--azure-lip), 0 4px 8px rgba(32, 48, 74, .28); }
.btn-quiet { color: var(--ink); text-shadow: none; background: linear-gradient(180deg, #FFFDF8, #FBE9CF); border-color: var(--edge); box-shadow: inset 0 3px 0 #fff, 0 5px 0 var(--lip), 0 12px 16px var(--shadow); }
.btn-quiet:hover { color: var(--ink); }
.btn-quiet:active { box-shadow: inset 0 3px 0 #fff, 0 1px 0 var(--lip), 0 4px 8px var(--shadow); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0 8px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 0; }
.app-tile { width: 64px; height: 64px; border-radius: 16px; border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--lip), 0 8px 12px var(--shadow); }

.num {
	display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-bottom: 10px;
	font-size: 1.2rem; font-weight: 900; color: var(--ink);
	background: linear-gradient(180deg, var(--gold-top), var(--gold-bottom)); border: 3px solid var(--gold-edge); border-radius: 50%;
	box-shadow: 0 3px 0 #E0A21E;
}

/* ---------- home page ---------- */

.hero > * { min-width: 0; }
.hero { display: grid; gap: 34px; padding: 16px 0 12px; align-items: center; }
.lockup { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.lockup-spool { flex: none; width: 84px; height: auto; filter: drop-shadow(0 6px 6px rgba(74, 44, 22, .25)); }
.lockup-text { display: flex; flex-direction: column; min-width: 0; }
.lockup-name { font-size: clamp(1.6rem, 8.4vw, 2.6rem); line-height: 1; }
@media (max-width: 479px) { .lockup { flex-direction: column; align-items: flex-start; gap: 6px; } }
.lockup-sub { margin-top: 4px; font-size: clamp(1.15rem, 5vw, 1.7rem); line-height: 1.1; color: var(--ribbon-bottom); }
.eyebrow { margin: 0; font-size: .9rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.25rem; font-weight: 700; line-height: 1.45; }

.phones { display: flex; justify-content: center; align-items: flex-start; gap: 14px; padding-bottom: 8px; }
.phone {
	margin: 0; width: min(47%, 250px); padding: 8px; border-radius: 32px;
	background: linear-gradient(180deg, var(--frame-top), var(--frame-mid) 45%, var(--frame-bottom));
	box-shadow: 0 0 0 2px var(--edge), 0 7px 0 2px var(--lip), 0 16px 24px var(--shadow);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 24px; }
.phone-2 { margin-top: 36px; }

.section { padding-top: 44px; }
.section-title { font-size: clamp(1.6rem, 5.5vw, 2.2rem); margin-bottom: 14px; }
.section-lead { max-width: 60ch; font-size: 1.1rem; font-weight: 700; color: var(--muted); }

.cards { list-style: none; margin: 0; padding: 0 0 6px; display: grid; gap: 22px; }

.goods { list-style: none; margin: 18px 0 0; padding: 0 0 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.icon-frame {
	margin: 0; padding: 8px 6px 8px; text-align: center;
	background: linear-gradient(180deg, #FFFFFF, #FFF8EE 45%, #F8E6CC); border: 2.5px solid #D8B888; border-radius: 22px;
	box-shadow: 0 5px 0 var(--lip), 0 10px 14px rgba(74, 44, 22, .16);
}
.icon-frame img { display: block; width: 100%; height: auto; }
.icon-frame figcaption { margin-top: 2px; font-size: .85rem; font-weight: 900; overflow-wrap: anywhere; }

.studio { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; padding: 26px 22px 28px; }
.studio-duck { width: 120px; height: 120px; flex: none; filter: drop-shadow(0 6px 6px rgba(74, 44, 22, .22)); }
.studio > div { flex: 1 1 260px; min-width: 0; }
.studio h2 { font-size: 1.6rem; }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-weight: 700; }
.links a { display: inline-block; padding: 6px 0; }

/* ---------- document pages (privacy, delete, 404) ---------- */

.doc { max-width: 780px; margin: 0 auto; padding-top: 16px; }
.doc-head { margin-bottom: 26px; }
.doc-head h1 { font-size: clamp(1.55rem, 6.4vw, 2.8rem); margin: 6px 0 12px; }
.doc .lead { color: var(--ink); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 12px; font-size: .95rem; font-weight: 700; color: var(--muted); }

.prose-body { position: relative; padding: 30px 26px 32px; }
.prose-body::before { inset: 9px; border-radius: 20px; }
.prose-body h2 { margin: 1.8em 0 .45em; font-size: 1.4rem; scroll-margin-top: 16px; }
.prose-body h2:first-child { margin-top: 0; }
.prose-body h3 { margin: 1.3em 0 .35em; font-size: 1.1rem; }
.prose-body p, .prose-body li { overflow-wrap: anywhere; }
.prose-body ul { margin: 0 0 1em; padding-left: 1.3em; }
.prose-body li { margin-bottom: .3em; }
.prose-body > :first-child { margin-top: 0; }

mark.todo {
	padding: 1px 8px; color: var(--ink); font-weight: 900; background: #FFE680; border: 2px dashed #B3261E; border-radius: 8px;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.steps { list-style: none; margin: 0 0 30px; padding: 0 0 6px; display: grid; gap: 22px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .num { margin-bottom: 0; }
.step > div { min-width: 0; }
.note { padding: 10px 14px; background: var(--paper-bottom); border-left: 5px solid var(--frame-bottom); border-radius: 10px; font-size: .98rem; color: var(--muted); }
.card ul { margin: 0 0 .8em; padding-left: 1.3em; }
.card li { margin-bottom: .35em; }
.card li, .card p { overflow-wrap: anywhere; }

.two-col { display: grid; gap: 22px; margin-bottom: 30px; padding-bottom: 6px; }
.doc > .card { margin-bottom: 8px; }

.not-found { text-align: center; padding: 40px 0 20px; }
.not-found .actions { justify-content: center; }
.not-found .ru-h { margin-top: 34px; font-size: 1.6rem; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
	.lockup-spool { width: 112px; }
	.cards { grid-template-columns: repeat(2, 1fr); }
	.two-col { grid-template-columns: repeat(2, 1fr); }
	.goods { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
	.frame { padding: 34px 36px 36px; }
	.prose-body { padding: 40px 44px 44px; }
}

@media (min-width: 640px) and (max-width: 879px) { .lockup-name { font-size: 3.2rem; } .lockup-sub { font-size: 1.7rem; } }
@media (min-width: 880px) and (max-width: 1020px) { .lockup { flex-direction: column; align-items: flex-start; gap: 6px; } }

@media (min-width: 880px) {
	:root { --gutter: 24px; }
	.hero { grid-template-columns: 1.2fr .8fr; gap: 40px; padding-top: 28px; }
	.phones { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.btn { transition: none; }
}

@media print {
	.site-header nav, .phones, .skip { display: none; }
	body { background: #fff; }
}
