/* V112 — Hub-first marketing homepage (www.envia-os.com lands in The Hub) */

.page-hub-first {
  overflow: hidden;
}

.page-hub-first .ambient-bg {
  opacity: 0.85;
}

.os-site-header {
  position: fixed;
  inset: 0 0 auto;
  left: 0;
  right: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 28px);
  pointer-events: none;
  transform: none;
  width: 100%;
  max-width: none;
}

.os-site-header > * {
  pointer-events: auto;
}

.os-brand {
  flex: 0 0 auto;
  margin-right: auto;
}

.os-brand .brand-logo {
  width: clamp(120px, 14vw, 150px);
  height: auto;
  display: block;
}

.os-top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-left: auto;
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 14, 36, 0.55);
  backdrop-filter: blur(16px);
}

.os-top-nav a {
  color: #c5d8f2;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 6px 8px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.os-top-nav a:hover,
.os-top-nav a.active {
  color: #fff;
  background: rgba(85, 234, 255, 0.12);
}

.os-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.replica-avatar {
  position: relative;
  overflow: hidden;
}

.replica-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
}

.replica-avatar span.has-img,
.replica-avatar:has(img) > span:not(.has-img) {
  opacity: 0;
  pointer-events: none;
}

.replica-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.marketing-return-sophie,
.trial-return-note a {
  color: #68ecff;
  font-weight: 800;
  text-decoration: none;
}

.marketing-return-sophie:hover,
.trial-return-note a:hover {
  text-decoration: underline;
}

.trial-section--chat .trial-enquiry-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.trial-hub-panel {
  padding: 0;
  overflow: hidden;
  min-height: 520px;
}

.trial-hub-panel .marketing-hub-viewport--compact {
  min-height: 520px;
}

.marketing-hub-viewport--compact .marketing-hub-shell--compact {
  min-height: 520px;
  max-height: 620px;
  border-radius: 22px;
}

.marketing-hub-viewport--compact .marketing-hub-rail {
  display: flex;
}

.replica-topbar-left {
  justify-content: flex-start;
  flex: 0 0 auto;
}

.replica-hamburger,
.replica-menu-dot {
  flex-shrink: 0;
}

.os-menu-toggle {
  display: none;
}

.marketing-hub-main {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 88px clamp(12px, 2vw, 22px) 24px;
  display: flex;
  flex-direction: column;
}

.marketing-hub-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
}

.marketing-hub-shell {
  flex: 1;
  min-height: calc(100dvh - 120px);
  max-height: calc(100dvh - 120px);
  border-radius: 28px;
  border: 1px solid rgba(89, 234, 255, 0.22);
  box-shadow:
    0 40px 90px rgba(2, 8, 24, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 0fr);
  transition: grid-template-columns 0.35s ease;
}

.marketing-hub-shell.is-panel-open {
  grid-template-columns: 58px minmax(0, 1fr) minmax(260px, 320px);
}

.marketing-hub-rail .replica-avatar {
  animation: hub-rail-pulse 4.8s ease-in-out infinite;
}

.marketing-hub-rail .replica-avatar:nth-child(3n) {
  animation-delay: 0.6s;
}

.marketing-hub-rail .replica-avatar:nth-child(4n) {
  animation-delay: 1.2s;
}

.marketing-hub-rail .replica-avatar.active {
  animation: hub-rail-pulse-active 3.2s ease-in-out infinite;
}

@keyframes hub-rail-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.06),
      0 0 14px rgba(83, 231, 255, 0.14);
  }
}

@keyframes hub-rail-pulse-active {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(83, 231, 255, 0.12),
      0 0 20px rgba(83, 231, 255, 0.42);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(83, 231, 255, 0.18),
      0 0 28px rgba(83, 231, 255, 0.55);
  }
}

.marketing-hub-workspace {
  min-width: 0;
}

.marketing-hub-brief {
  flex: 0 0 auto;
  margin: 0 18px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 237, 255, 0.16);
  background: linear-gradient(135deg, rgba(85, 234, 255, 0.08), rgba(154, 91, 255, 0.06));
}

.marketing-hub-brief-label {
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #68ecff;
  margin-bottom: 4px;
}

.marketing-hub-brief p {
  margin: 0;
  color: #d7e8ff;
  font-size: 12px;
  line-height: 1.45;
  transition: opacity 0.35s ease;
}

.marketing-hub-brief.is-fading p {
  opacity: 0.35;
}

.marketing-hub-feed {
  flex: 1;
  min-height: 0;
}

.marketing-hub-chips-wrap {
  flex: 0 0 auto;
  padding: 0 18px 8px;
}

.marketing-hub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-hub-chips button {
  appearance: none;
  border: 1px solid rgba(103, 237, 255, 0.28);
  background: rgba(103, 237, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  color: #eaffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.marketing-hub-chips button:hover {
  background: rgba(103, 237, 255, 0.16);
  border-color: rgba(103, 237, 255, 0.45);
  transform: translateY(-1px);
}

.marketing-hub-composer-shell {
  padding-bottom: 18px;
}

.marketing-hub-owner-pill:not([hidden]) {
  display: flex;
}

.marketing-hub-glass {
  align-self: stretch;
  margin: 12px 12px 12px 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(89, 234, 255, 0.2);
  background: linear-gradient(145deg, rgba(8, 20, 48, 0.92), rgba(22, 14, 64, 0.78));
  overflow: auto;
  position: relative;
}

.marketing-hub-glass[hidden] {
  display: none;
}

.marketing-hub-panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #9eb0cb;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.marketing-hub-glass h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.15rem;
}

.marketing-hub-glass p,
.marketing-hub-glass li {
  color: #c5d4ea;
  font-size: 13px;
  line-height: 1.55;
}

.marketing-hub-glass .panel-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.site-footer--hub-first {
  margin-top: 8px;
  padding: 28px clamp(16px, 3vw, 28px) 12px;
}

.legal--hub-first {
  padding: 0 clamp(16px, 3vw, 28px) 20px;
}

.legal--hub-first a {
  color: #9eb0cb;
  text-decoration: none;
  margin-left: 14px;
}

@media (max-width: 1100px) {
  .os-top-nav {
    display: none;
  }

  .os-menu-toggle {
    display: flex;
  }

  .marketing-hub-shell.is-panel-open {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .marketing-hub-glass {
    position: fixed;
    inset: auto 12px 12px;
    left: 12px;
    z-index: 170;
    max-height: 42vh;
    margin: 0;
  }
}

@media (max-width: 960px) {
  .trial-section--chat .trial-enquiry-layout {
    grid-template-columns: 1fr;
  }

  .trial-hub-panel .marketing-hub-viewport--compact {
    min-height: 460px;
  }
}

@media (max-width: 760px) {
  .marketing-hub-main {
    padding-top: 72px;
  }

  .os-header-actions .btn-ghost {
    display: none;
  }

  .marketing-hub-shell {
    min-height: calc(100dvh - 96px);
    max-height: calc(100dvh - 96px);
    border-radius: 20px;
  }

  .marketing-hub-rail {
    display: none;
  }

  .marketing-hub-shell {
    grid-template-columns: 1fr;
  }
}
