/* =========================================================
   Butterfly.ru — основной стиль
   Светлая «пергаментная» тема контента
   navbar / breadcrumbs / footer — те же, светлые
   ========================================================= */

:root {
  /* ---------- ФОНЫ ---------- */
  --bg:        #f5efe3;
  --bg-alt:    #ece4d3;

  /* ---------- СВЕТЛАЯ ШАПКА / КРОШКИ / ФУТЕР ---------- */
  --bg-light:      #f7f2ea;
  --bg-light-alt:  #efe7db;
  --text-light:    #3a322c;
  --text-light-mut:#7a6c60;
  --head-light:    #1f2d3a;
  --bd-light:      #e2d7c7;

  /* ---------- КОНТЕНТ ---------- */
  --card:      #fbf7ef;
  --text:      #3f382f;
  --text-mut:  #7a6c60;
  --head:      #a07a3a;

  /* ---------- АКЦЕНТ (медь на светлом — темнее) ---------- */
  --accent:    #b08a44;
  --accent-h:  #8a6a2e;
  --accent-l:  rgba(176, 138, 68, .12);
  --accent-light: #b85c3e;
  --accent-light-h: #9e4a2f;
  --accent-light-l: #f4e4dc;

  /* ---------- ГРАНИЦЫ ---------- */
  --bd:        #ddd2bc;
  --navbd:     #e2d7c7;

  /* ---------- СЕМАНТИКА ---------- */
  --success:   #4f7a4e;
  --warning:   #b8801e;
  --danger:    #a04040;

  /* ---------- ТЕНИ ---------- */
  --shadow-sm: 0 2px 8px rgba(63, 56, 47, .06);
  --shadow-lg: 0 12px 28px rgba(63, 56, 47, .10);
  --shadow-light-sm: 0 2px 8px rgba(58, 50, 44, .06);

  /* ---------- РАДИУСЫ ---------- */
  --radius:    2px;

  /* ---------- ШРИФТЫ ---------- */
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;

  /* ---------- РАЗМЕРЫ ---------- */
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.375rem;
  --fs-xl:    1.75rem;
  --fs-2xl:   2.25rem;
  --fs-hero:  2.5rem;

  --lh-tight: 1.25;
  --lh-base:  1.65;
  --lh-loose: 1.85;

  --footer-h: 60px;
}

/* ---------- RESET / БАЗА ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: var(--lh-base);
  background:
    radial-gradient(circle at 15% 10%, rgba(176, 138, 68, .05), transparent 50%),
    radial-gradient(circle at 85% 90%, rgba(176, 138, 68, .04), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

/* ---------- ТИПОГРАФИКА ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--head);
  font-weight: 500;
  letter-spacing: .3px;
  line-height: var(--lh-tight);
  margin-top: 0;
  margin-bottom: .75rem;
  text-align: center;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5 { font-size: var(--fs-base); }
h6 { font-size: var(--fs-sm); }

h1::after,
h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

p {
  margin: 0 0 1rem;
  font-weight: 300;
  color: var(--text);
}

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  font-weight: 300;
  color: var(--text);
}

small, .small { font-size: var(--fs-sm); font-weight: 300; }

.text-muted { color: var(--text-mut) !important; font-weight: 300; }

ul, ol, li { font-weight: 300; }

/* ---------- ССЫЛКИ ---------- */
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 400;
  transition: color .2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-h);
  text-decoration: underline;
}

/* ---------- ВЫДЕЛЕНИЕ ---------- */
::selection {
  background: var(--accent);
  color: #fbf7ef;
}

/* ---------- BOOTSTRAP OVERRIDES ---------- */
.text-primary { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger)  !important; }

.bg-primary { background-color: var(--accent) !important; }

