/* =========================================
   Mobile-First Enhancement Layer
   (loaded after style.css)
========================================= */

:root {
  --fluid-type-xs: clamp(0.82rem, 0.2vw + 0.78rem, 0.92rem);
  --fluid-type-sm: clamp(0.92rem, 0.25vw + 0.88rem, 1.02rem);
  --fluid-type-md: clamp(1rem, 0.4vw + 0.92rem, 1.14rem);
  --fluid-type-lg: clamp(1.25rem, 1.2vw + 1rem, 1.9rem);
  --fluid-type-xl: clamp(1.5rem, 2.2vw + 1rem, 2.6rem);
  --fluid-space-1: clamp(0.5rem, 1.2vw, 0.75rem);
  --fluid-space-2: clamp(0.75rem, 1.8vw, 1rem);
  --fluid-space-3: clamp(1rem, 2.4vw, 1.5rem);
  --fluid-space-4: clamp(1.25rem, 3vw, 2rem);
  --fluid-space-5: clamp(1.75rem, 4vw, 3rem);
  --radius-md: 14px;
  --radius-xl: 20px;
  --touch-size: 48px;
  --ease-standard: 0.3s ease;
}

html {
  font-size: clamp(15px, 0.26vw + 14px, 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.7;
}

.container {
  width: min(100% - clamp(1rem, 4vw, 2.5rem), 1200px);
}

.section {
  padding-block: clamp(2.75rem, 6vw, 6rem);
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.section-head {
  margin-bottom: var(--fluid-space-5);
}

.section-head h2 {
  font-size: var(--fluid-type-xl);
}

.section-head p,
.hero-subtext,
.about-card p,
.guide-points li,
.contact-info p,
.contact-item-text {
  font-size: var(--fluid-type-sm);
}

.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.9rem);
}

/* Mobile-first grids */
.about-cards,
.products-grid,
.guidance-grid,
.footer-grid,
.contact-layout,
.contact-form-grid,
.contact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fluid-space-3);
}

.product-gallery {
  aspect-ratio: 4 / 5;
  min-height: clamp(280px, 72vw, 480px);
}

.hero-content {
  padding-inline: clamp(0.25rem, 2vw, 1rem);
}

/* Visual polish */
.site-header,
.main-nav,
.contact-shell,
.about-card,
.guide-card,
.product-card,
.map-wrap {
  transition: transform var(--ease-standard), box-shadow var(--ease-standard), background var(--ease-standard),
    border-color var(--ease-standard), filter var(--ease-standard);
}

.about-card,
.guide-card,
.product-card,
.contact-shell,
.map-wrap {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Touch + tap micro-interactions */
.tap-feedback {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  will-change: transform;
}

.tap-feedback.is-tapping {
  transform: scale(0.97);
  filter: brightness(0.98);
}

:where(.btn-primary, .lang-toggle, .hamburger, .nav-close, .product-nav, .contact-action, .guide-link) {
  min-width: var(--touch-size);
  min-height: var(--touch-size);
}

@media (pointer: coarse) {
  :where(button, [role='button'], .btn-primary, .lang-toggle, .hamburger, .nav-close, .product-nav, .contact-action, .guide-link,
      .main-nav a) {
    min-height: var(--touch-size);
    min-width: var(--touch-size);
    touch-action: manipulation;
  }

  .main-nav a {
    min-height: var(--touch-size);
    display: inline-flex;
    align-items: center;
  }

  .product-dot {
    min-width: 6px;
    min-height: 6px;
    width: 6px;
    height: 6px;
    padding: 0;
  }

  .product-dot.active {
    min-width: 16px;
    width: 16px;
  }
}

/* Responsive image safety */
img {
  max-width: 100%;
  height: auto;
}

img[loading='lazy'] {
  content-visibility: auto;
}

/* Progressive enhancement breakpoints (min-width, mobile-first) */
@media (min-width: 600px) {
  .about-cards,
  .guidance-grid,
  .contact-form-grid,
  .contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-group.form-group--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .about-cards,
  .guidance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (min-width: 1600px) {
  .container {
    width: min(100% - 6vw, 1440px);
  }
}

@media (min-width: 2200px) {
  .container {
    width: min(100% - 8vw, 1680px);
  }
}

/* =========================================
   Professional Responsive Polish
========================================= */

.hero {
  min-height: min(100svh, 980px);
  padding-top: clamp(6.1rem, 12vh, 8.8rem);
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: clamp(0.9rem, 4vw, 2.6rem);
}

.hero-content {
  width: min(100%, 760px);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(1.9rem, 7.2vw, 4.2rem);
  line-height: 1.2;
  margin-top: clamp(1.6rem, 4.2vh, 3.2rem);
  text-wrap: balance;
}

.hero-subtext {
  max-width: 36ch;
  margin-inline: auto;
}

.hero-plant-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 560px);
  margin-inline: auto;
  pointer-events: none;
  padding: clamp(0.4rem, 1.2vw, 0.9rem);
  border-radius: clamp(18px, 2.8vw, 28px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(223, 245, 210, 0.44));
  box-shadow: 0 16px 38px rgba(24, 57, 29, 0.15);
}

