/* ============================================================
   Frezerdent — зуботехническая лаборатория
   Тёмная премиальная тема: графит + золото
   ============================================================ */

:root {
  --bg: #15130f;
  --bg-soft: #1c1913;
  --bg-card: #211d16;
  --line: rgba(212, 179, 116, .18);
  --line-soft: rgba(255, 255, 255, .07);
  --gold: #d4b374;
  --gold-bright: #e8cd94;
  --gold-dim: #a8894f;
  --text: #efeae0;
  --text-mut: #a49a88;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-head: 'Montserrat', system-ui, sans-serif;
  --radius: 14px;
  --container: 1240px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Типографика ---------- */

.eyebrow {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section { padding: 96px 0; }

.section__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.link-arrow {
  font-weight: 600;
  font-size: 15px;
  color: var(--gold);
  white-space: nowrap;
  transition: color .25s;
}
.link-arrow span { display: inline-block; transition: transform .25s; }
.link-arrow:hover { color: var(--gold-bright); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 17px 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s;
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  color: #1b160d;
  box-shadow: 0 8px 28px rgba(212, 179, 116, .22);
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(212, 179, 116, .34);
}

.btn--outline {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(212, 179, 116, .06);
}

.btn--sm { padding: 12px 22px; font-size: 12px; }
.btn--block { width: 100%; }
.btn__play { width: 11px; height: 13px; flex: none; }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21, 19, 15, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo__mark { width: 42px; height: 42px; color: var(--gold); }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .02em;
}
.logo__sub {
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--text-mut);
}

.nav { display: flex; gap: 26px; margin: 0 auto; }
.nav__link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-mut);
  padding: 6px 0;
  position: relative;
  transition: color .25s;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--gold);
  transition: right .25s;
}
.nav__link:hover, .nav__link--active { color: var(--text); }
.nav__link:hover::after, .nav__link--active::after { right: 0; }

.header__contacts { display: flex; align-items: center; gap: 18px; flex: none; }
.header__phones { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.45; }
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14.5px;
  transition: color .25s;
}
.header__phone svg { width: 13px; height: 13px; color: var(--gold); }
.header__phone:hover { color: var(--gold-bright); }
.header__phone + .header__phone { font-size: 13px; color: var(--text-mut); }

.header__wa {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gold);
  transition: all .25s;
}
.header__wa svg { width: 20px; height: 20px; }
.header__wa:hover { background: var(--gold); color: #1b160d; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 10px;
}
.burger span {
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.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); }

/* ---------- Плейсхолдеры изображений ---------- */

.img-ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(212, 179, 116, .14), transparent 55%),
    linear-gradient(155deg, #2a251b, #1a1712 70%);
  border: 1px solid var(--line-soft);
}
.img-ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .045) 45%, transparent 60%);
}
.img-ph__icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 30%;
  max-width: 120px;
  color: rgba(212, 179, 116, .4);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px; left: -140px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 179, 116, .10), transparent 65%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin-bottom: 26px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold-bright), var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__text {
  font-size: 18px;
  color: var(--text-mut);
  max-width: 380px;
  margin-bottom: 36px;
}

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

.hero__visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: stretch;
}
.hero__img { min-height: 460px; }
.img-ph--mill .img-ph__icon { width: 38%; }

.hero__card {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 32px 26px;
  background: rgba(28, 25, 19, .82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 230px;
  margin-left: -90px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.hero__feat {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.hero__feat svg { width: 30px; height: 30px; flex: none; color: var(--gold); }

/* ---------- Статистика ---------- */

.stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  padding: 44px 0;
}
.stats__list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}
.stats__item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stats__item svg { width: 34px; height: 34px; flex: none; color: var(--gold); }
.stats__item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold-bright);
}
.stats__item span { font-size: 13px; color: var(--text-mut); line-height: 1.35; display: block; }
.stats__label { font-weight: 600; color: var(--text) !important; }

