/* =========================================
   Юрекс — стили сайта
   ========================================= */

:root {
  color-scheme: light;
  /* Приглушённая каменная палитра: без яркого белого и без тусклых оттенков */
  --bg-dark: #3a352e;
  --bg-dark-2: #423d35;
  --bg-dark-3: #4b453b;
  --bg-light: #ece6da;
  --bg-muted: #ddd3c1;

  --text-light: #efe8da;
  --text-light-muted: #beb29b;
  --text-dark: #2a2620;
  --text-dark-muted: #6b6252;

  --accent: #a8763f;
  --accent-light: #c79657;
  --accent-dark: #7f5a2d;

  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: rgba(42, 38, 32, 0.12);

  --radius: 16px;
  --radius-sm: 10px;
  --container-w: 1180px;

  --font-display: 'Fraunces', Georgia, 'Iowan Old Style', serif;

  --shadow-soft: 0 20px 50px rgba(30, 25, 18, 0.14);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  color: #26201a;
  box-shadow: 0 10px 24px rgba(127, 90, 45, 0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(127, 90, 45, 0.4);
}

.btn--outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--text-light);
}
.btn--outline:hover {
  background: rgba(168, 118, 63, 0.16);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(58, 53, 46, 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.header.is-scrolled {
  padding: 12px 0;
  background: rgba(58, 53, 46, 0.92);
  border-bottom-color: var(--border-dark);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text-light);
}
.logo__badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent-light);
  flex-shrink: 0;
}
.logo__badge svg {
  width: 100%;
  height: 100%;
}
.accent-text { color: var(--accent-light); }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__link {
  color: var(--text-light-muted);
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition);
}
.nav__link:hover { color: var(--text-light); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header__phone {
  color: var(--text-light);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-light);
  border-radius: 2px;
  transition: all var(--transition);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #4d473d 0%, var(--bg-dark) 55%);
  padding: 170px 0 90px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(199, 150, 87, 0.16) 0%, transparent 70%);
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  text-align: center;
  max-width: 880px;
}

.eyebrow {
  display: inline-block;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 6px 16px;
  border: 1px solid rgba(168, 118, 63, 0.35);
  border-radius: 999px;
}
.eyebrow--dark { color: var(--accent-dark); border-color: rgba(127, 90, 45, 0.3); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-light);
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.12;
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero__subtitle {
  color: var(--text-light-muted);
  font-size: 18px;
  max-width: 680px;
  margin: 0 auto 38px;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--light { background: var(--bg-light); }
.section--muted { background: var(--bg-muted); }
.section--dark { background: var(--bg-dark); }

.section__title {
  font-size: clamp(28px, 3.6vw, 40px);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 18px;
}
.section__title--light { color: var(--text-light); }

.section__subtitle {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
  color: var(--text-dark-muted);
  font-size: 17px;
}
.section__subtitle--light { color: var(--text-light-muted); }

.section > .container > .eyebrow,
.section > .container > .eyebrow--dark {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 28px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Service cards ---------- */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.services-grid .card {
  flex: 0 1 calc((100% - 56px) / 3);
  min-width: 280px;
}
.card {
  background: linear-gradient(165deg, #fbf8f1 0%, var(--bg-light) 100%);
  border-radius: var(--radius);
  padding: 34px 26px;
  box-shadow: 0 2px 3px rgba(42, 32, 20, 0.06), 0 20px 36px -10px rgba(42, 32, 20, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 6px rgba(42, 32, 20, 0.08), 0 28px 48px -10px rgba(42, 32, 20, 0.28);
}
.card__icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin-bottom: 20px;
}
.card__icon svg {
  width: 100%;
  height: 100%;
}
.card__title {
  font-size: 18px;
  margin-bottom: 10px;
}
.card__desc {
  color: var(--text-dark-muted);
  font-size: 14.5px;
  margin-bottom: 16px;
}
.card__list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dark-muted);
  font-size: 14.5px;
  margin-bottom: 8px;
}
.card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Why us bento ---------- */
.whyus-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
  gap: 20px;
}
.whyus-tile {
  background: linear-gradient(160deg, var(--bg-dark-2), var(--bg-dark));
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 30px rgba(10, 8, 5, 0.28);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whyus-tile:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 40px rgba(10, 8, 5, 0.34);
}
.whyus-tile--lg {
  grid-column: span 2;
  grid-row: span 2;
}
.whyus-tile__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  color: var(--accent-light);
  margin-bottom: 18px;
}
.whyus-tile__icon svg {
  width: 100%;
  height: 100%;
}
.whyus-tile--lg .whyus-tile__icon {
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
}
.whyus-tile h3 {
  color: var(--text-light);
  font-size: 16px;
  margin: 0;
}
.whyus-tile--lg h3 {
  font-size: 21px;
  margin-bottom: 12px;
}
.whyus-tile--lg p {
  color: var(--text-light-muted);
  font-size: 15px;
  margin: 0;
  max-width: 42ch;
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}
.process__step {
  position: relative;
  padding: 10px 8px 0;
}
.process__num {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 14px;
}
.process__step h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.process__step p {
  color: var(--text-dark-muted);
  font-size: 14.5px;
}

