/* retailone.ru — design system. Dark shell, light reading surfaces. */

@layer reset, base, layout, components, pages, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body { min-height: 100dvh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
  img, svg, video, canvas { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; }
  ul, ol { padding: 0; list-style: none; }
  h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; text-wrap: balance; }
  p { text-wrap: pretty; }
  summary { cursor: pointer; list-style: none; }
  summary::-webkit-details-marker { display: none; }
}

@layer base {
  :root {
    --ink: #0a0c14;
    --ink-2: #12152280;
    --ink-3: #141827;
    --ink-4: #1c2136;
    --paper: #f6f7fb;
    --paper-2: #ffffff;
    --paper-3: #eceef6;
    --text: #111421;
    --text-2: #4b5068;
    --text-on-dark: #f2f4fa;
    --text-on-dark-2: #a9afc6;
    --line: #e2e5ef;
    --line-dark: #ffffff1a;
    --violet: #7c5cff;
    --teal: #19d3c5;
    --amber: #ffb454;
    --grad: linear-gradient(120deg, var(--violet), var(--teal));
    --grad-soft: linear-gradient(120deg, #7c5cff33, #19d3c533);
    --radius: 20px;
    --radius-s: 12px;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
    --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --shadow: 0 20px 60px -20px #0a0c1440;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: light;
  }
  body {
    font-family: var(--font-text);
    font-size: clamp(16px, 1.05vw, 18px);
    color: var(--text);
    background: var(--paper);
  }
  .wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
  .h1, .h2, .h3, .h4, h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
  .h1, h1 { font-size: clamp(30px, 4.6vw, 60px); font-weight: 800; }
  .h2, h2 { font-size: clamp(24px, 2.8vw, 38px); }
  .h3, h3 { font-size: clamp(19px, 1.7vw, 24px); }
  .h4, h4 { font-size: clamp(17px, 1.25vw, 19px); font-family: var(--font-text); font-weight: 800; }
  .lead { font-size: clamp(17px, 1.35vw, 21px); color: var(--text-2); max-width: 62ch; }
  .kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--violet);
  }
  .kicker::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
  .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
  .skip:focus { left: 8px; }
  :focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
}

