@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=Prata&display=swap');

:root {
  --paper: #F5F3EE;
  --ink: #252824;
  --green: #344238;
  --stone: #A6A49C;
  --sand: #D8D0C2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; /* Увеличили отступ, чтобы шапка не перекрывала заголовки при переходе по якорям */ }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.7 Manrope, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, select, textarea { outline-offset: 5px; }
button { cursor: pointer; }
img { display: block; width: 100%; object-fit: cover; }
h1, h2, h3 { font-family: Prata, Georgia, serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(46px, 6.2vw, 100px); }
h2 { font-size: clamp(34px, 4vw, 62px); }
h3 { font-weight: 500; font-size: 23px; line-height: 1.35; }
p { max-width: 660px; }

/* ПРИКЛЕЕННАЯ ШАПКА */
header {
  height: 96px; padding: 0 4.5%;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #25282425;
  background: rgba(245, 243, 238, 0.92); /* Полупрозрачный фон бумаги */
  backdrop-filter: blur(12px); /* Эффект матового стекла */
  -webkit-backdrop-filter: blur(12px); /* Для Safari */
  position: sticky;
  top: 0;
  z-index: 50;
  transition: height 0.3s ease, background 0.3s ease;
}
/* Эффект при прокрутке (добавим чуть позже через JS, если нужно, но стили уже готовы) */
header.scrolled {
  height: 76px;
  background: rgba(245, 243, 238, 0.98);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.brand { display: flex; gap: 13px; align-items: center; }
.mark {
  border: 1px solid var(--ink); width: 43px; height: 43px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 25px; font-family: Georgia, serif;
}
.brand strong { display: block; font-size: 20px; letter-spacing: 2.5px; font-weight: 500; line-height: 1.2; }
.brand small { display: block; font-size: 9px; letter-spacing: 2.5px; line-height: 1.4; margin-top: 3px; }
.nav { display: flex; gap: 25px; align-items: center; font-size: 12px; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.nav-cta { padding: 11px 16px; border: 1px solid #25282450; transition: all 0.3s; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.menu { display: none; background: none; border: 0; font-size: 25px; }
.eyebrow {
  font-size: 11px; letter-spacing: 2.8px; text-transform: uppercase;
  color: var(--stone); display: block; margin-bottom: 26px;
}
.caption {
  font-size: 9px; letter-spacing: 2.5px; color: #73786e;
  padding: 10px 0; text-transform: uppercase;
}
.wrap { max-width: 1440px; margin: auto; padding: 110px 7%; }
.btn {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--ink);
  background: none; font-size: 12px; color: inherit;
}
.btn::after { content: '↗'; font-size: 21px; }
.btn.solid { background: var(--green); color: white; padding: 17px 23px; border: 0; }
.btn.solid::after { content: '→'; }

/* HERO */
.hero {
  height: calc(100svh - 96px); min-height: 610px; max-height: 1000px;
  position: relative; color: white; isolation: isolate;
}
.hero > img { position: absolute; inset: 0; height: 100%; z-index: -2; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #0d1913b8, #10181000 85%),
              linear-gradient(0deg, #0d191370, transparent 50%);
  z-index: -1;
}
.hero-content { padding: 8% 7%; max-width: 980px; }
.hero-content .eyebrow {
  font-size: 12px;
  letter-spacing: 3.5px;
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 0, 0, 0.6);
  margin-bottom: 30px;
  font-weight: 500;
  opacity: 1;
}
.hero h1 { margin: 18px 0 25px; font-size: clamp(48px, 6.3vw, 97px); }
.hero .tagline { font: clamp(25px, 2.4vw, 37px)/1.45 Prata, Georgia, serif; max-width: 650px; }
.hero p { color: #eeeeee9c; font-size: 13px; }
.hero-bottom {
  position: absolute; bottom: 34px; left: 7%; right: 7%;
  display: flex; justify-content: space-between; font-size: 10px;
  letter-spacing: 1.5px;
}

/* INTRO */
.intro { display: grid; grid-template-columns: 1fr 2fr; gap: 80px; }
.intro p { font-size: 18px; line-height: 1.8; }
.intro h2 { max-width: 850px; }

/* DIRECTIONS */
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 48px;
}
.section-head h2 { margin-bottom: 0; }
.direction-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 55px 70px; align-items: start; }
.direction:nth-child(even) { margin-top: 100px; }
.direction img { height: 350px; transition: transform .7s; }
.direction:first-child img { height: 470px; }
.image-frame { overflow: hidden; position: relative; }
.image-frame:hover img { transform: scale(1.035); }
.direction h3 { font-size: 29px; margin: 20px 0 10px; }
.direction p { max-width: 470px; font-size: 13px; }
.direction .number { display: none; }

/* FEATURE */
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; align-items: stretch; }
.feature > img { height: 680px; }
.feature-text {
  padding: 90px 13%; display: flex; flex-direction: column;
  justify-content: center; background: #eaebdc;
}
.feature-text h2 { font-size: clamp(34px, 3.5vw, 55px); }

/* PANORAMA */
.panorama {
  height: 650px; position: relative; color: white;
  display: flex; align-items: end; padding: 6% 7%; isolation: isolate;
}
.panorama img { position: absolute; inset: 0; height: 100%; z-index: -2; }
.panorama::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, #112519d9, #11251966 50%, transparent);
  z-index: -1;
}
.panorama .eyebrow {
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 0, 0, 0.6);
  font-weight: 500;
}
.panorama h2 { max-width: 600px; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5); }

