/* ============================================================
   КонтентЗавод — components.css
   ============================================================ */

/* ---------------- NAV ---------------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background .25s ease, box-shadow .25s ease, border-color .25s ease; border-bottom: 1px solid transparent; }
.nav--scrolled { background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); border-color: var(--line); box-shadow: 0 1px 0 rgba(13,22,40,.02); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 8px 13px; border-radius: 9px; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-login { font-weight: 700; font-size: 15px; color: var(--ink-2); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; transition: color .15s, border-color .15s, background .15s; }
.nav-login:hover { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-tint); }
.nav-cta { padding: 11px 18px; font-size: 15px; }

/* ============================================================
   REQUEST MODAL
   ============================================================ */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.modal--hidden { opacity: 0; pointer-events: none; }
.modal { transition: opacity .2s ease; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: 100%; max-width: 860px;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 0; max-height: calc(100vh - 48px); overflow: hidden;
  transform: translateY(0); transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.modal--hidden .modal-card { transform: translateY(16px) scale(.98); }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); font-size: 14px; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.modal-close:hover { background: #fff; border-color: var(--accent-line); color: var(--accent-ink); }
/* two-column split layout */
.modal-view--split { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 0; }
.modal-left { padding: 40px 36px 40px 40px; background: var(--bg-soft); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.modal-right { padding: 32px 36px 32px 32px; overflow-y: auto; max-height: calc(100vh - 48px); }
.modal-title { font-size: 24px; font-weight: 800; line-height: 1.15; margin: 14px 0 0; }
.modal-sub { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-top: 14px; }
/* success view */
.modal-success { text-align: center; padding: 48px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; }
.modal-check { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--good-tint); color: var(--good); margin-bottom: 6px; }
.modal-success .btn { margin-top: 24px; min-width: 160px; }
@media (max-width: 720px) {
  .modal { padding: 0; place-items: end stretch; }
  .modal-card { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal-view--split { grid-template-columns: 1fr; }
  .modal-left { padding: 28px 24px 20px; border-right: none; border-bottom: 1px solid var(--line); }
  .modal-right { padding: 20px 24px 28px; max-height: none; }
  .modal--hidden .modal-card { transform: translateY(100%); }
  .modal-title { font-size: 20px; }
}

/* ---------------- HERO ---------------- */
.hero { padding-top: 64px; padding-bottom: 96px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1100px 460px at 78% -8%, var(--accent-tint), transparent 60%),
  radial-gradient(700px 380px at 8% 0%, var(--accent-tint), transparent 55%);
  pointer-events: none; }
.hero > .wrap { position: relative; }
.hero-h { margin-top: 8px; }
.hero-sub { margin-top: 22px; max-width: 560px; }
.hero-btns { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.micro { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.micro li { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.micro-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-ink); }
.micro--center { justify-content: center; }

/* split */
.hero-grid { display: grid; grid-template-columns: 1fr 1.06fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 580px; }

/* centered */
.hero--center { text-align: center; }
.hero--center .hero-h, .hero--center .hero-sub--center { margin-left: auto; margin-right: auto; }
.hero--center .hero-h { max-width: 14ch; }
.hero-sub--center { max-width: 640px; }
.hero--center .hero-btns { justify-content: center; }
.hero-mock--center { margin-top: 56px; }

/* flow */
.hero-flow-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; }
.hero-flow-top .hero-h { max-width: 16ch; }
.hero-flow-top .hero-sub { margin-top: 0; }
.hero-flow-strip { margin-top: 40px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.hero-flow-label { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.hero-mock { width: 100%; }

/* ---------------- MOCKUP FRAME ---------------- */
.mk-frame { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mk-bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; background: linear-gradient(#fff, #fbfcfe); border-bottom: 1px solid var(--line-2); }
.mk-dots { display: flex; gap: 6px; }
.mk-dots i { width: 11px; height: 11px; border-radius: 50%; background: #e3e8f1; }
.mk-dots i:nth-child(1){ background:#ffbcb5; } .mk-dots i:nth-child(2){ background:#ffe1a6; } .mk-dots i:nth-child(3){ background:#bfe7c4; }
.mk-url { display: inline-flex; align-items: center; gap: 7px; font-family: var(--ff-mono); font-size: 12.5px; color: var(--ink-3); background: var(--bg-soft); border: 1px solid var(--line-2); padding: 5px 12px; border-radius: 8px; }
.mk-tab { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.mk-body { padding: 22px; }

/* ---- analyzer ---- */
.an-input { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border: 1.5px solid var(--accent-line); border-radius: 13px; background: var(--accent-tint); }
.an-url { flex: 1; font-family: var(--ff-mono); font-size: 14px; color: var(--ink); }
.an-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: #fff; background: var(--accent); border: none; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-accent); transition: background .2s, transform .15s; }
.an-go:hover { background: var(--accent-strong); transform: translateY(-1px); }
.an-status { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s, max-height .4s; }
.an-status.on { opacity: 1; max-height: 40px; }
.an-spin { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-line); border-top-color: var(--accent); animation: spin .8s linear infinite; color: #fff; flex: none; }
.an-spin.done { background: var(--good); border-color: var(--good); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.an-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--accent-tint-2); overflow: hidden; max-width: 160px; margin-left: auto; }
.an-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; width: 0; transition: width .8s cubic-bezier(.4,0,.2,1); }
.an-block { margin-top: 18px; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.an-block.on { opacity: 1; transform: none; }
.an-h { font-weight: 700; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.an-h b { color: var(--accent-ink); margin-left: 4px; }
.an-kws { display: flex; flex-wrap: wrap; gap: 8px; }
.an-kws .chip { opacity: 0; transform: scale(.9); transition: opacity .35s, transform .35s; }
.an-block.on .chip { opacity: 1; transform: none; }
.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.an-group, .an-art { opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; }
.an-block.on .an-group, .an-block.on .an-art { opacity: 1; transform: none; }
.an-group { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; }
.an-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.an-group-t { font-weight: 600; font-size: 14px; flex: 1; }
.an-group-n { font-family: var(--ff-mono); font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--bg-soft); padding: 3px 9px; border-radius: 7px; }
.an-art { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 11px; margin-bottom: 9px; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.an-art svg { margin-top: 1px; flex: none; }

/* ---------------- FLOW ---------------- */
.flow { display: flex; align-items: stretch; gap: 6px; }
.flow-node { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; opacity: .4; transform: translateY(8px); transition: all .45s cubic-bezier(.22,.61,.36,1); }
.flow-node.on { opacity: 1; transform: none; border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.flow-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft); color: var(--ink-3); transition: background .4s, color .4s; }
.flow-node.on .flow-ico { background: var(--accent-tint); color: var(--accent); }
.flow-t { font-family: var(--ff-display); font-weight: 800; font-size: 16px; }
.flow-s { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.flow-link { display: flex; align-items: center; justify-content: center; position: relative; width: 38px; flex: none; color: var(--line); }
.flow-link svg { width: 100%; height: 12px; stroke: currentColor; stroke-width: 2; stroke-dasharray: 4 4; }
.flow-arrow { position: absolute; right: -2px; color: var(--line); transition: color .4s; }
.flow-link.on { color: var(--accent); }
.flow-link.on .flow-arrow { color: var(--accent); }
.flow--compact .flow-node { padding: 12px 8px; }
.flow--compact .flow-ico { width: 36px; height: 36px; }

.sol-flow { margin-top: 8px; }

/* ---------------- generic grids ---------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* ---------------- PROBLEM ---------------- */
.prob-card { padding: 26px 24px 28px; }
.prob-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--warn-tint); color: var(--warn); margin-bottom: 18px; }
.prob-t { font-size: 19px; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.prob-s { font-size: 15px; line-height: 1.55; }

/* ---------------- STEPS ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); position: relative; }
.step { padding: 26px 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; }
.step-num { font-family: var(--ff-mono); font-weight: 700; font-size: 14px; color: var(--accent); background: var(--accent-tint); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; margin-bottom: 16px; }
.step-t { font-size: 19px; font-weight: 800; margin-bottom: 9px; }
.step-s { font-size: 15px; line-height: 1.55; }

/* ---------------- FEATURE / WORKSPACE ---------------- */
.feature-mock { margin-top: 8px; }
.ws { display: grid; grid-template-columns: 232px 1fr 268px; min-height: 440px; }
.ws-nav { border-right: 1px solid var(--line-2); padding: 16px 12px; background: #fcfdff; }
.ws-proj { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 14px; background: #fff; }
.ws-proj-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; flex: none; }
.ws-proj-t { font-weight: 800; font-size: 14px; }
.ws-proj-s { font-size: 12px; color: var(--ink-3); }
.ws-nav-i { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.ws-nav-i svg { color: var(--ink-3); }
.ws-nav-i.active { background: var(--accent-tint); color: var(--accent-ink); }
.ws-nav-i.active svg { color: var(--accent); }
.ws-main { padding: 22px 24px; min-width: 0; }
.ws-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ws-url { display: inline-flex; align-items: center; gap: 7px; font-family: var(--ff-mono); font-size: 13px; color: var(--ink); margin-bottom: 7px; }
.ws-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.ws-ok { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--good); color: #fff; }
.ws-gen { font-size: 13px; padding: 10px 14px; white-space: nowrap; }
.ws-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.ws-stat { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-soft); }
.ws-stat-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #fff; color: var(--accent); border: 1px solid var(--line); margin-bottom: 12px; }
.ws-stat-v { font-family: var(--ff-display); font-weight: 800; font-size: 26px; line-height: 1; }
.ws-stat-t { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; font-weight: 600; }
.ws-section-t { font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 13px; }
.ws-dir { display: flex; align-items: center; gap: 13px; margin-bottom: 11px; }
.ws-dir-t { font-weight: 600; font-size: 13.5px; width: 150px; flex: none; }
.ws-dir-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.ws-dir-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ws-dir-n { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); width: 26px; text-align: right; }
.ws-rec { border-left: 1px solid var(--line-2); padding: 20px 18px; background: #fcfdff; }
.ws-rec-h { font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.ws-rec-c { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 11px; transition: border-color .2s, box-shadow .2s; }
.ws-rec-c:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.ws-rec-tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--ink-3); margin-bottom: 8px; text-transform: lowercase; }
.ws-rec-t { font-weight: 700; font-size: 13.5px; line-height: 1.35; margin-bottom: 10px; }
.ws-rec-go { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12.5px; color: var(--accent); }

/* ---------------- RESULT ---------------- */
.result-mock { max-width: 980px; margin: 0 auto; }
.rs { display: grid; grid-template-columns: 1fr 1fr; }
.rs-col { padding: 26px 28px; }
.rs-col:first-child { border-right: 1px solid var(--line-2); }
.rs-col--art { background: var(--bg-soft); display: flex; flex-direction: column; }
.rs-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.rs-h svg { color: var(--accent); flex: none; }
.rs-h b { color: var(--accent-ink); }
.rs-dirs { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-dir { font-weight: 600; font-size: 13.5px; padding: 8px 13px; border-radius: 9px; background: #fff; border: 1px solid var(--line); }
.rs-cluster { display: flex; flex-direction: column; gap: 8px; }
.rs-kw { display: flex; align-items: center; gap: 10px; font-family: var(--ff-mono); font-size: 13px; color: var(--ink); padding: 9px 13px; border: 1px dashed var(--accent-line); border-radius: 9px; background: var(--accent-tint); }
.rs-kw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.rs-arts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.rs-art { display: flex; align-items: flex-start; gap: 11px; font-weight: 600; font-size: 14px; line-height: 1.4; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.rs-art-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); flex: none; }
.rs-cta { margin-top: auto; width: 100%; }

/* ---------------- AUDIENCE ---------------- */
.grid-aud { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
.aud-card { padding: 24px 22px 26px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.aud-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-line); }
.aud-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); margin-bottom: 16px; }
.aud-t { font-size: 17px; font-weight: 800; margin-bottom: 9px; }
.aud-s { font-size: 14px; line-height: 1.5; }

/* ---------------- STUDIOS ---------------- */
.studio-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.studio-lead { color: #aebbd2; }
.studio-offer { margin-top: 28px; padding: 20px 22px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.studio-offer-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #cfe0ff; margin-bottom: 11px; }
.studio-offer p { font-size: 16px; line-height: 1.55; color: #e7ecf6; font-style: italic; }
.studio-gets { background: #fff; color: var(--ink); padding: 28px 28px 30px; }
.studio-gets-h { font-family: var(--ff-display); font-weight: 800; font-size: 19px; margin-bottom: 18px; }
.studio-gets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.studio-gets li { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.studio-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent-tint); color: var(--accent); flex: none; margin-top: 1px; }

/* ---------------- COMPARISON ---------------- */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 980px; margin: 0 auto; }
.cmp-col { border-radius: var(--radius); padding: 12px; }
.cmp-col--bad { background: var(--bg-soft); border: 1px solid var(--line); }
.cmp-col--good { background: var(--accent-tint); border: 1.5px solid var(--accent-line); }
.cmp-head { display: flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 800; font-size: 18px; padding: 14px 16px; }
.cmp-head-ico, .cmp-mark { display: grid; place-items: center; flex: none; }
.cmp-head-ico { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.cmp-mark { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; margin-top: 1px; }
.cmp-x { background: #f1e2dd; color: var(--warn); }
.cmp-c { background: #fff; color: var(--good); }
.cmp-col--good .cmp-c { background: var(--good); color: #fff; }
.cmp-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; font-weight: 600; font-size: 15px; line-height: 1.4; border-top: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.cmp-col--good .cmp-row { border-top-color: var(--accent-line); }

/* ---------------- USE CASES ---------------- */
.cases { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.case-row { display: flex; align-items: center; gap: 20px; padding: 20px 24px; transition: transform .2s, box-shadow .2s; }
.case-row:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.case-num { font-family: var(--ff-mono); font-weight: 700; font-size: 15px; color: var(--ink-3); flex: none; width: 30px; }
.case-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--accent-tint); color: var(--accent); flex: none; }
.case-t { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.case-s { font-size: 14.5px; }

/* ---------------- FEATURES ---------------- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-line); }
.feat-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); flex: none; }
.feat-t { font-weight: 700; font-size: 14.5px; line-height: 1.3; }

/* ---------------- QUALITY ---------------- */
.quality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.quality-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quality-point { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.quality-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--good-tint); color: var(--good); flex: none; }

/* ---------------- ACCESS ---------------- */
.access .access-card { padding: 26px 24px 26px; display: flex; flex-direction: column; min-height: 280px; }
.access-card--hl { border-color: var(--accent); box-shadow: var(--shadow-accent); position: relative; }
.access-tag { display: inline-block; font-family: var(--ff-mono); font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-tint); padding: 5px 10px; border-radius: 7px; align-self: flex-start; margin-bottom: 16px; }
.access-t { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.access-s { font-size: 14.5px; line-height: 1.5; margin-bottom: 24px; }
.access .btn { width: 100%; }

/* ---------------- FINAL CTA ---------------- */
.final { padding: 96px 0; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(700px 360px at 80% 120%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%),
  radial-gradient(620px 320px at 10% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%); }
.final-card { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.final-h { color: #fff; max-width: 18ch; margin: 0 auto; }
.final-sub { color: #aebbd2; margin: 22px auto 0; max-width: 560px; }
.final-form { display: flex; gap: 12px; margin: 34px auto 0; max-width: 620px; }
.final-input { flex: 1; display: flex; align-items: center; gap: 11px; padding: 4px 4px 4px 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 13px; }
.final-input input { flex: 1; background: none; border: none; outline: none; color: #fff; font-family: var(--ff-mono); font-size: 15px; }
.final-input input::placeholder { color: #7e8aa0; }
.final-secondary { display: inline-block; margin-top: 22px; font-weight: 600; font-size: 15px; color: #cfe0ff; }
.final-secondary:hover { color: #fff; }

/* ---------------- FOOTER ---------------- */
.footer { background: #07090f; color: #aebbd2; padding: 64px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; }
.brand--light { color: #fff; }
.footer-tag { margin-top: 16px; font-size: 15px; color: #7e8aa0; max-width: 280px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-h { font-family: var(--ff-display); font-weight: 800; font-size: 14px; color: #fff; margin-bottom: 16px; }
.footer-cols a { display: block; font-size: 14.5px; color: #aebbd2; padding: 6px 0; transition: color .15s; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13.5px; color: #6b7689; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .grid-4, .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-aud { grid-template-columns: repeat(3, 1fr); }
  .ws { grid-template-columns: 200px 1fr; }
  .ws-rec { display: none; }
}
@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero-grid, .hero-flow-top, .studio-grid, .quality-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-bottom: 64px; }
  .hero-sub, .hero-copy { max-width: 640px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .access { grid-template-columns: repeat(2, 1fr) !important; }
  .flow { flex-wrap: wrap; justify-content: center; }
  .flow-node { flex: 0 0 calc(33.33% - 20px); }
  .flow-link { display: none; }
}
@media (max-width: 620px) {
  .grid-4, .feat-grid, .grid-aud, .steps, .quality-points { grid-template-columns: 1fr; }
  .access { grid-template-columns: 1fr !important; }
  .cmp, .rs { grid-template-columns: 1fr; }
  .rs-col:first-child { border-right: none; border-bottom: 1px solid var(--line-2); }
  .ws { grid-template-columns: 1fr; }
  .ws-nav { display: none; }
  .hero-btns, .final-form { flex-direction: column; }
  .final-form { gap: 14px; }
  .flow-node { flex: 0 0 calc(50% - 16px); }
  .an-cols { grid-template-columns: 1fr; }
  .case-row { flex-wrap: wrap; gap: 14px; }
  .nav-cta { padding: 9px 14px; }
  .nav-cta span:not(.arrow) { display: none; }
  /* Footer: single column */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  /* Workspace: wrap generate button so it doesn't clip */
  .ws-main-head { flex-wrap: wrap; gap: 10px; }
  .ws-gen { width: 100%; justify-content: center; }
  /* Result mockup: tighter column padding */
  .rs-col { padding: 16px 18px; }
  .rs-kw { font-size: 12px; padding: 8px 10px; }
  .rs-art { font-size: 13.5px; padding: 10px 12px; }
  .rs-dir { font-size: 13px; padding: 7px 11px; }
  /* Clusters header: allow wrap */
  .rs-h { flex-wrap: wrap; }
}

/* ============================================================
   TWEAKS PANEL (vanilla)
   ============================================================ */
.tw {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 300px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 6px 18px 18px;
  font-family: var(--ff-body);
  transition: opacity .2s ease, transform .2s ease;
}
.tw--hidden { opacity: 0; pointer-events: none; transform: translateY(12px) scale(.98); }
.tw-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; padding: 14px 0 10px; }
.tw-title { font-family: var(--ff-display); font-weight: 800; font-size: 16px; }
.tw-close { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); font-size: 13px; line-height: 1; }
.tw-close:hover { background: #fff; border-color: var(--accent-line); color: var(--accent-ink); }
.tw-sect { font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.tw-row { margin-bottom: 12px; }
.tw-label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatch { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); transition: transform .12s; }
.tw-swatch:hover { transform: scale(1.08); }
.tw-swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
.tw-rangewrap { display: flex; align-items: center; gap: 12px; }
.tw-range { flex: 1; accent-color: var(--accent); }
.tw-val { font-family: var(--ff-mono); font-size: 12.5px; color: var(--ink-2); width: 40px; text-align: right; }
.tw-seg { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 11px; border: 1px solid var(--line); }
.tw-seg-b { flex: 1; padding: 8px 6px; border-radius: 8px; border: none; background: transparent; font-weight: 700; font-size: 13px; color: var(--ink-2); transition: background .15s, color .15s; }
.tw-seg-b.on { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.tw-text { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); font-family: var(--ff-body); font-size: 14px; color: var(--ink); }
.tw-text:focus { outline: none; border-color: var(--accent); background: #fff; }
.tw-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; border: none; background: var(--accent); color: #fff;
  box-shadow: var(--shadow-accent); transition: transform .15s, opacity .2s;
}
.tw-fab:hover { transform: scale(1.06); }
.tw-fab.tw--hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
@media (max-width: 560px) {
  .tw { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* ============================================================
   MFORM FIELDS
   ============================================================ */
.mform { margin-top: 0; }
.mform-fields { display: flex; flex-direction: column; gap: 13px; }
.mform-field { display: flex; flex-direction: column; gap: 6px; }
.mform-label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.mform-req { color: var(--accent); font-style: normal; }
.mform-field input, .mform-field textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px; border: 1.5px solid var(--line);
  background: var(--bg-soft); font-family: var(--ff-body); font-size: 15px; color: var(--ink);
  transition: border-color .15s, background .15s; resize: vertical;
}
.mform-field input::placeholder, .mform-field textarea::placeholder { color: var(--ink-3); }
.mform-field input:focus, .mform-field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.mform-field.invalid input, .mform-field.invalid textarea { border-color: var(--warn); background: var(--warn-tint); }
.mform-submit { width: 100%; margin-top: 16px; }

/* ============================================================
   MFORM CHECKBOXES
   ============================================================ */
.mform-checks { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mform-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.mform-check input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-width: 20px; border: 2px solid var(--line); border-radius: 6px; background: var(--bg-soft); margin-top: 1px; cursor: pointer; transition: border-color .15s, background .15s; display: grid; place-items: center; }
.mform-check input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.mform-check input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg) translate(-1px, -1px); display: block; }
.mform-check input[type="checkbox"]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.mform-check span { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.mform-check.invalid input[type="checkbox"] { border-color: var(--warn); background: var(--warn-tint); }
.mform-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.mform-link:hover { color: var(--accent); }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.ck-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px -8px rgba(11,18,32,.12);
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  transform: translateY(100%); opacity: 0; transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
.ck-banner--in  { transform: none; opacity: 1; }
.ck-banner--out { transform: translateY(100%); opacity: 0; }
.ck-text { flex: 1; min-width: 240px; }
.ck-title { font-family: var(--ff-display); font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.ck-desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.ck-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.ck-link:hover { color: var(--accent); }
.ck-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ck-btn { font-family: var(--ff-body); font-weight: 700; font-size: 14.5px; padding: 12px 20px; border-radius: 11px; border: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .12s; white-space: nowrap; }
.ck-btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.ck-btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.ck-btn--ghost { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.ck-btn--ghost:hover { background: #fff; color: var(--ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
@media (max-width: 640px) {
  .ck-banner { padding: 18px 20px; }
  .ck-actions { width: 100%; }
  .ck-btn { flex: 1; text-align: center; }
}

/* ============================================================
   MOBILE POLISH — base overflow protection + 390px fixes
   ============================================================ */

/* Prevent flex/grid children from overflowing their containers */
.rs-col { min-width: 0; }
.rs-art { overflow: hidden; }
.rs-art > span { word-break: break-word; overflow-wrap: break-word; }
.rs-kw { word-break: break-word; overflow-wrap: break-word; }
.an-art > span { word-break: break-word; overflow-wrap: break-word; }
.case-row > div { min-width: 0; }

/* ---- ≤ 480px: analyzer, workspace, card padding ---- */
@media (max-width: 480px) {
  /* Analyzer input: stack URL row + button vertically */
  .an-input { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .an-go { width: 100%; justify-content: center; }

  /* Mockup frame: less body padding */
  .mk-body { padding: 14px 16px; }

  /* Workspace inner: compact */
  .ws-main { padding: 16px 14px; }
  .ws-stats { gap: 8px; }
  .ws-stat { padding: 10px 8px; }
  .ws-stat-v { font-size: 20px; }
  .ws-stat-t { font-size: 11.5px; }
  .ws-stat-ico { width: 26px; height: 26px; margin-bottom: 6px; }
  .ws-dir { gap: 8px; }
  .ws-dir-t { width: 120px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ws-url { font-size: 12px; }
  .ws-state { font-size: 12px; }

  /* Section cards: tighter padding */
  .step { padding: 20px 18px 22px; }
  .prob-card { padding: 20px 18px 22px; }
  .case-row { padding: 14px 16px; gap: 10px; }
  .cmp-row { font-size: 13.5px; padding: 11px 13px; }
  .feat { padding: 14px 16px; }
  .quality-point { padding: 12px 14px; font-size: 14px; }
  .studio-gets { padding: 22px 20px 24px; }
  .access-card { padding: 22px 20px 22px; }

  /* Result mockup: even tighter at 480 */
  .rs-col { padding: 14px 14px; }
  .rs-art { padding: 9px 11px; font-size: 13px; }
  .rs-arts { gap: 8px; }
  .rs-dirs { gap: 6px; }
  /* CTA button: allow text wrap (prevents overflow on long strings) */
  .rs-cta { white-space: normal; }
  /* Cluster/section header: block flow so text wraps inline, not at flex boundary */
  .rs-h { display: block; line-height: 1.6; }
  .rs-h svg { display: inline-block; vertical-align: text-bottom; margin-right: 6px; }
}

/* ---- ≤ 460px: modal polish ---- */
@media (max-width: 460px) {
  .modal-left { padding: 20px 18px 14px; }
  .modal-right { padding: 14px 18px 24px; }
  .modal-title { font-size: 19px; }
  .modal-sub { font-size: 13.5px; line-height: 1.55; }
  .mform-check span { font-size: 13px; line-height: 1.45; }
  .mform-field input,
  .mform-field textarea { font-size: 14.5px; padding: 10px 13px; }
  .mform-label { font-size: 12.5px; }
}

/* Fix: ensure [hidden] attribute works even when display is overridden by component classes */
[hidden] { display: none !important; }
