/* Homepage-only styles: the discovery hero (assets/ga-hero.js) and Ask AI
   (assets/ga-home.js). Same palette and type as the site: navy wood
   background, Source Serif 4 headlines, Inter body, DM Sans labels, #5D9BD4 accents. */
.gh{position:relative;color:#fff;overflow:hidden;background-color:#0B1D33;background-image:linear-gradient(rgba(11,29,51,.955),rgba(11,29,51,.972)),url('/assets/wood-wall.jpg');background-image:linear-gradient(rgba(11,29,51,.955),rgba(11,29,51,.972)),image-set(url('/assets/wood-wall.webp') type('image/webp'),url('/assets/wood-wall.jpg') type('image/jpeg'));background-size:cover;background-position:center;background-blend-mode:normal}
.gh-inner{position:relative;max-width:1180px;margin:0 auto;padding:clamp(44px,5.5vw,76px) 24px clamp(64px,7vw,96px)}

/* Headline block: compact enough that the conversation panel starts within
   the first screen; each headline sentence stays on one line on desktop. */
.gh-head{display:grid;gap:18px}
.gh-eyebrow{font-family:'DM Sans',sans-serif;font-weight:500;font-size:clamp(11px,3vw,13px);letter-spacing:.2em;text-transform:uppercase;color:#5D9BD4}
.gh-h1{font-family:'Source Serif 4',Georgia,serif;font-weight:600;font-size:clamp(34px,4.3vw,62px);line-height:1.03;letter-spacing:-0.015em;margin:0}
.gh-h1 span{display:block}
.gh-h1 span + span{color:#5D9BD4}
.gh-sub{font-family:'Inter',sans-serif;font-size:clamp(16px,1.45vw,18.5px);line-height:1.6;color:#AEBED0;margin:4px 0 0;max-width:60ch}
.gh-sub strong{color:#fff;font-weight:600}
.gh-foot{display:grid;gap:14px;margin-top:clamp(28px,3.5vw,44px)}
.gh-foot .gh-sub{margin:0}

/* Conversation window, laid out like a chat app: Recents on the left, the
   thread in the middle, a prompt box at the bottom. The prompt box is a
   picture of one (aria-hidden): the question appears in it whole, is sent,
   and Gain answers. Nothing here calls an AI service. */
.gh-convo{display:grid;grid-template-columns:minmax(240px,288px) minmax(0,1fr);margin-top:clamp(24px,3vw,40px);border:1px solid rgba(255,255,255,.13);border-radius:18px;background:#0F2239;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 50px 100px -45px rgba(0,0,0,.8);overflow:hidden}
.gh-side{border-right:1px solid rgba(255,255,255,.07);padding:20px 10px;background:#0A192B}
.gh-side-label{font-family:'Inter',sans-serif;font-size:12.5px;font-weight:500;color:#7E8CA0;padding:2px 12px 10px}
.gh-tabs{display:flex;flex-direction:column;gap:1px}
.gh-tab{position:relative;display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:8px;padding:9px 12px;cursor:pointer;color:#AEBED0;font:inherit;overflow:hidden;transition:background .2s ease,color .2s ease}
.gh-tab:hover{background:rgba(255,255,255,.05);color:#fff}
.gh-tab:focus-visible{outline:2px solid #5D9BD4;outline-offset:-2px}
.gh-tab.is-active{background:rgba(255,255,255,.09);color:#fff}
.gh-tab-t{display:block;font-family:'Inter',sans-serif;font-size:14.5px;font-weight:400;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gh-tab-bar{position:absolute;left:12px;right:12px;bottom:3px;height:2px;border-radius:2px;background:#5D9BD4;opacity:.5;transform:scaleX(0);transform-origin:left}

.gh-main{display:flex;flex-direction:column;min-width:0}
.gh-title{height:50px;display:flex;align-items:center;padding:0 24px;border-bottom:1px solid rgba(255,255,255,.06);font-family:'Inter',sans-serif;font-size:14px;font-weight:500;color:#C3D0DF;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gh-stage{flex:1;display:grid;padding:clamp(26px,3vw,40px) clamp(24px,4vw,56px) 18px}
.gh-panel{grid-area:1 / 1;width:100%;max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:26px;visibility:hidden;opacity:0;transition:opacity .2s ease,visibility 0s linear .2s}
.gh-panel.is-active{visibility:visible;opacity:1;transition:opacity .2s ease}
.gh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
/* The visitor's message: a bubble on the right. */
.gh-q{align-self:flex-end;max-width:min(560px,86%);background:rgba(255,255,255,.075);border-radius:18px;padding:13px 18px}
.gh-q-text{font-family:'Inter',sans-serif;font-size:clamp(15.5px,1.2vw,16.5px);line-height:1.55;color:#E3EAF2;margin:0}
/* Gain's reply: the favicon as avatar, serif text, no bubble. */
.gh-a{display:grid;grid-template-columns:32px minmax(0,1fr);gap:16px;align-items:start}
.gh-avatar{display:block;width:32px;height:32px;border-radius:8px;box-shadow:0 0 0 1px rgba(255,255,255,.14)}
.gh-a-body{position:relative;min-width:0}
.gh-a-text{font-family:'Source Serif 4',Georgia,serif;font-size:clamp(19px,1.6vw,22px);line-height:1.5;color:#F2F5F9;margin:2px 0 0}
.gh-dots{position:absolute;left:0;top:11px;display:flex;gap:5px;opacity:0}
.gh-dots i{width:7px;height:7px;border-radius:50%;background:#7E8CA0;animation:gh-dot 1s ease-in-out infinite}
.gh-dots i:nth-child(2){animation-delay:.15s}
.gh-dots i:nth-child(3){animation-delay:.3s}
.gh-cta{display:inline-flex;align-items:center;gap:8px;margin-top:20px;font-family:'Inter',sans-serif;font-weight:600;font-size:14.5px;line-height:1.35;color:#9CC4EA;border:1px solid rgba(93,155,212,.5);border-radius:999px;padding:10px 18px;background:rgba(93,155,212,.06);transition:background .2s ease,color .2s ease,border-color .2s ease}
.gh-cta:hover{color:#fff;background:rgba(93,155,212,.18);border-color:#5D9BD4}
.gh-cta:focus-visible{outline:2px solid #5D9BD4;outline-offset:4px}

/* Prompt box: fixed height, so entering a question never moves the layout. */
.gh-composer{display:flex;align-items:flex-end;gap:12px;width:calc(100% - 2 * clamp(24px,4vw,56px));max-width:720px;margin:6px auto 22px;border:1px solid rgba(255,255,255,.14);border-radius:16px;background:rgba(255,255,255,.04);padding:12px 12px 12px 18px;transition:border-color .2s ease}
.gh-composer-field{position:relative;flex:1;min-width:0;height:3em;font-family:'Inter',sans-serif;font-size:15px;line-height:1.5}
.gh-composer-ph,.gh-composer-text{position:absolute;inset:0;transition:opacity .15s ease}
.gh-composer-ph{color:#6F7F94}
.gh-composer-text{color:#E3EAF2;opacity:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
/* The visitor can type here: the text is carried into "Tell me more" in the
   contact form. The textarea sits over the placeholder and autoplay text. */
.gh-composer-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;background:transparent;color:#E3EAF2;font:inherit;line-height:inherit;resize:none;outline:none;overflow-y:auto;caret-color:#5D9BD4}
.gh-composer:focus-within{border-color:rgba(93,155,212,.55)}
.gh-composer.is-typing .gh-composer-ph,.gh-composer.is-typing .gh-composer-text{opacity:0}
.gh-composer.has-text .gh-send{background:#5D9BD4;color:#0B1D33}
.gh-send{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:0;border-radius:10px;background:rgba(255,255,255,.09);color:#7E8CA0;cursor:pointer;transition:background .2s ease,color .2s ease}
.gh-send:focus-visible{outline:2px solid #5D9BD4;outline-offset:3px}
.gh-send::before{content:'';position:absolute;inset:-5px}
/* Carried into the contact form: a brief highlight on "Tell me more". */
@keyframes ga-carried{0%{border-color:#5D9BD4;box-shadow:0 0 0 3px rgba(93,155,212,.35)}100%{border-color:rgba(255,255,255,.2);box-shadow:0 0 0 0 rgba(93,155,212,0)}}
.ga-carried{animation:ga-carried 2.4s ease-out both}
.gh-composer.is-filled{border-color:rgba(93,155,212,.55)}
.gh-composer.is-filled .gh-composer-ph{opacity:0}
.gh-composer.is-filled .gh-composer-text{opacity:1}
.gh-composer.is-filled .gh-send{background:#5D9BD4;color:#0B1D33}

/* Sent: the bubble rises in, Gain "thinks" briefly, then answers. */
@keyframes gh-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes gh-send{from{opacity:0;transform:translateY(18px) scale(.98)}to{opacity:1;transform:none}}
@keyframes gh-think{0%{opacity:0}15%{opacity:1}85%{opacity:1}100%{opacity:0}}
@keyframes gh-dot{0%,100%{transform:translateY(0);opacity:.45}50%{transform:translateY(-4px);opacity:1}}
.gh-panel.is-anim .gh-q{animation:gh-send .35s cubic-bezier(.2,.7,.2,1) both}
.gh-panel.is-anim .gh-avatar{animation:gh-in .3s ease .25s both}
.gh-panel.is-anim .gh-dots{animation:gh-think .8s ease .35s both}
.gh-panel.is-anim .gh-a-text{animation:gh-in .45s cubic-bezier(.2,.7,.2,1) 1.1s both}
.gh-panel.is-anim .gh-cta{animation:gh-in .4s cubic-bezier(.2,.7,.2,1) 1.5s both}

.gh-noscript{list-style:none;margin:28px 0 0;padding:0;display:grid;gap:8px}
.gh-noscript a{color:#fff;font-family:'Inter',sans-serif;font-size:16px}
.gh:not(.is-ready) .gh-convo{display:none}

@media (max-width:860px){
  .gh-inner{padding:24px 20px 52px}
  .gh-eyebrow{font-size:11px;letter-spacing:.14em;line-height:1.6}
  .gh-h1{font-size:clamp(32px,9vw,44px)}
  .gh-sub{font-size:16px;line-height:1.55}
  .gh-convo{grid-template-columns:minmax(0,1fr);margin-top:20px;border-radius:16px}
  .gh-foot{margin-top:28px}
  .gh-side{min-width:0;border-right:0;border-bottom:1px solid rgba(255,255,255,.07);padding:14px 0 12px}
  .gh-side-label{padding:0 16px 8px;font-size:12px}
  /* Recents become a row of pills. It scrolls only when the visitor swipes or
     taps (assets/ga-hero.js); the edge fades show there is more. */
  .gh-tabs{flex-direction:row;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding:0 16px;padding:0 16px 2px;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 82%,transparent);mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 82%,transparent)}
  .gh-tabs::-webkit-scrollbar{display:none}
  .gh-tab{flex:0 0 auto;width:auto;min-height:42px;display:flex;align-items:center;scroll-snap-align:start;border:1px solid rgba(255,255,255,.15);border-radius:999px;padding:9px 15px}
  .gh-tab:last-child{margin-right:48px}
  .gh-tab.is-active{border-color:#5D9BD4}
  .gh-tab-t{font-size:14px}
  .gh-tab-bar{left:16px;right:16px}
  .gh-title{display:none}
  .gh-stage{padding:22px 16px 12px}
  .gh-panel{gap:20px}
  .gh-q{max-width:92%;padding:11px 15px;border-radius:16px}
  .gh-q-text{font-size:15px}
  .gh-a{grid-template-columns:28px minmax(0,1fr);gap:12px}
  .gh-avatar{width:28px;height:28px;border-radius:7px}
  .gh-a-text{font-size:18px;line-height:1.5;margin-top:1px}
  .gh-dots{top:9px}
  .gh-cta{display:flex;justify-content:space-between;width:100%;margin-top:18px;padding:12px 16px;font-size:14.5px}
  .gh-composer{width:calc(100% - 32px);margin:4px auto 16px;padding:10px 10px 10px 14px;border-radius:14px}
  .gh-composer-field{font-size:16px} /* 16px+ stops iOS zooming in on focus */
}
@media (prefers-reduced-motion: reduce){
  .gh-panel,.gh-panel.is-active,.gh-tab,.gh-cta,.gh-composer,.gh-composer *{transition:none}
  .ga-carried{animation:none}
  .gh-panel.is-anim .gh-q,.gh-panel.is-anim .gh-avatar,.gh-panel.is-anim .gh-dots,.gh-panel.is-anim .gh-a-text,.gh-panel.is-anim .gh-cta{animation:none}
}

/* Builder of Commercial Engines: carries the brand line motif that used to sit
   behind the old hero, drawn light on the light background. */
.ga-builder{position:relative;overflow:hidden}
.ga-builder-motif{position:absolute;right:-60px;top:34%;transform:translateY(-50%);width:min(60vw,860px);height:auto;pointer-events:none}
/* The motif draws once on entering view through the homepage reveal sweep
   (data-draw paths, then the node and outgoing line). On phones it sits
   below the buttons instead of behind the copy. */
@media (max-width:900px){
  .ga-builder{display:flex;flex-direction:column}
  .ga-builder > div{order:1;padding-bottom:28px !important}
  .ga-builder-motif{order:2;position:relative;right:auto;top:auto;transform:none;width:calc(100% + 40px);margin:-56px 0 -40px -40px}
}

/* ---- Ask AI ---- */
.ga-ask{background:#fff;border-top:1px solid #EEF0F3}
.ga-ask-inner{max-width:1180px;margin:0 auto;padding:clamp(64px,8vw,112px) 24px}
.ga-ask-eyebrow{font-family:'DM Sans',sans-serif;font-weight:500;font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:#1E4FA1}
.ga-ask-h{font-family:'Source Serif 4',Georgia,serif;font-weight:600;font-size:clamp(30px,4.4vw,50px);line-height:1.04;letter-spacing:-0.015em;color:#0B1D33;margin:16px 0 0}
.ga-ask-h span{display:block}
.ga-ask-p{font-family:'Inter',sans-serif;font-size:clamp(16px,1.5vw,19px);line-height:1.62;color:#5B6B7C;margin:22px 0 0;max-width:58ch}
.ga-ask-tools{display:flex;flex-wrap:wrap;gap:12px;margin-top:32px}
.ga-ask-tool{display:inline-flex;align-items:center;gap:10px;min-height:48px;font-family:'Inter',sans-serif;font-weight:600;font-size:15px;color:#0B1D33;background:#fff;border:1px solid #D6DBE1;border-radius:6px;padding:12px 18px;cursor:pointer;transition:border-color .2s ease,background .2s ease}
.ga-ask-tool:hover{border-color:#1E4FA1;background:#F5F8FD;color:#0B1D33}
.ga-ask-tool:focus-visible{outline:2px solid #1E4FA1;outline-offset:3px}
.ga-ask-tool small{font-family:'DM Sans',sans-serif;font-weight:500;font-size:11px;letter-spacing:.04em;color:#8FA0B4}
.ga-ask-status{min-height:1.5em;font-family:'Inter',sans-serif;font-size:14.5px;color:#1E4FA1;margin:16px 0 0}
.ga-ask-details{margin-top:26px;max-width:760px}
.ga-ask-details summary{cursor:pointer;font-family:'Inter',sans-serif;font-weight:600;font-size:15px;color:#1E4FA1;list-style:none}
.ga-ask-details summary::-webkit-details-marker{display:none}
.ga-ask-details summary::after{content:' \203A'}
.ga-ask-details[open] summary::after{content:' \2039'}
.ga-ask-prompt{margin:14px 0 0;padding:20px 22px;border-radius:12px;background:#FBFBF9;border:1px solid #E2E6EA;font-family:'Inter',sans-serif;font-size:14.5px;line-height:1.6;color:#3A4654;white-space:pre-wrap}
.ga-ask-copy{margin-top:12px;font-family:'Inter',sans-serif;font-weight:600;font-size:14px;color:#1E4FA1;background:none;border:1px solid #C7D2E0;border-radius:6px;padding:9px 16px;cursor:pointer}
.ga-ask-note{font-family:'Inter',sans-serif;font-size:13.5px;line-height:1.55;color:#8FA0B4;margin:14px 0 0;max-width:70ch}

/* Laptop screens (shorter than ~900px): tighten the space above the chat so
   the whole conversation, prompt box included, is visible on arrival. */
@media (min-width:861px) and (max-height:899px){
  .gh-inner{padding-top:clamp(24px,3vh,40px)}
  .gh-h1{font-size:clamp(30px,3.6vw,50px)}
  .gh-convo{margin-top:clamp(18px,2.4vh,28px)}
  .gh-stage{padding-top:clamp(18px,2.6vh,28px)}
}
@media (min-width:861px) and (max-height:800px){
  .gh-h1{font-size:clamp(30px,3.3vw,44px)}
  .gh-title{height:42px}
  .gh-composer{margin-bottom:14px}
}
