:root {
  --paper: #faf7f0;
  --bg: var(--paper);
  --fg: #1a1611;
  --muted: #f2ecdd;
  --muted-fg: #7c7364;
  --border: #e7dfcb;
  --primary: #18140f;
  --primary-fg: #faf7f0;
  --ring: #b3872f;
  --radius: 12px;
  --radius-lg: 22px;

  --ink: #0d0f14;
  --ink-2: #171a22;
  --ink-border: rgba(255, 255, 255, 0.1);
  --paper-text: rgba(250, 247, 240, 0.86);
  --paper-text-dim: rgba(250, 247, 240, 0.58);

  --gold: #b3872f;
  --gold-2: #d9b163;
  --gold-soft: rgba(179, 135, 47, 0.13);

  --emerald: #047857;
  --emerald-bg: #ecfdf5;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #b91c1c;
  --red-bg: #fef2f2;

  --shadow-sm: 0 1px 2px rgba(24, 18, 6, 0.06);
  --shadow-md: 0 14px 36px -14px rgba(24, 18, 6, 0.22);
  --shadow-gold: 0 10px 28px -8px rgba(179, 135, 47, 0.45);

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.01em; font-family: var(--font-serif); font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.muted { color: var(--muted-fg); }
.center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
main { flex: 1; display: flex; flex-direction: column; }
.hero:last-child { flex: 1 0 auto; display: flex; align-items: center; }
.hero:last-child .container { padding-top: 64px; padding-bottom: 64px; }

/* ── Reveal-on-scroll ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(250, 247, 240, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: 0 6px 24px -16px rgba(24,18,6,.35); background: rgba(250, 247, 240, 0.94); }
.site-header .container { min-height: 64px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding-top: 8px; padding-bottom: 8px; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--font-serif); font-size: 17px; letter-spacing: .01em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #211906; box-shadow: var(--shadow-gold); }
.brand-mark svg { width: 17px; height: 17px; }

.site-footer { margin-top: auto; border-top: none; background: var(--ink); color: var(--paper-text-dim); position: relative; overflow: hidden; }
.site-footer .container { padding: 56px 20px 0; position: relative; z-index: 1; }
.site-footer .brand { color: var(--paper-text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-family: var(--font-sans); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; color: var(--gold-2); font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; color: var(--paper-text-dim); }
.footer-grid a:hover { color: var(--gold-2); }
.trust-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ink-border); font-size: 13px; color: var(--paper-text-dim); }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.copyright { margin-top: 28px; border-top: 1px solid var(--ink-border); padding: 20px 0; color: var(--paper-text-dim); font-size: 13px; position: relative; z-index: 1; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--primary); color: var(--primary-fg); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .15s ease, background .15s ease;
  font-family: var(--font-sans);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.28) 40%, transparent 60%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); opacity: 1; }
.btn:hover::after { transform: translateX(120%); }
.btn-outline { background: var(--bg); color: var(--fg); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-outline-light { background: rgba(255,255,255,.04); color: var(--paper-text); border-color: rgba(255,255,255,.22); }
.btn-outline-light:hover { background: rgba(255,255,255,.09); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--muted); }
.btn-sm { height: 33px; padding: 0 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-success { background: var(--emerald); color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #211906; box-shadow: var(--shadow-gold); }
.btn-gold:hover { box-shadow: 0 14px 32px -8px rgba(179,135,47,.6); }
.btn svg { width: 16px; height: 16px; }

/* ── Inputs ───────────────────────────────────────────────────────────── */
.input, .textarea, select { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 13px; font-size: 14px; background: var(--bg); color: var(--fg); font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus, .textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.textarea { min-height: 90px; resize: vertical; }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.help { font-size: 13px; color: var(--muted-fg); margin-top: 6px; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: 16px; background: var(--bg); padding: 22px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card-hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.card-accent { position: relative; padding-top: 26px; }
.card-accent::before { content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* ── Badges ───────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge svg { width: 13px; height: 13px; }
.badge-green { background: var(--emerald-bg); color: var(--emerald); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-muted { background: var(--muted); color: var(--muted-fg); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 15% -10%, #1c2130 0%, var(--ink) 45%, #08090c 100%); color: var(--paper-text); isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(60% 60% at 50% 20%, transparent 0%, rgba(8,9,12,.35) 70%, rgba(8,9,12,.75) 100%); pointer-events: none; }
.hero .container { position: relative; z-index: 2; padding: 104px 20px 84px; text-align: center; }
.hero h1 { font-size: 48px; line-height: 1.14; margin: 18px auto 0; max-width: 760px; color: #fff; }
.hero h1 em { font-style: italic; background: linear-gradient(100deg, var(--gold-2), var(--gold) 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 17px; color: var(--paper-text-dim); max-width: 620px; margin: 18px auto 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(217,177,99,.35); background: rgba(255,255,255,.04); backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--gold-2); letter-spacing: .02em; }
.feather-bg { position: absolute; color: rgba(217,177,99,.06); pointer-events: none; }
.rosette { position: absolute; pointer-events: none; opacity: .1; color: var(--gold-2); }
.signature-draw path { stroke-dasharray: none; }

/* Brand wordmark lockup (hero) — engraved gold-plate lettering */
.hero-eyebrow { display: block; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-2); opacity: .85; margin-bottom: 22px; }
.brand-hero-wrap { margin: 0; line-height: 0; }
.wordmark { display: block; width: min(560px, 80vw); height: auto; margin: 0 auto; overflow: visible; filter: drop-shadow(0 12px 30px rgba(0,0,0,.5)); }
.wordmark .wm-sheen { mix-blend-mode: screen; }
.hero-tagline { font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--paper-text-dim); margin: 14px auto 0; max-width: 620px; }

/* Thematic decorative motifs (quill, inkwell) in the hero */
.motif { position: absolute; color: var(--gold-2); opacity: .16; pointer-events: none; }

@media (max-width: 640px) {
  .motif { display: none; }
}

/* Search */
.search { display: flex; gap: 8px; max-width: 440px; margin: 32px auto 0; }
.search .input { flex: 1; }
.search-glass { display: flex; gap: 8px; max-width: 480px; margin: 34px auto 0; padding: 7px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.search-glass .input { flex: 1; background: transparent; border: none; color: #fff; padding: 8px 16px; }
.search-glass .input::placeholder { color: rgba(255,255,255,.42); }
.search-glass .input:focus { box-shadow: none; }
.search-glass .btn { border-radius: 999px; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; max-width: 720px; margin-left: auto; margin-right: auto; }
.stat-num { font-family: var(--font-serif); font-size: 38px; font-weight: 700; color: var(--gold-2); line-height: 1; }
.stat-label { margin-top: 8px; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper-text-dim); }

/* ── Process ──────────────────────────────────────────────────────────── */
.process { padding: 96px 0 88px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-kicker { display: inline-block; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.section-head h2 { font-size: 32px; margin: 0; }
.section-head p { color: var(--muted-fg); margin-top: 12px; font-size: 15.5px; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; }
.process-grid::before { content: ""; position: absolute; top: 27px; left: 12.5%; right: 12.5%; height: 1px; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 16px); opacity: .5; }
.process-step { text-align: center; position: relative; }
.process-step .num { width: 56px; height: 56px; border-radius: 999px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #211906; font-family: var(--font-serif); font-weight: 700; font-size: 22px; display: grid; place-items: center; margin: 0 auto 18px; box-shadow: var(--shadow-gold); position: relative; z-index: 1; }
.process-step h3 { font-size: 16px; margin: 0 0 8px; }
.process-step p { color: var(--muted-fg); font-size: 13.5px; margin: 0; }

/* ── Security / trust band ────────────────────────────────────────────── */
.security-band { background: var(--ink); color: var(--paper-text); padding: 92px 0; position: relative; overflow: hidden; }
.security-band .section-head h2, .security-band .section-head p { color: inherit; }
.security-band .section-head p { color: var(--paper-text-dim); }
.security-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; position: relative; z-index: 1; }
.security-item { text-align: center; padding: 8px; }
.security-icon { width: 56px; height: 56px; border-radius: 999px; border: 1px solid rgba(217,177,99,.4); display: grid; place-items: center; margin: 0 auto 16px; color: var(--gold-2); background: rgba(217,177,99,.06); }
.security-icon svg { width: 24px; height: 24px; }
.security-item h3 { font-size: 15.5px; margin: 0 0 8px; color: #fff; }
.security-item p { font-size: 13px; color: var(--paper-text-dim); margin: 0; }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta-band { background: linear-gradient(135deg, #14171f, var(--ink) 60%); color: #fff; padding: 84px 0; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: 30px; margin: 0 auto 14px; max-width: 560px; }
.cta-band p { color: var(--paper-text-dim); max-width: 480px; margin: 0 auto 30px; }

/* ── Seal (verified certificate visual, wax-seal-with-ribbon motif) ───── */
.seal-wrap { position: relative; width: 116px; margin: 0 auto; }
.seal-ribbons { position: absolute; left: 50%; top: 96px; width: 56px; transform: translateX(-50%); z-index: 0; color: #035d43; }
.seal { width: 116px; height: 116px; border-radius: 999px; margin: 0 auto; display: grid; place-items: center; background: radial-gradient(circle at 32% 28%, #0ea578, #047857 55%, #035d43); color: #fff; box-shadow: 0 14px 34px -10px rgba(4,120,87,.55), inset 0 0 0 4px rgba(255,255,255,.16); position: relative; z-index: 1; }
.seal::after { content: ""; position: absolute; inset: -7px; border-radius: 999px; border: 2px dashed rgba(4,120,87,.35); }
.seal svg { width: 46px; height: 46px; }

/* Pricing ribbon */
.price-card { position: relative; overflow: hidden; }
.ribbon { position: absolute; top: 16px; right: -32px; transform: rotate(38deg); background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #211906; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 5px 38px; box-shadow: 0 4px 10px rgba(0,0,0,.18); }

/* Table */
.table-wrap { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th { text-align: left; padding: 12px 16px; background: var(--muted); font-weight: 500; color: var(--muted-fg); }
table.table td { padding: 12px 16px; border-top: 1px solid var(--border); }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: var(--muted); }

/* Gallery */
.gallery-main { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; border: 1px solid var(--border); background: var(--muted); box-shadow: var(--shadow-sm); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 12px; }
.gallery-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Загрузка нескольких фото в форме заявки */
.img-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 12px; }
.img-cell { position: relative; }
.img-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.img-remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--red, #dc2626); font-size: 16px; line-height: 1;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; padding: 0; }
.img-remove:hover { background: var(--red-bg, #fee2e2); }

/* Alerts */
.alert { border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; border: 1px solid var(--border); }
.alert-error { background: var(--red-bg); color: var(--red); border-color: transparent; }
.alert-success { background: var(--emerald-bg); color: var(--emerald); border-color: transparent; }
.alert-info { background: var(--muted); color: var(--fg); }

/* Notifications dropdown */
.notif { position: relative; }
.notif > summary { cursor: pointer; list-style: none; }
.notif > summary::-webkit-details-marker { display: none; }
.notif-count { background: var(--red); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; margin-left: 3px; }
.notif-menu { position: absolute; right: 0; top: 115%; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 50; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.notif-item { display: block; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--muted); }
.notif-item.unread { background: var(--gold-soft); }
.notif-empty { padding: 18px; text-align: center; }

.auth-wrap { max-width: 400px; margin: 56px auto; padding: 0 16px; position: relative; }
.dashboard { max-width: 1100px; margin: 0 auto; padding: 40px 16px; }

@media (max-width: 900px) {
  .grid-3, .grid-2, .footer-grid, .process-grid, .security-grid, .stats-row { grid-template-columns: 1fr 1fr; }
  .process-grid::before { display: none; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .footer-grid, .process-grid, .security-grid, .stats-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero .container { padding: 76px 20px 60px; }
  .section-head h2 { font-size: 26px; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  .hero, .security-band, .cta-band { background: #fff !important; color: #000 !important; }
}