@layer layout {
  .section { padding-block: clamp(56px, 9vw, 120px); }
  .section--tight { padding-block: clamp(40px, 6vw, 80px); }
  .section--dark { background: var(--ink); color: var(--text-on-dark); }
  .section--dark .lead, .section--dark .card__text { color: var(--text-on-dark-2); }
  .section__head { display: grid; gap: 14px; max-width: 72ch; margin-bottom: clamp(28px, 4vw, 48px); }
  .section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
  .grid-2 { display: grid; gap: clamp(20px, 3vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
  .prose { max-width: 72ch; }
  .prose > * + * { margin-top: 1em; }
  .prose h2 { margin-top: 1.8em; }
  .prose h3 { margin-top: 1.4em; }
  .prose ul, .prose ol { padding-left: 1.2em; }
  .prose ul { list-style: disc; }
  .prose ol { list-style: decimal; }
  .prose li + li { margin-top: .35em; }
  .prose a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .prose strong { font-weight: 800; }
  .prose blockquote { border-left: 3px solid var(--teal); padding-left: 1em; color: var(--text-2); }
  .prose img { border-radius: var(--radius-s); }
  .prose table { border-collapse: collapse; width: 100%; font-size: .95em; }
  .prose td, .prose th { border-bottom: 1px solid var(--line); padding: .6em .4em; text-align: left; vertical-align: top; }
}

@layer components {
  /* ---- header ---- */
  .hdr {
    position: sticky; top: 0; z-index: 50;
    background: #0a0c14e6; color: var(--text-on-dark);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-dark);
  }
  .hdr__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
  .logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
  .logo__mark { width: 40px; height: 40px; flex: none; }
  .logo__text { display: grid; line-height: 1.05; font-family: var(--font-display); }
  .logo__text b { font-weight: 800; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
  .logo__text i { font-style: normal; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-on-dark-2); }
  .nav { margin-inline: auto; }
  .nav__list { display: flex; gap: 4px; }
  .nav__item { position: relative; }
  .nav__link {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px;
    text-decoration: none; font-weight: 700; font-size: 15px; color: var(--text-on-dark);
    transition: background .2s;
  }
  .nav__link:hover, .nav__item:focus-within .nav__link { background: #ffffff14; }
  .nav__link[aria-current="page"] { color: var(--teal); }
  .has-sub > .nav__link::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); opacity: .6; }
  .sub {
    position: absolute; top: 100%; left: 0; padding-top: 10px; min-width: 280px;
    opacity: 0; translate: 0 8px; visibility: hidden; transition: opacity .2s, translate .25s var(--ease), visibility .2s;
  }
  .has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; translate: 0 0; visibility: visible; }
  .sub__list {
    background: var(--ink-3); border: 1px solid var(--line-dark); border-radius: 14px; padding: 8px; box-shadow: var(--shadow);
    display: grid; gap: 2px;
  }
  .sub__list a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-size: 14.5px; color: var(--text-on-dark); }
  .sub__list a:hover { background: #ffffff12; color: var(--teal); }
  .sub__list a[aria-current="page"] { color: var(--teal); }
  /* panel widgets: ПР / ПУУ with tooltip */
  .cabs { display: flex; gap: 8px; margin-left: auto; }
  .cab {
    position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    width: 44px; height: 44px; border-radius: 12px; background: #ffffff0a; border: 1.5px solid #ffffffd9;
    box-shadow: 0 4px 14px #00000066, 0 0 0 1px #ffffff14 inset, 0 0 18px #ffffff1a;
    font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: .04em; text-decoration: none; color: #fff;
    transition: background .2s, box-shadow .2s, translate .2s;
  }
  .cab:hover, .cab:focus-visible { background: #ffffff1c; translate: 0 -1px; box-shadow: 0 8px 22px #00000080, 0 0 0 1px #ffffff22 inset, 0 0 24px #19d3c544; }
  .cab__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px #19d3c533; }
  .cab::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 10px); right: 0; white-space: nowrap;
    padding: 8px 12px; border-radius: 10px; background: var(--ink-3); border: 1px solid var(--line-dark); box-shadow: var(--shadow);
    font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--text-on-dark);
    opacity: 0; translate: 0 6px; visibility: hidden; pointer-events: none; transition: opacity .2s, translate .25s var(--ease), visibility .2s;
  }
  .cab:hover::after, .cab:focus-visible::after { opacity: 1; translate: 0 0; visibility: visible; }
  .hdr__contacts { display: grid; text-align: right; line-height: 1.2; }
  .hdr__phone { font-family: var(--font-display); font-weight: 700; font-size: 16px; text-decoration: none; }
  .hdr__mail { font-size: 12.5px; color: var(--text-on-dark-2); text-decoration: none; }
  .burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; border-radius: 10px; }
  .burger span { width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
  @media (max-width: 1080px) {
    .nav { display: none; }
    .burger { display: flex; }
  }
  @media (max-width: 640px) { .hdr__contacts { display: none; } .logo__text b { font-size: 14px; } .cab::after { display: none; } }

  /* ---- mobile nav dialog ---- */
  .mnav {
    border: 0; padding: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
    background: var(--ink); color: var(--text-on-dark); inset: 0;
  }
  .mnav::backdrop { background: #0a0c14cc; }
  .mnav[open] { display: grid; grid-template-rows: auto 1fr auto; animation: slide-in .35s var(--ease); }
  @keyframes slide-in { from { translate: 0 -12px; opacity: 0; } }
  .mnav__top { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); border-bottom: 1px solid var(--line-dark); }
  .mnav__close { font-size: 34px; line-height: 1; width: 44px; height: 44px; }
  .mnav nav { overflow: auto; padding: 10px var(--gutter); }
  .mnav__link, .mnav__group summary { display: block; padding: 14px 0; font-family: var(--font-display); font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--line-dark); }
  .mnav__group summary { display: flex; justify-content: space-between; align-items: center; }
  .mnav__group summary::after { content: "+"; font-size: 22px; color: var(--teal); }
  .mnav__group[open] summary::after { content: "–"; }
  .mnav__group a { display: block; padding: 10px 0 10px 12px; text-decoration: none; color: var(--text-on-dark-2); }
  .mnav__all { color: var(--teal) !important; font-weight: 700; }
  .mnav__cabs { display: grid; gap: 8px; padding: 16px var(--gutter); border-top: 1px solid var(--line-dark); }
  .mnav__cabs a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #ffffff10; border: 1px solid var(--line-dark); text-decoration: none; color: var(--text-on-dark); font-size: 14px; }
  .mnav__cabs b { font-family: var(--font-display); font-size: 12px; letter-spacing: .04em; padding: 4px 8px; border-radius: 999px; background: var(--grad); color: var(--ink); }
  .mnav__contacts { display: grid; gap: 6px; padding: 16px var(--gutter) 24px; border-top: 1px solid var(--line-dark); color: var(--text-on-dark-2); }
  .mnav__contacts a { color: var(--text-on-dark); text-decoration: none; font-weight: 700; }

  /* ---- buttons ---- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px; font-weight: 800; text-decoration: none; font-size: 15px;
    border: 1.5px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .2s, color .2s;
    white-space: nowrap;
  }
  .btn:hover { transform: translateY(-2px); }
  .btn--primary { background: var(--grad); color: var(--ink); box-shadow: 0 10px 30px -10px #7c5cff99; }
  .btn--primary:hover { box-shadow: 0 16px 36px -10px #19d3c599; }
  .btn--amber { background: var(--amber); color: var(--ink); }
  .btn--ghost { border-color: currentColor; background: transparent; }
  .btn--light { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
  .btn--play::before { content: ""; width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

  /* ---- hero (inner pages) ---- */
  .phero { background: var(--ink); color: var(--text-on-dark); position: relative; overflow: hidden; isolation: isolate; }
  .phero::before, .phero::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none;
  }
  .phero::before { width: 520px; height: 520px; right: -120px; top: -200px; background: var(--violet); }
  .phero::after { width: 420px; height: 420px; right: 300px; bottom: -260px; background: var(--teal); opacity: .35; }
  .phero__in { padding-block: clamp(28px, 4vw, 56px) clamp(44px, 6vw, 88px); display: grid; gap: 18px; }
  .phero .lead { color: var(--text-on-dark-2); }
  .phero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
  .crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-on-dark-2); }
  .crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
  .crumbs a { text-decoration: none; }
  .crumbs a:hover { color: var(--teal); }
  .phero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 10px; }
  .fact { display: grid; }
  .fact b { font-family: var(--font-display); font-size: clamp(20px, 2vw, 28px); }
  .fact span { font-size: 13px; color: var(--text-on-dark-2); }

  /* ---- cards ---- */
  .cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
  .card a {
    display: grid; gap: 10px; height: 100%; padding: 24px; border-radius: var(--radius);
    background: var(--paper-2); border: 1px solid var(--line); text-decoration: none; position: relative; overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  }
  .card a::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
  .card a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
  .card a:hover::before { transform: scaleX(1); }
  .card__kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); font-weight: 800; }
  .card__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
  .card__text { color: var(--text-2); font-size: 14.5px; }
  .card__arrow { margin-top: auto; color: var(--violet); font-size: 20px; transition: translate .3s var(--ease); }
  .card a:hover .card__arrow { translate: 6px 0; }
  .section--dark .card a { background: var(--ink-3); border-color: var(--line-dark); color: var(--text-on-dark); }
  .section--dark .card__kicker { color: var(--text-on-dark-2); }

  /* ---- features & steps ---- */
  .features { display: grid; gap: 16px; }
  .features--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .features--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
  .features--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .feature { padding: 24px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
  .feature__n { font-family: var(--font-display); color: var(--violet); font-size: 13px; font-weight: 800; }
  .feature p { color: var(--text-2); font-size: 15px; }
  .section--dark .feature { background: var(--ink-3); border-color: var(--line-dark); }
  .section--dark .feature p { color: var(--text-on-dark-2); }
  .steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
  .step { position: relative; padding: 28px 24px 24px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
  .step__n {
    width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: var(--ink);
    display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; margin-bottom: 6px;
  }
  .step p { color: var(--text-2); font-size: 15px; }

  /* ---- pricing ---- */
  .plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .plan { padding: 28px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; position: relative; overflow: hidden; }
  .plan--hot { border-color: var(--violet); box-shadow: 0 30px 60px -30px #7c5cff80; }
  .plan__badge { position: absolute; top: 16px; right: 16px; background: var(--grad); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
  .plan__name { font-family: var(--font-display); font-size: 20px; }
  .plan__price { font-family: var(--font-display); font-size: clamp(30px, 3vw, 40px); font-weight: 800; letter-spacing: -.02em; }
  .plan__price small { font-size: 14px; font-weight: 600; color: var(--text-2); font-family: var(--font-text); }
  .plan__for { color: var(--text-2); font-size: 15px; }
  .plan ul { display: grid; gap: 8px; font-size: 15px; }
  .plan li { padding-left: 24px; position: relative; }
  .plan li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
  .checklist { display: grid; gap: 10px; }
  .checklist li { padding-left: 28px; position: relative; }
  .checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 800; }
  .checklist--no li::before { content: "–"; color: var(--amber); }

  /* ---- demos & player ---- */
  .demos + .demos { margin-top: 32px; }
  .demo-list { display: grid; gap: 8px; }
  .demo-list--cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
  .track {
    width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px;
    background: var(--paper-2); border: 1px solid var(--line); text-align: left; transition: border-color .2s, background .2s;
  }
  .track:hover { border-color: var(--violet); }
  .track.is-playing { background: var(--grad-soft); border-color: transparent; }
  .track__play { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--ink); position: relative; }
  .track__play::before { content: ""; position: absolute; left: 14px; top: 11px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
  .track.is-playing .track__play::before { border: 0; width: 10px; height: 12px; left: 13px; top: 12px; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); }
  .track__title { font-weight: 700; font-size: 15px; flex: 1; }
  .track__wave { display: none; gap: 3px; align-items: flex-end; height: 18px; }
  .track.is-playing .track__wave { display: inline-flex; }
  .track__wave i { width: 3px; background: var(--violet); border-radius: 2px; animation: eq .8s ease-in-out infinite alternate; }
  .track__wave i:nth-child(2) { animation-delay: .15s; } .track__wave i:nth-child(3) { animation-delay: .3s; } .track__wave i:nth-child(4) { animation-delay: .45s; }
  @keyframes eq { from { height: 4px; } to { height: 18px; } }
  .demo-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
  .demo-card { display: grid; gap: 8px; }
  .demo-card__btn {
    aspect-ratio: 1; border-radius: 16px; background: var(--img) center/cover, var(--ink-3); position: relative; overflow: hidden; width: 100%;
    transition: transform .3s var(--ease), box-shadow .3s;
  }
  .demo-card__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #0a0c14b0); }
  .demo-card__btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .demo-card__play { position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; width: 46px; height: 46px; border-radius: 50%; background: #ffffffe6; }
  .demo-card__play::before { content: ""; position: absolute; left: 18px; top: 14px; border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
  .demo-card.is-playing .demo-card__play { background: var(--teal); }
  .demo-card.is-playing .demo-card__play::before { border: 0; width: 12px; height: 14px; left: 17px; top: 16px; background: linear-gradient(90deg, var(--ink) 0 35%, transparent 35% 65%, var(--ink) 65%); }
  .demo-card__title { font-size: 14px; font-weight: 700; text-align: center; }
  .player {
    position: fixed; inset: auto 0 0 0; z-index: 60; background: #0a0c14f2; color: var(--text-on-dark);
    border-top: 1px solid var(--line-dark); backdrop-filter: blur(12px); animation: rise .35s var(--ease);
  }
  @keyframes rise { from { translate: 0 100%; } }
  .player__in { display: flex; align-items: center; gap: 14px; min-height: 64px; }
  .player__btn { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: var(--ink); display: grid; place-items: center; flex: none; }
  .player__btn .i-pause { display: none; }
  .player.is-playing .player__btn .i-play { display: none; }
  .player.is-playing .player__btn .i-pause { display: block; }
  .player__meta { display: grid; line-height: 1.2; min-width: 0; }
  .player__title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player__sub { font-size: 12px; color: var(--text-on-dark-2); }
  .player__bar { flex: 1; height: 6px; background: #ffffff22; border-radius: 3px; cursor: pointer; overflow: hidden; }
  .player__fill { height: 100%; width: 0; background: var(--grad); }
  .player__time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-on-dark-2); min-width: 40px; }
  .player__close { font-size: 26px; width: 36px; height: 36px; }
  body.has-player { padding-bottom: 72px; }
  @media (max-width: 640px) { .player__sub { display: none; } }

  /* ---- faq ---- */
  .faq__list { display: grid; gap: 10px; max-width: 80ch; }
  .faq__item { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
  .faq__item summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; font-weight: 800; }
  .faq__item summary::after { content: "+"; font-size: 22px; color: var(--violet); flex: none; transition: rotate .25s; }
  .faq__item[open] summary::after { rotate: 45deg; }
  .faq__a { padding: 0 0 16px; color: var(--text-2); }
  .faq__a p + p { margin-top: .7em; }

  /* ---- cta ---- */
  .cta { padding-block: clamp(40px, 6vw, 80px); }
  .cta__in {
    background: var(--ink); color: var(--text-on-dark); border-radius: 28px; padding: clamp(28px, 5vw, 56px);
    display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; position: relative; overflow: hidden; isolation: isolate;
  }
  .cta__in::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -180px; background: var(--grad); filter: blur(90px); opacity: .5; }
  .cta__in p { color: var(--text-on-dark-2); margin-top: 8px; max-width: 56ch; }
  .cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

  /* ---- logos ---- */
  .logos { overflow: hidden; mask: linear-gradient(90deg, transparent, #000 8% 92%, transparent); }
  .logos__track { display: flex; gap: 16px; width: max-content; animation: marquee 70s linear infinite; }
  .logos:hover .logos__track { animation-play-state: paused; }
  @keyframes marquee { to { translate: -50% 0; } }
  .logo-card { width: 160px; height: 90px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 12px; }
  .logo-card img { max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
  .logo-card:hover img { filter: none; opacity: 1; }
  .logo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
  .logo-grid .logo-card { width: auto; }

  /* ---- news ---- */
  .news-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
  .post-card a { display: grid; gap: 10px; text-decoration: none; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
  .post-card a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .post-card__img { aspect-ratio: 16/10; background: var(--grad-soft); overflow: hidden; }
  .post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease); }
  .post-card a:hover img { scale: 1.05; }
  .post-card__body { display: grid; gap: 6px; padding: 4px 18px 20px; }
  .post-card__date { font-size: 12.5px; color: var(--text-2); font-weight: 700; letter-spacing: .04em; }
  .post-card__title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
  .post-card__lead { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .section--dark .post-card a { background: var(--ink-3); border-color: var(--line-dark); color: var(--text-on-dark); }
  .section--dark .post-card__date, .section--dark .post-card__lead { color: var(--text-on-dark-2); }
  .pager { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
  .article { display: grid; gap: 40px; grid-template-columns: minmax(0, 72ch) minmax(260px, 340px); align-items: start; }
  @media (max-width: 900px) { .article { grid-template-columns: 1fr; } }
  .article__cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; max-width: 72ch; }
  .case-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; }
  .case-card h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin-bottom: 14px; font-family: var(--font-text); }
  .case-card dl { display: grid; gap: 10px; font-size: 14px; }
  .case-card dt { color: var(--text-2); font-size: 12.5px; }
  .case-card dd { font-weight: 700; }
  .article__nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14.5px; }
  .article__nav a { text-decoration: none; color: var(--violet); font-weight: 700; max-width: 45%; }

  /* ---- misc ---- */
  .pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--paper-3); font-size: 13.5px; font-weight: 700; }
  .section--dark .pill { background: #ffffff14; }
  .pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .note { padding: 18px 22px; border-radius: 14px; background: var(--grad-soft); border-left: 3px solid var(--violet); }
  .quote { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; max-width: 30ch; }
  .img-round { border-radius: var(--radius); overflow: hidden; }
  .product-shot { background: radial-gradient(60% 60% at 50% 40%, #7c5cff33, transparent), var(--paper-3); border-radius: var(--radius); padding: 32px; display: grid; place-items: center; }
  .product-shot img { max-height: 320px; object-fit: contain; mix-blend-mode: multiply; }
  .ftr { background: var(--ink); color: var(--text-on-dark); padding-top: clamp(44px, 6vw, 80px); }
  .ftr__grid { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(auto-fit, minmax(170px, 1fr)); padding-bottom: 40px; }
  .ftr__brand { display: grid; gap: 16px; justify-items: start; max-width: 36ch; color: var(--text-on-dark-2); }
  .ftr__col h3 { font-family: var(--font-text); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-on-dark-2); margin-bottom: 14px; }
  .ftr__col h3 a { text-decoration: none; }
  .ftr__col ul { display: grid; gap: 8px; font-size: 14px; }
  .ftr__col a { text-decoration: none; }
  .ftr__col a:hover { color: var(--teal); }
  .ftr__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-block: 20px; border-top: 1px solid var(--line-dark); font-size: 13px; color: var(--text-on-dark-2); }
  .ftr__bottom a { text-decoration: none; }
  @media (max-width: 760px) { .ftr__grid { grid-template-columns: 1fr 1fr; } .ftr__brand { grid-column: 1 / -1; } }
}

