/* Отдельные страницы портфолио: /sites/ и /reels/. Стиль — как у основной страницы. */
@font-face { font-family: "Sohne"; src: url("https://cdn.openai.com/common/fonts/soehne/soehne-buch.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sohne"; src: url("https://cdn.openai.com/common/fonts/soehne/soehne-halbfett.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #101010;
  --muted: #5d5d5d;
  --soft-line: rgba(0, 0, 0, .085);
  --page: #fff;
  --max: 1360px;
  --gutter: clamp(20px, 3vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Sohne", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: #111; color: #fff; }
.shell { width: min(var(--max), calc(100% - (var(--gutter) * 2))); margin-inline: auto; }

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding-inline: 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--soft-line);
}
.wordmark { justify-self: start; font-size: 18px; font-weight: 600; letter-spacing: -.045em; }
.topnav { display: flex; gap: 27px; font-size: 14px; }
.topnav a { position: relative; color: #555; }
.topnav a[aria-current="page"] { color: #000; }
.topnav a[aria-current="page"]::after,
.topnav a:hover::after,
.inline-link:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
}
.nav-pill { justify-self: end; background: #000; color: #fff; border-radius: 999px; padding: 10px 16px 11px; font-size: 14px; }

/* первый экран: заголовок, строка */
.page-head { padding: clamp(72px, 9vw, 128px) 0 clamp(44px, 5vw, 64px); }
.page-head h1 {
  margin: 0; max-width: 980px;
  font-size: clamp(50px, 7.4vw, 108px); line-height: .93; letter-spacing: -.068em; font-weight: 400;
}
.page-head p {
  margin: 26px 0 0; max-width: 660px;
  font-size: clamp(18px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -.033em; color: #333;
}

/* оглавление */
.toc { padding-bottom: clamp(92px, 10vw, 140px); border-bottom: 1px solid var(--soft-line); }
.toc-title { margin: 0 0 20px; font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: -.01em; }
.toc-grid { display: grid; gap: 28px 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.toc-grid.tall { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 24px 14px; }
.toc-item { display: block; }
.toc-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top;
  border-radius: 8px; border: 1px solid rgba(0,0,0,.1); background: #f4f4f4;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
}
.toc-grid.tall .toc-thumb { aspect-ratio: 9 / 16; object-position: center; border-radius: 12px; }
.toc-item:hover .toc-thumb { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20,20,40,.12); }
.toc-name { display: block; margin-top: 11px; font-size: 16px; letter-spacing: -.025em; }
.toc-kind { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }

/* карточки проектов */
.list { padding: clamp(92px, 10vw, 150px) 0; display: flex; flex-direction: column; gap: clamp(96px, 10vw, 150px); }
.feature {
  display: grid; grid-template-columns: minmax(280px, .83fr) minmax(0, 1.42fr);
  gap: clamp(52px, 7vw, 110px); align-items: center;
  scroll-margin-top: 96px;
}
.feature.reverse { grid-template-columns: minmax(0, 1.42fr) minmax(280px, .83fr); }
.feature.reverse .feature-copy { order: 2; }
.feature.reverse .feature-media { order: 1; }
.feature-copy { max-width: 450px; }
.feature-copy h2 { margin: 0; font-size: clamp(30px, 3.1vw, 47px); line-height: 1.02; letter-spacing: -.052em; font-weight: 400; }
.feature-copy p { margin: 19px 0 0; font-size: 17px; line-height: 1.48; letter-spacing: -.022em; color: #3f3f3f; }
.feature-meta { margin-top: 22px; display: flex; gap: 15px; flex-wrap: wrap; font-size: 13px; color: #595959; }
.inline-link { position: relative; display: inline-flex; margin-top: 24px; font-size: 14px; }

.browser-card {
  position: relative; background: #fff; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.12); box-shadow: 0 18px 50px rgba(20,20,40,.12);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.feature-media:hover .browser-card { transform: translateY(-4px) scale(1.006); }
.browser-bar {
  height: 35px; display: grid; grid-template-columns: 58px 1fr 58px; align-items: center;
  border-bottom: 1px solid rgba(0,0,0,.08); background: #f7f7f7; padding: 0 10px;
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.18); }
.browser-url { justify-self: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,.46); font-size: 9.5px; }
.browser-open { justify-self: end; font-size: 11px; color: rgba(0,0,0,.52); }
.browser-view { aspect-ratio: 16 / 10; overflow: hidden; }
.site-preview { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card-link { position: absolute; inset: 0; z-index: 3; }

/* ролики */
.feature.reel { grid-template-columns: minmax(0, 450px) minmax(0, 380px); justify-content: center; gap: clamp(48px, 9vw, 150px); }
.feature.reel.reverse { grid-template-columns: minmax(0, 380px) minmax(0, 450px); }
.feature.reel.square { grid-template-columns: minmax(0, 450px) minmax(0, 520px); }
.feature.reel.square.reverse { grid-template-columns: minmax(0, 520px) minmax(0, 450px); }
.reel-frame {
  position: relative; width: 100%; aspect-ratio: 9 / 16; margin-inline: auto;
  border-radius: 18px; overflow: hidden; background: #111;
  box-shadow: 0 18px 50px rgba(20,20,40,.16); cursor: pointer;
}
.square .reel-frame { aspect-ratio: 1 / 1; }
.reel-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  min-height: 38px; padding: 0 15px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.9); color: #000; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.reel-frame.unmuted .sound { background: #000; color: #fff; }
.ai-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* вопросы */
.faq { border-top: 1px solid var(--soft-line); padding: clamp(92px, 10vw, 140px) 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.faq h2 { margin: 0; font-size: clamp(40px, 4.6vw, 66px); line-height: .98; letter-spacing: -.06em; font-weight: 400; }
.faq-item { border-top: 1px solid rgba(0,0,0,.12); }
.faq-item:last-child { border-bottom: 1px solid rgba(0,0,0,.12); }
.faq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 44px 22px 0; font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -.03em; line-height: 1.25;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: #555; transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: -6px 0 24px; max-width: 640px; font-size: 17px; line-height: 1.5; letter-spacing: -.02em; color: #3f3f3f; }

/* призыв */
.cta { border-top: 1px solid var(--soft-line); padding: clamp(92px, 10vw, 140px) 0; }
.cta h2 { margin: 0; font-size: clamp(46px, 6.1vw, 88px); line-height: .95; letter-spacing: -.065em; font-weight: 400; }
.cta p { margin: 22px 0 0; max-width: 600px; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -.033em; color: #333; }
.cta-row { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.button {
  min-height: 46px; border-radius: 999px; padding: 0 20px;
  display: inline-flex; align-items: center; font-size: 15px;
  border: 1px solid rgba(0,0,0,.14); transition: transform .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: #000; color: #fff; border-color: #000; }

footer { border-top: 1px solid var(--soft-line); }
.footer-row { min-height: 104px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; color: #444; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s cubic-bezier(.22,.7,.25,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1150px) {
  .toc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toc-grid.tall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .feature, .feature.reverse,
  .feature.reel, .feature.reel.reverse, .feature.reel.square, .feature.reel.square.reverse { grid-template-columns: 1fr; gap: 36px; }
  .feature.reverse .feature-copy, .feature.reverse .feature-media { order: initial; }
  .feature-copy { max-width: 680px; }
  .reel .feature-media { width: min(100%, 420px, calc((100svh - 140px) * 9 / 16)); }
  .reel.square .feature-media { width: min(100%, 560px); }
}
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  .topbar { height: 56px; padding-inline: 16px; grid-template-columns: auto 1fr auto; gap: 14px; }
  .topnav { gap: 18px; justify-self: center; }
  .nav-pill { padding: 9px 13px 10px; font-size: 13px; }
  .page-head { padding-top: 56px; }
  .page-head h1 { font-size: clamp(44px, 13vw, 64px); }
  .page-head p { font-size: 18px; }
  .toc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .toc-grid.tall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .toc-name { font-size: 15px; }
  .toc-kind { font-size: 12px; }
  .list { padding: 72px 0; gap: 80px; }
  .feature-copy h2 { font-size: 34px; }
  .feature-copy p { font-size: 16px; }
  .footer-row { flex-direction: column; align-items: flex-start; justify-content: center; padding: 28px 0; }
}
@media (max-width: 380px) {
  .topnav a.hide-xs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.lvl { color: #8e8e96; }
