/* ===== Малахитовая Тайга — стили ===== */

/* Цвета */
:root {
  --ink: #103e34;
  --dark: #073f35;
  --paper: #f4f6ed;
  --mint: #b8f3cd;
  --muted: #546b60;
  --line: #ccd6ca;
  --forest-shift: 0px;
  color-scheme: light;
}

/* ===== Базовые стили ===== */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }

a:not(.brand):not(.button) { transition: color .22s ease, text-shadow .22s ease; }
a:not(.brand):not(.button):hover { text-shadow: 0 0 10px #84d9b188; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid #31a983;
  outline-offset: 6px;
}

img { display: block; max-width: 100%; }

/* ===== Утилиты ===== */
.wrap {
  width: min(1280px, calc(100% - 96px));
  margin: auto;
}

/* ===== Шапка ===== */
.header {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
}

.brand-emblem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.header nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
}

.header nav a,
.text-link {
  border-bottom: 1px solid transparent;
}

.header nav a:hover,
.text-link:hover {
  border-color: currentColor;
}

.header-contact {
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
}

.header-contact span { margin-left: 18px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #124e43;
  color: var(--paper);
  isolation: isolate;
  min-height: min(760px, calc(100svh - 112px));
  display: flex;
}

.hero-forest {
  position: absolute;
  inset: -45px -20px;
  background: linear-gradient(90deg, rgba(3, 35, 29, 0.82) 0%, rgba(3, 35, 29, 0.4) 48%, rgba(3, 35, 29, 0.04) 100%),
    url('assets/forest.png') center 48% / cover no-repeat;
  z-index: -2;
  transform: translateY(var(--forest-shift));
  will-change: transform;
}

.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #042f2866, transparent 42%);
  z-index: -1;
}

.cursor-light {
  position: absolute;
  top: var(--cursor-y, 50%);
  left: var(--cursor-x, 50%);
  width: 300px;
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #b8f3cd25 0%, #84d9b118 34%, #84d9b10b 54%, transparent 74%);
  mix-blend-mode: screen;
  transition: opacity .22s ease;
}

.cursor-light-grain {
  display: block;
  width: 100%;
  height: 100%;
  opacity: .35;
  mask-image: radial-gradient(circle, #000 0%, #000b 48%, transparent 76%);
}

.cursor-active .cursor-light { opacity: .68; }

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  padding-top: 72px;
  padding-bottom: 26px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 700;
  margin: 0 0 28px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(56px, 6.8vw, 100px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.06;
  margin-bottom: 30px;
}

em {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-style: italic;
}

h1 em { color: var(--mint); }

.hero-description {
  font-size: 19px;
  color: #e0eae0;
  line-height: 1.65;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 36px;
}

.button {
  padding: 16px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .25s, background .25s;
}

.button:hover {
  transform: translateY(-3px);
  background: #d2f9dd;
}

.light {
  background: var(--mint);
  color: var(--dark);
}

.text-link { font-size: 15px; }

.hero-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid #c7e8d833;
  font-size: 12px;
  letter-spacing: 0;
}

.hero-bottom a { letter-spacing: 0; }

/* ===== Секции ===== */
.section {
  padding-top: 100px;
  padding-bottom: 100px;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0;
  margin-bottom: 34px;
}

.section-heading .eyebrow { color: var(--muted); }

/* ===== Услуги ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 28px;
  margin-top: 42px;
}

.service {
  padding: 26px 0 0;
  border-top: 2px solid var(--dark);
}

h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0;
}

.service h3 { margin: 0 0 20px; }

.service p {
  color: var(--muted);
  font-size: 16px;
  min-height: 96px;
}

.service ul {
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 2.15;
  margin-bottom: 30px;
}

.service li:before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 12px 3px 1px;
  border-radius: 50%;
  background: #72a28c;
}

.service-cta {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 24px;
  margin: 44px auto 0;
  font-size: 14px;
  border-bottom: 1px solid var(--dark);
  padding: 8px 0;
  transition: color .22s ease, border-color .22s ease, text-shadow .22s ease;
}

.service-cta:hover { color: #208461; border-color: #208461; }

/* ===== Айдентика ===== */
.light-scene {
  position: relative;
  isolation: isolate;
}

.light-scene > :not(.section-fireflies) {
  position: relative;
  z-index: 1;
}

