/* ============================================================
   studio.css — надстройка над styles.css для раздела /studio/
   1) читаемая типографика: текст = Onest, моно только для
      терминальных акцентов
   2) светлая тема через переопределение токенов:
      html[data-theme="light"]
   Подключать ПОСЛЕ styles.css. Только на страницах студии.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap');

:root {
  --font-text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* рамки карточек студии (в тёмной — циановые, в светлой — приглушённые) */
  --edge:       rgba(124, 240, 255, 0.25);
  --edge-soft:  rgba(124, 240, 255, 0.14);
  --edge-faint: rgba(124, 240, 255, 0.07);
}

/* --- Типографика: текст человеком, терминал терминалом ----- */
/* база сайта 14.5px делает rem-размеры микроскопическими — поднимаем корень */
html:has(body.studio) { font-size: 16px; }
body.studio {
  font-family: var(--font-text);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
}

/* читаемые размеры описаний (перекрывают мелкие rem/px из базы и страниц) */
body.studio .section-lede { font-size: 1.3rem; line-height: 1.55; }
body.studio .st-hero .sub { font-size: 1.35rem; line-height: 1.55; }
body.studio .m-v { font-size: 1.25rem; line-height: 1.55; }
body.studio .m-k { font-size: .95rem; }
body.studio .eyebrow { font-size: .95rem; }
body.studio :is(.st-step p, .st-case p, .au-item p) { font-size: 1.15rem; line-height: 1.55; }
body.studio .service p { font-size: 1.15rem; line-height: 1.55; }
body.studio :is(.st-check li, .mt-check li) { font-size: 1.25rem; line-height: 1.55; }
body.studio :is(.st-check li, .mt-check li)::before { font-size: .95rem; }
body.studio .st-note { font-size: 1.08rem; }
body.studio .st-note a { font-size: 1.15rem; }
body.studio :is(.st-step h3, .st-case h3, .au-item h3) { font-size: 1.3rem; }
body.studio .service h3 { font-size: 1.45rem; }
body.studio .mt-group h3 { font-size: 1.5rem; }
body.studio .st-price .p { font-size: 1.25rem; }
body.studio .st-price .d { font-size: 1rem; }
body.studio .st-founder .t { font-size: 1.15rem; }
body.studio .st-founder .t p { font-size: 1.08rem; }
body.studio .rep table { font-size: 1rem; }
body.studio .rep-cap { font-size: .9rem; }
body.studio .st-form .lbl { font-size: .92rem; }
body.studio :is(.st-form input, .st-form textarea) { font-size: 1.15rem; }
body.studio .st-case .path { font-size: .85rem; }
body.studio .st-step .n, body.studio .mt-group .gp { font-size: .9rem; }
body.studio .term { font-size: 1rem; }
body.studio .nav-links a { font-size: .9rem; }
body.studio .ct-log { font-size: 1.05rem; }
body.studio .ct-log .v { font-size: .92rem; }
body.studio .ct-cap { font-size: .95rem; }
body.studio #lead-status { font-size: 1rem; }
body.studio .tags span { font-size: .85rem; }

/* сетка услуг: карточки как у остальных блоков студии,
   без заливки контейнера (пустые ячейки давали серую плиту) */
body.studio .services {
  background: transparent;
  border: none;
  gap: 10px;
}
body.studio .service {
  background: var(--panel);
  border: 1px solid var(--edge);
}
body.studio .service:hover { background: var(--bg-2); }

/* заголовки — Onest, плотные, без mono-разрядки */
body.studio .h-display,
body.studio .section-title,
body.studio .st-step h3,
body.studio .st-case h3,
body.studio .au-item h3,
body.studio .mt-group h3,
body.studio .st-founder .t b {
  font-family: var(--font-text);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-style: normal;
}
body.studio .h-display em { font-style: normal; color: var(--accent); }

/* лиды и описания */
body.studio .section-lede,
body.studio .st-hero .sub,
body.studio .m-v,
body.studio .st-step p,
body.studio .st-case p,
body.studio .au-item p,
body.studio .st-check li,
body.studio .mt-check li,
body.studio .service p,
body.studio .st-founder .t,
body.studio .st-form input,
body.studio .st-form textarea {
  font-family: var(--font-text);
  letter-spacing: 0;
}
body.studio .service h3 { font-family: var(--font-text); font-weight: 600; font-style: normal; }
body.studio .service h3 em { font-style: normal; }

