/* MIG Consult: счетоводни услуги
   Стил „Noir & Gold“: черно и метално злато, като модно списание.
   Playfair Display за заглавия (без курсив), Jost за текст.
   Сайтът умишлено има един и същ вид в светъл и тъмен режим на телефона.
   Цветовете се сменят само тук, в :root. */
:root {
  --noir: #0D0C0E;
  --noir-2: #19171B;
  --porcelain: #F4EFEB;
  --ivory: #FCFAF8;
  --ink: #1B1719;
  --muted-light: #6F6569;   /* текст върху порцелан */
  --muted-dark: #D2CBC8;    /* текст върху черно */
  --gold: #D4AF5A;          /* злато */
  --gold-deep: #D4AF5A;
  --gold-metal: linear-gradient(100deg, #A87B28 0%, #E9C977 28%, #FFF0B8 46%, #D7AE4F 62%, #9C7124 100%);
  --rouge: #A3203A;         /* червило, само за грешки */
  --hair-dark: rgba(212, 175, 90, .32);
  --hair-light: rgba(27, 23, 25, .14);

  --display: "Playfair Display", "Didot", Georgia, serif;
  --text: "Jost", "Futura", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--noir); color: var(--ivory); font: 300 17px/1.7 var(--text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 em, h2 em, blockquote em { font-style: normal; color: var(--gold); background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.metal { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--noir); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 16px; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* Места, които чакат истински данни. Махнете класа todo, когато се попълнят. */
.todo { background: rgba(230, 190, 60, .22); box-shadow: inset 0 -1px 0 #D9A92E; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }
.kicker { font-size: .72rem; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.light .kicker { color: var(--gold-deep); }

/* Бутони */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px;
  border: 1px solid #D4AF5A; background: var(--gold-metal); background-size: 160% 100%; background-position: 0 0; color: var(--noir); border-radius: 999px;
  font: 400 .82rem var(--text); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  font-weight: 500; transition: background-position .6s ease, box-shadow .3s;
}
.btn:hover { background-position: 100% 0; box-shadow: 0 10px 30px -12px rgba(212, 175, 90, .55); }
.link { font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid var(--gold); transition: color .3s; }
.link:hover { color: var(--gold); }

/* Горна лента */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--noir); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(13, 12, 14, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hair-dark); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; text-decoration: none; gap: 5px; }
.brand-mark { font-family: var(--display); font-size: 1.5rem; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: .34em; margin-right: -.34em; }
.brand-word { font-size: .56rem; letter-spacing: .62em; margin-right: -.62em; text-transform: uppercase; color: var(--gold); }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { text-decoration: none; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-dark); transition: color .3s; }
.nav a:hover { color: var(--ivory); }
.nav .nav-cta { color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 9px 18px; }
.menu-btn { display: none; width: 46px; height: 46px; background: none; border: 1px solid var(--hair-dark); border-radius: 50%; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 1px; background: var(--ivory); margin: 0 auto; position: relative; transition: transform .3s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -5px; } .bars::after { top: 5px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--noir); border-bottom: 1px solid var(--hair-dark);
    padding: 6px max(22px, env(safe-area-inset-right, 0px)) 22px max(22px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--hair-dark); font-size: .85rem; color: var(--ivory); }
  .nav .nav-cta { margin-top: 16px; text-align: center; border: 1px solid var(--gold); }
}

