/* M-LevelUp: обща визуална система на сайта.
   Идентичност: Literata за заглавия, IBM Plex Sans за текст,
   стоманено синьо. Същата като в докладите на кантората. */
:root {
  --paper: #f7f9fb; --surface: #ffffff;
  --ink: #1c2430; --muted: #5c6a7d; --line: #dfe5ec;
  --brand: #1f4e79; --brand-dark: #173c5e; --brand-soft: #e8eff6;
  --gold: #b98036; --good: #1e7d43; --good-bg: #e8f6ee;
  --risk: #a05a00; --risk-bg: #fdf3e3;
  --shadow: 0 1px 3px rgba(28,36,48,.08);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.6;
  font-size: 16.5px; }
img { max-width: 100%; }
a { color: var(--brand); }

/* --- глава --- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50; }
.topbar .in { max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: "Literata", Georgia, serif; font-weight: 700;
  font-size: 1.25rem; color: var(--brand); text-decoration: none;
  line-height: 1.1; }
.wordmark small { display: block; font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500; font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: 5px; }
nav.main { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--ink); text-decoration: none; font-size: .95rem;
  font-weight: 500; }
nav.main a:hover { color: var(--brand); }
nav.main a.cta { background: var(--brand); color: #fff; padding: 9px 20px;
  border-radius: 9px; font-weight: 600; }
nav.main a.cta:hover { background: var(--brand-dark); }
.navtoggle { display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; font-size: 1.2rem; padding: 4px 12px; cursor: pointer;
  color: var(--ink); }
@media (max-width: 860px) {
  .navtoggle { display: block; }
  nav.main { display: none; width: 100%; flex-direction: column;
    align-items: flex-start; gap: 12px; padding: 10px 0 6px; }
  nav.main.open { display: flex; }
  .topbar .in { flex-wrap: wrap; }
}

/* --- тяло --- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 56px 0; }
h1 { font-family: "Literata", Georgia, serif; font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15;
  text-wrap: balance; margin-bottom: 16px; }
h2 { font-family: "Literata", Georgia, serif; font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2;
  margin-bottom: 14px; text-wrap: balance; }
h3 { font-family: "Literata", Georgia, serif; font-weight: 600;
  font-size: 1.15rem; margin-bottom: 8px; }
p { margin-bottom: 12px; max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 10px; }

/* --- герой --- */
.hero { background: linear-gradient(180deg, var(--surface), var(--paper));
  border-bottom: 1px solid var(--line); padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px;
  align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.btnrow { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600;
  padding: 13px 26px; border-radius: 10px; font-size: 1.02rem; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border: 1.5px solid var(--line); color: var(--ink);
  background: var(--surface); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.credbox { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px 26px; box-shadow: var(--shadow); }
.credbox ul { list-style: none; padding: 0; }
.credbox li { padding: 9px 0 9px 30px; position: relative;
  border-bottom: 1px solid var(--line); font-size: .95rem; }
.credbox li:last-child { border-bottom: 0; }
.credbox li::before { content: ""; position: absolute; left: 2px; top: 16px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--good); }

/* --- карти --- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin-top: 8px; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; }
.card p { font-size: .95rem; color: var(--muted); flex: 1; }
.card .more { font-weight: 600; font-size: .93rem; text-decoration: none; }
.card .price { font-family: "IBM Plex Mono", monospace; font-size: .85rem;
  color: var(--gold); font-weight: 500; margin-bottom: 8px; }

/* --- процес --- */
.steps { counter-reset: s; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px; position: relative; }
.step::before { counter-increment: s; content: counter(s);
  font-family: "Literata", Georgia, serif; font-weight: 700;
  display: inline-flex; width: 34px; height: 34px; align-items: center;
  justify-content: center; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); margin-bottom: 10px; }
.step p { font-size: .92rem; color: var(--muted); margin: 0; }

/* --- таблици --- */
.tablebox { overflow-x: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 540px; }
th, td { text-align: left; padding: 13px 18px; border-top: 1px solid var(--line);
  font-size: .95rem; }
