/* Shared components of the generated pages (SPEC §0.4, §2), in the site's paper language: hairlines, mono labels, square chips, no
   rounded cards, no shadows. Loaded on every page after styles.css (the base). Owned by the platform; page CSS goes into
   css/home.css, css/ai.css, css/led.css. Conventions:
   - gutters: var(--gut) = 24 px, 16 px at ≤ 720 px; a section is .sec (top hairline, vertical rhythm var(--sec-y))
   - type scale: --t-h1 (page H1), --t-h2 (section titles, as the old About h2), --t-lead, --t-body; titles are bold uppercase,
     labels are .label.mono (accent), body copy is #3a3f4a on paper
   - CTAs: .cta.primary = the accent chip (the form's Send), .cta.secondary = the hairline chip (the hero's hint), in a .ctas row
   - the page's scroll padding clears the fixed header: anchors, glides (scroll.js) and keyboard focus stop below it; nothing may
     scroll sideways at 390, 768 or 1440 */
:root{--gut:24px;--sec-y:88px;--t-h1:clamp(32px,5vw,64px);--t-h2:clamp(28px,4vw,46px);--t-lead:clamp(17px,1.5vw,20px);--t-body:16px;--hair:1px solid var(--line);--body-ink:#3a3f4a}
@media (max-width:720px){:root{--gut:16px;--sec-y:56px}}
/* scroll-padding, not a margin per [id]: the browser also keeps a focused element (Tab, Shift+Tab) clear of the header, with room for its
   ring; anchor jumps and scroll.js glides use the same offset. The home's tiles also clear the sticky filter bar (css/home.css) */
html{scroll-padding-top:calc(var(--header) + 12px)}
h2.label,h3.label{font-weight:400}

/* skip link: off-screen until focused */
/* fixed only while focused: Safari 26 on iPhone tints its bars from fixed elements at the screen's edges, the header's paper must be the only one */
.skip{position:absolute;left:8px;top:8px;z-index:60;background:var(--ink);color:var(--paper);padding:8px 12px;transform:translateY(-200%)}
.skip:focus{position:fixed;transform:none}

/* ---- header nav (SPEC §3): the current page in accent; phones get «Menu» and a full-width panel (site/js/nav.js) */
nav.top a[aria-current="page"]{color:var(--accent)}
header.site .menu{display:none}
/* the language button (SPEC §12; parts.mjs langMenu, site/js/nav.js; the owner, 2026-11-16: one button that opens, on phones too):
   «EN ▾» after the nav on wide screens, beside «Menu» on phones. A <details>: its list hangs under the header's hairline, the
   code in ink and the language's own name beside it, the current one marked with an accent cell. It opens row by row (steps: the
   site's pixel rhythm), at once with reduced motion */
header.site .langs{order:1;position:relative;flex:0 0 auto;padding-left:16px;border-left:var(--hair);margin-left:-8px}
header.site .langs summary{list-style:none;display:inline-flex;align-items:center;gap:7px;cursor:pointer;padding:8px 6px;color:var(--ink);transition:color .15s;user-select:none;-webkit-user-select:none}
header.site .langs summary::-webkit-details-marker{display:none}
header.site .langs summary::after{content:'';width:5px;height:5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .2s}
header.site .langs[open] summary::after{transform:translateY(1px) rotate(-135deg)}
header.site .langs summary:hover,header.site .langs[open] summary{color:var(--accent)}
header.site .langs summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
header.site .lang-list{position:absolute;right:-8px;top:calc(50% + var(--header) / 2);min-width:176px;display:flex;flex-direction:column;background:var(--paper);border:var(--hair);border-top:0;z-index:2}
header.site .lang-list a{display:flex;align-items:center;gap:14px;padding:13px 16px;color:var(--mid);border-top:var(--hair);transition:color .15s,background .15s;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
header.site .lang-list a b{font-weight:500;color:var(--ink);min-width:2.2em;transition:color .15s}
header.site .lang-list a::after{content:'';width:6px;height:6px;margin-left:auto;background:transparent}
header.site .lang-list a[aria-current="true"] b{color:var(--accent)}
header.site .lang-list a[aria-current="true"]::after{background:var(--accent)}
header.site .lang-list a:hover{background:var(--ink);color:var(--paper)}
header.site .lang-list a:hover b{color:var(--paper)}
header.site .lang-list a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
header.site .langs[open] .lang-list{animation:lang-in .22s steps(6,end) both}
@keyframes lang-in{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0)}}
@media (prefers-reduced-motion:reduce){header.site .langs[open] .lang-list{animation:none}header.site .langs summary::after{transition:none}}
@media (max-width:1320px){header.site .tag{display:none}}   /* from 1320 down: room for «Discuss a project» (.hcta) */
header.site .brand{flex:0 0 auto;white-space:nowrap}
/* «Discuss a project» in the header (site/js/nav.js): its place in the row is kept from the start (the nav never shifts when it comes
   in), it shows once the page's own first button has scrolled away and goes while the form is on screen. Phones: the short label */