@layer pages {
  /* ---- home hero ---- */
  .hero { position: relative; background: var(--ink); color: var(--text-on-dark); overflow: hidden; isolation: isolate; min-height: min(92dvh, 860px); display: grid; align-items: center; }
  .hero__canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .9; }
  .hero__glow { position: absolute; z-index: -2; border-radius: 50%; filter: blur(100px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
  .hero__glow--a { width: 600px; height: 600px; left: -160px; top: -200px; background: var(--violet); }
  .hero__glow--b { width: 520px; height: 520px; right: -120px; bottom: -220px; background: var(--teal); animation-delay: -7s; opacity: .4; }
  @keyframes drift { to { translate: 60px 40px; } }
  .hero__in { padding-block: clamp(60px, 9vw, 120px); display: grid; gap: 22px; max-width: 980px; }
  .hero h1 { font-size: clamp(34px, 5.6vw, 76px); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; }
  .hero .lead { color: var(--text-on-dark-2); max-width: 58ch; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
  .hero__facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line-dark); }
  .hero__scroll { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; width: 24px; height: 38px; border: 2px solid #ffffff55; border-radius: 14px; }
  .hero__scroll::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--teal); animation: wheel 1.8s infinite; }
  @keyframes wheel { 60% { translate: 0 12px; opacity: 0; } 61% { translate: 0; opacity: 0; } }
  .tags { display: flex; flex-wrap: wrap; gap: 8px; }
  .tag { padding: 7px 12px; border-radius: 999px; background: #ffffff12; border: 1px solid var(--line-dark); font-size: 13px; font-weight: 700; text-decoration: none; transition: background .2s; }
  .tag:hover { background: var(--grad); color: var(--ink); border-color: transparent; }

  /* ---- home: industry strip ---- */
  .industries { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .industry {
    position: relative; display: grid; align-content: end; gap: 4px; min-height: 150px; padding: 18px; border-radius: 18px; text-decoration: none;
    background: var(--ink-3); border: 1px solid var(--line-dark); color: var(--text-on-dark); overflow: hidden; isolation: isolate; transition: transform .3s var(--ease);
  }
  .industry::before { content: ""; position: absolute; z-index: -1; width: 160px; height: 160px; right: -50px; top: -60px; border-radius: 50%; background: var(--grad); filter: blur(40px); opacity: .35; transition: opacity .3s; }
  .industry:hover { transform: translateY(-4px); }
  .industry:hover::before { opacity: .8; }
  .industry__icon { font-size: 26px; margin-bottom: auto; }
  .industry__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
  .industry__sub { font-size: 12.5px; color: var(--text-on-dark-2); }

  /* ---- how it works band ---- */
  .band { display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; align-items: center; }
  @media (max-width: 900px) { .band { grid-template-columns: 1fr; } }
  .stat-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 4px; }
  .stat b { font-family: var(--font-display); font-size: clamp(26px, 3vw, 40px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .stat span { color: var(--text-2); font-size: 14px; }

  /* ---- contacts ---- */
  .contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
  .contact { padding: 26px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 8px; }
  .contact b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
  .contact a { font-family: var(--font-display); font-size: clamp(18px, 1.8vw, 24px); text-decoration: none; }
  .contact a:hover { color: var(--violet); }
  .map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 380px; background: var(--paper-3); }
  .map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

  /* ---- 404 ---- */
  .nf { min-height: 60dvh; display: grid; place-items: center; text-align: center; padding-block: 80px; }

  /* ---- admin ---- */
  .adm { background: var(--paper); min-height: 100dvh; }
  .adm__bar { background: var(--ink); color: var(--text-on-dark); }
  .adm__bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
  .adm__bar a { text-decoration: none; font-weight: 700; }
  .adm__bar form { margin-left: auto; }
  .adm__main { padding-block: 32px; display: grid; gap: 20px; }
  .adm table { width: 100%; border-collapse: collapse; background: var(--paper-2); border-radius: 14px; overflow: hidden; font-size: 14.5px; }
  .adm th, .adm td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
  .adm th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
  .adm tr:hover td { background: var(--paper-3); }
  .form { display: grid; gap: 18px; max-width: 900px; }
  .form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
  .form input[type="text"], .form input[type="date"], .form textarea, .form input[type="file"] {
    padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); font-weight: 500; width: 100%;
  }
  .form textarea { min-height: 90px; resize: vertical; }
  .form__row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .form__check { display: flex !important; align-items: center; gap: 10px; }
  .form__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .form .err { color: #c0392b; font-weight: 700; }
  .form .ok { color: #1f8f5a; font-weight: 700; }
  .editor { background: var(--paper-2); border-radius: 10px; }
  .editor .ql-container { min-height: 320px; font-family: var(--font-text); font-size: 15px; }
  .editor .ql-toolbar { border-radius: 10px 10px 0 0; }
  .editor .ql-container { border-radius: 0 0 10px 10px; }
  .case-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .cover-preview { max-width: 320px; border-radius: 10px; }
  .login { min-height: 100dvh; display: grid; place-items: center; background: var(--ink); }
  .login form { width: min(380px, 100% - 32px); background: var(--paper-2); padding: 32px; border-radius: 20px; display: grid; gap: 14px; }
}

@layer motion {
  .reveal { opacity: 0; translate: 0 22px; transition: opacity .7s var(--ease), translate .7s var(--ease); transition-delay: var(--d, 0ms); }
  .reveal.in { opacity: 1; translate: 0 0; }
  @supports (animation-timeline: view()) {
    .reveal { opacity: 1; translate: 0; transition: none; animation: reveal both linear; animation-timeline: view(); animation-range: entry 0% entry 32%; animation-delay: var(--d, 0ms); }
    @keyframes reveal { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
    .hero__in { animation: hero-fade both linear; animation-timeline: scroll(); animation-range: 0 60vh; }
    @keyframes hero-fade { to { opacity: .15; translate: 0 -40px; } }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; translate: 0; }
  }
}
