/* ==========================================================================
   Homepage product hero — four products, each one tryable in place.

   Box (savings calculator + order), Chat (live Genie stream), Live Support
   (the website assistant inside a browser mock) and Orb (the Merlin voice orb,
   styled by voice-orb.css). Markup lives in index.php, behaviour in
   assets/js/products-hero.js. Everything is scoped under .phero so nothing
   leaks into the rest of the page.
   ========================================================================== */

.phero {
  --ph-radius: 28px;
  --ph-card: #fff;
  --ph-line: rgba(10, 11, 16, .08);
  --ph-box: #232873;
  --ph-chat: #7a2bf5;
  --ph-support: #0f8a6a;
  --ph-orb: #c6379b;
  --ph-accent: var(--ph-box);
  position: relative;
  padding: calc(var(--nav-h) + clamp(2.25rem, 7vh, 4.5rem)) 0 clamp(3rem, 8vh, 5.5rem);
  background: var(--paper);
  overflow: hidden;
}
/* The chat widgets also appear outside the hero (on /chat and /support), so
   they carry their own accent rather than inheriting one that may not exist.
   Without this the visitor's own bubbles rendered white-on-transparent. */
.gchat          { --ph-accent: #6a3df0; }
.gchat--support { --ph-accent: #0f8a6a; }
.phero[data-active="chat"]    { --ph-accent: var(--ph-chat); }
.phero[data-active="support"] { --ph-accent: var(--ph-support); }
.phero[data-active="orb"]     { --ph-accent: var(--ph-orb); }

/* -- Headline ------------------------------------------------------------ */
.phero__head { text-align: center; max-width: 62rem; margin: 0 auto; }
.phero__kicker { font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 600; color: var(--fg); }
.phero__kicker i { display: none; }
.phero__h {
  margin: .5rem 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance;
}
.phero__h .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.phero__sub {
  font-size: var(--t-lead); color: var(--fg-mid); line-height: 1.45;
  max-width: 44rem; margin: 0 auto; text-wrap: pretty;
}
.phero__cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }

/* -- Product switcher ---------------------------------------------------- */
.ptabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem; margin: clamp(2.25rem, 6vh, 3.5rem) auto 1rem; max-width: 72rem;
}
.ptab {
  position: relative; text-align: left;
  display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; row-gap: .15rem; align-items: center;
  padding: 1rem 1.1rem; border-radius: 18px;
  background: var(--paper-2); border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.ptab:hover { background: #ececf0; }
.ptab:focus-visible { outline: 2px solid var(--tab, var(--violet)); outline-offset: 3px; }
.ptab[aria-selected="true"] { background: #fff; border-color: var(--rule); }
.ptab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--tab);
}
.ptab__icon {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; background: var(--tab);
}
.ptab__icon svg { width: 22px; height: 22px; }
.ptab__name { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.015em; }
.ptab__line { font-size: var(--t-small); color: var(--fg-mid); line-height: 1.3; }
.ptab--box     { --tab: var(--ph-box); }
.ptab--chat    { --tab: var(--ph-chat); }
.ptab--support { --tab: var(--ph-support); }
.ptab--orb     { --tab: var(--ph-orb); }

/* -- Stage --------------------------------------------------------------- */
.pstage {
  max-width: 72rem; margin: 0 auto;
  border-radius: var(--ph-radius); background: var(--ph-card);
  border: 1px solid var(--rule-2, var(--ph-line));
  overflow: hidden; position: relative;
}
.ppanel {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  animation: ppanel-in .45s var(--ease) both;
}
.ppanel[hidden] { display: none; }
@keyframes ppanel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ppanel__eyebrow { font-size: 1rem; font-weight: 600; color: var(--ph-accent); }
.ppanel__h {
  margin: .4rem 0 .9rem; font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.022em; text-wrap: balance;
}
.ppanel__p { color: var(--fg-mid); line-height: 1.55; max-width: 34rem; }
.ppanel__list { margin: 1.25rem 0 0; display: grid; gap: .6rem; }
.ppanel__list li { display: flex; gap: .65rem; align-items: flex-start; font-size: .97rem; line-height: 1.4; }
.ppanel__list li::before {
  content: ""; flex: 0 0 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: var(--ph-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.ppanel__actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.6rem; }
.ppanel__actions .btn { padding-block: .8rem; }
.ppanel__fine { margin-top: 1rem; font-size: .8rem; color: var(--fg-dim); line-height: 1.45; max-width: 34rem; }
.ppanel__try { min-width: 0; }

.ptry-label {
  display: block; margin-bottom: .75rem;
  font-size: .9rem; font-weight: 500; color: var(--fg-mid);
}
.ptry-label i { display: none; }
@keyframes ph-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(24, 176, 123, .45); } 60% { box-shadow: 0 0 0 7px rgba(24, 176, 123, 0); } }