/* Начало */
.hero { position: relative; overflow: hidden; background: var(--noir); }
.hero-photo { position: relative; overflow: hidden; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 20%; animation: settle 2.4s cubic-bezier(.2,.7,.2,1) both; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,12,14,0) 45%, rgba(13,12,14,.7) 75%, var(--noir) 100%); }
.hero-in { position: relative; z-index: 2; margin-top: -120px; padding-bottom: 64px; }
.hero-text { display: grid; gap: 22px; max-width: 34rem; }
h1 { font-size: clamp(2.7rem, 9vw, 5.4rem); line-height: 1.02; letter-spacing: -.01em; }
h1 .ln { display: block; animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
h1 .ln:nth-child(2) { animation-delay: .12s; }
h1 .ln:nth-child(3) { animation-delay: .24s; }
.lead { color: var(--muted-dark); font-size: 1.08rem; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.hero-stats .hero-price { display: grid; gap: 2px; align-content: start; }
.hero-stats .hero-price span { margin: 0; }
.hero-price { display: flex; align-items: baseline; gap: 10px; padding-top: 20px; border-top: 1px solid var(--hair-dark); color: var(--muted-dark); font-size: .95rem; flex-wrap: wrap; }
.hero-price span { font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-right: 6px; }
.hero-price b { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--gold); background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (min-width: 900px) {
  .hero { min-height: 640px; display: flex; align-items: center; }
  .hero-photo { position: absolute; inset: 0 0 0 46%; }
  .hero-photo img { height: 100%; aspect-ratio: auto; object-position: 40% 25%; }
  .hero-photo::after { background: linear-gradient(90deg, var(--noir) 0%, rgba(13,12,14,.55) 22%, rgba(13,12,14,0) 50%), linear-gradient(0deg, rgba(13,12,14,.5), rgba(13,12,14,0) 30%); }
  .hero-in { width: 100%; margin-top: 0; padding-block: 96px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Лента с клиенти */
.for { border-block: 1px solid var(--hair-dark); overflow: hidden; background: var(--noir-2); }
.for-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.for-list { display: flex; list-style: none; margin: 0; padding: 18px 0; }
.for-list li { font-family: var(--display); font-size: 1.15rem; white-space: nowrap; padding: 0 30px; position: relative; color: var(--ivory); }
.for-list li::after { content: ""; position: absolute; right: -3px; top: 50%; width: 6px; height: 6px; border: 1px solid var(--gold); transform: translateY(-50%) rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Секции */
.section { padding-block: 92px; }
.light { background: var(--noir-2); color: var(--ivory); }
.dark { background: var(--noir); color: var(--ivory); }
.sec-head { display: grid; gap: 16px; max-width: 42rem; margin-bottom: 52px; }
.sec-head h2::after { content: ""; display: block; width: 64px; height: 1px; margin-top: 22px; background: var(--gold-metal); }
.sec-head.center h2::after { margin-inline: auto; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
h2 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.1; }
.sec-lead { font-size: 1.05rem; color: var(--muted-dark); max-width: 36em; }

/* Услуги */
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.services li { display: grid; gap: 10px; padding: 30px 0; border-top: 1px solid var(--hair-dark); align-content: start; }
.services h3 { font-size: 1.45rem; transition: color .3s; }
.services p { color: var(--muted-dark); max-width: 30em; }
@media (min-width: 720px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
@media (min-width: 1000px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 56px; }
  .services li { padding: 36px 0 40px; }
  .services li:hover h3 { color: var(--gold-deep); }
}

/* Цени */
.calc { max-width: 720px; margin: 0 auto 64px; display: grid; gap: 26px; padding: 34px clamp(20px, 5vw, 44px); border: 1px solid var(--hair-dark); border-radius: 28px; background: linear-gradient(160deg, var(--noir-2), var(--noir)); }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 12px; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted-dark); }
.seg-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 0 4px; border: 1px solid var(--hair-dark); border-radius: 999px; cursor: pointer; font-size: .95rem; transition: background .3s, color .3s, border-color .3s; }
.seg label:hover { border-color: var(--gold); }
.seg input:checked + label { background: var(--gold-metal); border-color: #D4AF5A; color: var(--noir); font-weight: 500; }
.seg input:focus-visible + label { outline: 1px solid var(--ivory); outline-offset: 3px; }
.calc-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-top: 22px; border-top: 1px solid var(--hair-dark); }
.calc-total span { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.calc-total output b { font-family: var(--display); font-weight: 400; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; }
.calc-total output.pulse b { display: inline-block; animation: rise .45s ease both; }

.menu { display: grid; gap: 48px; max-width: 980px; margin: 0 auto; }
.ptable h3 { font-size: 1.35rem; margin-bottom: 14px; color: var(--gold); }
.ptable ul { list-style: none; margin: 0; padding: 0; }
.ptable li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; transition: color .3s; }
.ptable li i { flex: 1; min-width: 20px; border-bottom: 1px dotted rgba(212, 175, 90, .5); transform: translateY(-4px); }
.ptable li b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; white-space: nowrap; }
.ptable li span { color: var(--muted-dark); }
.ptable li.is-active span, .ptable li.is-active b { color: var(--gold); }
.note { text-align: center; margin: 44px auto 0; color: var(--muted-dark); font-size: .95rem; max-width: 40em; }
@media (min-width: 820px) { .menu { grid-template-columns: 1fr 1fr; gap: 72px; } }

/* Стъпки */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.steps li { display: grid; gap: 10px; align-content: start; }
.step-n { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--gold); background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; justify-self: start; }
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--muted-dark); }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
  .steps li { padding-top: 26px; border-top: 1px solid var(--hair-dark); }
}

