/* ==========================================================================
   BOTTLE BUILDERS - Motion and hover

   Polish layer. Everything here is additive: remove this file and the site
   still works, it is just flatter.

   One rule runs through it. Panels that contain a photographic plate are
   never given a transform, because transforming them promotes the panel to
   its own compositing layer and the filtered image inside stops painting.
   Those panels lift with shadow and border instead.
   ========================================================================== */

/* --- 1. Text arriving ---------------------------------------------------- */

/* Section headings assemble line by line rather than appearing all at once. */
.head.reveal > *,
.tier-head.reveal > * {
  opacity: 0;
  transform: translateY(13px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.head.reveal.in > *,
.tier-head.reveal.in > * { opacity: 1; transform: none; }

.head.reveal.in > *:nth-child(1) { transition-delay: 0.04s; }
.head.reveal.in > *:nth-child(2) { transition-delay: 0.13s; }
.head.reveal.in > *:nth-child(3) { transition-delay: 0.22s; }
.head.reveal.in > *:nth-child(4) { transition-delay: 0.31s; }

/* Grids deal themselves out left to right. */
.grid-3.reveal > *,
.process.reveal > *,
.stats.reveal > *,
.pillars.reveal > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.grid-3.reveal.in > *,
.process.reveal.in > *,
.stats.reveal.in > *,
.pillars.reveal.in > * { opacity: 1; transform: none; }

.grid-3.reveal.in > *:nth-child(1),
.process.reveal.in > *:nth-child(1),
.stats.reveal.in > *:nth-child(1),
.pillars.reveal.in > *:nth-child(1) { transition-delay: 0.06s; }
.grid-3.reveal.in > *:nth-child(2),
.process.reveal.in > *:nth-child(2),
.stats.reveal.in > *:nth-child(2),
.pillars.reveal.in > *:nth-child(2) { transition-delay: 0.15s; }
.grid-3.reveal.in > *:nth-child(3),
.process.reveal.in > *:nth-child(3),
.stats.reveal.in > *:nth-child(3),
.pillars.reveal.in > *:nth-child(3) { transition-delay: 0.24s; }
.process.reveal.in > *:nth-child(4) { transition-delay: 0.33s; }
.process.reveal.in > *:nth-child(5) { transition-delay: 0.42s; }

/* The detail bubble swings in like it was stamped on. */
.section-mark.reveal {
  transform: translateY(13px) rotate(-14deg);
  transition: opacity 0.6s var(--ease), transform 0.6s cubic-bezier(0.34, 1.5, 0.5, 1);
}
.section-mark.reveal.in { transform: none; }

/* --- 2. Panels that lift ------------------------------------------------- */

/* No photographs inside these, so they can move. */
.card,
.process-step,
.pillar,
.stat,
.jrn-product,
.steps li {
  position: relative;
  transition: transform 0.26s var(--ease),
              box-shadow 0.26s var(--ease),
              background 0.26s var(--ease);
}
.card:hover,
.process-step:hover,
.pillar:hover,
.stat:hover,
.jrn-product:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 12px 24px rgba(13, 46, 76, 0.15);
  z-index: 3;
}

.contact-card,
.cta-band,
.partner {
  transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease);
}
.cta-band:hover,
.partner:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(13, 46, 76, 0.16);
}

/* The numbered step marker fills in when you reach for it. */
.steps li:hover::before {
  background: var(--hardhat);
  transform: scale(1.12);
}
.steps li::before { transition: background 0.24s var(--ease), transform 0.24s var(--ease); }

/* --- 3. Panels that hold a photograph ------------------------------------ */

/* Shadow and border only. See the note at the top of this file. */
.member {
  transition: background 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.member:hover {
  box-shadow: 0 14px 28px rgba(13, 46, 76, 0.18);
  border-color: var(--ink);
}

.bcard { transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.bcard-live:hover { box-shadow: 9px 9px 0 rgba(31, 122, 76, 0.26); }
.bcard-dead:hover { box-shadow: 9px 9px 0 rgba(166, 61, 35, 0.2); border-style: solid; }

.elevation-frame { transition: box-shadow 0.35s var(--ease); }
.elevation-frame:hover { box-shadow: 0 16px 34px rgba(13, 46, 76, 0.2); }

.band { transition: box-shadow 0.35s var(--ease); }
.band:hover { box-shadow: inset 0 0 0 3px var(--hardhat); }

/* --- 4. Controls --------------------------------------------------------- */

.btn-arrow,
.nav-cta span[aria-hidden],
.greenco-go .btn-arrow { transition: transform 0.22s var(--ease); }
.btn:hover .btn-arrow,
.nav-cta:hover span[aria-hidden],
.greenco-card:hover .greenco-go .btn-arrow { transform: translateX(5px); }

/* Links draw their own underline rather than switching one on. */
.foot-links a,
.member-name a,
.lc-text a,
.partner-body a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.32s var(--ease), color 0.2s var(--ease);
  padding-bottom: 2px;
}
.foot-links a:hover,
.member-name a:hover,
.lc-text a:hover,
.partner-body a:hover {
  background-size: 100% 2px;
  text-decoration: none;
}

.contact-row { transition: background 0.24s var(--ease), padding-left 0.24s var(--ease); }
.contact-row:hover { background: rgba(255, 255, 255, 0.34); padding-left: 10px; }

.field input,
.field select,
.field textarea { transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.field input:focus,
.field select:focus,
.field textarea:focus { box-shadow: 0 0 0 3px rgba(245, 180, 23, 0.35); }

/* Keyboard focus is a drafting marker, not a browser default. */
:focus-visible {
  outline: 2px solid var(--hardhat);
  outline-offset: 3px;
}

/* --- 5. Respect the setting ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .head.reveal > *,
  .tier-head.reveal > *,
  .grid-3.reveal > *,
  .process.reveal > *,
  .stats.reveal > *,
  .pillars.reveal > * { opacity: 1; transform: none; }
  .section-mark.reveal { transform: none; }
  .card:hover,
  .process-step:hover,
  .pillar:hover,
  .stat:hover,
  .jrn-product:hover,
  .cta-band:hover,
  .partner:hover { transform: none; }
}
