/* Установка J.A.R.V.I.S. — HUD-рамка поверх спокойных читаемых панелей.
   Направление: projects/site-runs/ikigai-jarvis/2026-11-13-01/01-direction.md */

:root {
  --bg: #0A0912;
  --bg-2: #13122A;
  --bg-3: #1B1A36;
  --paper: #F5F4F0;
  --paper-2: #ECEAE3;
  --ink: #14140F;
  --ink-2: #4A4A40;
  --text: #E8F1F8;
  --muted: #A9BACB;
  --cyan: #5CCFF0;
  --cyan-deep: #0E6E8C;
  --ok: #7EE0A8;
  --line: rgba(92, 207, 240, .16);
  --line-2: rgba(232, 241, 248, .08);
  --r: 16px;
  --r-in: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --f-display: "Unbounded", "Manrope", sans-serif;
  --f-body: "Manrope", "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", Consolas, monospace;
  --fs-h1: clamp(2.1rem, 1.2rem + 4.2vw, 4.4rem);
  --fs-h2: clamp(1.45rem, 1.05rem + 1.8vw, 2.35rem);
  --fs-lead: clamp(1.05rem, .98rem + .4vw, 1.3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9BE6FF; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
code { font: 500 .9em var(--f-mono); color: #BDEFFF; background: rgba(92, 207, 240, .1); padding: .08em .35em; border-radius: 6px; overflow-wrap: anywhere; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: #04131A; padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--steps { width: min(880px, 100% - 32px); }

/* ---------- Верхняя полоса ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 9, 18, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.topbar__in { width: min(1160px, 100% - 32px); margin-inline: auto; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { font: 700 15px var(--f-display); letter-spacing: .12em; color: #fff; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  font: 500 14px var(--f-body); color: var(--muted); text-decoration: none;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.topnav a:hover, .topnav a.is-active { color: #fff; background: rgba(92, 207, 240, .12); }
.topbar__progress { font: 500 13px var(--f-mono); color: var(--cyan); white-space: nowrap; }

/* ---------- Секции и ритм режимов ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section--dark { background: var(--bg); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-2); }
.section--light { background: var(--paper); color: var(--ink); }
.section--light + .section--light { padding-top: 0; }
.section--light a { color: var(--cyan-deep); }
.section--light code { color: #0B4B60; background: rgba(14, 110, 140, .1); }

h1, h2, h3 { margin: 0; }
h1 { font: 700 var(--fs-h1)/1.04 var(--f-display); letter-spacing: -.01em; color: #fff; word-break: keep-all; hyphens: none; }
h2 { font: 600 var(--fs-h2)/1.18 var(--f-display); color: #fff; max-width: 22ch; margin-bottom: 32px; }
.section--light h2 { color: var(--ink); }
.h2-sub { margin-top: 72px; }
h3 { font: 700 19px/1.35 var(--f-body); }

.kicker { font: 500 12px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin: 0 0 18px; }
.wave-tag { font: 500 13px var(--f-mono); color: var(--cyan); margin: 0 0 10px; }
.section--light .wave-tag { color: var(--cyan-deep); }
.lead { font-size: var(--fs-lead); color: #D3E2EE; max-width: 34ch; margin: 22px 0 28px; }
.lead-s { color: var(--muted); max-width: 62ch; margin: 28px 0 18px; }
.section--light .lead-s { color: var(--ink-2); }
.note, .hint { color: var(--muted); }
.note { margin: 28px 0 0; max-width: 60ch; }
.hint { font-size: 15px; padding: 12px 16px; margin: 16px 0 0; border-radius: var(--r-in); background: rgba(92, 207, 240, .06); box-shadow: 0 0 0 1px var(--line-2); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 88px); }
.hero__grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.os { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); margin-bottom: 22px; }
.os__btn {
  font: 600 15px var(--f-body); color: var(--muted); background: transparent; border: 0; cursor: pointer;
  padding: 10px 18px; min-height: 44px; border-radius: 999px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.os__btn[aria-pressed="true"] { color: #04131A; background: var(--cyan); }
.btn {
  display: flex; width: fit-content; align-items: center; gap: 12px;
  font: 700 16px var(--f-body); color: #04131A; background: #F5F4F0; text-decoration: none;
  padding: 6px 6px 6px 22px; min-height: 48px; border-radius: 999px;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover { color: #04131A; background: #DDF6FF; }
.btn:active { transform: scale(.98); }
.btn__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #04131A; color: var(--cyan); transition: transform .25s var(--ease); }
.btn:hover .btn__icon { transform: translateY(2px); }

.core { position: relative; width: min(340px, 100%); aspect-ratio: 1; margin-inline: auto; }
.core svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.core circle { fill: none; }
.core__track { stroke: rgba(92, 207, 240, .14); stroke-width: 6; }
.core__bar { stroke: var(--cyan); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 540.35; stroke-dashoffset: 540.35; transition: stroke-dashoffset .8s var(--ease); }
.core__dash { stroke: rgba(155, 230, 255, .4); stroke-width: 1.5; stroke-dasharray: 3 7; transform-origin: 100px 100px; animation: spin 40s linear infinite; }
.core__arc { stroke: rgba(92, 207, 240, .55); stroke-width: 3; stroke-dasharray: 60 280; transform-origin: 100px 100px; animation: spin 14s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.core__num { position: absolute; inset: 0 0 8% 0; display: flex; align-items: baseline; justify-content: center; place-content: center; flex-wrap: nowrap; padding-top: 34%; font: 700 clamp(48px, 7vw, 76px)/1 var(--f-display); color: #fff; }
.core__num small { font-size: .38em; color: var(--cyan); }
.core__cap { position: absolute; left: 0; right: 0; top: 62%; text-align: center; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Три волны ---------- */
.waves { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; }
.wave {
  position: relative; padding: 28px 24px 24px; border-radius: var(--r);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.wave p { margin: 8px 0 0; color: #C9D8E5; }
.wave b { color: #fff; font-weight: 600; }
.wave h3 { font: 600 20px/1.3 var(--f-display); color: #fff; }
.wave__n { font: 700 56px/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px rgba(92, 207, 240, .55); margin-bottom: 14px; }
.wave__t { font: 500 13px var(--f-mono) !important; color: var(--cyan) !important; margin-top: 16px !important; }
.wave--opt { box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .03); }
.wave--opt .wave__n { -webkit-text-stroke-color: rgba(232, 241, 248, .3); }

/* ---------- Шаги ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 20px 22px; border-radius: var(--r);
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.section--alt .step { background: var(--bg-3); }
.step:hover { box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .06); }
.step.is-done { box-shadow: 0 0 0 1px rgba(126, 224, 168, .35); }
.step.is-done .step__body h3 { color: #CFF5DF; }
.step__body { min-width: 0; }
.step__body p { margin: 8px 0 0; color: #C9D8E5; }
.step--opt { background: transparent !important; box-shadow: 0 0 0 1px var(--line-2); }
.step__check {
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid rgba(92, 207, 240, .45); background: transparent;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.step__check:active { transform: scale(.94); }
.step__check::after { content: ""; width: 12px; height: 20px; border: solid #062014; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-2px, -2px); opacity: 0; }
.step__check[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.step__check[aria-checked="true"]::after { opacity: 1; }

/* ---------- Промпт с HUD-скобками ---------- */
.prompt { position: relative; margin: 16px 0 4px; border-radius: var(--r-in); background: var(--bg-3); box-shadow: 0 0 0 1px var(--line); }
.prompt::before, .prompt::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: solid var(--cyan); opacity: .8;
}
.prompt::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: var(--r-in); }
.prompt::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: var(--r-in); }
.prompt__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line-2); }
.prompt__where { font: 500 12.5px var(--f-mono); color: var(--muted); }
.prompt__text {
  margin: 0; padding: 16px; max-height: 320px; overflow: auto;
  font: 400 13.5px/1.6 var(--f-mono); color: #DCEFFA;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.prompt--cmd .prompt__text { max-height: none; color: #fff; }
.copy {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font: 600 14px var(--f-body); color: #04131A; background: var(--cyan);
  border: 0; border-radius: 999px; cursor: pointer; padding: 4px 4px 4px 14px; min-height: 40px;
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.copy:hover { background: #8FE0F7; }
.copy:active { transform: scale(.97); }
.copy__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 19, 26, .14); font-size: 15px; }
.copy.is-copied { background: var(--ok); }

.got { margin: 12px 0 0; padding-left: 20px; color: #C9D8E5; }
.got li { margin: 6px 0; }
.shot { margin: 22px 0 0; }
.shot img { border-radius: var(--r-in); box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, .45); }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Первая задача ---------- */
.ideas { display: grid; grid-template-columns: 1fr; gap: 14px; }
.idea { padding: 20px; border-radius: var(--r); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2); min-width: 0; }
.idea h3 { font-size: 17px; }
.idea .prompt { margin-top: 12px; }

/* ---------- Волна 3 и помощь (светлые) ---------- */
.depts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 8px; }
.depts h3 { font-size: 16px; margin-bottom: 14px; color: var(--ink); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 9px 14px; border-radius: 999px; background: #FCFBF8; box-shadow: 0 0 0 1px rgba(20, 20, 15, .2); font-size: 15px; }
.tags--key li { background: transparent; box-shadow: 0 0 0 1px rgba(14, 110, 140, .35); }
.more { margin: 28px 0 0; color: var(--ink-2); max-width: 70ch; }

.faq { display: grid; gap: 8px; max-width: 820px; }
.faq details { background: #FCFBF8; border-radius: var(--r-in); box-shadow: 0 0 0 1px rgba(20, 20, 15, .18); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font: 400 22px/1 var(--f-mono); color: var(--cyan-deep); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }
.reset { margin-top: 28px; font: 600 14px var(--f-body); color: var(--ink-2); background: transparent; border: 1px solid rgba(20, 20, 15, .2); border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.reset:hover { border-color: var(--ink); color: var(--ink); }

.footer { background: var(--bg); border-top: 1px solid var(--line-2); padding: 36px 0 48px; }
.footer p { margin: 6px 0; color: var(--muted); font-size: 15px; }
.footer__small { font-size: 13px !important; }

/* ---------- Windows / Mac ---------- */
html[data-os="win"] .only-mac, html[data-os="mac"] .only-win { display: none !important; }

/* ---------- Появление ---------- */
.has-js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.has-js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .core { width: min(240px, 70%); order: -1; }
  .waves, .ideas, .depts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar__progress { display: none; }
  .topnav a { padding: 8px 9px; font-size: 13px; }
  .brand { display: none; }
  .topnav { margin-left: 0; width: 100%; justify-content: space-between; }
  .step { grid-template-columns: 1fr; padding: 18px 16px; }
  .prompt__bar { flex-wrap: wrap; }
  .os { display: flex; }
  .os__btn { flex: 1; padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .core__dash, .core__arc { animation: none; }
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* Web Interface Guidelines: тёмная схема, переносы заголовков, цифры, касания */
html { color-scheme: dark; }
.section--light { color-scheme: light; }
h1, h2, h3 { text-wrap: balance; }
.topbar__progress, .core__num, .wave__t { font-variant-numeric: tabular-nums; }
button, a, summary { touch-action: manipulation; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reset.is-armed { border-color: #B4352B; color: #B4352B; }

/* Аудит 14.11: фокус на светлом, мобильное меню, промпты без вложенного скролла, запасной путь, ошибки копирования */
.section--light :focus-visible { outline-color: var(--cyan-deep); }
html:not([data-os]) .only-mac { display: none; }
.copy.is-failed { background: #F2C56B; }
.alt { margin-top: 18px; border-radius: var(--r-in); box-shadow: 0 0 0 1px var(--line-2); padding: 4px 16px; }
.alt summary { cursor: pointer; padding: 10px 0; min-height: 44px; font-weight: 600; color: #D3E2EE; list-style: none; }
.alt summary::-webkit-details-marker { display: none; }
.alt summary::before { content: "+ "; color: var(--cyan); font-family: var(--f-mono); }
.alt[open] summary::before { content: "− "; }
.alt p { color: var(--muted); }
@media (max-width: 640px) {
  .topnav { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .prompt__text { max-height: none; }
}
.got--core { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }

/* 14.11: скачивание файлов-заданий, пошаговые списки */
.dls { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.dl { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; min-height: 44px; border-radius: 999px; background: var(--bg-3); color: #E8F1F8; text-decoration: none; font: 600 14px var(--f-body); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease); }
.dl:hover { color: #fff; box-shadow: 0 0 0 1px var(--cyan); }
.dl__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: #04131A; }
.howto { margin: 10px 0 0; padding-left: 20px; color: #C9D8E5; }
.howto li { margin: 4px 0; }
.steps--after { margin-top: 18px; }

/* ---------- Подсказка для Mac под переключателем ---------- */
.os__note { margin: -8px 0 22px; font-size: 15px; color: var(--muted); }
.os__note a { color: var(--cyan); }

/* ---------- Переключатель системы у каждого блока Win/Mac ---------- */
.os--inline { display: flex; width: fit-content; align-items: center; margin: 4px 0 14px; }
.os__label { font: 500 13px var(--f-body); color: var(--muted); padding: 0 8px 0 12px; }
.os--inline .os__btn { padding: 8px 16px; min-height: 40px; font-size: 14px; }
@media (max-width: 760px) {
  .os--inline { width: 100%; }
  .os__label { display: none; }
}

/* ---------- Скачать → вставить: номера действий и главная кнопка скачивания ---------- */
.n { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; background: var(--cyan); color: #04131A; font: 700 15px var(--f-body); vertical-align: 2px; flex: none; }
.sub { display: flex; align-items: flex-start; gap: 0; margin: 18px 0 6px; font-weight: 600; color: #E8F1F8; }
.sub .n { margin-top: -2px; }
.dl--main { background: var(--cyan); color: #04131A; padding: 8px 8px 8px 22px; min-height: 52px; font-size: 16px; box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(92, 207, 240, .35); }
.dl--main .dl__icon { background: #04131A; color: var(--cyan); width: 36px; height: 36px; }
.dl--main:hover, .dl--main:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 32px rgba(92, 207, 240, .5); }

/* ---------- Два ИИ в одном Cursor ---------- */
.who { margin: 28px 0 8px; padding: 22px 24px; border-radius: 16px; background: var(--bg-3); box-shadow: inset 3px 0 0 var(--cyan), 0 0 0 1px var(--line); max-width: 860px; }
.who h3 { margin: 0 0 12px; font-size: 20px; }
.who p { margin: 0 0 10px; }
.who p:last-child { margin-bottom: 0; }
.who__more { font-size: 15px; color: var(--muted); }
.who__more a { color: var(--cyan); }
@media (max-width: 760px) { .who { padding: 18px 16px; } }
