/* ==========================================================================
   Jobson Garden — side-scrolling motion (2026-10-10)
   Driven by assets/js/side-motion.js (home page + Garden Tips). Every rule is
   scoped to a class that script adds, so without it the pages are unchanged.
   ========================================================================== */

:root {
  --pop-ease: cubic-bezier(0.34, 1.56, 0.64, 1);   /* small spring overshoot */
  --iz-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Fix: "Two ways we work with you", its buttons and the WhatsApp box
   stayed invisible. home-motion.css hides [data-float] until home-motion.js
   shows it, and that script was retired in v4. site-motion reveals them now. */
html.m-on .home-mission [data-float],
html.m-on .home-initiatives [data-float] { opacity: 1; animation: none; }

/* ---- Fix: "How Plantation Works" is a ghost button made for dark sections
   (white text, white outline) sitting on a white background. */
.home-mission .btn--ghost { color: var(--primary); border-color: var(--primary); }
.home-mission .btn--ghost:hover { background: var(--primary); color: #fff; }
.home-mission .btn--ghost:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }


/* =========================================================================
   HOME — pop
   ========================================================================= */
html.m-on.jg-pop [data-m="card"]:not(.m-in) {
  transform: translate3d(0, calc(46px * var(--m-dist)), 0) scale(0.82) !important;
}
html.m-on.jg-pop [data-m="card"].m-in {
  transition:
    opacity 0.55s ease var(--d, 0ms),
    transform 1.05s var(--pop-ease) var(--d, 0ms),
    box-shadow 0.5s ease !important;
}
html.m-on.jg-pop [data-m="fade"]:not(.m-in) {
  transform: scale(0.6) !important;
}
html.m-on.jg-pop [data-m="fade"].m-in {
  transition: opacity 0.45s ease var(--d, 0ms), transform 0.9s var(--pop-ease) var(--d, 0ms) !important;
}
html.m-on.jg-pop .pill-tag[data-m] { transform-origin: left center; }
html.m-on.jg-pop .trust__item[data-m] { transform-origin: center bottom; }

/* ---- After the hero: the page rises over it as a card -------------------- */
.jg-sheet {
  position: relative;
  z-index: 6;
  background: var(--background);
  border-radius: var(--sheet-r, 0px) var(--sheet-r, 0px) 0 0;
  box-shadow: 0 -30px 60px -34px rgba(10, 24, 14, 0.3);
  /* Starts rising while the hero is still fading (hero tail, walk-hero.css), so
     there is no empty white screen between the hero and the page. */
  margin-top: -60vh;
  transform-origin: 50% 0;
  overflow-x: clip;
}
html.jg-has-sheet .wh__pin { transform-origin: 50% 40%; will-change: transform, filter; }
.jgx-moved { display: none !important; }

/* ---- "What we do" + figures: sideways row --------------------------------- */
.jgx { position: relative; padding: 0 !important; }
.jgx__sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.jgx--pin .jgx__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding-top: 4.5rem;              /* clear the floating header */
}
.jgx__track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  will-change: transform;
}
.jgx__track > * { flex: none; }
.jgx__panel--intro { width: min(34rem, 84vw); padding-right: clamp(0rem, 3vw, 3rem); }
.jgx__panel--intro .home-mission__left { max-width: none; }
.jgx .mission-card.jgx__card {
  width: clamp(15.5rem, 25vw, 22rem);
  height: min(66vh, 31rem);
  transform-origin: 50% 100%;
}
.jgx .mission-card.jgx__card:nth-of-type(even) { margin-top: 6vh; }
.jgx__panel--trust { width: min(22rem, 80vw); }
.jgx__panel--trust .trust__grid {
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 1.75rem;
}
.jgx__foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(1.25rem, 4vh, 2.5rem);
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.jgx__bar { width: clamp(6rem, 16vw, 12rem); height: 2px; background: var(--border); overflow: hidden; }
.jgx__bar i { display: block; height: 100%; background: var(--leaf); transform: scaleX(0.04); transform-origin: left center; }
.jgx__hint::after { content: " \2192"; }

