/* ============================================================
   Boréal Turf — Interaction layer
   1. Product card hover: grass sway + pile lift
   2. No-mow strikethrough section
   3. 3D comparison with rotating tiles
   ============================================================ */

/* ─────────────────────────────────────────────────────────
   Showcase floating turf (scroll-rotate, cut-out swatch)
   Transparent WebP — no baked background, so it sits directly
   on the section and only casts its own drop-shadow.
   Transform is driven per-frame from js/site.js; no transition
   here or the scroll scrub turns to mush.
   ───────────────────────────────────────────────────────── */
.turf-float {
  position: relative;
  width: 420px; height: 460px;
  margin: 0 auto;
  background-image: url('../images/turf-cutout.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 24px 30px rgba(15,36,25,0.22)) saturate(1.06);
  will-change: transform;
}
@media (max-width: 920px) {
  .turf-float { width: 280px; height: 320px; }
}

/* ───────────────────────────────────────────────────────────
   1. PRODUCT CARD — sway + lift
   ─────────────────────────────────────────────────────────── */

.product-card {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition:
    border-color 200ms var(--ease-boreal),
    transform 400ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.18);
}

/* Texture rises toward viewer on hover */
.product-thumb {
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.product-card:hover .product-thumb {
  transform: scale(1.04);
}

/* Tip-light gradient: blades catching light */
.product-thumb .tip-light {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 38%);
  opacity: 0;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}
.product-card:hover .product-thumb .tip-light {
  opacity: 1;
}

/* Sway blades overlay */
.product-thumb .sway {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.product-thumb .blade {
  position: absolute;
  bottom: 0;
  width: 22px;
  height: 64px;
  transform-origin: 50% 100%;
  animation-name: blade-sway;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-play-state: paused;
  opacity: 0.85;
  filter: drop-shadow(0 1px 0 rgba(15,36,25,0.18));
}
.product-card:hover .product-thumb .blade {
  animation-play-state: running;
}
.product-thumb .blade.b1 { left: 14%; animation-duration: 1.8s; animation-delay: 0s;    height: 58px; }
.product-thumb .blade.b2 { left: 36%; animation-duration: 2.1s; animation-delay: 0.2s;  height: 72px; }
.product-thumb .blade.b3 { left: 62%; animation-duration: 1.6s; animation-delay: 0.4s;  height: 54px; }
.product-thumb .blade.b4 { left: 82%; animation-duration: 2.0s; animation-delay: 0.1s;  height: 66px; }

@keyframes blade-sway {
  0%   { transform: rotate(-2deg); }
  50%  { transform: rotate( 2.2deg); }
  100% { transform: rotate(-2deg); }
}

/* Above-overlay ordering (cat tag + tag must stay on top) */
.product-thumb-tag, .product-thumb-cat { z-index: 3; }

/* ───────────────────────────────────────────────────────────
   2. NO-MOW SECTION — strikethroughs + counters
   ─────────────────────────────────────────────────────────── */

.no-mow {
  background: var(--cream);
  padding: 128px 48px;
}
.no-mow-inner {
  max-width: var(--max-marketing); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 96px; align-items: center;
}
.no-mow-head { max-width: 560px; }
.no-mow h2 em { font-style: italic; color: var(--clay); }

.no-mow-list {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 0;
}
.no-mow-task {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--bone);
  position: relative;
}
.no-mow-task:last-child { border-bottom: none; }

.no-mow-check {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  background: transparent;
  display: grid; place-items: center;
  transition:
    background-color 350ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color    350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.no-mow-task.done .no-mow-check {
  background: var(--moss);
  border-color: var(--moss);
}
.no-mow-check svg {
  width: 16px; height: 16px;
  stroke: var(--cream);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.no-mow-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 250ms ease-out 120ms;
}
.no-mow-task.done .no-mow-check path {
  stroke-dashoffset: 0;
}

.no-mow-label {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  position: relative;
  transition: opacity 450ms cubic-bezier(0.4, 0, 0.2, 1);
}
.no-mow-task.done .no-mow-label { opacity: 0.45; }

.no-mow-strike {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--moss);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 450ms ease-out;
  pointer-events: none;
  border-radius: 1px;
}
.no-mow-task.done .no-mow-strike { transform: scaleX(1); }

