/* GOOWESH - главная.
   Японская готика + Y2K + мягкий 3D-реализм: тёмное стекло с размытием, хромированный текст,
   глянцевые «таблетки», мягкие многослойные тени, неон и звёздочки-искры. */

@font-face { font-family: "JB Mono"; src: url(fonts/jbmono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Serif JP"; src: url(fonts/serif-jp.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Lato"; src: url(fonts/lato-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Lato"; src: url(fonts/lato-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url(fonts/lato-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Goth"; src: url(fonts/goth.woff2) format("woff2"); font-display: swap; }

:root {
  --bg: #050507;
  --ink: #eeebf6;
  --text: #c2bed0;
  --muted: #85819a;
  --dim: #4b4858;
  --line: rgba(255, 255, 255, .08);

  --mag: #ff3df2;
  --vio: #9b5cff;
  --cya: #39e6ff;
  --lim: #b4ff39;
  --yel: #ffe14a;
  --wht: #f3f1f8;
  --vapor: #b19eef;
  --wine: #a8243b;   /* бордовый акцент: роль, иероглифы в шапке и заголовках */

  --sans: "Lato", "Segoe UI", system-ui, sans-serif;
  --mono: "JB Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --serif: "Serif JP", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
  --goth: "Goth", "Old English Text MT", var(--serif);

  /* отступы: одна шкала на весь сайт */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;

  /* стекло и объём */
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .018) 55%, rgba(255, 255, 255, .035));
  --glass-border: rgba(255, 255, 255, .11);
  --blur: blur(18px) saturate(150%);
  --depth:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -24px 48px -24px rgba(0, 0, 0, .55),
    0 2px 4px rgba(0, 0, 0, .35),
    0 24px 60px -24px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 78% 22%, rgba(255, 255, 255, .06), transparent 60%),
    radial-gradient(900px 700px at 8% 70%, rgba(255, 255, 255, .025), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 300 15px/1.65 var(--sans);
  overflow-x: hidden;
}
h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--mag); color: #000; }
:focus-visible { outline: 1px solid var(--cya); outline-offset: 3px; border-radius: 4px; }

