/* Root */
:root {
  --xb-bg: #F3F2EB;
  --xb-surface: #FCFBF7;
  --xb-text: #23261F;
  --xb-muted: #5A5E53;
  --xb-accent: #56651E;
  --xb-accent-dark: #435117;
  --xb-accent-text: #FCFBF7;
  --xb-plate-bg: #23261F;
  --xb-plate-text: #F3F2EB;
  --xb-line: #E2E1D7;
  --xb-tint: #EAE9DE;
  --xb-font-head: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --xb-font-body: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --xb-radius: 8px;
  --xb-radius-btn: 999px;
  --xb-shadow: 0 1px 2px rgb(35 38 31 / .06), 0 12px 32px rgb(35 38 31 / .08);
  --xb-pad: clamp(16px, 4vw, 40px);
  --xb-sect-gap: clamp(72px, 9vw, 112px);
  --xb-section-gap: 112px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--xb-bg);
  color: var(--xb-text);
  font-family: var(--xb-font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--xb-font-head);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); }
h3 { font-size: clamp(1.2rem, 1vw + 0.8rem, 1.5rem); }
p { margin: 0 0 16px; max-width: 68ch; }
a { color: var(--xb-accent); text-underline-offset: 3px; }
a:hover { color: var(--xb-accent-dark); }
ul, ol { padding-left: 1.3em; }
.xb-wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--xb-pad); }
.xb-wrap--narrow { max-width: 760px; }
.xb-sect { padding-block: var(--xb-section-gap); position: relative; }
.xb-sect--tinted { padding-bottom: calc(var(--xb-section-gap) + 24px); }
.xb-sect__intro {
  color: var(--xb-muted);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-bottom: 32px;
}
.xb-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--xb-plate-bg);
  color: var(--xb-plate-text);
  padding: 10px 18px;
  border-radius: var(--xb-radius);
  z-index: 100;
  text-decoration: none;
}
.xb-skip:focus { left: 8px; color: var(--xb-plate-text); }

/* Background layer */
.xb-sect--tinted { background: var(--xb-tint); }
.xb-wavy::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -22px;
  height: 44px;
  background:
    radial-gradient(ellipse 50% 44px at 25% 100%, var(--xb-tint) 98%, transparent 100%),
    radial-gradient(ellipse 50% 44px at 75% 100%, var(--xb-bg) 98%, transparent 100%);
  background-color: var(--xb-tint);
  clip-path: ellipse(120% 100% at 50% 100%);
  transform: rotate(180deg);
  z-index: 0;
  pointer-events: none;
}
.xb-wavy > * { position: relative; z-index: 1; }

/* Header */
.xb-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.xb-head.is-scrolled {
  background: var(--xb-surface);
  box-shadow: 0 1px 0 var(--xb-line), 0 8px 24px rgb(35 38 31 / .06);
}
.xb-head__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}
.xb-head__mail {
  margin: 0;
  font-size: 0.9rem;
  color: var(--xb-muted);
  justify-self: start;
}
.xb-logo {
  font-family: var(--xb-font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--xb-text);
  text-decoration: none;
  justify-self: center;
  letter-spacing: -0.02em;
}
.xb-logo:hover { color: var(--xb-text); }