/* Phones */
@media (max-width: 760px) {
  .jgx__panel--intro { width: 86vw; }
  .jgx__panel--intro .home-mission__title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .jgx__panel--intro .home-mission__lede { font-size: 0.95rem; margin-bottom: 1.25rem; }
  .jgx__panel--intro .home-mission__actions { gap: 0.75rem; }
  .jgx .mission-card.jgx__card { width: 74vw; height: min(60vh, 28rem); }
  .jgx .mission-card.jgx__card:nth-of-type(even) { margin-top: 3vh; }
  .jgx--pin .jgx__sticky { padding-top: 5rem; padding-bottom: 5.5rem; } /* top logo, bottom nav */
}

/* Reduced motion / very short screens: a swipeable row instead of pinning */
.jgx--swipe .jgx__sticky { padding-block: 4rem; }
.jgx--swipe .jgx__track {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.jgx--swipe .jgx__track::-webkit-scrollbar { display: none; }
.jgx--swipe .jgx__track > * { scroll-snap-align: center; }

/* Sideways slides use the separate translate / rotate properties, so they
   stack with the pop (transform) instead of fighting it. */
html.jg-side .mission-card,
html.jg-side .initiative-card,
html.jg-side .home-initiatives__sidebar { will-change: translate; }
html.jg-side .mission-card { transform-origin: 0% 100%; }
html.jg-side .home-mission,
html.jg-side .home-initiatives { overflow-x: clip; }

/* =========================================================================
   GARDEN TIPS — after izanami-official.com
   ========================================================================= */

/* ---- Floating photos over the cover -------------------------------------- */
.iz .page-cover { isolation: isolate; }
.iz-float {
  position: absolute;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.92);
  transition: opacity 1.2s ease var(--fd, 0s), transform 1.6s var(--iz-ease) var(--fd, 0s);
  pointer-events: none;
  will-change: translate;
}
.iz-float img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iz-float--a { width: clamp(7rem, 11vw, 10.5rem); aspect-ratio: 3 / 4; right: 7%;  top: 18%; --fd: 0.15s; }
.iz-float--b { width: clamp(6rem, 9vw, 8.5rem);   aspect-ratio: 1;     right: 17%; top: 56%; --fd: 0.35s; }
.iz-float--c { width: clamp(6.5rem, 10vw, 9.5rem); aspect-ratio: 4 / 3; left: 6%;  top: 20%; --fd: 0.25s; }
.iz-cover-in .iz-float { opacity: 1; transform: none; }
@media (max-width: 899px) { .iz-float { display: none; } }

/* ---- Cover title: the two lines rise out of a mask ------------------------ */
.iz .page-cover__title > span:not(.visually-hidden) { display: block; overflow: hidden; }
.iz .page-cover__title-top, .iz .page-cover__title-main {
  animation: izRise 1.3s var(--iz-ease) both;
}
.iz .page-cover__title-top  { animation-delay: 0.35s; }
.iz .page-cover__title-main { animation-delay: 0.5s; }
@keyframes izRise { from { clip-path: inset(0 0 100% 0); transform: translate3d(0, 0.6em, 0); } to { clip-path: inset(0 0 0 0); transform: none; } }
html.pt-in .iz .page-cover__title-top  { animation-delay: 0.9s; }
html.pt-in .iz .page-cover__title-main { animation-delay: 1.05s; }