.hud { font: 400 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hud b { color: var(--ink); font-weight: 500; }
[lang="ja"] { font-family: var(--serif); text-transform: none; }
.goth { font-family: var(--goth); font-weight: 400; letter-spacing: .02em; text-transform: none; }

/* ---------- материалы ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--depth);
}
/* хром Y2K */
.chrome {
  background: linear-gradient(180deg, #ffffff 0%, #e9e6f4 30%, #8f8aa6 48%, #3b3848 52%, #b9b4cc 66%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .25)) drop-shadow(0 10px 24px rgba(0, 0, 0, .7));
}
/* звёздочка-искра из логотипа */
.spark {
  display: inline-block;
  width: .9em;
  height: .9em;
  vertical-align: -.08em;
  background: currentColor;
  -webkit-mask: url(sparkle.svg) center / contain no-repeat;
  mask: url(sparkle.svg) center / contain no-repeat;
}
/* глянцевая таблетка */
.chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -4px 10px rgba(0, 0, 0, .35), 0 6px 14px -8px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.chip { padding: 3px 10px; color: var(--ink); letter-spacing: .08em; text-transform: lowercase; background: linear-gradient(180deg, rgba(44, 42, 56, .88), rgba(12, 12, 17, .88)); }
.chip--acc { color: color-mix(in srgb, var(--acc) 70%, #fff); text-transform: uppercase; border-color: color-mix(in srgb, var(--acc) 40%, transparent); }

/* ---------- плёнка ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .6) 100%);
}

/* ---------- заставка ---------- */
#intro { display: none; }
.js #intro { display: block; position: fixed; inset: 0; z-index: 60; background-color: var(--bg); animation: intro-failsafe 0s 9s forwards; }
.js #intro.fade { background-color: rgba(5, 5, 7, 0); pointer-events: none; transition: background-color 1.3s cubic-bezier(.4, 0, .2, 1); }
.js.intro-skip #intro { display: none; }
#intro canvas { display: block; width: 100%; height: 100%; }
@keyframes intro-failsafe { to { visibility: hidden; opacity: 0; } }

/* появление - переходами, а не анимацией: после неё у блоков не остаётся filter/opacity,
   иначе ломается размытие стекла (backdrop-filter) внутри */
.js .reveal { transition: opacity .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), translate .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), filter .9s ease var(--d, 0s); }
.js:not(.ready) .reveal { opacity: 0; translate: 0 16px; filter: blur(8px); animation: show 0s 9s forwards; }
@keyframes show { to { opacity: 1; translate: none; filter: none; } }

/* ---------- огонь на фоне ---------- */
.ember {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 18%);
  mask: linear-gradient(180deg, transparent 0, #000 18%);
}
/* на широком экране огонь приглушается там, где стоит текст первого экрана */
@media (min-width: 901px) {
  .ember {
    -webkit-mask:
      linear-gradient(180deg, transparent 0, #000 18%),
      radial-gradient(42% 46% at 20% 66%, rgba(0, 0, 0, .14), rgba(0, 0, 0, .4) 55%, #000 100%);
    -webkit-mask-composite: source-in;
    mask:
      linear-gradient(180deg, transparent 0, #000 18%),
      radial-gradient(42% 46% at 20% 66%, rgba(0, 0, 0, .14), rgba(0, 0, 0, .4) 55%, #000 100%);
    mask-composite: intersect;
  }
}
.ready .ember { opacity: .9; }
.top, main, .foot { position: relative; z-index: 1; }

/* ---------- верхняя панель ---------- */
.top { position: sticky; top: var(--s3); z-index: 30; padding: var(--s3) var(--gutter) 0; }
.top-bar {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding: var(--s3) var(--s3) var(--s3) var(--s5);
  border: 0;
  border-radius: var(--r-s);
  /* чёрная: то, что под шапкой, размывается и обесцвечивается, поэтому цвет не просвечивает */
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(24px) grayscale(1) brightness(.75);
  backdrop-filter: blur(24px) grayscale(1) brightness(.75);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .85);
}
.brand-name {
  display: flex;
  align-items: baseline;
  gap: .5em;
  font: 600 19px/1 var(--serif);
  letter-spacing: .34em;
  margin-bottom: var(--s1);
}
.brand-kanji { letter-spacing: 0; color: var(--wine); font-weight: 700; }

.nav { display: flex; align-items: center; gap: var(--s2); }
.nav a {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-s);
  font: 400 12px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color .2s, background-color .2s, text-shadow .2s;
}
.nav a [lang="ja"] { font-size: 13px; letter-spacing: .08em; color: var(--wine); transition: color .2s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a:hover [lang="ja"] { color: #c8304b; }

/* разделы не прячутся под закреплённой шапкой при переходе по ссылке */
.section { scroll-margin-top: 96px; }

/* ---------- первый экран ---------- */
main { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s8);
  min-height: calc(100vh - 96px);
  padding: var(--s8) 0 var(--s9);
}
.hero-panel {
  --d: .05s;
  position: relative;
  /* без подложки: текст прямо на фоне, читаемость над огнём держит мягкая тень */
  text-shadow: 0 1px 14px rgba(5, 5, 7, .95), 0 0 2px rgba(5, 5, 7, .9);
}

.quote { margin-bottom: var(--s7); }
.quote blockquote { font: 600 clamp(28px, 3.2vw, 44px)/1.1 var(--serif); letter-spacing: .24em; color: var(--ink); text-shadow: 0 0 24px rgba(177, 158, 239, .25); }
.quote figcaption { margin-top: var(--s2); font: 300 13px/1.5 var(--sans); text-transform: none; letter-spacing: .02em; }

.name { font: 300 clamp(44px, 5.6vw, 84px)/1 var(--serif); letter-spacing: .04em; color: #fff; margin-bottom: var(--s4); padding-bottom: .06em; text-wrap: balance; }
.role { color: var(--wine); margin-bottom: var(--s5); }
.role .spark { margin-right: var(--s1); }
.about { max-width: 50ch; font: 300 17px/1.7 var(--sans); color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.facts dd { margin-top: var(--s1); font: 300 15px/1.4 var(--sans); color: var(--ink); }

/* ---------- сцена: логотип → дизайн → код → сервис (ЧБ, плоско, без градиентов) ---------- */
.scene {
  --d: .2s;
  --bg: rgba(14, 14, 16, .42);
  --pn: rgba(22, 22, 26, .4);
  --ln: #26262b;
  --tx: #8e8e96;
  --hi: #ececef;
  --ab: rgba(232, 232, 235, .68);
  position: relative;
  width: 100%;
  max-width: 640px;
  justify-self: center;
  container-type: inline-size;
  font-family: var(--sans);
}
.js .scene { transition-duration: 1.4s; }
.stage { position: relative; aspect-ratio: 6 / 5; }
.morph { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* окно, которое превращается из редактора дизайна в редактор кода и в сервис */
.frame {
  position: absolute;
  left: 4%;
  top: 9%;
  width: 92%;
  height: 76%;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--ln);
  -webkit-backdrop-filter: blur(22px) grayscale(1);
  backdrop-filter: blur(22px) grayscale(1);
  box-shadow: 0 3cqw 8cqw -3cqw rgba(0, 0, 0, .9);
  transform-origin: 50% 45%;
  transition: opacity .7s ease, transform 1s cubic-bezier(.7, 0, .2, 1);
}
.scene[data-mode="logo"] .frame { opacity: 0; transform: scale(.86); }
.scene[data-mode="back"] .frame { opacity: 0; transform: scale(1.04); transition-duration: .5s, .8s; }

.fbar { display: flex; align-items: center; gap: .9cqw; height: 5.6cqw; padding: 0 1.8cqw; flex: none; background: var(--pn); border-bottom: 1px solid var(--ln); font: 400 1.9cqw/1 var(--sans); color: var(--tx); white-space: nowrap; }
.fbar > i { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: #3a3a40; flex: none; }
.fbar span { margin-left: 1.2cqw; color: var(--hi); letter-spacing: .02em; }
.fbar b { margin-left: auto; padding: .35cqw 1cqw; border-radius: 4px; border: 1px solid #3a3a40; font: 400 1.45cqw/1 var(--sans); letter-spacing: .16em; color: var(--hi); }

.fbody { position: relative; flex: 1; min-height: 0; }
.fbody > * { position: absolute; transition: opacity .6s ease, transform .9s cubic-bezier(.7, 0, .2, 1), left .9s cubic-bezier(.7, 0, .2, 1), top .9s cubic-bezier(.7, 0, .2, 1), width .9s cubic-bezier(.7, 0, .2, 1), height .9s cubic-bezier(.7, 0, .2, 1); }

/* левая панель: слои (дизайн) / файлы (код) */
.pl { left: 0; top: 0; bottom: 0; width: 19%; padding: 1.6cqw 1.4cqw; background: var(--pn); border-right: 1px solid var(--ln); overflow: hidden; }
.phd { font: 400 1.4cqw/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #5c5c64; margin-bottom: 1.4cqw; }
.layers, .files { display: flex; flex-direction: column; gap: .9cqw; transition: opacity .5s; }
.phd { transition: opacity .5s; }
.layers .row { display: flex; align-items: center; gap: .9cqw; font: 400 1.55cqw/1.2 var(--sans); color: var(--tx); white-space: nowrap; overflow: hidden; }
.layers .row i { width: 1.4cqw; height: 1.4cqw; border: 1px solid #55555c; border-radius: 2px; flex: none; }
.layers .row.on { color: var(--hi); }
.layers .row.on i { background: var(--hi); border-color: var(--hi); }
.files span { font: 400 1.55cqw/1.2 var(--mono); color: var(--tx); padding-left: 1.6cqw; white-space: nowrap; }
.files .dir { padding-left: 0; }
.files .on { color: var(--hi); background: #1f1f23; border-radius: 3px; }
.phd-files, .files { position: absolute; left: 1.4cqw; right: 1.4cqw; opacity: 0; }
.phd-files { top: 1.6cqw; }
.files { top: 4.6cqw; }

/* панель инструментов холста */
.tools { left: 21%; top: 1.4cqw; display: flex; gap: .8cqw; padding: .7cqw; border-radius: 6px; background: var(--pn); border: 1px solid var(--ln); }
.tools i { width: 2.2cqw; height: 2.2cqw; border-radius: 3px; border: 1px solid #44444a; }
.tools i:nth-child(2) { background: var(--hi); border-color: var(--hi); }

/* правая панель свойств */
.pr { right: 0; top: 0; bottom: 0; width: 19%; padding: 1.6cqw 1.4cqw; background: var(--pn); border-left: 1px solid var(--ln); }
.prop { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: .6cqw .8cqw; align-items: baseline; padding: .9cqw 0; border-bottom: 1px solid var(--ln); font: 400 1.45cqw/1.2 var(--sans); color: #5c5c64; }
.prop b { font: 400 1.5cqw/1.2 var(--mono); color: var(--hi); }
.prop:nth-child(4) b, .prop:nth-child(5) b { grid-column: span 3; }

/* холст-артборд */
.board { left: 21%; top: 7.2cqw; width: 58%; height: calc(100% - 9cqw); background: var(--ab); border-radius: 4px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
/* прозрачные блоки с размытием - и в редакторе, и в сервисе */
.pl, .pr, .tools, .fbar { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.d { position: absolute; border-radius: 3px; opacity: 0; transform-origin: 0 0; }
.d[data-el="side"] { left: 0; top: 0; width: 17%; height: 100%; background: rgba(28, 28, 32, .7); border-radius: 3px 0 0 3px; }
.d[data-el="k1"], .d[data-el="k2"], .d[data-el="k3"] { top: 7%; width: 23%; height: 21%; background: rgba(110, 110, 118, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.d[data-el="k1"] { left: 22%; } .d[data-el="k2"] { left: 48%; } .d[data-el="k3"] { left: 74%; }
.d[data-el="chart"] { left: 22%; top: 34%; width: 75%; height: 42%; background: rgba(120, 120, 128, .26); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-end; gap: 4%; padding: 3% 4%; }
.d[data-el="chart"] i { flex: 1; background: rgba(28, 28, 32, .8); border-radius: 1px; }
.d[data-el="chart"] i:nth-child(1) { height: 40%; } .d[data-el="chart"] i:nth-child(2) { height: 62%; } .d[data-el="chart"] i:nth-child(3) { height: 48%; } .d[data-el="chart"] i:nth-child(4) { height: 80%; }
.d[data-el="chart"] i:nth-child(5) { height: 56%; } .d[data-el="chart"] i:nth-child(6) { height: 92%; } .d[data-el="chart"] i:nth-child(7) { height: 70%; } .d[data-el="chart"] i:nth-child(8) { height: 84%; }
.d[data-el="btn"] { left: 22%; top: 83%; width: 22%; height: 10%; background: rgba(28, 28, 32, .72); }
.drag { position: absolute; border: 1px solid #111; background: rgba(17, 17, 17, .06); opacity: 0; pointer-events: none; }
.sel { position: absolute; border: 1px solid #111; opacity: 0; pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s, opacity .2s; }
.sel i { position: absolute; width: 1cqw; height: 1cqw; background: #fff; border: 1px solid #111; }
.sel i:nth-child(1) { left: -.5cqw; top: -.5cqw; } .sel i:nth-child(2) { right: -.5cqw; top: -.5cqw; }
.sel i:nth-child(3) { left: -.5cqw; bottom: -.5cqw; } .sel i:nth-child(4) { right: -.5cqw; bottom: -.5cqw; }

/* код */
.code { left: 19%; top: 0; bottom: 0; width: 47%; padding: 2cqw 2.4cqw; opacity: 0; }
.code pre { margin: 0; font: 400 1.75cqw/1.75 var(--mono); color: #a6a6ad; white-space: pre; }
.code .l { display: block; opacity: 0; min-height: 1.75em; }
.code .l.on { opacity: 1; }
.code .l::before { content: attr(data-n); display: inline-block; width: 3cqw; color: #45454b; }
.code .kw { color: #fff; font-weight: 600; } .code .tg { color: var(--hi); } .code .at { color: #7c7c84; } .code .st { color: #c4c4ca; }
.code .caret { display: inline-block; width: .7cqw; height: 1.9cqw; vertical-align: -.35cqw; background: #fff; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* готовый сервис */
.app { inset: 0; display: grid; grid-template-columns: 15% 1fr; background: rgba(12, 12, 14, .32); opacity: 0; transform: scale(.96); }
.a-side { display: flex; flex-direction: column; align-items: center; gap: 2cqw; padding: 2cqw 0; background: rgba(22, 22, 26, .4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-right: 1px solid var(--ln); }
.a-side i { width: 45%; height: 1.4cqw; border-radius: 3px; background: #2c2c31; }
.a-side i:nth-of-type(1) { background: var(--hi); }
.a-logo { width: 60%; aspect-ratio: 1095 / 706; background: #fff; -webkit-mask: url(logo.png) center / contain no-repeat; mask: url(logo.png) center / contain no-repeat; margin-bottom: 1cqw; }
.a-main { display: flex; flex-direction: column; gap: 1.8cqw; padding: 2.2cqw 2.4cqw; min-width: 0; }
.a-top { display: flex; align-items: center; justify-content: space-between; font: 400 2.6cqw/1 var(--sans); color: var(--hi); }
.a-top b { font: 400 1.4cqw/1 var(--sans); letter-spacing: .2em; padding: .5cqw 1.2cqw; border-radius: 4px; color: #000; background: var(--hi); }
.a-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.a-kpi { display: flex; flex-direction: column; gap: .7cqw; padding: 1.4cqw 1.6cqw; border-radius: 6px; background: rgba(28, 28, 32, .36); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--ln); }
.a-kpi span { font: 400 1.45cqw/1 var(--sans); color: var(--tx); }
.a-kpi b { font: 400 3.2cqw/1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.a-chart { flex: 1; display: flex; align-items: flex-end; gap: 1cqw; padding: 1.6cqw; border-radius: 6px; background: rgba(28, 28, 32, .36); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--ln); min-height: 0; }
.a-chart i { flex: 1; height: 4%; border-radius: 2px; background: #3a3a40; transition: height .8s cubic-bezier(.2, .9, .3, 1.15); }
.a-chart i:nth-child(n+9) { background: var(--hi); }
.a-foot { display: flex; align-items: center; gap: 1.6cqw; }
.a-btn { position: relative; overflow: hidden; padding: 1cqw 2.4cqw; border-radius: 6px; background: var(--hi); color: #000; font: 400 1.7cqw/1 var(--sans); }
.a-btn.press { animation: press .35s ease; }
@keyframes press { 50% { transform: scale(.94); background: #fff; } }
.a-note { font: 400 1.5cqw/1 var(--sans); color: var(--tx); }

/* курсор */
.cursor { position: absolute; left: 0; top: 0; width: 3cqw; height: 3cqw; z-index: 5; opacity: 0; pointer-events: none; transition: opacity .3s; filter: drop-shadow(0 .3cqw .6cqw rgba(0, 0, 0, .6)); }
.cursor path { fill: #fff; stroke: #000; stroke-width: 1.4; stroke-linejoin: round; }
.scene[data-mode="design"] .cursor, .scene[data-mode="app"] .cursor { opacity: 1; }

/* --- режимы окна --- */
/* код: макет уезжает в превью справа, слои превращаются в файлы, свойства уходят */
.scene[data-mode="code"] .layers, .scene[data-mode="code"] .pl > .phd:first-child { opacity: 0; }
.scene[data-mode="code"] .files, .scene[data-mode="code"] .phd-files { opacity: 1; }
.scene[data-mode="code"] .tools { opacity: 0; transform: translateY(-2cqw); }
.scene[data-mode="code"] .pr { opacity: 0; transform: translateX(6cqw); }
.scene[data-mode="code"] .code { opacity: 1; }
.scene[data-mode="code"] .board { left: 68%; top: 2.4cqw; width: 30%; height: 46%; }
/* сервис: всё уступает место готовому интерфейсу */
.scene[data-mode="app"] .fbody > :not(.app), .scene[data-mode="back"] .fbody > :not(.app) { opacity: 0; }
.scene[data-mode="app"] .app, .scene[data-mode="back"] .app { opacity: 1; transform: none; }
.scene[data-mode="back"] .app { transition: opacity .25s; opacity: 0; }

/* этапы */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin: var(--s5) 0 0;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-s);
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(16px) grayscale(1);
  backdrop-filter: blur(16px) grayscale(1);
  font-family: var(--sans);
}
.pipeline li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px var(--s2); color: #45454b; transition: color .4s; }
.pk { font-size: 16px; white-space: nowrap; letter-spacing: .06em; color: #6a6a72; transition: color .4s; }
.pe { font: 400 10px/1 var(--sans); letter-spacing: .2em; }
.pbar { grid-column: 1 / -1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pbar i { display: block; height: 100%; transform: scaleX(0); transform-origin: left; background: #fff; }
.pipeline li.done .pbar i { transform: scaleX(1); opacity: .3; }
.pipeline li.on { color: var(--hi); }
.pipeline li.on .pk { color: #fff; }
.pipeline li.on .pbar i { animation: fill var(--stage-ms, 3000ms) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

/* вертикальная надпись */
.vert {
  --d: .3s;
  position: absolute;
  right: calc(var(--gutter) * -1 + 4px);
  top: 50%;
  translate: 0 -50%;
  writing-mode: vertical-rl;
  font: 500 13px/1 var(--serif);
  letter-spacing: .6em;
  color: var(--muted);
  padding: var(--s4) 0;
  border-right: 1px solid var(--line);
}

/* ---------- разделы ---------- */
.section { padding-top: var(--s9); }
.sec-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s6); }
.sec-no { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; }
.sec-head h2 { display: flex; align-items: baseline; gap: var(--s3); font-weight: 400; }
.sec-head h2 .goth { font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--ink); text-shadow: 0 0 22px rgba(177, 158, 239, .35); }
.sec-kanji { font: 500 18px/1 var(--serif); letter-spacing: .14em; color: var(--wine); }
.sec-rule { flex: 1; display: flex; align-items: center; gap: var(--s3); min-width: 40px; color: var(--muted); }
.sec-rule::before, .sec-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent); }
.sec-rule .spark { width: 10px; height: 10px; }

/* ---------- карточки проектов ---------- */
/* карточки только в ЧБ: акцент у всех один - светло-серый */
.proj--mag, .proj--vio, .proj--cya, .proj--lim, .proj--yel { --acc: #e6e6ea; }

.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s5); }
.proj-list li:nth-child(2) { --d: .06s; } .proj-list li:nth-child(3) { --d: .12s; } .proj-list li:nth-child(4) { --d: .18s; }

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--s3);
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9);
  overflow: hidden;
  transition: border-color .3s;
}
.card:hover, .card:focus-within {
  border-color: rgba(255, 255, 255, .26);
}

.media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: #0e0e11;
}
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .6s; filter: saturate(.92) contrast(1.04); }
.card:hover .media img { transform: scale(1.04); filter: saturate(1.05) contrast(1.06); }
/* глянец и виньетка поверх фото */
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
/* заглушка, пока нет фото */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--s2);
  background: #0e0e11;
}
.ph span { font: 700 clamp(54px, 7vw, 84px)/1 var(--serif); color: #3a3a40; }
.ph b { font-weight: 400; color: var(--muted); }
.media-no, .pin {
  position: absolute;
  z-index: 1;
  top: var(--s3);
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--ink);
  background: rgba(8, 8, 12, .5);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.media-no { left: var(--s3); }
.pin { right: var(--s3); color: #fff; display: inline-flex; align-items: center; gap: 6px; border-color: rgba(255, 255, 255, .35); }
.pin .spark { width: 10px; height: 10px; color: var(--acc); }

.card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s5) var(--s3) var(--s3); }
.card-head { display: flex; align-items: center; gap: var(--s3); }
.sq { display: inline-block; width: 7px; height: 7px; border-radius: 1px; background: var(--acc); flex: none; }
.st { color: var(--ink); font-size: 13px; letter-spacing: .1em; }
.st-label { color: var(--muted); }
.card-head .year { margin-left: auto; color: var(--ink); }
.card h3 { font: 700 26px/1.15 var(--sans); letter-spacing: -.005em; margin: var(--s3) 0 var(--s2); }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.card-sum { flex: 1; font: 300 15px/1.65 var(--sans); color: var(--text); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s6); }
.open { margin-left: auto; color: var(--acc); }
.card-foot .code-t { color: var(--ink); }
.card-foot .stack { color: var(--muted); text-transform: lowercase; letter-spacing: .08em; }

/* закреплённый проект: крупнее, голографическая рамка */
.feat { margin-bottom: var(--s5); }
.card--feat {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s3);
  border-color: rgba(255, 255, 255, .2);
}
.card--feat .media { aspect-ratio: auto; min-height: 380px; }
.card--feat .card-body { padding: var(--s6) var(--s5) var(--s4); }
.card--feat h3 { font-size: clamp(36px, 4vw, 56px); line-height: 1.05; margin: var(--s4) 0 var(--s4); padding-bottom: .05em; }
.card--feat .card-sum { font-size: 17px; max-width: 46ch; }
.card--feat .open { padding: 8px 16px; border-radius: 4px; color: #0a0a0f; background: #ececef; }

/* ---------- контакты: плоские блоки в стиле шапки ---------- */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); }
.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  height: 100%;
  padding: var(--s5) var(--s5) var(--s5);
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(24px) grayscale(1) brightness(.75);
  backdrop-filter: blur(24px) grayscale(1) brightness(.75);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .25s, background-color .25s;
}
.contact-label { font-size: 10px; }
.contact-val { font: 300 18px/1.3 var(--sans); overflow-wrap: anywhere; }
.contact-arrow { position: absolute; top: var(--s5); right: var(--s5); font: 300 16px/1 var(--sans); color: var(--muted); transition: color .25s, translate .25s; }
a.contact:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); }
a.contact:hover .contact-arrow { color: #fff; translate: 2px -2px; }

/* ---------- подвал: крупный GOOWESH на всю ширину ---------- */
main { padding-bottom: var(--s9); }
.foot { position: relative; z-index: 1; padding: 0 var(--gutter); overflow: hidden; }
.foot-meta {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  padding: var(--s4) 0 var(--s5);
  border-top: 1px solid var(--line);
}
.foot-mark {
  /* ровно в ширину контента сайта (как шапка и карточки) */
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 0 var(--s3);
  font: 300 calc(min(100vw - var(--gutter) * 2, var(--wrap)) / 5.5)/1 var(--serif);
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  user-select: none;
}
.empty { padding: var(--s6) 0; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .vert { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: var(--s5); min-height: 0; padding: var(--s6) 0 var(--s8); }
  .scene { display: none; } /* на мобильных анимация первого экрана не показывается */
  .ready .ember { opacity: .45; }
  .card--feat { grid-template-columns: 1fr; }
  .card--feat .media { min-height: 0; aspect-ratio: 16 / 10; }
  .card--feat .card-body { padding: var(--s5) var(--s3) var(--s3); }
  .section { padding-top: var(--s8); }
}
/* телефон: шапка от края до края, без скруглений */
@media (max-width: 700px) {
  .top { top: 0; padding: 0; }
  .top-bar { max-width: none; border-radius: 0; border-width: 0 0 1px; padding-top: calc(var(--s3) + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 520px) {
  .brand-name { font-size: 15px; letter-spacing: .26em; }
  .top-bar { padding-left: var(--s4); }
  .brand .hud { display: none; }
  .nav a { padding: var(--s2) var(--s3); letter-spacing: .1em; }
  .nav a [lang="ja"] { display: none; }
  .sec-head > p, .sec-rule { display: none; }
  .pipeline { gap: var(--s3); }
  .pk { font-size: 15px; white-space: nowrap; }
  .pe { display: none; }
  .quote blockquote { letter-spacing: .14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