/* Burger */
.xb-burger {
  justify-self: end;
  width: 48px;
  height: 48px;
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  background: var(--xb-surface);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.xb-burger__line {
  width: 20px; height: 2px;
  background: var(--xb-text);
  transition: transform .3s ease, opacity .3s ease;
}
.xb-burger[aria-expanded="true"] .xb-burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.xb-burger[aria-expanded="true"] .xb-burger__line:nth-child(2) { opacity: 0; }
.xb-burger[aria-expanded="true"] .xb-burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu overlay */
.xb-menu {
  position: fixed;
  inset: 0;
  background: var(--xb-plate-bg);
  color: var(--xb-plate-text);
  display: none;
  padding-top: 96px;
  overflow-y: auto;
  z-index: 40;
}
.xb-menu--open { display: block; }
.xb-menu__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
.xb-menu__list { list-style: none; margin: 0; padding: 0; }
.xb-menu__item { margin-bottom: 8px; }
.xb-menu__link {
  display: inline-block;
  font-family: var(--xb-font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--xb-plate-text);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
.xb-menu__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--xb-plate-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.xb-menu__link:hover::after,
.xb-menu__link[aria-current="page"]::after { transform: scaleX(1); }
.xb-menu__link:hover { color: var(--xb-plate-text); }
.xb-menu__title {
  font-size: 1rem;
  text-transform: none;
  color: var(--xb-plate-text);
  opacity: .75;
  margin-bottom: 16px;
}
.xb-menu__side ul { list-style: none; margin: 0; padding: 0; }
.xb-menu__side li { margin-bottom: 8px; }
.xb-menu__side span {
  display: inline-block;
  opacity: .7;
  margin-right: 6px;
  font-size: 0.9rem;
}
.xb-menu__side a { color: var(--xb-plate-text); }

/* Hero */
.xb-hero__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
.xb-hero__body { max-width: 560px; }
.xb-hero__title { margin-bottom: 24px; max-width: 15ch; }
.xb-hero__line { display: inline; }
.xb-hero__line--big {
  font-size: clamp(3rem, 8vw + 1rem, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.xb-hero__line--small {
  font-size: 0.75em;
  font-weight: 700;
  color: var(--xb-accent);
  letter-spacing: -0.02em;
}
.xb-hero__text { font-size: 1.1rem; color: var(--xb-muted); margin-bottom: 32px; }
.xb-hero__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--xb-radius);
  box-shadow: var(--xb-shadow);
}
.xb-rise { animation: xb-rise .5s ease-out both; }
@keyframes xb-rise {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

/* Accent */
.xb-accent {
  display: inline;
  color: var(--xb-accent);
}

/* Buttons */
.xb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--xb-radius-btn);
  background: var(--xb-accent);
  color: var(--xb-accent-text);
  font-family: var(--xb-font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color .25s ease, transform .15s ease, box-shadow .25s ease;
}
.xb-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--xb-accent-dark);
  transform: translateY(100%);
  transition: transform .3s ease;
  border-radius: inherit;
}
.xb-btn:hover::before { transform: translateY(0); }
.xb-btn:hover { color: var(--xb-accent-text); }
.xb-btn:focus-visible {
  outline: 3px solid var(--xb-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgb(86 101 30 / .25);
}
.xb-btn:active { transform: scale(0.97); }
.xb-btn > * { position: relative; z-index: 1; }
.xb-btn--alt {
  background: transparent;
  color: var(--xb-accent);
  border: 2px solid var(--xb-accent);
}
.xb-btn--alt::before { background: var(--xb-accent); }
.xb-btn--alt:hover { color: var(--xb-accent-text); }

/* Checklist */
.xb-check-grid {
  display: grid;
  gap: 64px;
  grid-template-columns: 1fr;
  align-items: center;
}
.xb-check-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--xb-radius);
  box-shadow: var(--xb-shadow);
}
.xb-check__intro { color: var(--xb-muted); margin-bottom: 24px; }
.xb-check__list { margin: 0 0 24px; padding-left: 0; list-style: none; }
.xb-check__item {
  position: relative;
  padding-left: 32px;
  text-indent: 0;
  margin-bottom: 12px;
  line-height: 1.55;
}
.xb-check__item::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--xb-accent);
}
.xb-check__more { margin: 0; }