thead th { border-top: 0; font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
td.num { font-family: "IBM Plex Mono", monospace; white-space: nowrap; }
.note { color: var(--muted); font-size: .85rem; }

/* --- ЧЗВ --- */
details.faq { background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px 22px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0;
  list-style: none; position: relative; padding-right: 30px; }
details.faq summary::after { content: "+"; position: absolute; right: 2px;
  top: 12px; font-size: 1.3rem; color: var(--brand); }
details.faq[open] summary::after { content: "−"; }
details.faq p { color: var(--muted); font-size: .95rem; padding-bottom: 14px; }

/* --- формуляр --- */
form.inquiry { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
form.inquiry label { display: block; font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  margin: 16px 0 6px; }
form.inquiry input, form.inquiry textarea, form.inquiry select {
  width: 100%; font-family: inherit; font-size: 1rem; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); }
form.inquiry input:focus, form.inquiry textarea:focus,
form.inquiry select:focus { outline: none; border-color: var(--brand); }
form.inquiry textarea { resize: vertical; }
.typerow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px; }
.typerow input { display: none; }
.typerow label.type { margin: 0; padding: 14px; text-align: center;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
  font-size: .9rem; text-transform: none; letter-spacing: 0;
  font-weight: 600; color: var(--ink); background: #fff; }
.typerow input:checked + label.type { border-color: var(--brand);
  background: var(--brand-soft); color: var(--brand); }
.formnote { font-size: .82rem; color: var(--muted); margin-top: 14px; }
#formmsg { margin-top: 12px; font-size: .95rem; }

/* --- лента с акцент --- */
.band { background: var(--brand); color: #fff; }
.band h2 { color: #fff; }
.band p { color: #cddae8; }
.band .btn.primary { background: #fff; color: var(--brand); }

/* --- подножие --- */
footer { background: var(--surface); border-top: 1px solid var(--line);
  padding: 40px 0 30px; margin-top: 40px; }
footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } }
footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 10px; }
footer a { color: var(--ink); text-decoration: none; display: block;
  padding: 3px 0; font-size: .93rem; }
footer a:hover { color: var(--brand); }
footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line);
  padding-top: 16px; color: var(--muted); font-size: .8rem; }

/* ===================== ВЕРСИЯ 2: корпоративно-технологичен слой ========== */

/* Тъмният герой: юридическа тежест + технологична мрежа */
.hero2 { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #10263e 0%, #173c5e 55%, #1f4e79 100%);
  border-bottom: 0; padding: 88px 0 84px; }
