/* Product pages and the product hub. Builds on homepage.css (tokens, .btn, .eyebrow, .head, .faq, .final, .new). */

/* ---------- shared bits ---------- */
.pr-sec { padding-block: clamp(44px, 6vw, 84px); }
.pr-soft { background: var(--soft); border-block: 1px solid #D4EADF; }
.pr-sec .head { margin-bottom: 36px; }
.pr-sec .faq { max-width: 820px; margin-inline: auto; }
.fine.center { text-align: center; }

/* screenshot / video frame */
.pshot {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background: #F6F9F8;
  border: 1px solid #C1E0D2;
  box-shadow: 0 30px 70px rgba(7, 83, 61, .12), 0 0 0 6px rgba(255, 255, 255, .6);
}
.pshot img,
.pshot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pshot-ph { display: none; }
.pshot.missing img { display: none; }
.pshot.missing .pshot-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  color: var(--deep);
  background:
    repeating-linear-gradient(45deg, rgba(9, 175, 114, .06) 0 12px, transparent 12px 24px),
    #F1FBF6;
}
/* logo-style visuals (a brand mark instead of a screenshot) */
.pshot.logo { background: #fff; }
.pshot.logo img { object-fit: contain; padding: 14%; }

/* ---------- hero ---------- */
.pr-hero {
  padding-block: clamp(32px, 5vw, 64px) clamp(40px, 6vw, 80px);
  background-color: #F1FBF6;
  background-image:
    radial-gradient(ellipse at 15% 10%, #fff 0%, rgba(255, 255, 255, .9) 25%, transparent 60%),
    radial-gradient(ellipse at 100% 70%, rgba(9, 175, 114, .14), transparent 48%),
    linear-gradient(rgba(10, 138, 102, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 138, 102, .05) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  border-bottom: 1px solid #D4EADF;
}
.pr-crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--muted);
}
.pr-crumbs a { color: var(--deep); text-decoration: none; }
.pr-crumbs a:hover { text-decoration: underline; }
.pr-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.pr-hero-copy { display: grid; gap: 18px; justify-items: start; }
.pr-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.07;
}
.pr-hero .lede { margin: 0; }
.pr-hero .hero-ctas { margin-top: 6px; justify-content: flex-start; }

.pr-hub-hero { text-align: center; }
.pr-hub-hero .lede { margin-inline: auto; }
.pr-hub-hero h1 { margin-top: 14px; max-width: 18ch; margin-inline: auto; }