/* DARK */
.dark { background: #222b24; color: var(--paper); }
.dark .caption { color: #c0c6bc; }

/* ГЛАВНАЯ: Сетка карточек */
.bonsai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tree-card { display: flex; flex-direction: column; height: 100%; }
.tree-card .gallery-item { flex-grow: 1; }
.bonsai-grid img { height: auto; width: 100%; display: block; transition: opacity 0.3s ease; }
.tree-card:hover img { opacity: 0.85; }
.bonsai-grid h3 { 
  font-family: Prata, serif; font-size: 24px; margin: 28px 0 0; 
  min-height: 58px; 
  line-height: 1.2;
}

/* PERSON */
.person { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.person-page { padding-top: 40px; }
.person-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #e9e6dc;
  overflow: hidden;
}
.person-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.person-visual .monogram {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font: 170px Prata, serif; color: #34423865;
  background: #e9e6dc;
}

/* GALLERY GRID */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.gallery-grid .gallery-item:first-child { grid-column: span 2; }
.gallery-grid img { height: 310px; object-fit: cover; }
.gallery-item {
  background: none; border: 0; padding: 0; color: inherit;
  text-align: left; width: 100%;
}
.gallery-item:hover img { filter: brightness(.94); }

/* КАТАЛОГ БОНСАЙ */
.category-nav { display: flex; flex-wrap: wrap; gap: 15px; }
.nav-pill {
  padding: 12px 24px;
  border: 1px solid #25282430;
  font-size: 13px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.nav-pill:hover {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.category-header {
  margin-bottom: 40px;
  padding-top: 20px;
}
.category-header h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
}
.category-header p {
  font-size: 13px;
  color: var(--stone);
}
.bonsai-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
}
.bonsai-card { 
  display: flex; flex-direction: column; height: 100%;
}
.card-img-wrapper {
  overflow: hidden;
  margin-bottom: 18px;
}
.bonsai-card img { 
  height: 380px; object-fit: cover; width: 100%; 
  transition: transform 0.5s ease;
}
.bonsai-card:hover img {
  transform: scale(1.05);
}
.bonsai-card h3 {
  font-family: Prata, serif; font-size: 20px;
  margin: 0 0 8px; flex-grow: 0;
}
.bonsai-card .price-block {
  margin-top: auto; 
  display: flex; flex-direction: column; align-items: flex-start;
}
.bonsai-card .price {
  font-size: 14px; color: var(--ink);
  margin: 0 0 14px; letter-spacing: .5px;
}
.bonsai-card .btn-buy,
.bonsai-card .private {
  display: inline-block; 
  padding: 11px 22px;
  border: 0; font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase;
}
.bonsai-card .btn-buy {
  background: var(--green); color: white; cursor: pointer;
}
.bonsai-card .btn-buy:hover { background: #252824; }
.bonsai-card .private {
  background: #a6a49c; color: #ffffff;
}

/* LECTURE */
.lecture { display: grid; grid-template-columns: 1fr 1.15fr; gap: 80px; align-items: center; }
.lecture img { height: 500px; }

/* CONTACT */
.contact { border-top: 1px solid #25282430; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lead-form label { font-size: 11px; display: block; }
.lead-form input:not([type=checkbox]),
.lead-form textarea,
.lead-form select {
  width: 100%; border: 0; border-bottom: 1px solid #25282450;
  background: transparent; padding: 10px 0; border-radius: 0; color: var(--ink);
}
.lead-form textarea { min-height: 85px; resize: vertical; }
.full { grid-column: 1 / -1; }
.notice { font-size: 11px; color: #6b7167; line-height: 1.7; }
.file-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.file-preview img { width: 100px; height: 75px; }
.consent { display: flex !important; align-items: start; gap: 10px; }
.consent input { margin-top: 5px; }
.form-message {
  font-size: 12px; padding: 16px; background: #eaebdc; display: none;
}
.form-message.visible { display: block; }
.honey { position: absolute; left: -10000px; }

/* FOOTER */
footer {
  padding: 40px 7%; border-top: 1px solid #25282425;
  display: flex; justify-content: space-between; gap: 25px; font-size: 10px;
}

/* PAGE HEAD */
.page-head { padding: 50px 7% 40px; max-width: 1440px; margin: auto; }
.page-head h1 { max-width: 1040px; font-size: clamp(43px, 5.3vw, 80px); margin-bottom: 25px; }
.page-head p { font-size: 17px; max-width: 660px; }
.page-image { height: 570px; position: relative; }
.page-image img { height: 100%; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 35px; margin-top: 50px; }
.steps article { border-top: 1px solid #25282450; padding-top: 18px; }
.steps small { font-size: 12px; color: #798174; }
.steps h3 { margin: 20px 0 12px; font-size: 19px; }
.steps p { font-size: 12px; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.formats article { border-top: 1px solid #25282450; padding-top: 25px; }

/* БЛОГ И ОПИСАНИЕ ДЕРЕВА */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 30px;
}
.blog-card {
  display: flex; flex-direction: column; background: #fff; text-decoration: none; color: inherit;
  border: 1px solid #25282415;
}
.blog-card img { height: 240px; object-fit: cover; }
.blog-card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card h3 { font-family: Prata, serif; font-size: 22px; margin: 0 0 15px 0; }
.blog-card .date { font-size: 10px; letter-spacing: 2px; color: var(--stone); margin-bottom: 10px; text-transform: uppercase; }
.blog-card p { font-size: 13px; line-height: 1.6; color: #555; margin: 0; }

.tree-page { padding-top: 0; }
.tree-main-photo { width: 100%; max-height: 70vh; object-fit: contain; background: #eae7df; margin-bottom: 40px; }
.tree-info h1 { font-size: clamp(32px, 4vw, 56px); margin: 0 0 20px; }
.tree-info .tree-price { font-size: 24px; font-family: Prata, serif; margin-bottom: 30px; color: var(--green); }
.tree-description { font-size: 16px; line-height: 1.8; color: #333; }
.tree-description p { margin-bottom: 20px; max-width: 800px; }

/* СТИЛИ ДЛЯ БЛОКА КЕЙСА */
.case-study-section {
  border-top: 1px solid #25282430;
  padding-top: 80px;
  margin-top: 40px;
}
.case-study-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.case-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.case-photo {
  position: relative;
}
.case-photo img {
  height: 400px;
  object-fit: cover;
  width: 100%;
}
.case-photo .label {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(37, 40, 36, 0.8);
  color: white;
  font-size: 11px;
  padding: 6px 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.case-text h2 {
  font-size: clamp(30px, 3.5vw, 45px);
  margin: 15px 0 25px;
}
.case-text p {
  font-size: 15px;
  margin-bottom: 30px;
}

/* DIALOG */
dialog {
  border: 0; padding: 0; width: min(1100px, 94vw);
  max-height: 94svh; background: var(--paper); color: var(--ink);
}
dialog::backdrop { background: #000000c0; }
.dialog-close {
  position: absolute; top: 15px; right: 15px;
  border: 0; background: var(--paper); width: 40px; height: 40px;
  font-size: 26px; z-index: 1;
}
.dialog-body { padding: 40px; }
.lightbox img { max-height: 80svh; object-fit: contain; }

/* STICKY CTA */
.sticky-cta { display: none; }
.skip { position: absolute; left: -10000px; }
.skip:focus {
  left: 10px; top: 10px; background: white; z-index: 100; padding: 10px;
}

@media (min-width: 1500px) { .hero-content { padding-top: 110px; } }

@media (max-width: 1050px) {
  .nav { gap: 15px; font-size: 10px; }
  .nav a:nth-child(4) { display: none; }
  .wrap { padding: 80px 6%; }
  .person, .contact-grid { gap: 50px; }
  .direction-grid { gap: 40px; }
  .feature > img { height: 570px; }
  .feature-text { padding: 55px 10%; }
  .bonsai-grid img { height: auto; }
  .bonsai-gallery { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .case-photo img { height: 300px; }
}

@media (max-width: 760px) {
  header { height: 78px; padding: 0 6%; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 8px; }
  .mark { width: 36px; height: 36px; font-size: 21px; }
  .menu { display: block; }
  .nav {
    display: none; position: absolute; top: 78px; left: 0; right: 0;
    background: var(--paper); padding: 30px 6%;
    font-size: 15px; gap: 22px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* Тень для выпадающего меню */
  }
  .nav.open { display: flex; flex-direction: column; align-items: start; }
  .nav a:nth-child(4) { display: block; }
  .hero { height: calc(100svh - 78px); min-height: 620px; max-height: 850px; }
  .hero img { object-position: 65% center; }
  .hero::after {
    background: linear-gradient(90deg, #0c1914bd, #0c191440),
                linear-gradient(0deg, #0c191499, transparent);
  }
  .hero-content { padding: 90px 7% 0; }
  .hero-content .eyebrow { font-size: 11px; letter-spacing: 3px; }
  .hero h1 { font-size: 49px; }
  .hero .tagline { font-size: 26px; }
  .hero-bottom { bottom: 25px; gap: 20px; letter-spacing: .8px; }
  .hero-bottom span:last-child { max-width: 140px; text-align: right; }
  .wrap { padding: 65px 7%; }
  .intro, .person, .lecture, .two-cols, .contact-grid {
    grid-template-columns: 1fr; gap: 30px;
  }
  .intro p { font-size: 16px; }
  .section-head { display: block; margin-bottom: 35px; }
  .section-head .btn { margin-top: 20px; }
  .direction-grid { grid-template-columns: 1fr; gap: 40px; }
  .direction:nth-child(even) { margin-top: 0; }
  .direction img, .direction:first-child img { height: 330px; }
  .direction h3 { font-size: 27px; }
  .feature { grid-template-columns: 1fr; }
  .feature > img { height: 370px; }
  .feature-text { padding: 55px 7%; }
  .panorama { height: 570px; padding: 50px 7%; }
  .panorama img { object-position: 68%; }
  .bonsai-grid { grid-template-columns: 1fr; gap: 45px; }
  .bonsai-grid img { height: auto; }
  .person-visual { order: 2; }
  .person-visual .monogram { font-size: 110px; }

  .gallery-grid { grid-template-columns: 1fr; gap: 25px; }
  .gallery-grid .gallery-item:first-child { grid-column: span 1; }
  .gallery-grid img,
  .gallery-grid .gallery-item:first-child img { height: 260px; }

  .lecture img { height: 330px; }
  .lead-form { gap: 20px; }
  .lead-form .mobile-full { grid-column: 1 / -1; }
  .contact-grid { gap: 35px; }
  footer { display: block; padding-bottom: 95px; }
  footer > * { display: block; margin-bottom: 15px; }
  .page-head { padding: 40px 7% 30px; }
  .page-head p { font-size: 15px; }
  .page-image { height: 360px; }
  .steps { grid-template-columns: 1fr; gap: 25px; }
  .formats { grid-template-columns: 1fr; }
  .tree-details { grid-template-columns: 1fr; }
  .tree-details img { height: 290px; min-height: 0; }
  .tree-details .dialog-body { padding: 35px 25px; }
  .bonsai-gallery { grid-template-columns: 1fr; gap: 35px; }
  .bonsai-card img { height: 380px; }
  .blog-grid { grid-template-columns: 1fr; gap: 30px; }
  .sticky-cta {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 40; justify-content: space-between;
    background: var(--green); color: white; padding: 15px 7%; font-size: 12px;
  }
  .dialog-body { padding: 25px; }
  .lightbox img { height: auto; }

  .case-study-grid { grid-template-columns: 1fr; gap: 30px; }
  .case-photo img { height: 250px; }
  .case-study-section { padding-top: 50px; margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}