:root {
  --bg: #0b0a09; --ink: #f3efe7; --muted: #8f8a82; --faint: #4a4641; --line: rgba(243,239,231,.1); --card: rgba(243,239,231,.035);
  --accent: #ff6fa3; --accent2: #ff5a1f; --pad: clamp(16px, 4.4vw, 72px); --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: Onest, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; overflow-x: hidden; min-height: 100svh;
  background: radial-gradient(55% 45% at 80% 8%, rgba(255,111,163,.18), transparent 70%), radial-gradient(40% 40% at 0% 60%, rgba(255,90,31,.08), transparent 70%), var(--bg); background-attachment: fixed; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0b0a09; }
.grain { position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
header, main, footer { position: relative; z-index: 1; }
em { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.01em; }

/* шапка */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px var(--pad); }
.mark { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px 2px rgba(255,111,163,.6); }
.mark b { margin-left: 5px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #0b0a09; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.dev-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink) !important; transition: border-color .3s; }
.dev-link span { color: var(--accent2); font-size: 12.5px; }
.dev-link:hover { border-color: var(--accent2); }

/* первый экран */
.hero { padding: clamp(16px, 4vh, 48px) var(--pad) clamp(20px, 4vh, 40px); max-width: 1100px; }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--faint); }
h1 { font-weight: 300; font-size: clamp(40px, 6.4vw, 100px); line-height: .96; letter-spacing: -.045em; }
.lead { margin-top: 22px; max-width: 640px; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.6; color: var(--muted); font-weight: 300; }
.lead strong { color: var(--ink); font-weight: 400; }