/* терминальные акценты остаются mono */
body.studio :is(
  .nav, .nav-links a, .nav-cta, .brand,
  .eyebrow, .term, .st-note,
  .tags span, .st-price .p, .st-price .d,
  .st-case .path, .st-step .n, .mt-group .gp, .m-k,
  .rep-bar b, .rep table, .rep-cap,
  #lead-status, .st-form .lbl,
  .footer-brand, .footer-meta,
  .btn, .num, .theme-toggle
) {
  font-family: var(--font-mono);
}

/* чек-листы: маркер [ok] mono, текст Onest */
body.studio .st-check li::before,
body.studio .mt-check li::before { font-family: var(--font-mono); }

/* --- Переключатель темы ------------------------------------ */
/* в шапке студии 4 элемента: brand | links | toggle | cta */
body.studio .nav { grid-template-columns: auto 1fr auto auto; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--accent-line);
  color: var(--accent);
  background: transparent;
  padding: 7px 12px;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
/* кнопка показывает тему, НА которую переключит */
.theme-toggle .moon { display: none; }
html[data-theme="light"] .theme-toggle .moon { display: inline; }
html[data-theme="light"] .theme-toggle .sun { display: none; }

/* --- Светлая тема: переопределение токенов ------------------ */
html[data-theme="light"] {
  --bg:         #f4f6f7;
  --bg-2:       #eaedef;
  --panel:      #ffffff;
  --line:       rgba(12, 22, 32, 0.10);
  --line-2:     rgba(12, 22, 32, 0.20);
  --grid:       rgba(12, 22, 32, 0.045);
  --text:       #14202b;
  --text-dim:   #47555f;
  --text-mute:  #71808a;
  --accent:     #0b7285;
  --accent-2:   #0e7490;
  --accent-soft: rgba(11, 114, 133, 0.08);
  --accent-line: rgba(11, 114, 133, 0.45);
  --edge:       rgba(12, 22, 32, 0.16);
  --edge-soft:  rgba(12, 22, 32, 0.10);
  --edge-faint: rgba(12, 22, 32, 0.06);
}
html[data-theme="light"] ::selection { background: var(--accent); color: #fff; }
html[data-theme="light"] .site-header {
  background: rgba(246, 248, 249, 0.85);
}
html[data-theme="light"] .btn-primary { color: #ffffff; }
html[data-theme="light"] .btn-primary:hover { color: var(--accent); }
/* карточки и панели, которые в тёмной = #0a0d12/#07090f */
html[data-theme="light"] :is(.st-step, .st-case, .au-item, .st-founder, .rep, .st-form input, .st-form textarea, #studio-strip a) {
  background: var(--panel);
}
html[data-theme="light"] .service:hover { background: var(--bg-2); }
/* приоритеты в фрагменте отчёта — читаемые на белом */
html[data-theme="light"] .rep .p0 { color: #c92a2a; }
html[data-theme="light"] .rep .p1 { color: #b45309; }
html[data-theme="light"] .rep .p2 { color: #0b7285; }
html[data-theme="light"] #lead-status[data-state="ok"] { color: #2b8a3e; }
html[data-theme="light"] #lead-status[data-state="error"] { color: #c92a2a; }

/* ============================================================
   polish 2026-07-15 «Партитура»: свет, глубина, второй акцент.
   Светлая тема — первичная, тёмная — зеркало.
   ============================================================ */

/* 1. амбиентный свет вместо плоской плиты */
body.studio::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 85% -5%, rgba(11,114,133,.11), transparent 62%),
    radial-gradient(720px 520px at -10% 32%, rgba(37,99,235,.07), transparent 60%),
    radial-gradient(820px 620px at 70% 108%, rgba(11,114,133,.07), transparent 60%);
}
html:not([data-theme="light"]) body.studio::before {
  background:
    radial-gradient(900px 620px at 85% -5%, rgba(124,240,255,.07), transparent 62%),
    radial-gradient(720px 520px at -10% 32%, rgba(91,124,250,.055), transparent 60%),
    radial-gradient(820px 620px at 70% 108%, rgba(124,240,255,.045), transparent 60%);
}

/* 2. карточки: глубина по умолчанию + hover-подъём */
body.studio :is(.service, .st-step, .st-case, .au-item, .st-founder, .ct-side) {
  transition: transform .25s ease, box-shadow .25s ease,
              border-color .25s ease, background .25s ease;
}
html[data-theme="light"] body.studio :is(.service, .st-step, .st-case, .au-item, .st-founder, .ct-side) {
  box-shadow: 0 1px 2px rgba(12,22,32,.05), 0 4px 14px rgba(12,22,32,.04);
}
html[data-theme="light"] body.studio :is(.service, .st-step, .st-case):hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: 0 12px 32px rgba(11,114,133,.14), 0 2px 6px rgba(12,22,32,.06);
}
html:not([data-theme="light"]) body.studio :is(.service, .st-step, .st-case) {
  background: linear-gradient(165deg, #0d1219, #0a0e13);
  box-shadow: inset 0 1px 0 rgba(124,240,255,.07);
}
html:not([data-theme="light"]) body.studio :is(.service, .st-step, .st-case):hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: inset 0 1px 0 rgba(124,240,255,.12), 0 14px 34px rgba(0,0,0,.5), 0 0 24px rgba(124,240,255,.05);
  background: linear-gradient(165deg, #0f151d, #0b1016);
}

/* 3. второй акцент: деньги = тёплый янтарь */
body.studio .st-price .p { color: #b45309; }
html:not([data-theme="light"]) body.studio .st-price .p { color: #ffb454; }

/* 4. градиент в акцентных словах заголовков */
body.studio :is(.h-display em, .section-title em) {
  background: linear-gradient(92deg, #0b7285, #2563eb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html:not([data-theme="light"]) body.studio :is(.h-display em, .section-title em) {
  background: linear-gradient(92deg, #7cf0ff, #5b9cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 5. читаемость тёмной темы: описания светлее графита */
html:not([data-theme="light"]) body.studio { --text-dim: #aeb8c2; }

/* 6. нотная строка перед каждой секцией */
body.studio .section .section-head { position: relative; padding-top: 30px; }
body.studio .section .section-head::before {
  content: ""; position: absolute; top: 0; left: 0; width: 128px; height: 13px;
  background: repeating-linear-gradient(to bottom, var(--edge) 0 1px, transparent 1px 4px);
}
body.studio .section .section-head::after {
  content: ""; position: absolute; top: 1px; left: 84px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent-soft);
}

/* 7. водяной знак ♪ в hero */
body.studio .st-hero { position: relative; }
body.studio .st-hero::after {
  content: "♪"; position: absolute; right: 3%; top: 24px;
  font-family: Georgia, serif; font-style: italic;
  font-size: min(320px, 28vw); line-height: 1;
  color: var(--accent); opacity: .05;
  pointer-events: none; user-select: none;
}

/* 8. живой курсор в терминальной строке */
body.studio .st-hero .term::after {
  content: "_"; color: var(--accent); margin-left: 3px;
  animation: nv-caret 1.1s steps(1) infinite;
}
@keyframes nv-caret { 50% { opacity: 0; } }

/* 9. струна сквозь шаги метода (видна в зазорах между карточками) */
@media (min-width: 961px) {
  body.studio .st-steps { position: relative; }
  body.studio .st-steps::before {
    content: ""; position: absolute; left: 16px; right: 16px; top: 28px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
    pointer-events: none;
  }
}

/* 10. появление секций при скролле */
.nv-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.nv-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.studio .st-hero .term::after { animation: none; }
  .nv-reveal { opacity: 1; transform: none; transition: none; }
}

/* 11. теги-чипы: читаемые, не сливаются с фоном */
body.studio .service .tags span {
  color: var(--text);
  border-color: var(--edge);
  border-radius: 4px;
  padding: 4px 9px;
  background: var(--accent-soft);
  transition: border-color .2s, background .2s;
}
html:not([data-theme="light"]) body.studio .service .tags span {
  color: #c8d2dc;
  background: rgba(124,240,255,.05);
}
body.studio .service:hover .tags span { border-color: var(--accent-line); }
body.studio .service .tags span::before { opacity: 1; }

/* 12. акцент на бренд-словах в манифесте (Note / Vibe) */
body.studio .m-v em { font-style: normal; font-weight: 600; color: var(--accent); }

/* 13. чек-лист «Контроль качества» в 2 колонки — убираем провал справа */
@media (min-width: 900px) {
  body.studio #checklist .st-check {
    max-width: none;
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 48px; row-gap: 0;
  }
  body.studio #checklist .st-check li { margin: 0; }
}

/* ============================================================
   polish 2026-07-16: мягкая геометрия поверх «Партитуры».
   Острые углы — только у терминальных панелей (код остаётся кодом),
   у карточек и кнопок — скругление. Один градиентный акцент:
   тонкая линия-строка сверху карточки при hover, не заливка.
   ============================================================ */
:root {
  --radius-sm: 8px;   /* чипы, теги, мелкие элементы */
  --radius-md: 12px;  /* карточки услуг/кейсов/шагов, кнопки */
  --radius-lg: 18px;  /* крупные панели: флагман, hero-терминал, форма */
}

/* 14. округление карточек и панелей (терминалы — .term, .nv-term, .ct-side, .rep — остаются острыми: это код/консоль) */
body.studio :is(.service, .st-step, .st-case, .au-item, .st-founder, .st-shot, .st-flagship, .st-form input, .st-form textarea) {
  border-radius: var(--radius-md);
  overflow: hidden;
}
body.studio .st-shot img { border-radius: 0; } /* картинка внутри карточки — до края скруглённого контейнера не долистываем, обрежется маской родителя */
body.studio .btn, body.studio .theme-toggle, body.studio .st-chip {
  border-radius: var(--radius-sm);
}
body.studio .service .tags span { border-radius: 6px; }

/* 15. акцентная строка сверху при hover — линия, не заливка (держит терминальный характер) */
body.studio :is(.service, .st-case, .st-shot) { position: relative; }
body.studio :is(.service, .st-case, .st-shot)::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(92deg, #0b7285, #2563eb);
  opacity: 0; transform: scaleX(.4); transform-origin: left center;
  transition: opacity .25s ease, transform .35s ease;
}
html:not([data-theme="light"]) body.studio :is(.service, .st-case, .st-shot)::before {
  background: linear-gradient(92deg, #7cf0ff, #5b9cff);
}
body.studio :is(.service, .st-case, .st-shot):hover::before {
  opacity: 1; transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  body.studio :is(.service, .st-case, .st-shot)::before { transition: opacity .15s ease; transform: none; }
}

/* 16. флагман: скруглённый акцентный бордер + чуть заметное свечение вместо плоской рамки */
body.studio .st-flagship {
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--accent-line), 0 20px 60px -32px rgba(11,114,133,.35);
}
html:not([data-theme="light"]) body.studio .st-flagship {
  box-shadow: 0 0 0 1px var(--accent-line), 0 20px 60px -28px rgba(124,240,255,.18);
}
body.studio .fs-head, body.studio .fs-line, body.studio .fs-cta { border-radius: 0; } /* внутренние блоки живут внутри уже скруглённого контейнера */

/* 11. аврора: живое цветовое пятно в hero (циан → фиолет → тёплый) */
body.studio .st-hero { }
body.studio .st-hero::before {
  content: ""; position: absolute; top: -25%; bottom: -25%; z-index: 0;
  left: 50%; width: 100vw; margin-left: -50vw;
  background:
    radial-gradient(46% 60% at 80% 22%, rgba(124, 240, 255, .26), transparent 64%),
    radial-gradient(42% 58% at 8% 74%, rgba(139, 124, 255, .22), transparent 62%),
    radial-gradient(34% 46% at 55% 104%, rgba(255, 124, 214, .13), transparent 62%);
  filter: blur(42px);
  pointer-events: none;
  animation: nv-aurora 18s ease-in-out infinite alternate;
}
body.studio .st-hero > * { position: relative; z-index: 1; }
@keyframes nv-aurora {
  to { transform: translate3d(4%, -3%, 0) scale(1.08); }
}
html[data-theme=light] body.studio .st-hero::before {
  background:
    radial-gradient(46% 60% at 80% 22%, rgba(64, 201, 224, .30), transparent 64%),
    radial-gradient(42% 58% at 8% 74%, rgba(122, 104, 255, .22), transparent 62%),
    radial-gradient(34% 46% at 55% 104%, rgba(232, 93, 161, .16), transparent 62%);
}

/* градиентное слово в заголовке hero */
body.studio .st-hero .h-display em {
  background: linear-gradient(92deg, #7cf0ff 0%, #8b7cff 58%, #ff7cd6 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme=light] body.studio .st-hero .h-display em {
  background: linear-gradient(92deg, #0b7285 0%, #5b4bd6 58%, #c2417f 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* флагман: мягкое свечение вместо плоской рамки */
body.studio .st-flagship {
  box-shadow: 0 0 0 1px var(--accent-line), 0 12px 48px -18px rgba(139, 124, 255, .35);
}

@media (prefers-reduced-motion: reduce) {
  body.studio .st-hero::before { animation: none; }
}
