/* Madenov Legal Group — public website. Colours and fonts match the CRM and the client app. */
:root {
  --bg: #ffffff;
  --soft: #f3f4fb;
  --brand: #1a1f7c;
  --brand-2: #2a31a8;
  --brand-soft: #e7e9f7;
  --ink: #16202c;
  --muted: #5d6876;
  --line: #dde2ec;
  --gold: #b07a2a;
  --gold-2: #96661f;
  --wa: #1f9d55;
  --radius: 16px;
  --serif: "PT Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--brand); margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 54px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 12px; font: 600 16px/1.2 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #188546; }
.btn-gold { background: var(--gold); color: #fff; width: 100%; }
.btn-gold:hover { background: var(--gold-2); }
.btn-light { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); flex: none; }
.brand b { display: block; font: 700 19px/1.1 var(--serif); }
.brand small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.brand-white { color: #fff; }
.brand-white small { color: #c9cdf0; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); border-bottom-color: var(--gold); }
.nav-wa { display: none !important; }
.lang { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); text-decoration: none; font-weight: 600; font-size: 14px; }
.lang .ic { width: 16px; height: 16px; }
.top-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.burger { display: none; background: none; border: 0; padding: 8px; color: var(--brand); cursor: pointer; }
.burger .ic { width: 28px; height: 28px; }

/* hero */
.hero { background: linear-gradient(160deg, var(--brand-soft) 0%, #fff 70%); padding: 64px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { font-size: 20px; color: var(--ink); max-width: 640px; }
.hero-logo { justify-self: center; width: min(360px, 100%); filter: drop-shadow(0 18px 30px rgba(26, 31, 124, .12)); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.lead { font-size: 19px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.fact b { font: 700 28px/1 var(--serif); color: var(--brand); white-space: nowrap; }
.fact span { color: var(--muted); font-size: 15px; line-height: 1.4; }

/* sections */
.sec { padding: 72px 0; }
.sec-soft { background: var(--soft); }
.sec-title { text-align: center; }
.sec-title.left { text-align: left; margin-top: 40px; }
.sec-lead { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 36px; }
.split .sec-lead { text-align: left; margin-left: 0; }
.split .sec-title { text-align: left; }
.sec-more { text-align: center; margin-top: 28px; }
.sec-more a { font-weight: 600; text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, border-color .2s, transform .2s; }
.card:hover { border-color: var(--brand-soft); box-shadow: 0 16px 40px rgba(26, 31, 124, .1); transform: translateY(-2px); }
.card-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15px; flex: 1; }
.card-more { color: var(--brand-2); font-weight: 600; font-size: 15px; }
.how { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.how li { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.how-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 18px var(--serif); margin-bottom: 14px; }
.how p, .why p { color: var(--muted); font-size: 15px; margin: 0; }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 36px; }
.why > div { border-top: 3px solid var(--gold); padding-top: 18px; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 32px; }
.case { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.case-tag { font-size: 13px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.case p { flex: 1; }
.case-result { display: flex; gap: 10px; color: #1d6b3c; background: #e6f4ec; border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.prices { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.price-row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row b { color: var(--brand); white-space: nowrap; }
.faq h2 { text-align: left; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 32px; }
.article-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); }
.article-card:hover { border-color: var(--brand-soft); box-shadow: 0 16px 40px rgba(26, 31, 124, .08); }
.article-card p { color: var(--muted); font-size: 15px; margin: 0; }
.article-meta { font-size: 13px; color: var(--muted); }

/* inner pages */
.page-head { background: linear-gradient(160deg, var(--brand-soft) 0%, #fff 80%); padding: 36px 0 44px; }
.page-head .lead { max-width: 780px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.doc { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.prose { max-width: 760px; }
.prose h2 { font-size: 27px; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checks li { display: flex; gap: 10px; margin-bottom: 10px; }
.checks .ic { color: var(--wa); margin-top: 3px; }
.checks.small { margin-top: 24px; font-size: 15px; color: var(--muted); }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.2em; }
.steps-list li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 14px; min-height: 32px; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 700 15px/32px var(--serif); text-align: center; }
.note { background: #fbf4e8; border-left: 4px solid var(--gold); border-radius: 10px; padding: 16px 20px; margin: 0 0 1.2em; color: #4a3a1f; display: flex; gap: 10px; align-items: flex-start; }
.note b { color: var(--ink); }
.side { position: sticky; top: 96px; }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; box-shadow: 0 16px 40px rgba(26, 31, 124, .07); display: grid; gap: 12px; }
.side-box p { color: var(--muted); font-size: 14px; margin: 0; }
.side-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.side-price { font: 700 30px/1.1 var(--serif); color: var(--brand); }
.side-links { list-style: none; padding: 0; margin: 0; }
.side-links li { padding: 6px 0; }
.person { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.person-photo { aspect-ratio: 1; border-radius: var(--radius); background: var(--brand-soft); display: grid; place-items: center; padding: 28px; }
.person h2 { margin-bottom: .2em; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 28px; }
.contact-item { display: flex; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-item > .ic { color: var(--brand); width: 26px; height: 26px; }
.contact-item p { margin: 4px 0; font-weight: 600; }
.contact-item small { color: var(--muted); }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }

/* request form */
.cta { background: var(--brand); color: #fff; padding: 72px 0; }
.cta-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.cta h2 { color: #fff; }
.cta p { color: #d7daf5; }
.cta-or { margin-top: 28px; font-weight: 600; color: #fff !important; }
.cta-links { display: flex; flex-wrap: wrap; gap: 12px; }
.lead-form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .2); }
.lead-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lead-form input, .lead-form select, .lead-form textarea { font: 16px var(--sans); color: var(--ink); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
.lead-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.lead-form .consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.lead-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-size: 15px; min-height: 1px; }
.form-msg.ok { color: #1d6b3c; background: #e6f4ec; padding: 12px 14px; border-radius: 10px; }
.form-msg.bad { color: #9a2f28; background: #f9e3e1; padding: 12px 14px; border-radius: 10px; }
.lead-form [aria-invalid="true"] { border-color: #c0392b; }

/* footer */
.foot { background: #10144f; color: #c9cdf0; padding: 56px 0 24px; font-size: 15px; }
.foot-in { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 40px; }
.foot h3 { color: #fff; font-size: 17px; font-family: var(--sans); font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: #c9cdf0; }
.foot a:hover { color: #fff; }
.foot p { margin-top: 16px; }
.foot-contacts li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contacts .ic { width: 18px; height: 18px; margin-top: 3px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid #2a2f6e; margin-top: 40px; padding-top: 20px; font-size: 14px; }
.float-wa { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.float-wa .ic { width: 28px; height: 28px; }

/* language choice on the first visit */
.langpick { position: fixed; inset: 0; z-index: 100; background: rgba(16, 20, 79, .55); display: grid; place-items: center; padding: 20px; }
.langpick[hidden] { display: none; }
.langpick-box { background: #fff; border-radius: 20px; padding: 32px 28px; text-align: center; max-width: 420px; width: 100%; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.langpick-box h2 { font-size: 22px; margin: 16px 0 22px; }
.langpick-btns { display: grid; gap: 12px; }
.langpick-btns .btn { font-size: 18px; padding: 16px; }

/* tablets and phones */
@media (max-width: 1080px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, .08); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-wa { display: flex !important; gap: 8px; align-items: center; color: var(--wa) !important; border-bottom: 0 !important; }
  .burger { display: inline-flex; }
  .lang { margin-left: auto; }
  .how { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 28px; }
  .hero-in, .split, .doc, .cta-in, .person, .foot-in { grid-template-columns: 1fr; gap: 32px; }
  .hero-logo { display: none; }
  .hero .lead { font-size: 18px; }
  .facts { grid-template-columns: 1fr; margin-top: 28px; gap: 10px; }
  .sec, .cta { padding: 48px 0; }
  .side { position: static; }
  .person-photo { max-width: 220px; }
  .top-phone span { display: none; }
  .brand small { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .how { grid-template-columns: 1fr; }
  .hero-btns .btn, .cta-links .btn { width: 100%; }
  .price-row { flex-direction: column; gap: 4px; }
  .brand b { font-size: 16px; }
  .brand img { width: 40px; height: auto; }
  .top-in { gap: 8px; min-height: 64px; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand b { font-size: 15px; }
  .lang { padding: 7px 8px; }
  .lang .ic { display: none; }
  .burger { padding: 6px; }
  .contact-grid, .cards, .cases, .articles { grid-template-columns: 1fr; }
}