.no-mow-hours {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
  margin-left: auto;
  letter-spacing: 0.04em;
}

/* Counters column */
.no-mow-counters {
  display: flex; flex-direction: column; gap: 56px;
  padding-left: 32px;
  border-left: 1px solid var(--bone);
}
.no-mow-counter-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.no-mow-counter-num {
  font-family: var(--serif);
  font-size: 120px; line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--moss);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px;
}
.no-mow-counter-num small {
  font-family: var(--sans);
  font-size: 18px; font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0;
  font-variant-numeric: normal;
}
.no-mow-counter-sub {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.55; margin-top: 12px; max-width: 320px;
}

@media (max-width: 920px) {
  .no-mow { padding: 80px 24px; }
  .no-mow-inner { grid-template-columns: 1fr; gap: 56px; }
  .no-mow-counters { flex-direction: column; gap: 32px; padding-left: 0; border-left: none; order: -1; }
  .no-mow-counter-num { font-size: 80px; }
  .no-mow-label { font-size: 26px; }
}

/* ───────────────────────────────────────────────────────────
   3. 3D COMPARISON — rotating tiles + controls
   ─────────────────────────────────────────────────────────── */

.cmp3d {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 128px 48px;
  position: relative;
  overflow: hidden;
}
.cmp3d::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 1200px 600px at 30% 60%, rgba(192,74,31,0.08), transparent 70%),
    radial-gradient(ellipse 800px 400px at 80% 30%, rgba(92,122,82,0.10), transparent 70%);
  pointer-events: none;
}
.cmp3d-inner {
  max-width: var(--max-marketing); margin: 0 auto;
  position: relative;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 96px;
  align-items: center;
}
.cmp3d h2 { color: var(--cream); margin: 0; }
.cmp3d h2 em { font-style: italic; color: var(--clay-soft); }
.cmp3d .section-eyebrow { color: var(--clay-soft); }
.cmp3d .section-eyebrow::before { background: var(--clay-soft); }
.cmp3d-lede {
  font-size: 17px; line-height: 1.6;
  color: rgba(244,239,227,0.75);
  margin: 24px 0 0;
  max-width: 480px;
}

/* Tile stage */
.cmp3d-stage {
  position: relative;
  perspective: 1200px;
  height: 520px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.cmp3d-stage.dragging { cursor: grabbing; }

.cmp3d-tiles {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 48px;
  transform-style: preserve-3d;
}
.cmp3d-tile-wrap {
  position: relative;
  width: 280px;
  display: flex; flex-direction: column; align-items: center;
  animation: tile-bob 4s ease-in-out infinite;
}
.cmp3d-tile-wrap.t2 { animation-delay: -2s; }

@keyframes tile-bob {
  0%, 100% { transform: translateY(-3px); }
  50%      { transform: translateY( 3px); }
}

.cmp3d-tile {
  width: 240px; height: 240px;
  border-radius: 8px;
  background: var(--paper);
  background-size: cover; background-position: center;
  transform-style: preserve-3d;
  transition:
    box-shadow 600ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
}
.cmp3d-tile-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  transition: opacity 250ms ease-out;
}
.cmp3d-tile-img.fading { opacity: 0; }

/* Shadow under tile (floats) */
.cmp3d-shadow {
  position: absolute;
  bottom: -28px; left: 50%;
  width: 200px; height: 24px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  filter: blur(14px);
  transform: translateX(-50%);
  z-index: -1;
  animation: shadow-bob 4s ease-in-out infinite;
}
.cmp3d-tile-wrap.t2 .cmp3d-shadow { animation-delay: -2s; }

@keyframes shadow-bob {
  0%, 100% { transform: translateX(-50%) scale(1.08); opacity: 0.55; }
  50%      { transform: translateX(-50%) scale(0.92); opacity: 0.40; }
}

/* Best-match ring */
.cmp3d-tile.best {
  box-shadow:
    0 0 0 2px rgba(92,122,82,0.6),
    0 0 0 12px rgba(92,122,82,0.15);
  animation: best-pulse 2.5s ease-in-out infinite;
}
@keyframes best-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(92,122,82,0.55), 0 0 0 10px rgba(92,122,82,0.12); }
  50%      { box-shadow: 0 0 0 2px rgba(92,122,82,0.85), 0 0 0 22px rgba(92,122,82,0.25); }
}

