:root {
  --primary: #5d9c59;
  --secondary: #df7861;
  --accent: #f9b572;
  --light: #faf8ed;
  --dark: #3a4d39;
  --text: #333333;
  --gray: #f5f5f5;
  --white: #ffffff;
  --muted: #666666;
  --header-h: 74px;
  --radius: 15px;
  --radius-pill: 50px;
  --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--light);
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.sprite-host {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  display: block;
  line-height: 0;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--dark);
  cursor: pointer;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.block-loader {
  position: relative;
  width: 84px;
  height: 84px;
}

.block-loader span {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  animation: rise 0.9s infinite alternate;
}

.block-loader span:nth-child(1) {
  left: 8px;
  top: 30px;
  background: var(--primary);
}

.block-loader span:nth-child(2) {
  left: 32px;
  top: 30px;
  background: var(--secondary);
  animation-delay: 0.15s;
}

.block-loader span:nth-child(3) {
  left: 56px;
  top: 30px;
  background: var(--accent);
  animation-delay: 0.3s;
}

@keyframes rise {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-22px);
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.logo .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  fill: currentColor;
  stroke: none;
}

.site-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  margin: 0 15px;
  color: var(--dark);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.header-btn,
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 25px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: 0.3s;
}

.header-btn {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(93, 156, 89, 0.3);
}

.header-btn:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-3px);
}

.mobile-menu {
  display: none;
  color: var(--dark);
  margin-left: auto;
}

/* Hero */
.hero,
.page-hero {
  background-color: #1b1b1b;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero {
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 80px 20px;
}

.hero-content {
  max-width: 900px;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  text-wrap: balance;
}

.hero p,
.page-hero p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.92;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary-hero {
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 15px 35px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  min-height: 52px;
}

.btn-primary-hero:hover {
  background: var(--light);
  color: var(--dark);
  transform: translateY(-4px);
}

.btn-secondary-hero {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  padding: 13px 33px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 52px;
}

.btn-secondary-hero:hover {
  background: var(--white);
  color: var(--dark);
}

.page-hero {
  min-height: 42vh;
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 80px 20px 70px;
}

/* Sections */
.section {
  padding: 90px 20px;
}

.section-muted {
  background: var(--gray);
}

.section-title {
  text-align: center;
  color: var(--dark);
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 4px;
  background: var(--accent);
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.section-title p {
  color: var(--muted);
  max-width: 640px;
  margin: 28px auto 0;
}

/* Service cards */
.service-card,
.product-card,
.blog-card,
.quote-card,
.detail-panel,
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover,
.product-card:hover,
.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.media-frame {
  width: 100%;
  background-color: #d9d4c8;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.service-card .media-frame {
  height: 350px;
}

.product-card .media-frame {
  height: 220px;
}

.blog-card .media-frame,
.article-hero-img {
  height: 300px;
}

.card-body,
.service-content,
.product-content,
.blog-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3,
.service-content h3,
.product-content h3,
.blog-content h3 {
  color: var(--dark);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card-body p,
.service-content p,
.product-content p,
.blog-content p {
  color: var(--muted);
  margin-bottom: 20px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  transition: 0.3s;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.service-content .btn-outline,
.blog-content .btn-outline {
  margin-top: auto;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--dark);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  width: 100%;
  transition: 0.3s;
}

.btn-accent:hover {
  background: var(--secondary);
  color: var(--white);
}

.product-kicker {
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Carousel */
.slider {
  position: relative;
}

.slider-viewport {
  overflow: hidden;
}

.slider-track {
  display: flex;
  will-change: transform;
}

.slider-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%);
  transition: 0.25s;
}

.slider-btn .ui-icon {
  width: 22px;
  height: 22px;
}

.slider-btn:hover {
  background: var(--dark);
  color: var(--white);
}

.slider-btn.prev {
  left: 0;
}

.slider-btn.next {
  right: 0;
}

.product-slider {
  padding: 10px 56px 8px;
}

.product-slider .slider-track {
  gap: 24px;
}

.product-slider .product-card {
  flex: 0 0 280px;
  width: 280px;
  height: auto;
}

.quote-slider {
  padding: 0 56px;
}

.quote-slider .slider-track {
  width: 100%;
}

.quote-slide {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 8px 4px 12px;
}

.quote-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px;
}

