/* Бесплатные модели + интерактив */
.free { position: relative; }
.section--portfolio + .section--free { margin-top: 0; }
.free__title { margin-top: 0; margin-bottom: 60px; }
.free__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: clamp(16px, 3vw, 36px); }
.fm { display: flex; flex-direction: column; padding: 18px 18px 14px; border-radius: 22px; }
.fm__media { aspect-ratio: 340 / 380; border-radius: 26px; overflow: hidden; display: grid; place-items: center; }
.fm__media img { width: 100%; height: 100%; object-fit: contain; }
.fm--soon .fm__media { border: 2px solid rgba(255,255,255,.85); }
.fm--soon .fm__media img { object-fit: cover; }
.fm__title { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-family: var(--f-round); font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); }
.fm__title .sparkle { width: .75em; height: .75em; color: #fff; }
.fm__desc { margin: 0 0 14px; font-family: var(--f-round); font-size: 13px; line-height: 1.45; color: var(--text-2); }
.fm__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fm__actions .btn { font-size: 13px; text-transform: uppercase; min-height: 34px; padding: 5px 12px; }
.fm__actions [aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.fm__dl { position: relative; }
.fm__dl summary { list-style: none; }
.fm__dl summary::-webkit-details-marker { display: none; }
.fm__dl-menu { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; min-width: 170px; padding: 6px; border-radius: 14px; background: #1a1430; border: 1px solid var(--line); box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); display: grid; }
.fm__dl-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.fm__dl-menu a:hover { background: rgba(255,255,255,.08); }
.fm__dl-menu svg { width: 16px; height: 16px; color: var(--accent); }
.fm__rules { display: inline-flex; align-items: center; gap: 6px; align-self: flex-end; margin-top: 12px; padding: 4px 0; border: 0; background: none; cursor: pointer; font-family: var(--f-display); font-size: 13px; color: var(--text-2); }
.fm__rules:hover { color: var(--accent); }
.fm__rules svg { width: 16px; height: 16px; }
.fm__rules-text { color: var(--text-2); line-height: 1.6; }

/* окно интерактивной модели */
.l2d { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(16px, 3vw, 34px); margin-top: clamp(50px, 7vw, 90px); padding: clamp(18px, 3vw, 30px); background: linear-gradient(160deg, rgba(19,12,31,.16), rgba(30,22,50,.1)); }
.l2d__title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 3vw, 34px); text-transform: uppercase; }
.l2d__title .sparkle { width: .7em; height: .7em; color: var(--accent); }
.l2d__sub { margin: 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.l2d__label { margin: 0 0 8px; font-family: var(--f-display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.l2d__models { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.l2d__models button { display: grid; gap: 6px; padding: 8px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; font-family: var(--f-display); font-size: 15px; transition: border-color .2s, background .2s; }
.l2d__models button[aria-checked="true"] { border-color: var(--accent); background: rgba(233,139,255,.1); }
.l2d__models img, .l2d__models .ph { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: rgba(0,0,0,.25); min-height: 0; }
.l2d__controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.l2d__flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.l2d__flag svg { width: 14px; height: 14px; color: var(--accent); }
.l2d__note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.l2d__stage { position: relative; height: clamp(420px, 60vh, 600px); border-radius: 24px; overflow: hidden; background: radial-gradient(70% 60% at 50% 40%, rgba(138,61,255,.26), transparent 70%), radial-gradient(50% 40% at 70% 90%, rgba(107,63,240,.25), transparent), #0c0814; border: 1px solid var(--line); }
.l2d__ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; }
.l2d__ph p { margin: 14px 0 0; font-family: var(--f-display); font-size: clamp(18px, 2vw, 22px); letter-spacing: .04em; }
.l2d__ph small { color: var(--muted); max-width: 320px; }
.l2d__ghost { position: relative; width: 150px; height: 190px; transition: transform .25s var(--ease); }
.l2d__ghost span { position: absolute; inset: 0; border-radius: 50% 50% 46% 46% / 42% 42% 58% 58%; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.03)); border: 1.5px dashed rgba(255,255,255,.3); animation: breathe 4s ease-in-out infinite; }
.l2d__ghost svg { position: absolute; width: 34px; height: 34px; right: -8px; top: -6px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(233,139,255,.8)); }
@keyframes breathe { 50% { transform: scale(1.03, .98); } }
@media (prefers-reduced-motion: reduce) { .l2d__ghost span { animation: none; } }

@media (max-width: 820px) {
  .free__grid { grid-template-columns: minmax(0, 420px); }
  .l2d { grid-template-columns: 1fr; }
  .l2d__stage { height: 440px; }
}

/* живая модель */
.l2d__stage-wrap { position: relative; }
.l2d__stage { touch-action: pan-y; }
.l2d__canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.l2d__ph.is-busy .l2d__ghost span { animation: breathe 1s ease-in-out infinite; }
.l2d__preview { position: absolute; right: 12px; bottom: 12px; width: 132px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,220,255,.5); box-shadow: var(--neon-glow-soft); background: #000; }
.l2d__cam { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.l2d__status { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.l2d__status svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.l2d__expr { margin-top: 18px; }
.l2d__expr-list { display: flex; flex-wrap: wrap; gap: 6px; }
.l2d__chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); cursor: pointer; font-family: var(--f-display); font-size: 13px; letter-spacing: .03em; transition: background .2s, border-color .2s, box-shadow .2s; }
.l2d__chip:hover { border-color: var(--line-2); }
.l2d__chip[aria-pressed="true"] { background: rgba(233,139,255,.18); border-color: var(--accent); box-shadow: var(--neon-glow-soft); }
.l2d__chip--reset { color: var(--muted); }
[data-sleep][aria-pressed="true"] { border-color: var(--accent); }
