/* storydotty.app: the home for the projects. Same paper, ink and pastel dots
   as the first Storydotty app; each project card brings its own colour. */
@font-face { font-family: "Nunito"; src: url("/_home/fonts/Nunito-Regular.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/_home/fonts/Nunito-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
:root {
  --bg: #faf6ef;
  --ink: #2b2a28;
  --muted: #6d6a64;
  --card: #fffdf9;
  --line: #e4ddd0;
  --mint: #cfe8dd;
  --peach: #f7d9c4;
  --sky: #cfe0f5;
  --butter: #f8ecc2;
  --monstro: #FFF4E6;
  --monstro-ink: #2B1B3D;
  --monstro-teal: #3BB8A8;
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1c1a; --ink: #f2eee6; --muted: #aaa49a; --card: #272522; --line: #3a3732; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 "Nunito", system-ui, sans-serif; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #e59a6a; outline-offset: 3px; border-radius: 8px; }
html.ru [lang="en"], html:not(.ru) [lang="ru"] { display: none !important; }

.wrap { max-width: 980px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 22px; }
.brand img { width: 40px; height: 40px; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang button { font: 700 14px "Nunito", system-ui, sans-serif; color: var(--ink); background: none; border: 0; padding: 6px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.intro { padding-block: 36px 40px; }
.intro h1 { font-size: clamp(34px, 5.5vw, 54px); line-height: 1.08; margin: 0 0 14px; font-weight: 800; max-width: 16ch; text-wrap: balance; }
.intro p { font-size: 19px; color: var(--muted); margin: 0; max-width: 46ch; }
.dots { display: flex; gap: 8px; margin-bottom: 22px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 64px; }
.project { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 2px 10px rgba(43, 42, 40, .06); transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.project:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(43, 42, 40, .10); }
.visual { height: 240px; position: relative; overflow: hidden; }
.body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.body h2 { margin: 0; font-size: 24px; font-weight: 800; }
.body p { margin: 0; color: var(--muted); }
.meta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.go { font-weight: 700; }
.go::after { content: " →"; }
.tag { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.dotty .visual { background: #FFF7E8; }
.dotty .visual .icon { position: absolute; left: 26px; top: 26px; width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 5px 0 rgba(31, 42, 68, .18); }
.dotty .visual .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.dotty .tag { background: #CDEFEA; color: #135d55; }

.monstro .visual { background: var(--monstro); }
.monstro .visual .icon { position: absolute; left: 26px; top: 26px; width: 92px; height: 92px; border-radius: 22px; border: 3px solid var(--monstro-ink); box-shadow: 0 5px 0 var(--monstro-ink); }
.monstro .visual .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.monstro .tag { background: #FFE2C2; color: #6a3a10; }

footer { border-top: 1.5px solid var(--line); padding-block: 24px 36px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  .visual { height: 210px; }
}
@media (prefers-reduced-motion: reduce) { .project { transition: none; } .project:hover { transform: none; } }