header.site .hcta{order:1;flex:0 0 auto;margin-left:16px;margin-right:16px;padding:9px 14px 8px;background:var(--accent);color:#fff;white-space:nowrap;opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .25s,transform .25s,visibility 0s .25s}
header.site .hcta.on{opacity:1;visibility:visible;transform:none;transition:opacity .25s,transform .25s,visibility 0s}
header.site .hcta:hover{background:var(--ink)}
header.site .hcta:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
header.site .hcta .s{display:none}
@media (scripting:none){header.site .hcta{opacity:1;visibility:visible;transform:none}}
/* a narrow desktop (the nav still in the row): the short label and a tighter nav, so the row fits */
@media (min-width:861px) and (max-width:1000px){header.site .hcta{margin-left:12px;margin-right:12px;padding:9px 10px 8px}header.site .hcta .l{display:none}header.site .hcta .s{display:inline}header.site nav.top{gap:14px}}
/* a nav item never breaks into two lines (the owner, 2026-11-14: «AI» and «LED» instead of the long names, parts.mjs PT) */
header.site nav.top a{white-space:nowrap}
@media (prefers-reduced-motion:reduce){header.site .hcta,header.site .hcta.on{transition:none;transform:none}}
@media (max-width:860px){
  header.site .menu{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:10px;cursor:pointer;min-height:40px;padding:0 0 0 12px;color:var(--ink);font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase}
  header.site .menu::after{content:'';width:14px;height:5px;border-top:1px solid currentColor;border-bottom:1px solid currentColor;transition:height .2s}
  header.site .menu:hover,header.site.open .menu{color:var(--accent)}
  header.site.open .menu::after{height:0;border-bottom:0}
  header.site .menu:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  header.site nav.top{display:none;position:fixed;left:0;right:0;top:var(--header);flex-direction:column;gap:0;background:var(--paper);border-bottom:var(--hair);padding:4px var(--gut) 16px;max-height:calc(100dvh - var(--header));overflow-y:auto}
  header.site.open nav.top{display:flex}
  header.site nav.top a{font-family:"Instrument Sans","Onest",system-ui,sans-serif;font-size:26px;font-weight:600;letter-spacing:-.02em;text-transform:none;padding:14px 0;border-bottom:var(--hair)}
  header.site nav.top a:last-child{border-bottom:0}
  /* phones: brand · [Discuss] · EN ▾ · Menu. The language button is one short word now, so it stays beside «Discuss» (it used
     to give its place to it); the row's gaps are tighter so the four fit a 320 px screen in every language */
  header.site{gap:10px}
  header.site .langs{margin-left:0;padding-left:0;border-left:0}
  header.site .langs summary{min-height:40px;padding:0 4px}
  header.site .lang-list{right:-4px}
  header.site .hcta{display:none;margin:0 0 0 auto;padding:8px 10px 7px}
  header.site .hcta.on{display:block}
  header.site:not(.cta) .langs{margin-left:auto}
  header.site .hcta .l{display:none}
  header.site .hcta .s{display:inline}
  header.site .menu{order:2;padding-left:6px}
  /* the narrowest phones (320 px): «Discuss» takes the language button's place while it shows, as it did before */
  @media (max-width:349px){header.site.cta .langs{display:none}}
}

/* ---- footer: contacts, the nav + privacy, © and the mark */
footer.site .f-nav{display:flex;flex-wrap:wrap;gap:10px 22px}
footer.site .f-nav a:hover{color:var(--accent)}
footer.site .f-nav a[href$="privacy.html"],footer.site .f-nav a[href$="legal.html"]{color:var(--mid)}   /* the two legal pages, quieter than the nav (legal.html: 2026-11-19) */
@media (max-width:720px){footer.site{flex-direction:column;align-items:flex-start;gap:32px}footer.site .fine{align-items:flex-start}}

/* ---- page frame and sections */
main.page{padding-top:var(--header)}
/* the first label of every page (the home's «Editor & visual director», «AI Animatics», «LED & Event Content», «Articles» …) stands
   at one height: the header + --hero-top, the home hero's own rule (the owner, 2026-11-14: «чтобы это не скакало вверх-вниз»).
   Every page's first section takes its top padding from here; phones: 28 px */
:root{--hero-top:clamp(32px,5vh,56px)}
@media (max-width:720px){:root{--hero-top:28px}}
.sec{padding:var(--sec-y) var(--gut);border-top:var(--hair)}
main.page>.sec:first-child{border-top:0}
.sec-head{margin:0 0 40px;max-width:72ch}
.sec-title{font-size:var(--t-h2);line-height:1.02;letter-spacing:-.03em;margin:0;font-weight:700;text-transform:uppercase}
.sec-lead{font-size:var(--t-lead);line-height:1.4;margin:18px 0 0;max-width:58ch;color:var(--body-ink)}
.page-hero h1{font-size:var(--t-h1);line-height:1;letter-spacing:-.035em;margin:0;font-weight:700;text-transform:uppercase;max-width:20ch;overflow-wrap:break-word}
.page-hero .sec-lead{margin-top:24px}
.alias{display:block;height:0}

/* ---- calls to action */
.ctas{display:flex;flex-wrap:wrap;gap:12px 14px;margin-top:32px}
.cta{display:inline-flex;align-items:center;gap:10px;padding:10px 22px;border:1px solid transparent;transition:color .2s,background .2s,border-color .2s}
.cta.primary{color:var(--paper);background:var(--accent)}
.cta.primary:hover{background:var(--ink)}
.cta.secondary{color:var(--ink);background:var(--paper);border-color:var(--line)}
.cta.secondary:hover{color:var(--accent);border-color:var(--accent)}

/* ---- media figure: the box keeps the image ratio (width/height attributes); a play button opens the modal player */
figure.media{margin:0;display:grid;gap:10px;min-width:0}
figure.media img{display:block;width:100%;height:auto;background:#E4E6EB}
figure.media figcaption{color:var(--mid)}
.media-play{all:unset;box-sizing:border-box;cursor:pointer;position:relative;display:block}
.media-play:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.media-play .play-mark{position:absolute;left:12px;bottom:12px;color:var(--paper);background:var(--ink);padding:6px 10px;transition:background .2s}
.media-play:hover .play-mark,.media-play:focus-visible .play-mark{background:var(--accent)}
/* a work card's preview loop (js/card-previews.js): over the poster, in the poster's own box and crop, shown once it has a frame */
figure.sw .media-play video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .4s;pointer-events:none}
figure.sw.playing .media-play video{opacity:1}
@media (prefers-reduced-motion:reduce){figure.sw .media-play video{display:none}}

/* ---- numbered steps */
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));border-top:var(--hair)}
.steps li{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;padding:16px 20px 18px 0;border-bottom:var(--hair);align-items:baseline}
.steps b{font-weight:600;font-size:17px;letter-spacing:-.01em}
.steps p{margin:6px 0 0;color:var(--body-ink);font-size:15px;line-height:1.45;max-width:46ch}

