

:root{
  --ease-premium: cubic-bezier(.16,1,.3,1);
  --glow-gold-soft: 0 0 0 1px rgba(223,169,59,.28), 0 12px 42px rgba(223,169,59,.16), 0 24px 70px rgba(0,0,0,.5);
  --lift-shadow: 0 22px 60px rgba(0,0,0,.55);
}

.mesh-layer{
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: var(--bg-canvas);
}
.mesh-blob{
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  opacity: .9;
}
.mesh-blob--forest{
  width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(circle at 40% 40%, rgba(95,128,103,.30), rgba(51,80,59,.12) 55%, transparent 72%);
  animation: meshDriftA 26s ease-in-out infinite alternate;
}
.mesh-blob--wheat{
  width: 48vmax; height: 48vmax; right: -16vmax; top: 8vh;
  background: radial-gradient(circle at 55% 45%, rgba(223,169,59,.17), rgba(201,111,43,.07) 52%, transparent 70%);
  animation: meshDriftB 22s ease-in-out infinite alternate;
}
.mesh-blob--ember{
  width: 56vmax; height: 56vmax; left: 12vw; bottom: -30vmax;
  background: radial-gradient(circle at 50% 50%, rgba(201,111,43,.13), rgba(95,128,103,.10) 55%, transparent 72%);
  animation: meshDriftC 30s ease-in-out infinite alternate;
}
@keyframes meshDriftA{
  from{ transform: translate3d(0,0,0) scale(1); }
  to{ transform: translate3d(6vmax,4vmax,0) scale(1.12); }
}
@keyframes meshDriftB{
  from{ transform: translate3d(0,0,0) scale(1.05); opacity:.85; }
  to{ transform: translate3d(-5vmax,6vmax,0) scale(.94); opacity:1; }
}
@keyframes meshDriftC{
  from{ transform: translate3d(0,0,0) scale(1); }
  to{ transform: translate3d(4vmax,-5vmax,0) scale(1.1); }
}

#pollen-canvas{
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none; opacity: .35;
}

main, .site-header, .site-footer{ position: relative; z-index: 2; }

body::after{ z-index: 3 !important; }

.hero-section{ isolation: isolate; }
.hero-photo-bg{ transform: translateZ(0); }

.hero-line{
  display: block;
  overflow: hidden;
  padding-bottom: .22em; margin-bottom: -.22em;
}
.hero-line .w-mask{
  display: inline-block; overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .24em; margin-bottom: -.24em;
  padding-right: .26em; margin-right: -.26em;
}
.hero-line .w-mask:last-child{ padding-right: 0; margin-right: 0; }
.hero-line .w-inner{
  display: inline-block; will-change: transform, opacity, filter;
  transform: translateY(112%) rotate(2.5deg);
  opacity: 0; filter: blur(8px);
}
body.hero-ready .hero-line .w-inner{
  animation: heroWordUp 1.05s var(--ease-premium) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes heroWordUp{
  0%{ transform: translateY(112%) rotate(2.5deg); opacity: 0; filter: blur(8px); }
  60%{ opacity: 1; filter: blur(0); }
  100%{ transform: translateY(0) rotate(0); opacity: 1; filter: blur(0); }
}

body.premium-on [data-hero-fade]{
  opacity: 0; transform: translateY(22px);
  transition: opacity .9s var(--ease-premium), transform .9s var(--ease-premium);
  transition-delay: var(--d, 0ms);
}
body.premium-on.hero-ready [data-hero-fade]{ opacity: 1; transform: none; }

.hero-content-wrapper{ will-change: transform; }
.hero-photo-bg img{ will-change: transform; }

.reveal{
  opacity: 0; transform: translateY(30px);
  transition: opacity .85s var(--ease-premium), transform .85s var(--ease-premium);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in{ opacity: 1; transform: none; }

.calendar-crop-card.reveal, .disease-dossier-card.reveal{ animation: none !important; }

.reveal-group.in > *:nth-child(1){ --reveal-delay: 0ms; }
.reveal-group.in > *:nth-child(2){ --reveal-delay: 90ms; }
.reveal-group.in > *:nth-child(3){ --reveal-delay: 180ms; }
.reveal-group.in > *:nth-child(4){ --reveal-delay: 270ms; }

.nav-link-btn{ position: relative; }
.nav-link-btn::after{
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 1px; background: var(--color-wheat);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-premium);
}
.nav-link-btn:hover::after{ transform: scaleX(1); }
.nav-link-btn.active::after{ transform: scaleX(1); }

.btn{ transition: transform .3s var(--ease-premium), box-shadow .3s var(--ease-premium), background .25s ease, border-color .25s ease, color .25s ease !important; }
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(223,169,59,.28), 0 6px 18px rgba(0,0,0,.5) !important;
}
.btn-primary:active{ transform: translateY(0) scale(.98); }
.btn-glass:hover{
  transform: translateY(-2px);
  border-color: var(--color-wheat) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(223,169,59,.22), 0 0 24px rgba(223,169,59,.10);
  background: rgba(223,169,59,.06);
}
.user-auth-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 26px rgba(223,169,59,.25); }

