/* The Gr0ve CSS + image visual module base templates.
   Formats: JPEG well and PNG isolate shell. */

.grove-visual-module {
  --grove-visual-shell-shadow:
    -2px -2px 6px rgba(255, 255, 255, 0.72),
    2px 2px 6px rgba(180, 170, 155, 0.26),
    -8px -8px 24px rgba(255, 255, 255, 0.48),
    8px 8px 24px rgba(180, 170, 155, 0.16),
    inset 0 2px 4px rgba(255, 255, 255, 0.62),
    inset 0 -2px 4px rgba(180, 170, 155, 0.08),
    0 0 28px rgba(var(--grove-green-rgb), 0.08);
  --grove-visual-well-shadow:
    inset 3px 3px 10px rgba(180, 170, 155, 0.30),
    inset -3px -3px 10px rgba(255, 255, 255, 0.45),
    inset 7px 7px 22px rgba(180, 170, 155, 0.20),
    inset -7px -7px 22px rgba(255, 255, 255, 0.32),
    inset 0 0 38px rgba(var(--grove-green-rgb), 0.055);
  position: relative;
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 24px;
}

.grove-visual-module__shell {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 4vw, 34px);
  border-radius: var(--grove-radius-md);
  background:
    linear-gradient(180deg, rgba(var(--grove-green-rgb), 0.035), rgba(var(--grove-green-rgb), 0)),
    linear-gradient(160deg, var(--grove-bg-pure) 0%, var(--grove-bg) 44%, var(--grove-bg-secondary) 100%);
  box-shadow: var(--grove-visual-shell-shadow);
  contain: layout style paint;
}

.grove-visual-module__shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(var(--grove-green-rgb), 0.14);
  border-radius: inherit;
  pointer-events: none;
}

.grove-visual-module__header {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 20px;
  text-align: center;
}

.grove-visual-module__eyebrow {
  color: var(--grove-green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.grove-visual-module__title {
  color: var(--grove-text-primary);
  font-size: 1.18rem;
  font-weight: 760;
  line-height: 1.35;
}

.grove-visual-module__well {
  position: relative;
  overflow: hidden;
  border-radius: var(--grove-radius-sm);
  background: var(--grove-bg-secondary);
  box-shadow: var(--grove-visual-well-shadow);
}

.grove-visual-module__well::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    inset 0 0 34px rgba(var(--grove-green-rgb), 0.05);
  pointer-events: none;
}

.grove-visual-module__image {
  width: 100%;
  height: auto;
  border-radius: calc(var(--grove-radius-sm) - 10px);
}

.grove-visual-module--jpeg-well .grove-visual-module__well {
  padding: clamp(10px, 2vw, 18px);
}

.grove-visual-module--jpeg-well .grove-visual-module__image {
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  box-shadow:
    0 10px 28px rgba(120, 110, 95, 0.16),
    0 0 22px rgba(var(--grove-green-rgb), 0.08);
}

.grove-visual-module--isolate-shell .grove-visual-module__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.grove-visual-module__isolate-stage {
  position: relative;
  display: grid;
  min-height: clamp(260px, 42vw, 430px);
  place-items: center;
  overflow: hidden;
  border-radius: var(--grove-radius-md);
  background:
    linear-gradient(180deg, rgba(var(--grove-green-rgb), 0.08), rgba(45, 154, 94, 0.055)),
    var(--grove-bg-secondary);
  box-shadow: var(--grove-visual-well-shadow);
}

.grove-visual-module__isolate-stage::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: var(--grove-radius-pill);
  background: rgba(var(--grove-green-rgb), 0.07);
  filter: blur(28px);
}

.grove-visual-module__isolate {
  position: relative;
  z-index: 2;
  width: min(92%, 620px);
  max-height: 380px;
  object-fit: contain;
  filter:
    drop-shadow(0 22px 30px rgba(120, 110, 95, 0.22))
    drop-shadow(0 0 18px rgba(var(--grove-green-rgb), 0.16));
}

.grove-visual-module__copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  align-content: center;
}

.grove-visual-module__copy p {
  margin: 0;
  color: var(--grove-text-secondary);
  font-size: 1rem;
  line-height: 1.62;
}

.grove-visual-module__caption {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--grove-text-tertiary);
  font-size: 0.86rem;
  font-weight: 560;
  line-height: 1.55;
  text-align: center;
}

@media (min-width: 800px) {
  .grove-visual-module--isolate-shell .grove-visual-module__shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.72fr);
  }

  .grove-visual-module--isolate-shell .grove-visual-module__header {
    margin: 0 0 12px;
    text-align: left;
  }

  .grove-visual-module--isolate-shell .grove-visual-module__caption {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .grove-visual-module {
    margin: 2.25rem auto;
    padding: 0 14px;
  }

  .grove-visual-module__shell {
    border-radius: var(--grove-radius-sm);
  }

  .grove-visual-module__isolate-stage {
    min-height: 240px;
    border-radius: var(--grove-radius-sm);
  }

  .grove-visual-module__title {
    font-size: 1.08rem;
  }
}
