:root {
  --navy: #110737;
  --navy-2: #0d0943;
  --gold: #e5c365;
  --gold-dark: #8b6818;
  --cream: #fbfaf6;
  --text: #1d1b2b;
  --muted: #6b6880;
  --line: #e7e3d6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(17, 7, 55, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 16px; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-alt { background: var(--cream); }
.section-lead { color: var(--muted); max-width: 680px; margin-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: 8px; }
.link { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.danger { color: #b3261e; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 32px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary {
  background: linear-gradient(135deg, #fbeeb5 0%, #e5c365 40%, #c4972b 60%, #f1d98a 100%);
  color: var(--navy);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 14px rgba(196, 151, 43, .35);
}
.btn-primary:hover { background: var(--navy); color: var(--gold); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--gold); }
.btn-block { display: block; width: 100%; text-align: center; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold-dark); font-weight: 800; font-size: 20px; }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--navy); font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: var(--gold-dark); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn { color: var(--gold-dark); display: inline-flex; }
.phone { color: var(--navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; overflow: hidden; }
.hero h1, .hero h2 { color: #fff; }
.hero .lead { font-size: 19px; opacity: .9; max-width: 560px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: end; }
.hero-text { padding: 90px 0; align-self: center; }
.hero-media { position: relative; align-self: end; }
.hero-media::before {
  content: ""; position: absolute; left: -2%; right: -2%; top: -12%; bottom: 0;
  background: radial-gradient(ellipse closest-side at 50% 40%, rgba(229, 195, 101, .45), rgba(229, 195, 101, .12) 60%, transparent 100%);
}
.hero-media::after {
  content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 36px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55), transparent 70%);
}
.hero-media img { position: relative; z-index: 1; margin: 0 auto; width: 100%; max-width: 680px; height: auto; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero .btn-ghost { color: #fff; border-color: var(--gold); }
.hero .btn-ghost:hover { background: var(--gold); color: var(--navy); }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: center; }
.portrait img { border-radius: var(--radius); box-shadow: var(--shadow); }
.stats { display: flex; gap: 30px; list-style: none; padding: 0; margin: 28px 0 0; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 28px; color: var(--gold-dark); }
.stats span { color: var(--muted); font-size: 14px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-kind { color: var(--gold-dark); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 6px; }
.card-foot { margin-top: auto; padding-top: 12px; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.price-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; background: #fff; }
.price-hit { border: 2px solid var(--gold); box-shadow: var(--shadow); }
.badge { position: absolute; top: -12px; right: 20px; background: var(--gold); color: var(--navy); font-weight: 700; font-size: 13px; padding: 4px 14px; border-radius: 20px; }
.price { font-size: 30px; font-weight: 800; color: var(--navy); margin: 8px 0 16px; }
.features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.features li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 15px; }
.features li::before { content: "●"; color: var(--gold); position: absolute; left: 0; font-size: 10px; top: 13px; }

/* reviews */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.review { margin: 0; background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.review blockquote { margin: 0 0 18px; font-style: italic; color: var(--text); flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 14px; }
.review img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; margin-top: 10px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.post-card img { border-radius: 12px; margin-bottom: 14px; width: 100%; height: 170px; object-fit: cover; }
.post-card h2, .post-card h3 { font-size: 20px; }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: var(--navy); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--gold-dark); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.search-form { display: flex; gap: 10px; max-width: 560px; margin: 20px 0 36px; }
.search-form input { flex: 1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 40px; flex-wrap: wrap; }
.crumbs { margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.article { max-width: 780px; }
.article-cover { border-radius: var(--radius); margin: 26px 0; width: 100%; }
.prose { font-size: 18px; line-height: 1.75; }
.prose h2 { margin-top: 36px; }
.cta-box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-top: 40px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; color: var(--navy); }
.form label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #d6d1e3; border-radius: 12px; background: #fff; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.form .small { font-weight: 400; }
.form-wide { max-width: 760px; }
.form-actions { display: flex; gap: 14px; align-items: center; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; opacity: 0; }
.mono { font-family: Consolas, monospace; }
.field-row { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.current-image { display: flex; flex-direction: column; gap: 8px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
fieldset label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
fieldset input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #d6d1e3; border-radius: 10px; }

.notice { padding: 14px 18px; border-radius: 12px; margin: 16px 0; font-weight: 500; }
.notice.ok { background: #e7f6ec; color: #1d6b36; }
.notice.error { background: #fdeceb; color: #9b1c15; }

/* contacts */
.contacts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.contact-info p { font-size: 18px; }
.contact-info a { text-decoration: none; }
.socials { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; }
.socials a { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.socials a:hover { text-decoration: underline; }

/* dialog */
.dialog { border: 0; border-radius: var(--radius); padding: 28px; width: min(440px, 92vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(17, 7, 55, .55); }
.dialog:not([open]) { display: none; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-close { background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--navy); line-height: 1; }

/* footer */
.site-footer { background: var(--navy); color: #d9d6e8; padding: 60px 0 0; }
.site-footer a { color: #d9d6e8; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .socials a { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
.footer-name { color: #fff; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.footer-title { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; margin-bottom: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: #aaa6c4; }
.site-footer .muted { color: #aaa6c4; }

/* admin */
body.admin { background: #f4f3f8; display: flex; min-height: 100vh; }
.admin-side { width: 260px; background: var(--navy); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; flex-shrink: 0; }
.admin-brand { color: var(--gold); font-weight: 800; font-size: 20px; margin: 0; }
.admin-side nav { display: flex; flex-direction: column; gap: 6px; }
.admin-side nav a { color: #d9d6e8; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.admin-side nav a:hover, .admin-side nav a.active { background: rgba(229, 195, 101, .15); color: var(--gold); }
.admin-side form { margin-top: auto; }
.admin-side .btn-ghost { color: #fff; border-color: #fff; }
.admin-side .btn-ghost:hover { background: #fff; color: var(--navy); }
.admin-main { flex: 1; padding: 36px 40px; min-width: 0; }
.admin-main h1 { font-size: 28px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.admin .form label { color: var(--navy); }
.admin .form { background: #fff; padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.actions { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.actions form { margin: 0; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; background: #eceaf3; font-size: 13px; color: var(--muted); }
.tag-ok { background: #e7f6ec; color: #1d6b36; }
.login-box { max-width: 380px; margin: 10vh auto; background: #fff; padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.login-box .form { background: none; padding: 0; box-shadow: none; }
body.admin:has(.login-box) { display: block; }
body.admin:has(.login-box) .admin-main { padding: 20px; }

/* responsive */
@media (max-width: 1000px) {
  .main-nav, .phone { display: none; }
  .burger { display: block; }
  .main-nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 76px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 20px;
  }
  .main-nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hero-grid, .about-grid, .contacts-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero-text { padding: 80px 0 40px; }
  .hero-media { max-width: 560px; width: 100%; margin: 0 auto; }
  .admin-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .admin-side .admin-brand { width: 100%; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .admin-side nav a { padding: 8px 10px; font-size: 14px; }
  .admin-side form { margin: 0 0 0 auto; }
  body.admin { flex-direction: column; }
  .admin-main { padding: 20px 16px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .hero-text { padding: 56px 0 28px; }
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .hero .lead { font-size: 17px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; text-align: center; }
  .stats { gap: 20px; }
  .cards, .pricing, .post-grid, .reviews { grid-template-columns: 1fr; }
  .card img { height: 180px; }
  .header-inner { height: 64px; gap: 12px; }
  .brand img { width: 40px; height: 40px; }
  .main-nav.open { top: 64px; }
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; text-align: center; }
  .footer-bottom { flex-direction: column; }
  .dialog { padding: 20px; }
  .table th, .table td { padding: 10px; }
  .field-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 420px) {
  .brand span { display: none; }
  .header-actions { gap: 10px; }
}