/* ---------- Reviews ---------- */
.reviews-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
}
.reviews-carousel__viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.reviews-carousel__track {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.reviews-carousel__arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: var(--bg-light);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition);
}
.reviews-carousel__arrow svg { width: 20px; height: 20px; }
.reviews-carousel__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.reviews-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.reviews-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
}
.reviews-carousel__dot.is-active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}

.review-card {
  flex: 0 0 calc((100% - 56px) / 3);
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.review-card__stars {
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 16px;
  font-size: 15px;
}
.review-card__text {
  color: var(--text-dark);
  font-size: 15px;
  margin-bottom: 24px;
}
.review-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.review-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  color: #26201a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.review-card__name { font-weight: 700; font-size: 14.5px; }

/* ---------- Contact / Form ---------- */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.contact__info .section__title,
.contact__info .section__subtitle {
  text-align: left;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.contact__info .section__subtitle {
  margin-bottom: 0;
}
.contact__points {
  margin: 28px 0 34px;
}
.contact__points li {
  position: relative;
  padding-left: 26px;
  color: var(--text-light-muted);
  font-size: 15px;
  margin-bottom: 12px;
}
.contact__points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: 800;
}
.contact__direct {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
}
.contact__direct-item { display: flex; flex-direction: column; gap: 4px; }
.contact__direct-label { color: var(--text-light-muted); font-size: 13px; }
.contact__direct-value { color: var(--text-light); font-weight: 700; font-size: 16px; }

.form {
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light-muted);
  font-weight: 600;
}
.form__field input,
.form__field select,
.form__field textarea {
  font-family: inherit;
  background: var(--bg-dark-3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-light);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}
.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  border-color: var(--accent);
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: #8a8069; }

.form__checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-light-muted);
  cursor: pointer;
}
.form__checkbox input { margin-top: 3px; }
.form__checkbox a { color: var(--accent-light); text-decoration: underline; }

.form__honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; opacity: 0;
}

.form__status {
  min-height: 20px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.form__status.is-success { color: #7cd992; }
.form__status.is-error { color: #e08a8a; }

/* ---------- Footer ---------- */
.footer {
  background: #2e2a24;
  padding: 70px 0 26px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--border-dark);
}
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 6px;
}
.footer__col a, .footer__col span {
  color: var(--text-light-muted);
  font-size: 14.5px;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--accent-light); }
.footer__desc {
  color: var(--text-light-muted);
  font-size: 14px;
  margin-top: 12px;
  max-width: 280px;
}
.logo--footer { margin-bottom: 4px; }

/*
 * Оборачиваем заголовок и кнопку в общий блок, который сам сжимается по
 * содержимому (width: fit-content). Его ширина при этом определяется
 * САМЫМ широким ребёнком — это заголовок. align-items: stretch растягивает
 * кнопку (у которой нет собственной width) ровно до этой ширины, поэтому
 * её правый край всегда совпадает с правым краем заголовка, без ручного
 * подбора пикселей. Чтобы это работало, кнопка должна быть заведомо уже
 * заголовка сама по себе — поэтому у неё уменьшены отступы и шрифт.
 */
.footer__telegram-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
  gap: 18px;
}

.footer__col a.footer__telegram-btn {
  margin: 0;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-light);
  white-space: nowrap;
}
.footer__col a.footer__telegram-btn:hover { color: var(--text-light); }
.footer__telegram-btn svg { display: block; width: 16px; height: 16px; flex-shrink: 0; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  color: #948a76;
  font-size: 13px;
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer__legal-links a {
  color: #948a76;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__legal-links a:hover { color: var(--text-light); }

/* ---------- Floating action button ---------- */
.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  color: #26201a;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(127, 90, 45, 0.35);
  z-index: 90;
  transition: transform var(--transition);
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 24px; height: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header__phone { display: none; }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(58, 53, 46, 0.98);
    padding: 20px 24px 26px;
    gap: 18px;
    border-bottom: 1px solid var(--border-dark);
  }

  .contact__inner { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .review-card { flex-basis: calc((100% - 28px) / 2); }
  .services-grid .card { flex-basis: calc((100% - 28px) / 2); }

  .whyus-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .whyus-tile--lg { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 640px) {
  .header__actions .btn--sm { display: none; }
  .hero { padding: 130px 0 60px; }
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .reviews-carousel { gap: 10px; }
  .reviews-carousel__arrow { width: 40px; height: 40px; }
  .review-card { flex-basis: 100%; }
  .services-grid .card { flex-basis: 100%; }
  .footer__bottom { flex-direction: column; text-align: center; }

  .whyus-bento { grid-template-columns: 1fr; }
  .whyus-tile--lg { grid-column: span 1; grid-row: span 1; }
}