.hero-plant-wrap::before {
  content: '';
  position: absolute;
  inset: auto 10% -10% 10%;
  height: clamp(30px, 6vw, 56px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 125, 50, 0.25), transparent 72%);
  filter: blur(10px);
  z-index: 0;
}

.hero-plant {
  position: relative;
  z-index: 1;
  display: block;
  margin-inline: auto;
  justify-self: center;
  width: clamp(240px, 62vw, 620px);
  filter: drop-shadow(0 10px 22px rgba(19, 55, 25, 0.24));
  animation: heroFloat 6.8s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 860px) {
  .site-header {
    padding-block: clamp(8px, 2vw, 12px);
  }

  .nav-wrap {
    gap: clamp(8px, 2vw, 12px);
  }

  .language-switcher {
    margin-inline-start: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: clamp(5.2rem, 12vw, 6rem);
    padding-bottom: clamp(0.6rem, 3.4vw, 1.1rem);
  }

  .hero-split {
    gap: clamp(0.75rem, 3.4vw, 1.4rem);
    align-items: start;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.62rem, 7vw, 2.3rem);
    line-height: 1.22;
  }

  .hero-subtext {
    max-width: 30ch;
    font-size: clamp(0.95rem, 3.8vw, 1.08rem);
  }

  .hero-plant-wrap {
    width: min(100%, 460px);
    padding: clamp(0.35rem, 2.2vw, 0.7rem);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(24, 57, 29, 0.12);
  }

  .hero-plant {
    width: clamp(220px, 74vw, 420px);
  }

  .hero-content .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 168px;
    min-height: 40px;
    padding: 0.54rem 1rem;
    font-size: clamp(0.83rem, 3vw, 0.92rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(47, 125, 50, 0.2);
  }

  .section-head {
    margin-bottom: clamp(1.25rem, 5vw, 2rem);
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 1rem, 1200px);
  }

  .hero h1 {
    font-size: clamp(1.48rem, 7.6vw, 1.95rem);
  }

  .hero-plant {
    width: clamp(210px, 78vw, 340px);
  }

  .hero-plant-wrap {
    width: 100%;
    border-radius: 14px;
    padding: clamp(0.3rem, 2.4vw, 0.52rem);
  }

  .hero-content .btn-primary {
    min-width: 146px;
    min-height: 38px;
    padding: 0.48rem 0.9rem;
    font-size: clamp(0.8rem, 3.3vw, 0.88rem);
    letter-spacing: 0;
  }

  .hero {
    padding-bottom: 0.45rem;
  }

  .lang-toggle {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 360px) {
  .hero {
    padding-top: 4.8rem;
    padding-bottom: 0.35rem;
  }

  .hero h1 {
    font-size: clamp(1.36rem, 7.2vw, 1.72rem);
  }

  .hero-subtext {
    font-size: 0.9rem;
  }

  .hero-plant {
    width: clamp(190px, 80vw, 300px);
  }
}

@media (min-width: 900px) {
  .hero {
    min-height: min(100svh, 920px);
  }

  .hero-plant {
    width: clamp(320px, 34vw, 620px);
  }
}

@media (min-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: clamp(1.2rem, 3vw, 2.4rem);
  }

  .hero-content {
    max-width: 780px;
  }
}

@media (min-width: 1360px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: clamp(1.6rem, 3.2vw, 2.8rem);
  }

  .hero h1 {
    font-size: clamp(2.8rem, 3.6vw, 4.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tap-feedback,
  .site-header,
  .main-nav,
  .about-card,
  .guide-card,
  .product-card,
  .contact-shell,
  .map-wrap {
    transition: none !important;
  }

  .hero-plant {
    animation: none !important;
  }
}