.quote-card p {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 24px;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0 0 4px;
  color: var(--dark);
}

.stars {
  color: var(--accent);
  display: flex;
  gap: 3px;
}

.stars .ui-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

/* About */
.about-copy h2,
.about-copy h3,
.article-body h2,
.detail-copy h2 {
  color: var(--dark);
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-copy p,
.article-body p,
.detail-copy p {
  margin-bottom: 18px;
  font-size: 1.08rem;
}

.about-photo,
.detail-photo {
  height: 420px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.stat-row div {
  background: var(--white);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat-row strong {
  display: block;
  color: var(--primary);
  font-size: 1.6rem;
}

/* CTA */
.cta-section {
  color: var(--white);
  text-align: center;
  padding: 100px 20px;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 640px;
  margin: 0 auto 30px;
  opacity: 0.92;
}

.cta-section .btn-primary-hero {
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 70px 20px 30px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p,
.footer-contact p {
  opacity: 0.82;
}

.site-footer h3 {
  font-size: 1.25rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.site-footer h3::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 3px;
  background: var(--accent);
  left: 0;
  bottom: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.newsletter-form {
  display: flex;
  margin-top: 12px;
}

.newsletter-form input,
.form-control-wl {
  flex: 1;
  padding: 12px 15px;
  border: 0;
  border-radius: 50px 0 0 50px;
  outline: 0;
  min-height: 48px;
}

.newsletter-form button {
  background: var(--primary);
  color: var(--white);
  border: 0;
  padding: 0 18px;
  border-radius: 0 50px 50px 0;
  font-weight: 600;
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
}

.newsletter-form button:hover {
  background: var(--accent);
  color: var(--dark);
}

#home,
#services,
#products,
#about,
#insights,
#contact {
  scroll-margin-top: 90px;
}

.contact-card {
  color: var(--text);
}

.contact-card .contact-line a {
  color: var(--dark);
  text-decoration: none;
}

.contact-card .contact-line a:hover {
  color: var(--primary);
}

.contact-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.contact-line .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.75;
}

.form-note {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--accent);
}

/* Contact form */
.form-control-wl {
  width: 100%;
  border-radius: 12px;
  background: var(--light);
  border: 1px solid transparent;
  margin-bottom: 14px;
}

.form-control-wl:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(93, 156, 89, 0.12);
}

textarea.form-control-wl {
  min-height: 140px;
  resize: vertical;
  border-radius: 12px;
}

.form-submit {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  border: 0;
  border-radius: var(--radius-pill);
  min-height: 48px;
  font-weight: 600;
}

.form-submit:hover {
  background: var(--dark);
}

/* Article */
.article-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  font-size: 1.6rem;
  margin-top: 32px;
}

.article-meta {
  color: var(--muted);
  margin-bottom: 24px;
}

.process-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.process-list li {
  position: relative;
  padding: 18px 18px 18px 72px;
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.process-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.crumb {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.crumb a {
  color: var(--accent);
  text-decoration: none;
}

#scrollToTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#scrollToTop.is-visible {
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.7s ease forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .mobile-menu {
    display: grid;
  }

  .mobile-menu .ui-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 12px 20px 20px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav a {
    margin: 6px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .header-btn {
    display: none;
  }

  .about-photo,
  .detail-photo {
    height: 300px;
    margin-top: 24px;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .product-slider,
  .quote-slider {
    padding-left: 0;
    padding-right: 0;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
    background: rgba(93, 156, 89, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  }

  .slider-btn.prev {
    left: 20px;
  }

  .slider-btn.next {
    right: 20px;
  }

  .product-slider .product-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: calc(100vh - var(--header-h));
    padding: 60px 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary-hero,
  .btn-secondary-hero {
    width: 100%;
  }

  .service-card .media-frame {
    height: 240px;
  }

  .quote-card {
    padding: 24px;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
  }

  .section {
    padding: 70px 16px;
  }
}