/* ---- FAQ as <details> */
.faq{border-top:var(--hair);max-width:80ch}
.faq details{border-bottom:var(--hair)}
.faq summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:18px 0;font-size:18px;font-weight:600;letter-spacing:-.01em}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+';flex:0 0 auto;color:var(--accent);font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:400}
.faq details[open] summary::after{content:'−'}
.faq summary:hover{color:var(--accent)}
.faq .a{padding:0 0 20px;max-width:64ch}
.faq .a p{margin:0 0 10px;font-size:var(--t-body);line-height:1.5;color:var(--body-ink)}

/* ---- specs table and credits list */
table.specs{border-collapse:collapse;width:100%;max-width:720px}
table.specs th,table.specs td{border-top:var(--hair);padding:10px 16px 10px 0;text-align:left;vertical-align:top}
table.specs tr:last-child>*{border-bottom:var(--hair)}
table.specs th{color:var(--mid);font-weight:400;white-space:nowrap;width:1%}
table.specs td{font-size:15px;line-height:1.45}
ul.credits{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:15px;line-height:1.4}
ul.credits li{display:flex;flex-wrap:wrap;gap:2px 12px}
ul.credits .mono{color:var(--mid);min-width:14ch}

/* ---- the home grid's server-rendered list of works (the no-JS base; main.js replaces it with the grid) */
.worklist{list-style:none;margin:0;padding:6px 0 0;columns:3 260px;column-gap:24px}
.worklist li{break-inside:avoid;border-top:var(--hair)}
.worklist a{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 0}
.worklist a:hover{color:var(--accent)}
.worklist b{font-weight:600;font-size:15px;letter-spacing:-.01em;min-width:0}
.worklist .mono{color:var(--mid);white-space:nowrap}