.cmp3d-best-badge {
  position: absolute;
  top: -38px; left: 50%;
  transform: translateX(-50%);
  background: var(--moss);
  color: var(--cream);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 250ms ease-out;
}
.cmp3d-tile-wrap.best .cmp3d-best-badge { opacity: 1; }

/* Meta under tile */
.cmp3d-meta {
  margin-top: 36px;
  text-align: center;
  width: 100%;
}
.cmp3d-meta-name {
  font-family: var(--serif);
  font-size: 22px; line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 0 0 14px;
}
.cmp3d-bars {
  display: flex; flex-direction: column; gap: 8px;
}
.cmp3d-bar-row {
  display: grid; grid-template-columns: 64px 1fr auto;
  align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(244,239,227,0.55);
}
.cmp3d-bar-track {
  height: 4px; background: rgba(244,239,227,0.12);
  border-radius: 2px; overflow: hidden;
}
.cmp3d-bar-fill {
  height: 100%; background: var(--moss);
  border-radius: 2px;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cmp3d-bar-val {
  font-family: var(--mono); font-size: 11px;
  color: rgba(244,239,227,0.7); letter-spacing: 0.04em; text-transform: none;
}
.cmp3d-swatch-row {
  display: grid; grid-template-columns: 64px 1fr auto;
  align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(244,239,227,0.55);
}
.cmp3d-swatch-strip {
  height: 14px; border-radius: 3px;
  display: flex; overflow: hidden;
}
.cmp3d-swatch-strip span { flex: 1; }

/* Controls */
.cmp3d-controls {
  background: rgba(244,239,227,0.04);
  border: 1px solid rgba(244,239,227,0.12);
  border-radius: var(--radius-l);
  padding: 36px;
  display: flex; flex-direction: column; gap: 28px;
}
.cmp3d-control-row {
  display: flex; flex-direction: column; gap: 12px;
}
.cmp3d-control-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.cmp3d-control-label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(244,239,227,0.85);
}
.cmp3d-control-val {
  font-family: var(--mono); font-size: 12px;
  color: rgba(244,239,227,0.5); letter-spacing: 0.04em;
}

/* Branded range slider */
.cmp3d-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: rgba(244,239,227,0.12);
  outline: none;
  cursor: pointer;
}
.cmp3d-slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--moss) 0%, var(--moss) var(--fill, 50%),
    rgba(244,239,227,0.12) var(--fill, 50%), rgba(244,239,227,0.12) 100%
  );
}
.cmp3d-slider::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: rgba(244,239,227,0.12);
}
.cmp3d-slider::-moz-range-progress {
  height: 4px; border-radius: 2px; background: var(--moss);
}
.cmp3d-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  margin-top: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--moss);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.cmp3d-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--moss);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Toggle */
.cmp3d-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.cmp3d-toggle-sw {
  position: relative;
  width: 44px; height: 24px;
  background: rgba(244,239,227,0.15);
  border-radius: 999px;
  transition: background 200ms ease;
}
.cmp3d-toggle-sw::after {
  content: ""; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cmp3d-toggle input { display: none; }
.cmp3d-toggle input:checked + .cmp3d-toggle-sw { background: var(--moss); }
.cmp3d-toggle input:checked + .cmp3d-toggle-sw::after { transform: translateX(20px); }

/* Rotate button (mobile) */
.cmp3d-rotate-btn {
  display: none;
  appearance: none; border: 1px solid rgba(244,239,227,0.2);
  background: rgba(244,239,227,0.06);
  color: var(--cream);
  font: inherit;
  padding: 10px 20px;
  border-radius: 999px;
  margin: 24px auto 0;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-size: 13px;
}

@media (max-width: 920px) {
  .cmp3d { padding: 80px 24px; }
  .cmp3d-inner { grid-template-columns: 1fr; gap: 48px; }
  .cmp3d-stage { height: auto; }
  .cmp3d-tiles { position: relative; flex-wrap: wrap; gap: 32px; padding: 24px 0 60px; }
  .cmp3d-tile-wrap { width: 220px; }
  .cmp3d-tile { width: 180px; height: 180px; }
  .cmp3d-rotate-btn { display: block; }
  .cmp3d-stage { cursor: default; }
}