/* ---- Section label pinned at the left edge -------------------------------- */
.iz-rail {
  position: fixed;
  left: clamp(1rem, 1.8vw, 1.75rem);
  top: 50%;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transform: translate3d(-12px, -50%, 0);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.8s var(--iz-ease);
  pointer-events: none;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
@media (min-width: 1360px) { .iz-rail { display: flex; } }
.iz-rail.is-on { opacity: 1; transform: translate3d(0, -50%, 0); }
.iz-rail__line { width: 1px; height: 3.5rem; background: currentColor; opacity: 0.35; }
.iz-rail__labels {
  position: relative;
  height: 7rem;
  width: 1.2em;
  overflow: hidden;
}
.iz-rail__label {
  position: absolute;
  left: 0;
  top: 0;
  writing-mode: vertical-rl;
  white-space: nowrap;
  transform: translate3d(0, 7.5rem, 0);
  transition: transform 0.8s var(--iz-ease);
}
.iz-rail__label.is-cur { transform: none; }
.iz-rail__label.is-past { transform: translate3d(0, -7.5rem, 0); }

/* ---- Tip rows: side wipe --------------------------------------------------- */
.iz-row { position: relative; border-bottom-color: transparent !important; overflow-x: clip; }
.iz-row::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.4s var(--iz-ease) 0.25s;
}
.iz-row--r::after { transform-origin: right center; }
.iz-row.is-in::after { transform: none; }

.iz-row .blog-row__media { overflow: hidden; border-radius: 4px; }
.iz-row .blog-row__media img {
  clip-path: inset(0 100% 0 0);
  transform: scale(1.3);
  transition: clip-path 1.3s var(--iz-ease), transform 1.8s var(--iz-ease);
}
.iz-row--r .blog-row__media img { clip-path: inset(0 0 0 100%); }
.iz-row.is-in .blog-row__media img { clip-path: inset(0 0 0 0); transform: none; }

.iz-row .blog-row__body > * {
  opacity: 0;
  transform: translate3d(60px, 0, 0);
  transition: opacity 0.8s ease calc(0.2s + var(--k, 0) * 0.09s),
              transform 1.2s var(--iz-ease) calc(0.2s + var(--k, 0) * 0.09s);
}
.iz-row--r .blog-row__body > * { transform: translate3d(-60px, 0, 0); }
.iz-row.is-in .blog-row__body > * { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .iz-row .blog-row__body > *, .iz-row--r .blog-row__body > * { transform: translate3d(0, 28px, 0); }
}

/* "Explore tip": a line that draws in front, after Izanami's "—— View" links */
.iz-row .blog-row__link { display: inline-flex; align-items: center; gap: 0.75rem; }
.iz-row .blog-row__link::before {
  content: "";
  width: 2.25rem; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--iz-ease) 0.7s;
}
.iz-row.is-in .blog-row__link::before { transform: none; }
.iz-row .blog-row__link:hover::before { transform: scaleX(1.5); transition-delay: 0s; transition-duration: 0.5s; }

/* ---- Guides: pinned sideways scroll --------------------------------------- */
.izh { position: relative; }
.izh__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.izh__head .tip-index__title { margin-bottom: 0; }
.izh__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--primary);
  flex: none;
  padding-bottom: 0.4rem;
}
.izh__count b { font-weight: 500; font-size: 1.35rem; letter-spacing: 0.02em; }
.izh__bar { width: clamp(5rem, 10vw, 9rem); height: 2px; background: var(--border); overflow: hidden; }
.izh__bar i { display: block; height: 100%; background: var(--leaf); transform: scaleX(0.04); transform-origin: left center; }
.izh__hint { text-transform: uppercase; color: var(--muted-foreground); }
.izh__hint::after { content: " \2192"; }

.izh .tip-card { position: relative; flex: none; }
.tip-card__num {
  position: absolute;
  z-index: 2;
  top: 0.85rem;
  left: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  letter-spacing: -0.02em;
}
.izh .tip-card__more { display: inline-flex; align-items: center; gap: 0.6rem; }
.izh .tip-card__more::before {
  content: "";
  width: 1.5rem; height: 1px;
  background: currentColor;
  transform-origin: left center;
  transition: transform 0.5s var(--iz-ease);
}
.izh .tip-card:hover .tip-card__more::before { transform: scaleX(1.8); }

