/* PolyFox — черновая вёрстка: просто и читаемо, дизайн позже. Логические свойства (inline/block) — готово к RTL. */
:root {
  /* гамма логотипа (оригами-лиса «Графит»): графитовые тона + огненный рыжий; фон слегка затемнён, не тёмный */
  --bg: #e9ecf0; --bg2: #dfe3e9; --fg: #1f2329; --muted: #5d6470; --line: #cfd5dd; --card: #f9fafb; --accent: #e8590c;
  --accent-soft: #fde6d6; --head: #2a2f38; --head-fg: #f3f4f6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1e23; --bg2: #22262d; --fg: #eef0f3; --muted: #a2a9b4; --line: #343a44; --card: #252a32; --accent: #f97316;
          --accent-soft: #3a2a20; --head: #14171b; --head-fg: #eef0f3; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); }
body { background: linear-gradient(180deg, var(--bg2) 0, var(--bg) 420px); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1180px; margin-inline: auto; padding: 8px 20px 48px; }
.top { background: var(--head); border-block-end: 3px solid var(--accent); }
.top-in { max-width: 1180px; margin-inline: auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; color: var(--head-fg); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; background: #eef0f3; border-radius: 10px; padding: 2px; }
.langs { display: flex; gap: 14px; font-size: 15px; }
.langs a { color: #ffb37f; }
.langs b { font-weight: 600; color: var(--head-fg); }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 18px 0 10px; letter-spacing: -.015em; }
h2 { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--accent); }
.lead { color: var(--muted); margin: 0 0 6px; }
.about { max-width: 760px; margin: 0 0 8px; }
.crumb { margin: 6px 0 0; font-size: 15px; }
.hero { margin-block-start: 28px; display: flex; align-items: center; gap: 36px; }
.hero h1 { margin-block-start: 0; }
.hero .about { font-size: 18px; max-width: 720px; }
.hero-logo { width: 190px; height: 190px; flex: none; }
.grid-svc { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.svc { position: relative; background: var(--card); border: 1px solid var(--line); border-block-start: 3px solid var(--accent);
  border-radius: 14px; padding: 16px 18px 18px; box-shadow: 0 1px 2px rgba(31,35,41,.05); }
.svc summary { list-style: none; cursor: default; }
.svc summary::-webkit-details-marker { display: none; }
.svc h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.25; padding-inline-end: 34px; }
.svc p { margin: 0; color: var(--muted); font-size: 15px; }
.svc-n { position: absolute; inset-inline-end: 14px; inset-block-start: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--head); color: var(--head-fg); font: 600 14px/26px var(--font); text-align: center; }
.svc-note { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.sec { margin-block-start: 36px; }
.grid { display: grid; gap: 18px; }
.grid-proj { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-main { grid-template-columns: 1fr; }
.grid-h { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.grid-v { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid-3d, .grid-mascot { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.proj, .d3 { box-shadow: 0 1px 2px rgba(31,35,41,.06), 0 6px 18px rgba(31,35,41,.06); }
.proj, .d3 { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--fg); padding-block-end: 14px; }
.proj:hover, .d3:hover { text-decoration: none; border-color: var(--accent); }
.proj img, .d3 img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-block-end: 8px; background: var(--line); }
.proj .t, .d3 .t, .vid .t, .masc .t { font-weight: 600; padding-inline: 14px; }
.proj .m, .d3 .m, .masc .m { color: var(--muted); font-size: 14px; padding-inline: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 0; }
.chips span { font-size: 12px; border-radius: 99px; padding: 2px 9px; color: var(--accent); background: var(--accent-soft); }
.d3 .go { padding-inline: 14px; color: var(--accent); font-weight: 600; margin-block-start: 4px; }
figure { margin: 0; }
.vid video { width: 100%; display: block; border-radius: 12px; background: #000; }
.vid.h video { aspect-ratio: 16 / 9; }
.vid.v video { aspect-ratio: 9 / 16; }
.vid figcaption { display: flex; flex-direction: column; gap: 2px; padding-block-start: 8px; }
.vid .t, .vid .m { padding-inline: 2px; }
.vid .m { color: var(--muted); font-size: 13px; }
.badge { align-self: flex-start; margin: 4px 14px 0; font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 1px 7px; }
.vid .badge { margin-inline: 2px; }
.masc img { width: 100%; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
footer { max-width: 1180px; margin-inline: auto; padding: 24px 20px 40px; color: var(--muted); font-size: 14px; border-block-start: 2px solid var(--line); }
.pick { padding: 60px 20px; font-size: 20px; text-align: center; }
@media (max-width: 520px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-logo { width: 120px; height: 120px; }
  .hero .about { font-size: 16px; }
  .grid-svc { gap: 10px; }
  .svc { padding: 12px 16px; }
  .svc summary { cursor: pointer; display: flex; align-items: center; gap: 10px; }
  .svc summary h3 { margin: 0; flex: 1; padding: 0; font-size: 17px; }
  .svc summary .svc-n { position: static; flex: none; }
  .svc summary::after { content: ""; flex: none; width: 9px; height: 9px; border-inline-end: 2px solid var(--accent);
    border-block-end: 2px solid var(--accent); transform: rotate(45deg); margin: -4px 4px 0; transition: transform .2s; }
  .svc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .svc[open] p { margin-top: 10px; }
  .grid-v { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-h, .grid-proj, .grid-3d, .grid-mascot { grid-template-columns: 1fr; }
}
