/* ===========================
   BUDOVA — Main Stylesheet
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* === TOKENS === */
:root {
  --forest:    #2C4A2E;
  --moss:      #5C7A3E;
  --birch:     #D4B896;
  --earth:     #F2EDE6;
  --white:     #FAFAF8;
  --dark:      #1A1A1A;
  --mid:       #4A4A4A;
  --light-line:#DDD6CE;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --section-pad: 100px 0;
  --container:   1180px;
  --radius:      4px;
  --transition:  0.35s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
  display: block;
  margin-bottom: 14px;
}

/* === HEADER / NAV === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.97);
  box-shadow: 0 1px 0 var(--light-line);
  transition: box-shadow var(--transition);
  padding: 0;
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo svg { flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0.02em;
}

.logo-tagline {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--moss);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border: 1.5px solid var(--forest);
  border-radius: var(--radius);
  color: var(--forest) !important;
  background: transparent;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--forest);
  color: var(--white) !important;
}

/* === BURGER === */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 2px;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-image-side {
  position: relative;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s ease;
}

.hero-img.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,26,26,0.15) 0%, rgba(26,26,26,0.0) 100%);
}

.hero-content-side {
  background: var(--forest);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 64px 80px 72px;
  position: relative;
}

.hero-content-side::before {
  content: '';
  position: absolute;
  top: 80px; bottom: 80px; left: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--birch) 30%, var(--birch) 70%, transparent);
}

.hero-title {
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-title strong {
  font-weight: 700;
  display: block;
  color: var(--birch);
}

.hero-desc {
  font-size: 15px;
  color: rgba(250,250,248,0.75);
  max-width: 400px;
  line-height: 1.75;
  margin-bottom: 44px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--birch);
  color: var(--forest);
  border-color: var(--birch);
}

.btn-primary:hover {
  background: #C8A880;
  border-color: #C8A880;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,184,150,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(250,250,248,0.4);
}