/* ---------- Услуги ---------- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 250px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.service:hover {
  transform: translateY(-5px);
  border-color: var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
}

.service__img {
  flex: 1;
  border-radius: 0;
  border: none;
  min-height: 140px;
}
.service__body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service__body h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}
.service__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}
.service:hover .service__more { opacity: 1; transform: none; }
.service__more span { display: inline-block; }

.service--wide { grid-column: span 2; }
.service--split { flex-direction: column-reverse; }

/* оттенки плейсхолдеров услуг */
.img-ph--a { background-image: radial-gradient(110% 110% at 25% 15%, rgba(212,179,116,.18), transparent 55%), linear-gradient(150deg, #2c2317, #1a1712); }
.img-ph--b { background-image: radial-gradient(110% 110% at 70% 20%, rgba(232,205,148,.13), transparent 55%), linear-gradient(200deg, #29241c, #171410); }
.img-ph--c { background-image: radial-gradient(110% 110% at 40% 80%, rgba(212,179,116,.15), transparent 55%), linear-gradient(120deg, #262019, #191510); }
.img-ph--d { background-image: radial-gradient(110% 110% at 80% 70%, rgba(232,205,148,.12), transparent 55%), linear-gradient(160deg, #2b251a, #161310); }
.img-ph--e { background-image: radial-gradient(110% 110% at 15% 60%, rgba(212,179,116,.17), transparent 55%), linear-gradient(140deg, #28221a, #181410); }
.img-ph--f { background-image: radial-gradient(110% 110% at 55% 30%, rgba(232,205,148,.14), transparent 55%), linear-gradient(175deg, #2a241b, #171310); }

/* ---------- Процесс ---------- */

.process {
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.process .eyebrow { text-align: center; margin-bottom: 52px; }

.process__steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  counter-reset: step;
}
.process__step {
  counter-increment: step;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  padding: 0 6px;
}
.process__step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold-dim);
}
.process__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 62px;
  left: calc(50% + 42px);
  width: calc(100% - 84px);
  border-top: 1px dashed var(--line);
}
.process__icon {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--gold);
  transition: all .3s;
}
.process__icon svg { width: 34px; height: 34px; }
.process__step:hover .process__icon {
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(212, 179, 116, .08);
  transform: translateY(-3px);
}

.process__cta { text-align: center; margin-top: 52px; }

/* ---------- Почему мы ---------- */

.why__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.why__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.why__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: border-color .3s, transform .3s;
}
.why__card:hover { border-color: var(--line); transform: translateY(-3px); }
.why__card svg { width: 32px; height: 32px; flex: none; color: var(--gold); }

.why__visual { min-height: 520px; }
.img-ph--tech { background-image: radial-gradient(120% 120% at 70% 20%, rgba(212,179,116,.16), transparent 60%), linear-gradient(165deg, #2b251b, #171410); }

/* ---------- Работы ---------- */

.works__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}
.works__item { transition: transform .3s, box-shadow .3s; }
.works__item:hover { transform: scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.works__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.works__item:nth-child(4) { grid-column: span 2; }

.img-ph--w1 { background-image: radial-gradient(120% 120% at 30% 25%, rgba(212,179,116,.18), transparent 60%), linear-gradient(150deg, #2c2519, #181410); }
.img-ph--w2 { background-image: radial-gradient(110% 110% at 70% 30%, rgba(232,205,148,.13), transparent 55%), linear-gradient(200deg, #282218, #161310); }
.img-ph--w3 { background-image: radial-gradient(110% 110% at 25% 75%, rgba(212,179,116,.15), transparent 55%), linear-gradient(130deg, #262019, #171410); }
.img-ph--w4 { background-image: radial-gradient(110% 110% at 60% 60%, rgba(232,205,148,.12), transparent 55%), linear-gradient(170deg, #2a241a, #171310); }
.img-ph--w5 { background-image: radial-gradient(110% 110% at 40% 20%, rgba(212,179,116,.16), transparent 55%), linear-gradient(145deg, #292318, #161310); }

/* ---------- Футер ---------- */

.footer {
  background: #11100c;
  border-top: 1px solid var(--line-soft);
  padding-top: 80px;
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 48px;
  padding-bottom: 64px;
}
.footer__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.footer__about .logo { margin-bottom: 28px; }
.footer__list { display: flex; flex-direction: column; gap: 14px; }
.footer__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-mut);
  line-height: 1.45;
}
.footer__list svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--gold); }
.footer__list a { transition: color .25s; }
.footer__list a:hover { color: var(--gold-bright); }

.footer__socials { display: flex; gap: 12px; margin-top: 28px; }
.footer__socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gold);
  transition: all .25s;
}
.footer__socials svg { width: 20px; height: 20px; }
.footer__socials a:hover { background: var(--gold); color: #1b160d; }

.footer__form { display: flex; flex-direction: column; gap: 14px; }
.footer__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.footer__form input,
.footer__form textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 15px 18px;
  width: 100%;
  resize: vertical;
  transition: border-color .25s;
}
.footer__form input::placeholder,
.footer__form textarea::placeholder { color: var(--text-mut); }
.footer__form input:focus,
.footer__form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.footer__form input.is-error,
.footer__form textarea.is-error { border-color: #c96f5c; }
.footer__hours {
  font-size: 13px;
  color: var(--text-mut);
  text-align: center;
}
.footer__form-msg { font-size: 14px; text-align: center; color: var(--gold-bright); }

.footer__map-ph {
  min-height: 210px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.img-ph--map { background-image: radial-gradient(120% 120% at 50% 40%, rgba(212,179,116,.1), transparent 60%), linear-gradient(160deg, #23201a, #14120e); }
.footer__pin { width: 34px; height: 42px; color: var(--gold); filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.footer__addr { font-size: 14.5px; color: var(--text-mut); margin-bottom: 16px; }

.footer__bottom {
  border-top: 1px solid var(--line-soft);
  padding: 22px 0;
}
.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-mut);
}
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { transition: color .25s; }
.footer__legal a:hover { color: var(--gold-bright); }

/* ---------- Появление при скролле ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1180px) {
  .nav { gap: 18px; }
  .header__phone + .header__phone { display: none; }
  .stats__list { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .process__steps { grid-template-columns: repeat(4, 1fr); row-gap: 40px; }
  .process__step:not(:last-child)::after { display: none; }
}

@media (max-width: 1020px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    background: rgba(21, 19, 15, .98);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 26px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { font-size: 17px; padding: 11px 0; }
  .burger { display: flex; margin-left: auto; }
  .header__contacts { margin-left: auto; }
  .header__contacts .btn { display: none; }

  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__img { min-height: 380px; }
  .why__inner { grid-template-columns: 1fr; }
  .why__visual { min-height: 340px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__map { grid-column: span 2; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .header__phones { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero__visual { grid-template-columns: 1fr; }
  .hero__card {
    width: auto;
    margin: -60px 16px 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px;
  }
  .hero__feat { flex: 1 1 46%; }
  .stats__list { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .service--wide { grid-column: span 2; }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: 1fr; }
  .works__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__map { grid-column: auto; }
  .footer__form-row { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .services__grid { grid-template-columns: 1fr; }
  .service--wide { grid-column: auto; }
  .works__grid { grid-template-columns: 1fr; }
  .works__item:nth-child(n) { grid-column: auto; grid-row: auto; }
  .hero__actions .btn { width: 100%; }
}