/* Desktop: the section pins and the row travels left. */
.izh--pin { padding-block: 0; }
.izh--pin .izh__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(6rem, 12vh, 8rem);   /* clear the floating header; start near the top, not centred, so no big blank gap above the heading */
}
.izh--pin .tip-index__grid {
  display: flex;
  grid-template-columns: none;
  gap: clamp(1.25rem, 2.2vw, 2rem);
  overflow: visible;
  will-change: transform;
}
.izh--pin .tip-card {
  width: clamp(18rem, 27vw, 25rem);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.izh--pin .tip-card:nth-child(even) { margin-top: clamp(1.5rem, 4vh, 3rem); }
.izh--pin .tip-card:hover { transform: none; }
.tip-card__ph { display: block; overflow: hidden; flex: none; }
.izh--pin .tip-card__ph { height: clamp(8rem, 31vh, 18rem); }
.izh--pin .tip-card__img {
  height: 100%;
  aspect-ratio: auto;
  transform: translate3d(var(--ix, 0px), 0, 0) scale(1.14);
}

/* Cards rise in as the section arrives. */
.izh .tip-card {
  opacity: 0;
  translate: 0 50px;
  transition: opacity 0.8s ease calc(var(--k, 0) * 0.1s), translate 1.2s var(--iz-ease) calc(var(--k, 0) * 0.1s),
              box-shadow 0.4s ease, border-color 0.4s ease;
}
.izh.is-in .tip-card { opacity: 1; translate: 0 0; }
.izh .izh__head > * { opacity: 0; translate: 0 24px; transition: opacity 0.8s ease, translate 1.1s var(--iz-ease); }
.izh .izh__meta { transition-delay: 0.15s; }
.izh.is-in .izh__head > * { opacity: 1; translate: 0 0; }

/* Phones / reduced motion: a swipeable row. */
.izh--swipe .tip-index__grid {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.izh--swipe .tip-index__grid::-webkit-scrollbar { display: none; }
.izh--swipe .tip-card { width: min(78vw, 20rem); scroll-snap-align: start; }
@media (max-width: 640px) {
  .izh__head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .izh__hint::after { content: " \2192"; }
}

@media (prefers-reduced-motion: reduce) {
  .iz-row .blog-row__media img,
  .iz-row .blog-row__body > *,
  .izh .tip-card,
  .izh .izh__head > * { transform: none; translate: none; clip-path: none; transition-duration: 0.6s; }
  .iz-float { transform: none; }
}

/* =========================================================================
   HOME — "harvest" band at the top of the footer (after lusion.co)
   Added by assets/js/harvest-loader.js; the 3D is assets/js/harvest3d.js.
   ========================================================================= */
.jg-harvest {
  position: relative;
  height: clamp(22rem, 64vh, 38rem);
  margin-top: calc(var(--space-16) * -1);      /* sit flush with the footer top */
  margin-bottom: var(--space-12);
  touch-action: pan-y;
  user-select: none;
}
.jg-harvest canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.jg-harvest__title {
  position: absolute;
  left: 0; right: 0;
  top: 18%;
  margin: 0;
  z-index: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}
.jg-harvest__hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(18% + clamp(2.8rem, 9vw, 7.5rem) * 1.95 + 1.25rem);
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.jg-harvest.is-touched .jg-harvest__hint { opacity: 0; }
@media (max-width: 760px) {
  .jg-harvest { height: clamp(18rem, 50vh, 26rem); }
  .jg-harvest__title { top: 14%; }
  .jg-harvest__hint { top: calc(14% + clamp(2.8rem, 9vw, 7.5rem) * 1.95 + 1rem); }
}

/* Garden Tips (2026-10-13): less white between the tips block and the guides. */
@media (min-width: 900px) { body.page-blog .blog-main { padding-bottom: 1.5rem; } }