.btn-outline:hover {
  border-color: var(--white);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid rgba(250,250,248,0.12);
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--birch);
  line-height: 1;
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(250,250,248,0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* === ABOUT === */
.about {
  padding: var(--section-pad);
  background: var(--earth);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
}

.about-img-accent {
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 200px;
  aspect-ratio: 1;
  background: var(--forest);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.about-accent-num {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  color: var(--birch);
  line-height: 1;
}

.about-accent-text {
  font-size: 11px;
  font-weight: 500;
  color: rgba(250,250,248,0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  line-height: 1.4;
}

.about-content h2 {
  font-size: clamp(32px, 3vw, 48px);
  color: var(--forest);
  margin-bottom: 24px;
}

.about-content p {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.about-value {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.about-value-icon {
  width: 36px;
  height: 36px;
  background: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-value-icon svg { width: 16px; height: 16px; stroke: var(--birch); }

.about-value-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 2px;
}

.about-value-text span {
  font-size: 13px;
  color: var(--mid);
}

/* === SERVICES === */
.services {
  padding: var(--section-pad);
  background: var(--white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(32px, 3vw, 48px);
  color: var(--forest);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.75;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--light-line);
}

.service-card {
  background: var(--white);
  padding: 48px 36px;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 36px; right: 36px;
  height: 2px;
  background: var(--moss);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover { background: var(--earth); }
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--earth);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: background var(--transition);
}

.service-card:hover .service-icon { background: var(--white); }
.service-icon svg { width: 24px; height: 24px; stroke: var(--forest); }

.service-card h3 {
  font-size: 22px;
  color: var(--forest);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.75;
}

/* === PROJECTS === */
.projects {
  padding: var(--section-pad);
  background: var(--forest);
}

.projects .section-header h2 { color: var(--white); }
.projects .section-header p { color: rgba(250,250,248,0.65); }
.projects .eyebrow { color: var(--birch); }

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

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}

.project-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img { transform: scale(1.06); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.85) 0%, rgba(26,26,26,0.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
  transition: background var(--transition);
}

.project-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--birch);
  margin-bottom: 6px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.project-loc {
  font-size: 12px;
  color: rgba(250,250,248,0.6);
  margin-top: 4px;
}

/* === ECO SECTION === */
.eco {
  padding: var(--section-pad);
  background: var(--earth);
}

.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.eco-content h2 {
  font-size: clamp(32px, 3vw, 48px);
  color: var(--forest);
  margin-bottom: 20px;
}

.eco-content p {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 16px;
}

.eco-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.eco-feature {
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 3px solid var(--moss);
}

.eco-feature strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 4px;
}

.eco-feature span {
  font-size: 13px;
  color: var(--mid);
}

.eco-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

.eco-img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.eco-img:first-child { grid-column: 1 / -1; aspect-ratio: 16/9; }
.eco-img:not(:first-child) { aspect-ratio: 1; }

/* === TESTIMONIALS === */
.testimonials {
  padding: var(--section-pad);
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 0;
}

.testimonial-card {
  background: var(--earth);
  padding: 36px 32px;
  border-radius: var(--radius);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.6;
  color: var(--birch);
  position: absolute;
  top: 28px;
  left: 28px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.8;
  margin-top: 24px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}

.testimonial-author-role {
  font-size: 12px;
  color: var(--mid);
  margin-top: 1px;
}

/* === CONTACT === */
.contact {
  padding: var(--section-pad);
  background: var(--forest);
}

.contact .section-header h2 { color: var(--white); }
.contact .section-header p { color: rgba(250,250,248,0.65); }
.contact .eyebrow { color: var(--birch); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: start;
}

.contact-info {
  padding-top: 8px;
}

.contact-info h3 {
  font-size: 28px;
  color: var(--white);
  margin-bottom: 20px;
}

.contact-info p {
  font-size: 14px;
  color: rgba(250,250,248,0.65);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  background: rgba(250,250,248,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg { width: 18px; height: 18px; stroke: var(--birch); }

.contact-item-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.4);
  margin-bottom: 3px;
}

.contact-item-value {
  font-size: 15px;
  color: var(--white);
}

.contact-item-value a { color: var(--white); transition: color var(--transition); }
.contact-item-value a:hover { color: var(--birch); }

/* === FORM === */
.contact-form-wrap {
  background: rgba(250,250,248,0.05);
  border: 1px solid rgba(250,250,248,0.1);
  border-radius: 4px;
  padding: 48px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.55);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(250,250,248,0.07);
  border: 1px solid rgba(250,250,248,0.14);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(250,250,248,0.3); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--birch);
  background: rgba(250,250,248,0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #E07B54;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select option { background: var(--forest); color: var(--white); }

.field-error {
  font-size: 12px;
  color: #E07B54;
  margin-top: 5px;
  display: none;
}

.form-group.has-error .field-error { display: block; }

.form-note {
  font-size: 12px;
  color: rgba(250,250,248,0.35);
  line-height: 1.6;
  margin-bottom: 24px;
}

.form-note a { color: var(--birch); text-decoration: underline; }
.form-note a:hover { color: var(--white); }

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success svg {
  width: 56px;
  height: 56px;
  stroke: var(--birch);
  margin: 0 auto 20px;
}

.form-success h3 {
  font-size: 26px;
  color: var(--white);
  margin-bottom: 12px;
}

.form-success p {
  font-size: 14px;
  color: rgba(250,250,248,0.6);
  line-height: 1.7;
}

/* === FOOTER === */
.site-footer {
  background: #111710;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250,250,248,0.08);
}

.footer-brand p {
  font-size: 13px;
  color: rgba(250,250,248,0.4);
  line-height: 1.75;
  margin-top: 16px;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.4);
  margin-bottom: 18px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 13px;
  color: rgba(250,250,248,0.65);
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--birch); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(250,250,248,0.3);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 12px;
  color: rgba(250,250,248,0.35);
  transition: color var(--transition);
}

.footer-legal a:hover { color: var(--birch); }

/* === SCROLL REVEAL ===
   Анімація вмикається лише якщо JS додав .js-ready до <html>.
   Без JS — весь контент одразу видимий. */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.js-ready [data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready [data-reveal-delay="1"] { transition-delay: 0.1s; }
.js-ready [data-reveal-delay="2"] { transition-delay: 0.2s; }
.js-ready [data-reveal-delay="3"] { transition-delay: 0.3s; }
.js-ready [data-reveal-delay="4"] { transition-delay: 0.4s; }
.js-ready [data-reveal-delay="5"] { transition-delay: 0.5s; }

/* === MOBILE NAV === */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--forest);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 102;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 22px; color: var(--white) !important; }
  .nav-cta { font-size: 18px !important; padding: 14px 32px !important; }
  .burger { display: flex; z-index: 103; }
  .site-header.scrolled .burger span { background: var(--forest); }
  .burger.open span { background: var(--white) !important; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image-side { height: 50vh; }
  .hero-content-side { padding: 60px 32px; }
  .hero-content-side::before { display: none; }
  .about-grid, .eco-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-accent { right: 0; bottom: -16px; width: 140px; }
  .about-accent-num { font-size: 36px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-pad: 60px 0; }
  .form-row { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .eco-features { grid-template-columns: 1fr; }
  .eco-visual { grid-template-columns: 1fr; }
  .eco-img:first-child { aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .contact-form-wrap { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}