.btn {
  font-weight: 400;
  letter-spacing: .5px;
  padding: .5rem 1.15rem;
  border-radius: 2px;
  font-size: var(--fs-base);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-sm { padding: .35rem .85rem; font-size: var(--fs-sm); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf7ef;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: #fbf7ef;
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf7ef;
}

.card {
  background: var(--card);
  border-color: var(--bd);
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  transition: border-color .4s ease, box-shadow .4s ease, transform .3s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   NAVBAR — светлая
   ========================================================= */
.navbar {
  background: var(--bg-light) !important;
  border-bottom: 1px solid var(--bd-light);
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.navbar-brand {
  color: var(--text-light) !important;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  padding-top: 0;
  padding-bottom: 0;
  text-decoration: none;
}

.navbar-brand:hover,
.navbar-brand:focus-visible { text-decoration: none; }

.navbar-brand span {
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--text-light);
}

.navbar-brand img { width: 50px; height: 50px; }

.navbar .nav-link {
  color: var(--text-light) !important;
  font-weight: 400;
  font-size: .95rem;
  letter-spacing: 0;
  padding: .4rem .75rem;
  text-decoration: none;
  transition: color .2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible,
.navbar .nav-link.active {
  color: var(--accent-light) !important;
  text-decoration: none;
}

.navbar-toggler {
  border-color: var(--bd-light);
  padding: .25rem .5rem;
  font-size: .95rem;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem var(--accent-light-l);
}

.dropdown-menu {
  background: #ffffff;
  border-color: var(--bd-light);
  border-radius: 10px;
  box-shadow: var(--shadow-light-sm);
  padding: .35rem 0;
  font-size: .95rem;
  min-width: 10rem;
}

.dropdown-item {
  color: var(--text-light);
  padding: .4rem 1rem;
  font-weight: 400;
  transition: background .15s ease, color .15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--accent-light-l);
  color: var(--accent-light-h);
}

.dropdown-divider {
  border-top-color: var(--bd-light);
  margin: .3rem 0;
  opacity: 1;
}

/* =========================================================
   BREADCRUMBS — светлые
   ========================================================= */
.breadcrumb-wrap {
  background: var(--bg-light-alt);
  border-bottom: 1px solid var(--bd-light);
  padding: .6rem 0;
}

.breadcrumb {
  margin: 0;
  font-size: var(--fs-sm);
  background: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--accent-light);
  font-weight: 500;
}

.breadcrumb-item a {
  color: var(--text-light-mut);
  text-decoration: none;
  transition: color .2s ease;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus-visible {
  color: var(--accent-light);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--head-light);
  font-weight: 500;
}

/* ---------- СЕКЦИИ ---------- */
section { position: relative; }

.section-alt { background: var(--bg-alt); }

/* =========================================================
   FOOTER — в стиле navbar (светлый)
   ========================================================= */
footer {
  background: var(--bg-light);
  color: var(--text-light-mut);
  padding: 1rem 0;
  text-align: center;
  flex-shrink: 0;
  font-size: var(--fs-sm);
  font-weight: 300;
  border-top: 1px solid var(--bd-light);
}

footer p {
  margin: 0;
  color: var(--text-light-mut);
  font-weight: 300;
}

footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: color .2s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent-light);
  text-decoration: underline;
}

@media (min-width: 992px) {
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-h);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1030;
    border-top: 1px solid var(--bd-light);
    box-shadow: 0 -2px 6px rgba(58, 50, 44, .06);
  }

  footer .container { width: 100%; }

  main { padding-bottom: var(--footer-h); }
}

/* ---------- ФОРМЫ ---------- */
.form-control,
.form-select {
  background: #fbf7ef;
  border-color: var(--bd);
  color: var(--text);
  border-radius: 2px;
  padding: .5rem .8rem;
  font-size: var(--fs-base);
  font-weight: 300;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-control::placeholder { color: #a89c88; }

.form-control:focus,
.form-select:focus {
  background: #fbf7ef;
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem var(--accent-l);
}

.form-label {
  font-weight: 400;
  color: var(--head);
  margin-bottom: .35rem;
  font-size: var(--fs-sm);
}

/* ---------- ЯКОРЯ ---------- */
:target { scroll-margin-top: 80px; }

/* ---------- A11Y ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- PRINT ---------- */
@media print {
  footer { position: static; height: auto; box-shadow: none; }
  main { padding-bottom: 0; }
  .navbar { display: none; }
  body { background: #fff; color: #000; font-weight: 400; }
  h1, h2, h3, h4, h5, h6 { color: #000; text-align: left; }
  h1::after, h2::after { display: none; }
  a { color: #000; text-decoration: none; }
}