/* ---- the privacy notice and the 404 page */
.legal{max-width:calc(43em + 2 * var(--gut));margin:0 auto;padding:var(--sec-y) var(--gut) 96px}   /* the notice is one reading column in the middle of the page (the owner, 2026-10-10: «по центру лучше»; it stood on the grid's left edge before). 43em = the old 64ch in Instrument Sans: a ch follows the font that is loaded, so the whole column widened when the web font swapped in (CLS 0.39 at 768) */
.legal h1{font-size:clamp(28px,4vw,40px);line-height:1.02;letter-spacing:-.03em;margin:0 0 28px;font-weight:700;text-transform:uppercase}
.legal p:not(.label){font-size:17px;line-height:1.5;margin:0 0 16px}
.legal h2.label{margin-top:40px}
.legal ul{list-style:none;margin:0 0 16px;padding:0;border-top:var(--hair)}   /* the notice's lists: rows under hairlines, like every list of the site */
.legal li{font-size:17px;line-height:1.5;padding:11px 0 12px;border-bottom:var(--hair)}
.legal li b{font-weight:600}
.legal p.updated{margin:40px 0 0;color:var(--mid)}
.legal a{border-bottom:1px solid var(--line)}
.legal a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.nf{min-height:calc(100svh - var(--header) - 220px)}

/* ---- «Copy link» to a work's share URL (parts.mjs copyLink, site/js/page.js; SPEC §8.1): a mono text button on a hairline, the
   confirmation beside it in the accent; without the Clipboard API a selected read-only field with the URL appears under it */
.copy{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px;max-width:100%}
.copy-link{all:unset;box-sizing:border-box;cursor:pointer;font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;line-height:1.4;color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:2px;transition:color .2s,border-color .2s}
.copy-link:hover,.copy-link[data-state="copied"]{color:var(--accent);border-bottom-color:var(--accent)}
.copy-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.copy-msg{color:var(--accent)}
.copy-field{flex:1 1 100%;min-width:0;box-sizing:border-box;margin:0;padding:9px 10px;border:1px solid var(--accent);border-radius:0;background:var(--paper);color:var(--ink);font-size:12px;letter-spacing:.02em;text-transform:none}
@media (prefers-reduced-motion:reduce){.copy-link{transition:none}}
/* an anchor target focused after a glide (scroll.js) gets no ring: the focus is for screen readers and the next Tab */
section[tabindex="-1"]:focus,[id][tabindex="-1"]:focus{outline:none}

/* ---- one product across the pages (the integrate pass): rules that were repeated per page live here once.
   Type: h1 / h2 titles are bold uppercase; h3 item titles (a work's title, a step, a use) keep their own case; headings never leave
   an orphan word on their last line and leads wrap evenly. */
main :is(h1,h2,h3),.faq summary{text-wrap:balance}
/* the 01 / 02 numbers of steps, uses, types and examples */
main .n.mono{color:var(--accent)}
.sec-lead,.svc-line,.hero-lead{text-wrap:pretty}
/* a work's title in a page body (the landings' cards and examples, the home's crafts): the catalog's own case, as the player and the
   grid show it; it opens the player in place (page.js / main.js) */
.inst-title,.ex-text h3{font-size:clamp(22px,2.1vw,30px);line-height:1.08;letter-spacing:-.02em;font-weight:700;overflow-wrap:break-word}
.inst-title a,.ex-text h3 a{transition:color .2s}
.inst-title a:hover,.ex-text h3 a:hover{color:var(--accent)}
.inst-title a:focus-visible,.ex-text h3 a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* mono controls: the hairline chip that opens an item in the player (button.chip) and the underlined text button (.playlink) */
button.chip,.playlink{all:unset;box-sizing:border-box;cursor:pointer;font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);transition:color .2s,border-color .2s}
button.chip{padding:9px 12px;border:1px solid var(--line);background:var(--paper);line-height:1.2}
button.chip:hover{color:var(--accent);border-color:var(--accent)}
button.chip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.playlink{white-space:nowrap;border-bottom:1px solid var(--line)}
.playlink:hover{color:var(--accent);border-bottom-color:var(--accent)}
.playlink:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* a media caption under a picture: mono, quiet, the title on the left and a player link on the right (the home's services and crafts) */
.media-cap{display:flex;justify-content:space-between;align-items:baseline;gap:6px 16px;flex-wrap:wrap;color:var(--mid);margin:10px 0 0}
@media (prefers-reduced-motion:reduce){button.chip,.playlink,.inst-title a,.ex-text h3 a{transition:none}}
/* the loading screen (js/boot.js): <html class="booting"> is covered by paper from the first paint; the script lifts the cover (at once
   when the page is ready in time, after its mark animation otherwise). If the script never arrives the cover lifts itself after 6 s;
   without scripts css/nojs.css removes it */
html.booting::before{content:"";position:fixed;inset:0;z-index:2147483000;background:var(--paper);animation:nb-boot-failsafe 1ms linear 4s forwards}
@keyframes nb-boot-failsafe{to{visibility:hidden}}
html.boot-on{overflow:hidden}