.section-fireflies {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.soft-spark {
  width: 2px;
  height: 2px;
  background: #4c9f78;
  box-shadow: 0 0 8px 2px #4c9f7840;
  animation-name: drift-soft;
}

.identity { background: #e5ece2; }

.identity-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.identity-copy p:not(.eyebrow) {
  max-width: 360px;
  color: var(--muted);
  font-size: 16px;
}

.identity-copy h2 { font-size: clamp(50px, 5.5vw, 78px); }

.caption {
  display: block;
  font-size: 11px;
  letter-spacing: 1.6px;
  margin-top: 40px;
}

.identity-art { overflow: hidden; }

.identity-art img { width: 100%; height: auto; }

/* ===== Процесс ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 55px 0 0;
}

.steps li {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.steps h3 { margin-top: 8px; }
.steps p { font-size: 16px; color: var(--muted); }

/* ===== Контакты ===== */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
  color: var(--paper);
}

.contact > .wrap {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: center;
}

.contact h2 { font-size: clamp(48px, 5.5vw, 78px); }
.contact h2 em { color: var(--mint); }
.contact p { color: #d0dfd3; font-size: 16px; }

.contact-panel {
  border: 1px solid #94bca650;
  padding: 36px;
}

.contact-panel h3 { font-size: 24px; }
.contact-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #94bca650;
  color: var(--mint);
  overflow-wrap: anywhere;
}

.contact-link:hover { color: #fff; }

/* ===== Футер ===== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 12px;
}

.footer button {
  font-size: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* ===== Прочее ===== */
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 10;
  background: #fff;
  padding: 12px;
}

.skip:focus { top: 10px; }

.fireflies {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #72e7b4;
  box-shadow: 0 0 15px 4px #48bb8955;
  animation: drift 7s ease-in-out infinite alternate;
  opacity: 0.5;
}

.section-fireflies .soft-spark { opacity: 0.2; }

@keyframes drift-soft {
  from { transform: translate(0, 5px); opacity: 0.08; }
  to   { transform: translate(8px, -8px); opacity: 0.28; }
}

@keyframes drift {
  from { transform: translate(0, 12px); opacity: 0.1; }
  to   { transform: translate(18px, -28px); opacity: 0.7; }
}

.reveal {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(22px);
}

/* ===== Отключение анимаций ===== */
body.motion-off *,
body.motion-off *:before,
body.motion-off *:after {
  animation: none !important;
  transition: none !important;
}

body.motion-off .cursor-active .cursor-light { opacity: 0; }

.motion-off .hero-forest { transform: none; }
.motion-off .reveal.pending { opacity: 1; transform: none; }

html:has(.motion-off) { scroll-behavior: auto; }

/* ===== Адаптив ===== */
@media (min-width: 1600px) {
  .hero-content { padding-top: 100px; }
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .header { height: 94px; }
  .header nav { gap: 16px; font-size: 13px; }
  .header-contact { display: none; }
  .hero { min-height: min(760px, calc(100svh - 94px)); }
  .hero-content { padding-top: 65px; }
  .identity-grid { gap: 35px; }
  .service p { min-height: 155px; }
  .contact-grid { gap: 35px; }
  .contact-panel { padding: 24px; }
  .footer { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
  .header { height: 92px; gap: 10px; }
  .brand { font-size: 11px; gap: 8px; }
  .brand-emblem { width: 38px; height: 38px; }
  .header nav { gap: 14px; }
  .header nav a { font-size: 12px; }
  .header nav a:nth-child(2),
  .header nav a:nth-child(3) { display: none; }
  .hero { min-height: 620px; }
  .hero-content { padding-top: 54px; }
  .hero .eyebrow { font-size: 10px; }
  h1 { font-size: clamp(42px, 11vw, 64px); }
  .hero-description { font-size: 16px; }
  .hero-actions { gap: 23px; flex-wrap: wrap; }
  .hero-bottom {
    margin-top: 68px;
    align-items: flex-end;
    font-size: 10px;
  }
  .hero-bottom span { max-width: 160px; }
  .hero-bottom a { white-space: nowrap; }
  .hero-forest { background-position: 60% bottom; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  h2 { font-size: 36px; letter-spacing: 0; }
  .service-grid,
  .identity-grid,
  .steps,
  .contact-grid { grid-template-columns: 1fr; }
  .service-grid { margin-top: 35px; gap: 26px; }
  .service,
  .service + .service {
    margin-top: 0;
    padding: 24px 0 0;
  }
  .service p { min-height: 0; max-width: 400px; }
  .service h3 { margin-top: 18px; }
  .service ul { margin-bottom: 20px; }
  .identity-grid { gap: 30px; }
  .identity-grid > * { min-width: 0; }
  .identity-copy h2 { font-size: 44px; }
  .identity-copy p:not(.eyebrow) { max-width: none; }
  .caption { margin-top: 25px; }
  .steps { gap: 24px; margin-top: 35px; }
  .steps h3 { margin-top: 15px; }
  .contact h2 { font-size: 54px; }
  .footer { font-size: 11px; gap: 15px; }
  .footer > span { width: 100%; }
  .contact-grid { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .hero-forest { transform: none; }
  .reveal.pending { opacity: 1; transform: none; }
  .cursor-active .cursor-light { opacity: 0; }
}