.step-process-card, .calendar-crop-card, .disease-dossier-card, .about-feature-box, .stat-box-item{
  transition: transform .45s var(--ease-premium), background .3s ease, border-color .3s ease, box-shadow .45s var(--ease-premium) !important;
}
.step-process-card:hover, .calendar-crop-card:hover, .disease-dossier-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--lift-shadow);
  border-color: rgba(223,169,59,.35) !important;
}

.models-rail-wrap{ position: relative; }
.models-grid{
  display: flex !important;
  gap: 18px;
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 22px;
  margin: 0 -4px;
  scrollbar-width: none;
  cursor: grab;
}
.models-grid::-webkit-scrollbar{ display: none; }
.models-grid.dragging{ cursor: grabbing; scroll-snap-type: none; }
.models-grid .model-card{
  flex: 0 0 min(340px, 82vw);
  scroll-snap-align: start;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  transition: transform .5s var(--ease-premium), box-shadow .5s var(--ease-premium), border-color .35s ease, background .3s ease !important;
}
.models-grid .model-card:hover{
  transform: translateY(-8px);
  border-color: rgba(223,169,59,.45);
  box-shadow: var(--glow-gold-soft);
}
.models-grid .model-card-media{ aspect-ratio: 16/10; }
.models-grid .model-card-media img{
  transition: transform .8s var(--ease-premium), filter .5s ease !important;
}
.models-grid .model-card:hover .model-card-media img{ transform: scale(1.06); }

.models-rail-wrap::before, .models-rail-wrap::after{
  content: ""; position: absolute; top: 0; bottom: 22px; width: 56px;
  z-index: 2; pointer-events: none;
}
.models-rail-wrap::before{ left: -4px; background: linear-gradient(90deg, var(--bg-canvas), transparent); }
.models-rail-wrap::after{ right: -4px; background: linear-gradient(-90deg, var(--bg-canvas), transparent); }

.rail-controls{
  display: flex; align-items: center; gap: 14px;
  margin-top: 4px;
}
.rail-btn{
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; color: var(--text-main);
  border: 1px solid var(--border-strong); cursor: pointer;
  transition: all .3s var(--ease-premium);
}
.rail-btn:hover{
  border-color: var(--color-wheat); color: var(--color-wheat);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 18px rgba(223,169,59,.14);
}
.rail-btn:disabled{ opacity: .3; cursor: default; transform: none; box-shadow: none; }
.rail-btn svg{ width: 18px; height: 18px; }
.rail-progress{
  flex: 1; height: 2px; background: var(--border-subtle);
  position: relative; overflow: hidden;
}
.rail-progress-fill{
  position: absolute; inset: 0 auto 0 0; width: 20%;
  background: var(--color-wheat);
  transition: width .2s ease, transform .15s linear;
}
.rail-hint{
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}

.model-card{ position: relative; }
.model-card::after{
  content: ""; position: absolute; inset: auto 12px -10px 12px; height: 20px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.5), transparent 70%);
  filter: blur(6px); z-index: -1; opacity: 0;
  transition: opacity .5s ease;
}
.model-card:hover::after{ opacity: 1; }

.hero-trust-row{ backdrop-filter: blur(6px); }

@media (prefers-reduced-motion: reduce){
  .mesh-blob{ animation: none !important; }
  .hero-line .w-inner{ transform: none; opacity: 1; filter: none; animation: none; }
  [data-hero-fade], .reveal{ opacity: 1; transform: none; transition: none; }
  .models-grid{ scroll-snap-type: none; }
  *{ scroll-behavior: auto !important; }
}

@media (max-width: 768px){
  #pollen-canvas{ opacity: .25; }
  .mesh-blob{ filter: blur(48px); }
  .models-grid .model-card{ flex-basis: 78vw; }
  .rail-hint{ display: none; }
  .models-rail-wrap::before, .models-rail-wrap::after{ width: 28px; }
}