.hero2::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
  mask-image: radial-gradient(ellipse 90% 90% at 70% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 70% 20%, #000 30%, transparent 75%); }
.hero2 .wrap { position: relative; display: grid;
  grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero2 .wrap { grid-template-columns: 1fr; } }
.hero2 h1 { color: #fff; }
.hero2 .lede { color: #b9cadd; }
.hero2 .eyebrow { color: #d9a45b; }
.hero2 .btn.ghost { background: rgba(255,255,255,.06); color: #fff;
  border-color: rgba(255,255,255,.25); }
.hero2 .btn.ghost:hover { border-color: #fff; color: #fff; }
.hero2 .btn.primary { background: #fff; color: var(--brand); }
.hero2 .btn.primary:hover { background: #e8eff6; }

/* Илюстрацията: плаващ сертификат с печат */
.heroart { position: relative; min-height: 340px; }
.heroart svg { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.35)); }
@media (prefers-reduced-motion: no-preference) {
  .float-a { animation: floaty 7s ease-in-out infinite; }
  .float-b { animation: floaty 9s ease-in-out 1.2s infinite; }
  .float-c { animation: floaty 8s ease-in-out 2.4s infinite; }
  @keyframes floaty { 0%,100% { transform: translateY(0); }
    50% { transform: translateY(-12px); } }
  .pulse-ring { animation: pulsering 3.2s ease-out infinite; transform-origin: center; }
  @keyframes pulsering { 0% { opacity: .7; transform: scale(.7); }
    100% { opacity: 0; transform: scale(1.5); } }
}

/* Лента на доверието с броячи */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding-top: 26px; padding-bottom: 26px; }
@media (max-width: 760px) { .trust .wrap { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
.tstat { text-align: center; }
.tstat b { display: block; font-family: "Literata", Georgia, serif;
  font-size: 1.7rem; color: var(--brand); font-weight: 700;
  font-variant-numeric: tabular-nums; }
.tstat span { font-size: .8rem; color: var(--muted); }

/* Икони в картите */
.cicon { width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-soft); display: flex; align-items: center;
  justify-content: center; margin-bottom: 14px; }
.cicon svg { width: 24px; height: 24px; stroke: var(--brand); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(28,36,48,.12); }
.step { transition: transform .25s ease, box-shadow .25s ease; }
.step:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(28,36,48,.1); }

/* Сертификатни значки */
.badges { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.badge2 { display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px; padding: 10px 18px; backdrop-filter: blur(4px); }
.badge2 svg { width: 30px; height: 30px; flex-shrink: 0; }
.badge2 div { line-height: 1.25; }
.badge2 b { font-size: .85rem; display: block; color: #fff; }
.badge2 span { font-size: .72rem; color: #b9cadd; }

/* Страничен герой на вътрешните страници */
.pagehero { background: linear-gradient(120deg, #10263e, #1f4e79);
  color: #fff; padding: 54px 0 46px; position: relative; overflow: hidden; }
.pagehero::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 24px 24px; opacity: .4;
  mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%); }
.pagehero .wrap { position: relative; }
.pagehero h1 { color: #fff; margin-bottom: 8px; }
.pagehero .lede { color: #b9cadd; }
.pagehero .eyebrow { color: #d9a45b; }

/* Разкриване при скрол */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
}

/* ===================== Бутоните: блясък, повдигане, вълна ================ */
.btn, nav.main a.cta, form.inquiry button {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease,
              background-color .18s ease; }
.btn:hover, nav.main a.cta:hover, form.inquiry button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16, 38, 62, .28); }
.btn:active, nav.main a.cta:active, form.inquiry button:active {
  transform: translateY(0) scale(.97); box-shadow: 0 3px 8px rgba(16,38,62,.2);
  transition-duration: .06s; }

/* Блясъкът: ивица светлина минава през бутона при посочване */
@media (prefers-reduced-motion: no-preference) {
  .btn::before, nav.main a.cta::before, form.inquiry button::before {
    content: ""; position: absolute; top: -20%; bottom: -20%;
    left: -75%; width: 45%; z-index: -1;
    background: linear-gradient(105deg, transparent,
                rgba(255,255,255,.42), transparent);
    transform: skewX(-18deg); transition: none; pointer-events: none; }
  .btn:hover::before, nav.main a.cta:hover::before,
  form.inquiry button:hover::before {
    animation: sheen .7s ease forwards; }
  @keyframes sheen { to { left: 130%; } }
  .btn.ghost::before { background: linear-gradient(105deg, transparent,
                rgba(31,78,121,.16), transparent); }
}

/* Вълната при натискане (слага я site.js от точката на клика) */
span.ripple { position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.45); transform: scale(0);
  animation: rippleout .55s ease-out forwards; z-index: -1; }
.btn.ghost span.ripple, .typerow label.type span.ripple {
  background: rgba(31,78,121,.18); }
@keyframes rippleout { to { transform: scale(2.6); opacity: 0; } }

/* Стрелките в "Научете повече" се плъзват напред */
.card .more { transition: letter-spacing .2s ease; }
.card .more:hover { letter-spacing: .02em; }
.card .more:hover::after { content: ""; }

/* ===================== Структурирана навигация с падащи менюта =========== */
.navdrop { position: relative; }
.navdrop > button { background: none; border: 0; font: inherit; font-weight: 500;
  font-size: .95rem; color: var(--ink); cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 5px; }
.navdrop > button:hover { color: var(--brand); }
.navdrop > button::after { content: ""; width: 7px; height: 7px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.navdrop.open > button::after,
.navdrop:hover > button::after { transform: rotate(225deg) translateY(-1px); }
.dropmenu { position: absolute; top: calc(100% + 12px); left: -14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 16px 36px rgba(16,38,62,.16);
  padding: 8px; min-width: 240px; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: opacity .18s ease,
  transform .18s ease, visibility .18s; z-index: 60; }
.dropmenu::before { content: ""; position: absolute; top: -12px; left: 0;
  right: 0; height: 12px; }
.navdrop:hover .dropmenu, .navdrop.open .dropmenu { opacity: 1;
  visibility: visible; transform: none; }
.dropmenu a { display: block; padding: 9px 14px; border-radius: 8px;
  font-size: .93rem; }
.dropmenu a:hover { background: var(--brand-soft); color: var(--brand); }
.dropmenu a small { display: block; color: var(--muted); font-size: .74rem;
  font-weight: 400; }
@media (max-width: 860px) {
  .navdrop { width: 100%; }
  .dropmenu { position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: 0; padding: 2px 0 2px 14px;
    min-width: 0; display: none; }
  .navdrop.open .dropmenu { display: block; }
  .navdrop:not(.open):hover .dropmenu { display: none; }
}
