/* Shared components used on several pages: banner text panel, stat boxes, intro layout/photos, product tiles and
   the coloured "why" cards. Loaded on every page.
*/

.panel {
  position: relative;
  background: rgba(24, 31, 28, .62);
  backdrop-filter: blur(3px);
  padding: clamp(20px, 2vw, 34px) clamp(20px, 2.2vw, 38px) clamp(50px, 4vw, 66px);
  border-left: 3px solid transparent;
}

.rule {
  position: absolute;
  left: clamp(20px, 2.2vw, 38px);
  top: 0;
  height: 4px;
  width: 84px;
  background: var(--orange);
  transform: translateY(-100%) scaleX(0);
  transform-origin: left;
}

.edge {
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--orange), var(--green));
  transform: scaleY(0);
  transform-origin: top;
}

@keyframes panelIn {
  from { clip-path: inset(0 0 0 100%); opacity: 0; }
   to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes ruleIn {
  to { transform: translateY(-100%) scaleX(1); }
}

@keyframes edgeIn {
  to { transform: scaleY(1); }
}

@media (max-width: 640px) {
  .panel {
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rule {
    transform: translateY(-100%);
  }

  .edge {
    transform: none;
  }
}

.intro-grid {
  display: grid;
  align-items: start;
  gap: clamp(32px, 3.4vw, 64px);
  grid-template-columns: minmax(0, .96fr) minmax(0, 1fr);
}

.intro-text {
  padding-top: clamp(0px, 1vw, 8px);
}

.intro-text h3 {
  margin: 14px 0 0;
  font-size: clamp(20px, 1.75vw, 30px);
  font-weight: 600;
  line-height: 1.25;
}

.intro-text p {
  margin: 26px 0 0;
  max-width: 66ch;
  font-size: clamp(14.5px, 1.02vw, 17px);
  line-height: 1.95;
  color: #1f2622;
}

.pics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
}

.hang {
  position: relative;
}

.hang.low {
  margin-top: clamp(28px, 4.4vw, 82px);
}

.pic {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  animation: comeForward 5.4s ease-in-out infinite alternate;
  will-change: transform;
}

.hang.low .pic {
  animation-duration: 6.4s;
  animation-delay: -3.2s;
}

@keyframes comeForward {
  from { transform: translateY(0) scale(.96); box-shadow: 0 8px 18px -14px rgba(10, 30, 20, .3); }
  
    to   { transform: translateY(-12px) scale(1.045); box-shadow: 0 34px 50px -20px rgba(10, 30, 20, .55); }
}

.stats {
  list-style: none;
  margin: clamp(36px, 4vw, 66px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 24px);
}

.stat {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: default;
  background: var(--card);
  border-radius: 8px;
  min-height: clamp(130px, 10.2vw, 170px);
  padding: clamp(20px, 2.3vw, 38px) clamp(18px, 1.6vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  transform: translateY(101%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

.stat .val {
  display: block;
  font-size: clamp(32px, 3.4vw, 62px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  transition: color .3s ease;
  white-space: nowrap;
}

.stat .lab {
  display: block;
  margin-top: 14px;
  font-size: clamp(13px, .95vw, 15.5px);
  color: var(--muted);
  transition: color .3s ease;
}

.stat .ico {
  flex: none;
  width: clamp(44px, 4.2vw, 68px);
  height: clamp(44px, 4.2vw, 68px);
  color: #a0a7a3;
  transition: color .3s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}

.stat .ico svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat:hover,
.stat:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 22px 34px -18px rgba(8, 60, 32, .55);
}

.stat:hover::before,
.stat:focus-visible::before {
  transform: translateY(0);
}

.stat:hover .val,
.stat:focus-visible .val {
  color: #fff;
}

.stat:hover .lab,
.stat:focus-visible .lab {
  color: rgba(255,255,255,.88);
}

.stat:hover .ico,
.stat:focus-visible .ico {
  color: #fff;
  transform: rotate(12deg) scale(1.12);
}

.tile {
  --w: clamp(270px, 27.6vw, 530px);
  flex: none;
  position: relative;
  display: block;
  overflow: hidden;
  width: var(--w);
  height: clamp(210px, 16.4vw, 316px);
  margin-right: 8px;
  border-radius: 6px;
  background: var(--bgc, var(--mint));
}

.tile img {
  position: absolute;
  left: 50%;
  top: 5%;
  height: 76%;
  width: auto;
  max-width: 70%;
  object-fit: contain;
  transform: translateX(-50%);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}

.tile:hover img {
  transform: translateX(-50%) scale(1.06);
}

.tile .name {
  position: absolute;
  left: 6%;
  bottom: 7%;
  font-size: clamp(14px, 1.05vw, 19px);
  font-weight: 500;
  line-height: 1.25;
  color: #0e1511;
}

.tile .go {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.tile .go svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile:hover .go,
.tile:focus-visible .go {
  opacity: 1;
  transform: translateY(0);
}

.tile.mint {
  --bgc: var(--mint);
}

.tile.pink {
  --bgc: var(--pink);
}

@media (max-width: 1020px) {
  .intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pics {
    max-width: 760px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    --w: 78vw;
    height: 62vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pic,
  .track {
    animation: none !important;
  }

  .stat,
  .stat::before,
  .tile img {
    transition: none;
  }
}

.wcards {
  margin-left: auto;
  width: min(100%, 940px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.wcard {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  isolation: isolate;
  min-height: clamp(250px, 17.5vw, 320px);
  padding: clamp(18px, 1.6vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  background: var(--c);
  color: #fff;
  cursor: default;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease;
}

.wcard.g {
  --c: var(--green-card);
}

.wcard.r {
  --c: var(--red-card);
}

.wcard.n {
  --c: var(--navy);
}

.wcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.26) 50%, transparent 68%);
  transform: translateX(-125%);
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}

.wcard::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

.wcard .num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: clamp(24px, 1.9vw, 34px);
  font-weight: 700;
  color: rgba(255,255,255,.28);
  transition: color .35s ease, transform .5s cubic-bezier(.2,.7,.2,1);
  font-variant-numeric: tabular-nums;
}

.wcard .ic {
  width: clamp(52px, 4.2vw, 74px);
  height: clamp(52px, 4.2vw, 74px);
  transition: transform .6s cubic-bezier(.2,.8,.3,1.2);
  transform-origin: 50% 60%;
}

.wcard .ic svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wcard h3 {
  margin: 0;
  font-size: clamp(18px, 1.55vw, 26px);
  font-weight: 600;
  line-height: 1.2;
}

.wcard p {
  margin: 12px 0 0;
  font-size: clamp(12.5px, .88vw, 15px);
  line-height: 1.7;
  color: rgba(255,255,255,.92);
}

.wcard:hover,
.wcard:focus-visible {
  transform: translateY(-12px);
  box-shadow: 0 30px 44px -20px rgba(0,0,0,.8);
}

.wcard:hover::before,
.wcard:focus-visible::before {
  transform: translateX(125%);
}

.wcard:hover::after,
.wcard:focus-visible::after {
  transform: scaleX(1);
}

.wcard:hover .num,
.wcard:focus-visible .num {
  color: #fff;
  transform: scale(1.18);
}

.wcard:hover .ic,
.wcard:focus-visible .ic {
  transform: scale(1.14) rotate(-7deg);
}

@media (max-width: 1100px) {
  .wcards {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .wcards {
    grid-template-columns: minmax(0, 1fr);
  }

  .wcard {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wcard,
  .wcard::before,
  .wcard::after,
  .wcard .ic,
  .wcard .num {
    transition: none;
  }
}