/* Filter */
.xb-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 32px;
}
.xb-filter__btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--xb-radius-btn);
  border: 1px solid var(--xb-line);
  background: var(--xb-surface);
  color: var(--xb-text);
  font-family: var(--xb-font-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.xb-filter__btn:hover { border-color: var(--xb-accent); color: var(--xb-accent); }
.xb-filter__btn:focus-visible { outline: 3px solid var(--xb-accent); outline-offset: 2px; }
.xb-filter__btn:active { transform: scale(0.97); }
.xb-filter__btn.is-active {
  background: var(--xb-plate-bg);
  border-color: var(--xb-plate-bg);
  color: var(--xb-plate-text);
}

/* Cards */
.xb-cards {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
.xb-card {
  display: flex;
  flex-direction: column;
  background: var(--xb-surface);
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(35 38 31 / .05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.xb-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--xb-shadow);
}
.xb-card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.xb-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.xb-card__body h3 { margin-bottom: 12px; }
.xb-card__body p {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xb-card__link {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--xb-font-head);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--xb-accent);
  padding-bottom: 2px;
  align-self: flex-start;
}
.xb-card.is-hidden { display: none; }

/* Plate */
.xb-plate {
  background: var(--xb-plate-bg);
  color: var(--xb-plate-text);
  border-radius: var(--xb-radius);
  padding: 32px;
}
.xb-plate a { color: var(--xb-plate-text); }

/* Interactive + Form */
.xb-duo {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
  align-items: start;
}
.xb-hints__plate { margin-bottom: 32px; padding: 32px; }
.xb-hints__title { color: var(--xb-plate-text); margin-bottom: 12px; }
.xb-hints__text { color: var(--xb-plate-text); opacity: .9; margin: 0; }
.xb-hints__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.xb-hints__btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--xb-radius-btn);
  border: 1px solid rgb(35 38 31 / .15);
  background: var(--xb-surface);
  color: var(--xb-accent);
  font-family: var(--xb-font-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.xb-hints__btn:hover { background: var(--xb-accent); color: var(--xb-accent-text); }
.xb-hints__btn:focus-visible { outline: 3px solid var(--xb-accent); outline-offset: 2px; }
.xb-hints__btn:active { transform: scale(0.97); }
.xb-hints__btn.is-active {
  background: var(--xb-accent);
  color: var(--xb-accent-text);
}
.xb-hints__out {
  background: var(--xb-surface);
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  padding: 16px 20px;
  color: var(--xb-muted);
  min-height: 56px;
}

/* Form */
.xb-form-wrap__intro { color: var(--xb-muted); margin-bottom: 24px; }
.xb-form {
  background: var(--xb-surface);
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgb(35 38 31 / .05);
}
.xb-form__field { margin-bottom: 20px; }
.xb-form__label {
  display: block;
  font-family: var(--xb-font-head);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.xb-hints { align-self: start; }
.xb-duo { align-items: start; }
.xb-form__input, .xb-form__area {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  background: var(--xb-bg);
  color: var(--xb-text);
  font-family: var(--xb-font-body);
  font-size: 1rem;
  line-height: 1.5;
}
.xb-form__area { resize: vertical; min-height: 110px; }
.xb-form__input:focus-visible,
.xb-form__area:focus-visible {
  outline: 3px solid var(--xb-accent);
  outline-offset: 1px;
}
.xb-field--error .xb-form__input,
.xb-field--error .xb-form__area { border-color: #A3321E; }
.xb-form .xb-check { margin: 4px 0 20px; }
.xb-form .xb-check label { font-size: 0.92rem; }
.xb-check input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--xb-accent);
  margin-right: 8px;
  vertical-align: -3px;
}
.xb-form__note {
  font-size: 0.88rem;
  color: var(--xb-muted);
  margin-top: 16px;
}
.xb-form__submit { width: 100%; margin-top: 8px; }
.is-sending { opacity: .65; pointer-events: none; }

/* Steps */
.xb-steps {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
.xb-steps__list { margin: 0; padding-left: 0; list-style: none; counter-reset: xb-step; }
.xb-steps__item {
  counter-increment: xb-step;
  position: relative;
  padding-left: 64px;
  margin-bottom: 32px;
}
.xb-steps__item::before {
  content: counter(xb-step);
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--xb-plate-bg);
  color: var(--xb-plate-text);
  font-family: var(--xb-font-head);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xb-steps__item h3 { margin-bottom: 6px; }
.xb-steps__item p { margin: 0; color: var(--xb-muted); }
.xb-steps__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--xb-radius);
  box-shadow: var(--xb-shadow);
}

/* FAQ */
.xb-faq__item {
  background: var(--xb-surface);
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius);
  margin-bottom: 12px;
  padding: 4px 24px;
}
.xb-faq__item summary {
  font-family: var(--xb-font-head);
  font-weight: 650;
  font-size: 1.05rem;
  padding: 16px 0;
  cursor: pointer;
  list-style-position: outside;
}
.xb-faq__item summary:focus-visible { outline: 3px solid var(--xb-accent); outline-offset: 2px; }
.xb-faq__item p { color: var(--xb-muted); margin: 0 0 20px; }