/* ---------- outcome cards ---------- */
.pr-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.pr-card {
  background: #fff;
  border: 1px solid #D0E5D9;
  border-top: 3px solid #8CCFAC;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(7, 83, 61, .06);
}
.pr-card .n {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--deep);
  font-weight: 800;
}
.pr-card h3 { margin: 14px 0 6px; font-size: 1.15rem; }
.pr-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- extra blocks (steps, audio, logos) ---------- */
.steps5, .steps6, .steps4 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: s;
}
.steps5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps5 li, .steps6 li, .steps4 li {
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.steps5 li { counter-increment: s; }
.steps5 li::before {
  content: counter(s);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}
.steps5 b, .steps6 b, .steps4 b { font-size: 1.02rem; }
.steps5 span, .steps6 span, .steps4 span { color: var(--muted); font-size: .92rem; }
.steps6 small, .steps4 small {
  color: var(--deep);
  font-weight: 800;
  letter-spacing: .08em;
  font-size: .72rem;
}

.audio-demo {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 18px;
  padding: 20px 24px;
}
.audio-demo b { display: block; }
.audio-demo span { color: var(--muted); font-size: .92rem; }
.audio-demo audio { flex: 1 1 280px; max-width: 460px; }

.logo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.logo-grid li {
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 16px;
  height: 170px;
  display: grid;
  place-items: center;
  padding: 20px;
}
.logo-grid li[hidden] { display: none; }
.logo-grid img { max-width: 90%; max-height: 120px; object-fit: contain; }

/* filter tabs (by integration type) */
.int-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.int-filter button {
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.int-filter button:hover { color: var(--navy); border-color: #CFE3DA; }
.int-filter button[aria-pressed="true"] { color: var(--navy); border-color: var(--green); background: var(--mint); box-shadow: 0 0 0 3px rgba(9, 175, 114, .15); }
.int-filter button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- alternating feature rows ---------- */
.pr-rows { display: grid; gap: clamp(36px, 5vw, 72px); }
.pr-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.pr-row.flip .pr-text { order: 2; }
.pr-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--deep);
  font-weight: 800;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pr-text h3 {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.pr-text p { color: var(--muted); margin: 0 0 16px; }
.pr-text ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-weight: 600; font-size: .96rem; }
.pr-text li { display: flex; gap: 10px; align-items: flex-start; }
.pr-text .ck { flex: 0 0 auto; margin-top: 3px; }

/* ---------- use-case tabs ---------- */
.pr-uc { max-width: 920px; margin-inline: auto; background: #fff; border: 1px solid #D0E5D9; border-radius: 24px; padding: clamp(14px, 2.5vw, 24px); box-shadow: 0 14px 40px rgba(7, 83, 61, .07); }
.pr-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; padding: 6px; background: var(--soft); border-radius: 999px; }
.pr-tabs button {
  flex: 1 1 auto;
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  padding: 11px 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.pr-tabs button:hover { color: var(--navy); }
.pr-tabs button[aria-selected="true"] { color: #fff; background: var(--navy); box-shadow: 0 6px 16px rgba(13, 22, 63, .2); }
.pr-tabs button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.pr-panel {
  position: relative;
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
}
.pr-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.pr-uc-img {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  align-self: stretch;
  padding: clamp(20px, 3vw, 32px);
  background: radial-gradient(circle at 30% 20%, #fff 0, #E5FFF2 45%, #CDEFE0 100%);
  border-right: 1px solid #D0E5D9;
}
.pr-uc-img .ic { padding: 16px; width: 92px; height: 92px; border-radius: 26px; background: #fff; box-shadow: 0 14px 34px rgba(7, 83, 61, .16); }
.pr-uc-img .lb { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--deep); }
.pr-uc-img img { width: auto; height: auto; max-width: 100%; max-height: 420px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(7, 83, 61, .2)); }
.pr-uc-img:has(img) .ic, .pr-uc-img:has(img) .lb { display: none; }
.pr-uc-body { padding: clamp(20px, 3vw, 30px) clamp(22px, 4vw, 40px) clamp(24px, 3.5vw, 34px); }
.pr-panel[hidden] { display: none; }
.pr-panel h3 { margin: 0 0 8px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.01em; }
.pr-panel p { margin: 0; color: var(--muted); max-width: 62ch; font-size: 1.02rem; }
@media (max-width: 560px) {
  .pr-tabs { border-radius: 18px; }
  .pr-tabs button { flex: 1 1 45%; }
  .pr-panel { grid-template-columns: 1fr; }
  .pr-uc-img { border-right: 0; border-bottom: 1px solid #D0E5D9; }
  .pr-uc-img img { max-height: 340px; }
}

/* ---------- story + related ---------- */
.pr-two { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pr-two .head { margin-bottom: 20px; }
.pr-story {
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(7, 83, 61, .06);
}
.pr-story:hover { border-color: #8CCEB0; }
.pr-story .th { position: relative; aspect-ratio: 16 / 9; background: #F6F9F8; }
.pr-story .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pr-story .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.pr-story .bd { padding: 20px; display: grid; gap: 6px; align-content: center; }
.pr-story .bd span { color: var(--deep); font-weight: 800; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.pr-story .bd h3 { margin: 0; font-size: 1.1rem; }
.pr-story .bd p { margin: 0; color: var(--muted); font-size: .92rem; }

.pr-rels { display: grid; gap: 12px; }
.pr-rel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #D0E5D9;
  border-radius: 16px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
}
.pr-rel:hover { border-color: var(--green); }
.pr-rel b { grid-column: 1; }
.pr-rel span { grid-column: 1; color: var(--muted); font-size: .9rem; }
.pr-rel i {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-style: normal;
  font-size: 2rem;
  line-height: 1;
  color: var(--deep);
  font-weight: 800;
  transition: background .3s, color .3s, transform .3s;
}


/* ---------- final CTA ---------- */
.pr-cta { padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px); }

/* ---------- hub ---------- */
.pr-hubgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pr-hubcard {
  display: grid;
  gap: 8px;
  align-content: start;
  background: #fff;
  border: 1px solid #D0E5D9;
  border-top: 3px solid #8CCFAC;
  border-radius: 20px;
  padding: 26px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(7, 83, 61, .06);
  transition: transform .2s, box-shadow .2s;
}
.pr-hubcard:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(7, 83, 61, .12); }
.pr-hubcard h3 { margin: 0; font-size: 1.2rem; }
.pr-hubcard p { margin: 0; color: var(--muted); }
.pr-hubcard span { color: var(--deep); font-weight: 800; font-size: .92rem; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .pr-hero-grid, .pr-row, .pr-two { grid-template-columns: 1fr; }
  .pr-row.flip .pr-text { order: 0; }
  .steps5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-hubgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .pr-cards { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-grid li { height: 130px; padding: 14px; }
  .logo-grid img { max-height: 80px; }
}
@media (max-width: 575px) {
  .steps5, .steps4, .steps6 { grid-template-columns: 1fr; }
  .pr-hubgrid { grid-template-columns: 1fr; }
  .pr-story { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-hubcard { transition: none; }
}

/* ---------- motion ---------- */
/* scroll reveal (classes added by product.js) */
.pv { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.pv[data-pv="left"] { transform: translateX(-40px); }
.pv[data-pv="right"] { transform: translateX(40px); }
.pv[data-pv="zoom"] { transform: translateY(24px) scale(.95); }
.pv.pv-in { opacity: 1; transform: none; }

/* hero entrance */
@keyframes pr-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pr-pop { from { opacity: 0; transform: translateY(28px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes pr-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.pr-hero-copy > * { animation: pr-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.pr-hero-copy > :nth-child(2) { animation-delay: .08s; }
.pr-hero-copy > :nth-child(3) { animation-delay: .16s; }
.pr-hero-copy > :nth-child(4) { animation-delay: .24s; }
.pr-hero .pshot { animation: pr-pop .9s cubic-bezier(.2, .8, .2, 1) .2s both, pr-float 6s ease-in-out 1.2s infinite; }
.pr-crumbs { animation: pr-rise .5s ease both; }

/* hover lifts */
.pr-card, .pr-rel, .pr-story, .pshot, .logo-grid li { transition: opacity .7s ease, transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
.pr-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(7, 83, 61, .14); border-top-color: var(--green); }
.pr-card .n { transition: background .3s, color .3s, transform .3s; }
.pr-card:hover .n { background: var(--green); color: #fff; transform: scale(1.12) rotate(-6deg); }
.pr-rel:hover { transform: translateX(6px); box-shadow: 0 10px 24px rgba(7, 83, 61, .1); }
.pr-rel:hover i { transform: translateX(4px); }
.pr-story:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(7, 83, 61, .14); }
.pr-story .th img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.pr-story:hover .th img { transform: scale(1.06); }
.pr-story .play { transition: transform .3s; animation: pr-pulse 2.4s ease-out infinite; }
.pr-story:hover .play { transform: scale(1.12); }
@keyframes pr-pulse { 0% { box-shadow: 0 6px 18px rgba(0,0,0,.18), 0 0 0 0 rgba(255,255,255,.7); } 70%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.18), 0 0 0 18px rgba(255,255,255,0); } }
.pr-row .pshot:hover { transform: translateY(-6px) scale(1.01); }
.logo-grid li:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(7, 83, 61, .12); }

/* use-case panel swap */
.pr-panel:not([hidden]) { animation: pr-rise .4s ease both; }

@media (prefers-reduced-motion: reduce) {
  .pv { opacity: 1; transform: none; transition: none; }
  .pr-hero-copy > *, .pr-hero .pshot, .pr-crumbs, .pr-story .play, .pr-panel { animation: none !important; }
  .pr-card, .pr-rel, .pr-story, .pshot, .logo-grid li { transition: none; }
}

/* related links as a full-width row (no customer story column) */
.pr-rels.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; margin-inline: auto; }
@media (max-width: 860px) { .pr-rels.wide { grid-template-columns: 1fr; } }

/* portrait phone / chat screenshot: show the whole image, no crop or frame */
.pshot.phone { aspect-ratio: auto; min-height: 0; background: none; border: 0; box-shadow: none; overflow: visible; display: grid; place-items: center; }
.pshot.phone img { position: static; width: auto; height: auto; max-width: 100%; max-height: 520px; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(7, 83, 61, .18)); }
.pshot.phone.missing { aspect-ratio: 4 / 3; border: 1px solid #C1E0D2; border-radius: 18px; overflow: hidden; position: relative; }

/* wide screenshot shown in full (no cropping) */
.pshot.fit { aspect-ratio: 16 / 9; min-height: 0; background: #fff; }
.pshot.fit img { object-fit: contain; object-position: center; }

/* WordPress adds width/height attributes (width="1" for SVG logos); let the logo use its natural size like the static page */
.logo-grid img { width: auto; height: auto; }