/* За мен */
.about-in { display: grid; gap: 30px; max-width: 980px; }
blockquote { margin: 0; font-family: var(--display); font-size: clamp(2rem, 5.6vw, 3.6rem); line-height: 1.15; text-wrap: balance; }
blockquote::before { content: "“"; display: block; font-size: 1.6em; line-height: .6; color: var(--gold); margin-bottom: 10px; }
.about-text { display: grid; gap: 14px; max-width: 38em; padding-left: 22px; border-left: 1px solid var(--gold); }
.about-text p { color: var(--muted-dark); }
.about-text .sign { font-family: var(--display); font-size: 1.6rem; color: var(--ivory); }

/* Контакт */
.contact-in { display: grid; gap: 48px; }
.contact-info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cards { margin: 18px 0 0; display: grid; }
.cards div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--hair-dark); align-items: baseline; }
.cards dt { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.cards dd { margin: 0; overflow-wrap: anywhere; font-size: 1.05rem; }
.cards a { text-decoration: none; }
.form { display: grid; gap: 20px; padding: clamp(24px, 5vw, 44px); background: var(--noir); border: 1px solid var(--hair-dark); border-radius: 28px; box-shadow: 0 30px 80px -40px rgba(212, 175, 90, .25); min-width: 0; }
.field { display: grid; gap: 4px; }
.field label { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.field input, .field select, .field textarea {
  width: 100%; font: 300 1.05rem var(--text); color: var(--ivory); background: transparent;
  border: 0; border-bottom: 1px solid var(--hair-dark); border-radius: 0; padding: 10px 0;
  transition: border-color .3s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold-deep); }
.field.err input { border-bottom-color: #E58A8A; }
.field select option { background: var(--noir); color: var(--ivory); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted-dark); }
.check input { margin-top: 5px; accent-color: #D4AF5A; width: 17px; height: 17px; flex: none; }
.form .btn { justify-self: start; }
.form-msg { font-size: .95rem; min-height: 1.4em; }
.form-msg.bad { color: #E58A8A; }
@media (min-width: 920px) { .contact-in { grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: start; } }

/* Долна лента */
.foot { background: var(--noir); border-top: 1px solid var(--hair-dark); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; padding-block: 34px; font-size: .85rem; color: var(--muted-dark); }
.foot p a { text-decoration: none; border-bottom: 1px solid var(--hair-dark); }

/* Поверителност */
.doc { padding-block: 64px 90px; }
.doc-in { max-width: 44em; display: grid; gap: 14px; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.45rem; margin-top: 18px; }
.doc p { color: var(--muted-dark); }
.small { font-size: .85rem; }
.back { text-decoration: none; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

/* Появяване при скрол: видимо и без JS */
.js .reveal { opacity: .3; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.services li.reveal:nth-child(3n+2), .steps li.reveal:nth-child(2) { transition-delay: .1s; }
.services li.reveal:nth-child(3n), .steps li.reveal:nth-child(3) { transition-delay: .2s; }
.steps li.reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .for-track { width: auto; }
  .for-list[aria-hidden] { display: none; }
  .for-list { flex-wrap: wrap; justify-content: center; }
}