/* -- Box: video + savings calculator ------------------------------------ */
.pbox { display: grid; gap: 1rem; }
.pbox__media {
  position: relative; border-radius: 20px; overflow: hidden; background: #0d1626;
  aspect-ratio: 832 / 464; box-shadow: var(--lift-2);
}
.pbox__media video { width: 100%; height: 100%; object-fit: cover; }
.pbox__specs {
  position: absolute; left: .75rem; bottom: .75rem; right: .75rem;
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.pbox__specs span {
  font-size: .78rem; font-weight: 600; color: #fff; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(10, 12, 24, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
}
.pcalc {
  border-radius: 20px; border: 1px solid var(--ph-line); background: var(--paper);
  padding: 1.1rem 1.25rem 1.25rem;
}
.pcalc__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .5rem; }
.pcalc__row label { font-size: .9rem; font-weight: 600; }
.pcalc__row output { font-variant-numeric: tabular-nums; font-weight: 650; }
.pcalc input[type="range"] { width: 100%; margin: .55rem 0 1rem; accent-color: var(--ph-box); }
.pseg { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1.1rem; }
.pseg button {
  font-size: .82rem; font-weight: 600; padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid var(--ph-line); background: #fff; transition: all .15s;
}
.pseg button[aria-pressed="true"] { background: var(--ph-box); color: #fff; border-color: transparent; }
.pcalc__out { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pcalc__out div { border-radius: 14px; padding: .85rem 1rem; background: #fff; border: 1px solid var(--ph-line); }
.pcalc__out small { display: block; font-size: .76rem; color: var(--fg-dim); line-height: 1.3; }
.pcalc__out b { display: block; margin-top: .25rem; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pcalc__out .is-cloud b { color: #b23a3a; }
.pcalc__out .is-box b { color: #0f8a6a; }
.pcalc__note { margin-top: .7rem; font-size: .74rem; color: var(--fg-dim); line-height: 1.4; }

/* -- Chat window (shared by Chat and Live Support) ---------------------- */
.gchat {
  display: flex; flex-direction: column; height: 460px;
  border-radius: 20px; overflow: hidden; background: #fff;
  border: 1px solid var(--ph-line); box-shadow: var(--lift-3);
}
.gchat__bar {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem;
  border-bottom: 1px solid var(--ph-line); background: #fbfbfd;
}
.gchat__dots { display: flex; gap: 6px; }
.gchat__dots i { width: 11px; height: 11px; border-radius: 50%; background: #e3e3e8; }
.gchat__dots i:nth-child(1) { background: #ff5f57; } .gchat__dots i:nth-child(2) { background: #febc2e; } .gchat__dots i:nth-child(3) { background: #28c840; }
.gchat__title { font-size: .86rem; font-weight: 650; display: flex; align-items: center; gap: .45rem; }
.gchat__title em { font-style: normal; font-size: .72rem; font-weight: 600; color: #0f8a6a; background: rgba(15, 138, 106, .1); padding: .15rem .5rem; border-radius: 999px; }
.gchat__ext { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--ph-accent); }
.gchat__ext:hover { text-decoration: underline; }
.gchat__body {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem;
  background: #fff; scroll-behavior: smooth;
}
.gmsg { max-width: 86%; font-size: .93rem; line-height: 1.5; padding: .6rem .85rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.gmsg--bot { align-self: flex-start; background: #f3f3f7; color: var(--fg); border-bottom-left-radius: 5px; }
.gmsg--me  { align-self: flex-end; background: var(--ph-accent); color: #fff; border-bottom-right-radius: 5px; }
.gmsg--err { background: #fdf0f0; color: #9a2f2f; }
.gtyping { display: inline-flex; gap: 4px; padding: .2rem 0; }
.gtyping i { width: 6px; height: 6px; border-radius: 50%; background: #9a9cab; animation: gbounce 1s infinite ease-in-out; }
.gtyping i:nth-child(2) { animation-delay: .15s; } .gtyping i:nth-child(3) { animation-delay: .3s; }
@keyframes gbounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
.gchips { display: flex; flex-wrap: wrap; gap: .45rem; }
.gchips button {
  font-size: .82rem; font-weight: 600; padding: .45rem .8rem; border-radius: 999px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--ph-accent) 35%, transparent); color: var(--ph-accent); background: #fff;
  transition: background .15s;
}
.gchips button:hover { background: color-mix(in srgb, var(--ph-accent) 8%, #fff); }
.gchat__form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--ph-line); background: #fff; }
.gchat__form input {
  flex: 1; min-width: 0; border: 1px solid var(--ph-line); border-radius: 12px; padding: .7rem .85rem;
  font-size: .93rem; outline: none; background: #fafafc;
}
.gchat__form input:focus { border-color: var(--ph-accent); background: #fff; }
.gchat__form button {
  flex: 0 0 auto; width: 44px; border-radius: 12px; background: var(--ph-accent); color: #fff;
  display: grid; place-items: center; transition: opacity .15s;
}
.gchat__form button:disabled { opacity: .45; cursor: default; }
.gchat__form button svg { width: 18px; height: 18px; }

/* -- Live Support: browser mock with the widget docked inside ----------- */
.pbrowser {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--ph-line);
  box-shadow: var(--lift-3); background: #f6f7f9;
}
.pbrowser__bar { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; background: #eceef2; border-bottom: 1px solid var(--ph-line); }
.pbrowser__url {
  flex: 1; font-size: .8rem; color: var(--fg-mid); background: #fff; border-radius: 8px; padding: .3rem .7rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pbrowser__url b { color: var(--fg); font-weight: 600; }
.pbrowser__view { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); min-height: 470px; }
.pbrowser__page { padding: 1.4rem; display: grid; align-content: start; gap: .7rem; }
.pbrowser__page .sk { height: 12px; border-radius: 6px; background: #e3e5ea; }
.pbrowser__page .sk--h { height: 26px; width: 70%; background: #d9dce3; }
.pbrowser__page .sk--img { height: 120px; border-radius: 14px; background: linear-gradient(135deg, #dfe9f5, #ece3f6); }
.pbrowser__page .sk--w60 { width: 60%; } .pbrowser__page .sk--w80 { width: 80%; }
.pbrowser__dock { padding: .8rem .8rem .8rem 0; display: flex; }
.pbrowser__dock .gchat { height: auto; flex: 1; box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .4); }
.gchat--support .gchat__bar { background: linear-gradient(135deg, #0f8a6a, #1f6fd1); color: #fff; border-bottom: 0; }
.gchat--support .gchat__ava { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; color: #0f8a6a; }
.gchat--support .gchat__ava svg { width: 18px; height: 18px; }
.gchat--support .gchat__title { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }
.gchat--support .gchat__title small { font-size: .7rem; font-weight: 500; opacity: .85; }
.gchat__note { font-size: .7rem; color: var(--fg-dim); text-align: center; padding: 0 .6rem .55rem; background: #fff; }

/* -- Orb ------------------------------------------------------------------ */
.porb .morb {
  background: radial-gradient(80% 70% at 50% 35%, rgba(198, 55, 155, .10), rgba(122, 43, 245, .05) 55%, #fff 100%);
  border: 1px solid var(--ph-line); min-height: 460px; justify-content: center;
}
.porb__hints { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.porb__hints span { font-size: .8rem; color: var(--fg-mid); padding: .35rem .7rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--ph-line); }

/* -- Trust strip under the stage ---------------------------------------- */
.phero__trust {
  max-width: 72rem; margin: 1.5rem auto 0; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem 1.75rem; font-size: var(--t-small); color: var(--fg-mid);
}
.phero__trust span { display: inline-flex; align-items: center; gap: .45rem; }
.phero__trust svg { width: 16px; height: 16px; color: var(--violet); }

/* -- Responsive ----------------------------------------------------------- */
@media (max-width: 1020px) {
  .ptabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ppanel { grid-template-columns: 1fr; }
  .pbrowser__view { grid-template-columns: 1fr; }
  .pbrowser__page { display: none; }
  .pbrowser__dock { padding: .8rem; }
}
@media (max-width: 560px) {
  .phero__kicker { font-size: .74rem; }
  .ptabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .ptab { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: .7rem .25rem .8rem; row-gap: .4rem; border-radius: 16px; }
  .ptab__icon { grid-row: auto; width: 38px; height: 38px; border-radius: 11px; }
  .ptab__name { font-size: .74rem; line-height: 1.15; }
  .ptab[aria-selected="true"]::after { left: .6rem; right: .6rem; }
  .ptab__line { display: none; }
  .ppanel { padding: 1.25rem; }
  .gchat { height: 420px; }
  .pcalc__out { grid-template-columns: 1fr; }
  .phero__cta .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ppanel { animation: none; }
  .ptab, .ptab:hover { transition: none; transform: none; }
  .ptry-label i { animation: none; }
}