/* Reveal */
.xb-reveal { opacity: 1; }
html.xb-js .xb-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
html.xb-js .xb-reveal--in { opacity: 1; transform: none; }

/* Footer */
.xb-foot {
  background: var(--xb-plate-bg);
  color: var(--xb-plate-text);
  padding: clamp(48px, 7vw, 88px) 0 32px;
  margin-top: var(--xb-sect-gap);
}
.xb-foot a { color: var(--xb-plate-text); }
.xb-foot__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
.xb-foot__logo { color: var(--xb-plate-text); }
.xb-foot__tag { opacity: .8; font-size: 0.95rem; }
.xb-foot__title {
  color: var(--xb-plate-text);
  font-size: 1rem;
  margin-bottom: 16px;
}
.xb-foot__list { list-style: none; margin: 0; padding: 0; }
.xb-foot__list li { margin-bottom: 10px; }
.xb-foot__list a { text-decoration: none; opacity: .9; }
.xb-foot__list a:hover { opacity: 1; text-decoration: underline; }
.xb-foot ul li span { opacity: .65; margin-right: 6px; }
.xb-foot__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgb(243 242 235 / .2);
}
.xb-foot__copy { opacity: .7; font-size: 0.9rem; margin: 0; }

/* Inner pages */
.xb-page-head { padding-top: 48px; }
.xb-page-head h1 { margin-bottom: 20px; }
.xb-page-head p { color: var(--xb-muted); font-size: 1.1rem; }

/* Prose */
.xb-prose { max-width: 760px; }
.xb-prose h2 {
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.2rem);
  margin-top: 48px;
}
.xb-prose ol, .xb-prose ul { margin-bottom: 20px; }
.xb-prose li { margin-bottom: 8px; }
.xb-prose a { text-decoration: underline; }
.xb-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.xb-prose th, .xb-prose td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--xb-line);
}
.xb-prose th { font-family: var(--xb-font-head); font-weight: 650; }

/* Gallery */
.xb-gallery {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
.xb-gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--xb-radius);
  box-shadow: var(--xb-shadow);
}

/* Contacts */
.xb-contact-list { list-style: none; margin: 0; padding: 0; }
.xb-contact-list li { margin-bottom: 12px; }

/* Thanks / 404 */
.xb-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.xb-center p { margin-inline: auto; }
.xb-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.xb-links a {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--xb-line);
  border-radius: var(--xb-radius-btn);
  background: var(--xb-surface);
  text-decoration: none;
  font-family: var(--xb-font-head);
  font-weight: 600;
}
.xb-links a:hover { border-color: var(--xb-accent); }

/* Breakpoints */
@media (max-width: 767px) {
  :root { --xb-section-gap: 72px; }
  .xb-check-media img {
    aspect-ratio: 3 / 2;
    max-height: 360px;
  }
  .xb-steps__media img {
    aspect-ratio: 3 / 2;
    max-height: 360px;
  }
}

@media (min-width: 480px) {
  .xb-menu__grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .xb-hero__grid { gap: 40px; }
}

@media (min-width: 640px) {
  .xb-cards { grid-template-columns: repeat(2, 1fr); }
  .xb-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .xb-check-grid { grid-template-columns: 1fr 1fr; }
  .xb-duo { grid-template-columns: 1fr 1fr; }
  .xb-steps { grid-template-columns: 3fr 2fr; }
}

@media (min-width: 1024px) {
  .xb-cards { grid-template-columns: repeat(3, 1fr); }
  .xb-hero__grid { grid-template-columns: 6fr 5fr; align-items: center; }
  .xb-foot__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .xb-gallery--wide { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .xb-hero__grid { gap: 56px; }
  .xb-duo { gap: 64px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html.xb-js .xb-reveal { opacity: 1; transform: none; }
}

/* Optional field label */
.xb-form__field .xb-form__label:has(+ .xb-form__input#lead-phone) { color: var(--xb-muted); }