/* конструктор */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding: 0 var(--pad); align-items: start; }
.view { position: sticky; top: 16px; height: min(78vh, 760px); min-height: 420px; border-radius: 28px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(70% 60% at 50% 45%, rgba(255,111,163,.16), transparent 70%), radial-gradient(100% 100% at 50% 100%, rgba(243,239,231,.05), transparent 60%), #141210; }
.view canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.view canvas:active { cursor: grabbing; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-size: 14px; transition: opacity .5s; }
.loading i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: sp 1s linear infinite; }
.loading.off { opacity: 0; pointer-events: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.view-tools { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.view-tools button { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(11,10,9,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13px; cursor: pointer; transition: border-color .3s, background .3s; }
.view-tools button:hover { border-color: var(--accent); }
.view-tools button[aria-pressed=true] { background: var(--ink); color: #0b0a09; }
.hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 12px; color: var(--muted); pointer-events: none; }

.panel { padding: 24px; border-radius: 28px; border: 1px solid var(--line); background: rgba(22,20,18,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: grid; gap: 20px; }
.prod b { display: block; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.prod span { color: var(--muted); font-size: 13.5px; }
fieldset { border: 0; display: grid; gap: 10px; }
legend { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; width: 100%; }
legend small { letter-spacing: .04em; text-transform: none; font-size: 12.5px; color: var(--ink); }
.lines { display: grid; gap: 8px; }
.lines input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(243,239,231,.04); font-size: 16px; text-transform: uppercase; letter-spacing: .02em; outline: none; transition: border-color .3s; }
.lines input::placeholder { text-transform: none; color: var(--faint); letter-spacing: 0; }
.lines input:focus { border-color: var(--accent); }
.lines.script input { text-transform: none; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; border: 1px solid var(--line); }
.seg button { padding: 10px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; transition: background .3s, color .3s; }
.seg button[aria-checked=true] { background: var(--ink); color: #0b0a09; }
.seg button span { display: block; font-size: 19px; line-height: 1.2; }
.sw { display: flex; flex-wrap: wrap; gap: 7px; }
.sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 3px #161412; transition: transform .25s var(--ease), border-color .25s; position: relative; }
.sw button:hover { transform: scale(1.08); }
.sw button[aria-checked=true] { border-color: var(--ink); }
.sw button.metal { background-image: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0) 45%, rgba(0,0,0,.25)); }
.sw button:focus-visible, .seg button:focus-visible, .qty button:focus-visible, .order:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.qty { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 6px; }
.qty button { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgba(243,239,231,.04); font-size: 20px; cursor: pointer; }
.qty button:hover { border-color: var(--accent); }
.qty input { height: 46px; text-align: center; border-radius: 14px; border: 1px solid var(--line); background: rgba(243,239,231,.04); font-size: 18px; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty input:focus { border-color: var(--accent); }
.quick { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.quick button { height: auto; padding: 6px 12px; font-size: 13px; border-radius: 999px; color: var(--muted); }
.quick button.on { color: var(--ink); border-color: var(--accent); }

.calc { padding: 18px; border-radius: 18px; background: rgba(255,111,163,.07); border: 1px solid rgba(255,111,163,.25); display: grid; gap: 8px; }
.calc .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 15px; }
.calc .row b { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums; }
.calc .total b { font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.calc .save { color: #5fe39a; font-size: 14px; min-height: 0; }
.calc .next { color: var(--muted); font-size: 13px; }
.calc .next b { color: var(--ink); font-weight: 500; }
.order { padding: 17px; border-radius: 999px; border: 0; background: var(--ink); color: #0b0a09; font-weight: 600; font-size: 17px; cursor: pointer; transition: background .4s var(--ease), transform .2s; }
.order:hover { background: var(--accent); }
.order:active { transform: scale(.98); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; text-align: center; margin-top: -8px; }

/* секции */
.sec { padding: clamp(64px, 10vh, 120px) var(--pad) 0; }
.sec-h { margin-bottom: 28px; }
.label { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
h2 { font-weight: 300; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.035em; }
.tiers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tier { padding: 22px 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); transition: border-color .3s, background .3s; }
.tier.on { border-color: var(--accent); background: rgba(255,111,163,.08); }
.tier small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.tier b { display: block; font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.tier span { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(95,227,154,.12); color: #5fe39a; }
.tier span.zero { background: transparent; color: var(--muted); padding-left: 0; font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.card .e { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(255,111,163,.1); color: var(--accent); }
.card .e svg { width: 24px; height: 24px; }
.view-tools button { display: inline-flex; align-items: center; gap: 6px; }
.view-tools button svg { width: 15px; height: 15px; }
svg.ar { width: 14px; height: 14px; vertical-align: -2px; }
.dev-link span { display: inline-flex; align-items: center; gap: 3px; }
.btn svg.ar { margin-left: 8px; width: 16px; height: 16px; }
.sheet .x { display: grid; place-items: center; }
.sheet .x svg { width: 15px; height: 15px; }
.card h3 { font-weight: 400; font-size: 20px; }
.card p { margin-top: 8px; color: var(--muted); font-weight: 300; line-height: 1.6; font-size: 15px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; padding: 26px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 300; line-height: 1.6; font-size: 15px; }
.steps li::before { content: "0" counter(s); display: block; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 40px; line-height: 1; color: var(--accent); margin-bottom: 14px; }
.steps b { display: block; color: var(--ink); font-weight: 400; font-size: 17px; margin-bottom: 6px; }
.specs { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.specs div { padding-top: 16px; border-top: 1px solid var(--accent); }
.specs span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.specs b { font-weight: 400; font-size: 17px; }

.banner { margin: clamp(64px, 10vh, 120px) var(--pad) 0; padding: clamp(28px, 4vw, 56px); border-radius: 28px; border: 1px solid rgba(255,90,31,.35);
  background: radial-gradient(70% 140% at 100% 100%, rgba(255,90,31,.25), transparent 70%), rgba(22,20,18,.8); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.banner em { color: var(--accent2); }
.banner p { margin-top: 16px; max-width: 620px; color: var(--muted); line-height: 1.6; font-weight: 300; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 26px; border-radius: 999px; background: var(--ink); color: #0b0a09; font-weight: 500; font-size: 16px; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: background .4s var(--ease), color .4s, border-color .4s; }
.btn:hover { background: var(--accent2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--faint); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(56px, 8vh, 96px); padding: 26px var(--pad) calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
footer a:hover { color: var(--ink); }

/* окно заказа */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.sheet { position: relative; width: min(520px, 100%); padding: 28px; border-radius: 26px; background: #171513; border: 1px solid var(--line); animation: up .4s var(--ease); }
@keyframes up { from { opacity: 0; transform: translateY(20px); } }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); }
.sheet h3 { font-size: 22px; font-weight: 500; }
.sheet p { margin-top: 8px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.sheet pre { margin-top: 16px; padding: 16px; border-radius: 14px; background: rgba(243,239,231,.05); border: 1px solid var(--line); white-space: pre-wrap; font: 13.5px/1.6 ui-monospace, Menlo, monospace; color: var(--ink); }
.m-act { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.m-act .btn { flex: 1; padding: 13px 18px; font-size: 15px; }

@media (max-width: 1100px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .builder { grid-template-columns: 1fr; }
  .view { position: relative; top: 0; height: 58vh; min-height: 340px; }
  .steps, .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top nav { gap: 14px; }
  .top nav .hide-sm, .top nav a[href="#prices"], .top nav a[href="#builder"] { display: none; }
  .dev-link span { display: none; }
  .panel { padding: 18px; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .specs { grid-template-columns: 1fr; }
  .banner .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .loading i { animation: none; } }
