/* Full-width home animation and responsive refinements. */
.tech-site {
  --header-height: 102px;
}

.hero-banner {
  position: relative;
  display: block;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  min-height: 480px;
  max-height: 1080px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--ink);
}

.hero-banner > .hero-motion-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

/* Small, independent controls: the scroll cue belongs only to the banner. */
.hero-scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 50, 54, .32);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  transition: background .2s ease;
}
.hero-scroll-cue svg { animation: scroll-cue 3s ease-in-out infinite; }
.hero-scroll-cue:hover { background: rgba(0, 50, 54, .65); }
.hero-scroll-cue:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(0, 50, 54, .7);
}
@keyframes scroll-cue {
  0%, 75%, 100% { transform: translateY(-1px); }
  35% { transform: translateY(3px); }
}

.whatsapp-float {
  position: fixed;
  z-index: 40;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 32, 35, .16);
  transition: background .2s ease, color .2s ease;
}
/* Leave the banner's bottom-right playback control unobstructed. */
.hero-in-view .whatsapp-float {
  right: calc(76px + env(safe-area-inset-right, 0px));
}
.whatsapp-float:hover { background: var(--jade); color: var(--ink); }
.whatsapp-float:focus-visible { outline: 3px solid var(--jade); outline-offset: 4px; }
.modal-open .whatsapp-float, .menu-open .whatsapp-float { visibility: hidden; }

.manifesto-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 32px;
}

.manifesto > *, .manifesto-lower > *, .solutions-grid > *,
.experience > *, .demo-panel, .demo-description > *,
.human-section > *, .process-grid > *, .faq > *,
.contact-grid > *, .form-row > *, .footer-top > *, .footer-bottom > * {
  min-width: 0;
}

.button, .text-button, .quiet-link { max-width: 100%; }
input, select, textarea { min-width: 0; max-width: 100%; }
.brief-actions { flex-wrap: wrap; }
.modal-close { width: 44px; height: 44px; }
.modal { overscroll-behavior: contain; }
.modal > .section-label { padding-right: 44px; max-width: 100%; }
.mobile-nav {
  max-height: calc(100vh - var(--header-height));
  max-height: calc(100svh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 1180px) {
  .tech-site { --header-height: 90px; }
}

@media (min-width: 961px) {
  .mobile-nav { display: none; }
}

@media (max-width: 1024px) {
  .hero-banner {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 760px) {
  .tech-site { --header-height: 82px; }
  .hero-banner { aspect-ratio: 4 / 5; }
  .manifesto-actions { gap: 22px; margin-top: 28px; }
  .modal h2 {
    font-size: clamp(27px, 6.8vw, 35px);
    overflow-wrap: anywhere;
  }
  .brief-actions .button { flex: 1 1 150px; }

  /* Demonstrations reflow instead of shrinking their text on phones. */
  .browser-top { font-size: 12px; }
  .clinic-nav strong { font-size: 18px; }
  .clinic-nav strong > span { font-size: 10px; line-height: 1.5; }
  .clinic-nav > span { font-size: 11px; }
  .clinic-label { font-size: 11px; line-height: 1.5; letter-spacing: .04em; }
  .clinic-main h3 { font-size: clamp(30px, 7vw, 42px); }
  .clinic-btn { font-size: 12px; line-height: 1.5; padding: 9px 12px; }
  .clinic-footer { font-size: 12px; line-height: 1.5; flex-wrap: wrap; }
  .demo-app-header { flex-wrap: wrap; }
  .demo-app-header strong { font-size: 14px; }
  .demo-badge { font-size: 11px; }
  .crm-title, .insight-heading { flex-wrap: wrap; align-items: flex-start; }
  .crm-title h3, .insight-heading h3 { font-size: 24px; }
  .crm-filter { font-size: 12px; }
  .kanban {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 14px;
    padding: 0 16px 18px;
  }
  .kanban-column { min-width: 0; padding: 14px; }
  .kanban-title { font-size: 14px; gap: 8px; margin-bottom: 12px; }
  .kanban-title i { width: 7px; height: 7px; }
  .kanban-card { padding: 13px; }
  .kanban-avatar { width: 24px; height: 24px; font-size: 12px; margin-right: 8px; }
  .kanban-card strong { font-size: 14px; line-height: 24px; }
  .kanban-card small { font-size: 13px; line-height: 1.6; }
  .kanban-tag { font-size: 12px; padding: 3px 8px; }
  .insight-heading > span { font-size: 12px; max-width: none; }
  .insight-metrics { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 18px; }
  .insight-metrics > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 12px;
    border: 0;
    border-bottom: 1px solid #bfd2cd;
    padding: 0 0 16px;
  }
  .insight-metrics span { font-size: 14px; }
  .insight-metrics strong { font-size: 32px; margin: 0; }
  .insight-metrics small { grid-column: 1 / -1; font-size: 12px; }
  .insight-chart > div:first-child { font-size: 14px; flex-wrap: wrap; gap: 8px; }
  .insight-chart > div:first-child span { font-size: 12px; }
}

@media (max-width: 430px) {
  .manifesto-actions { align-items: flex-start; flex-direction: column; }
  .manifesto-actions .button { width: 100%; }
}

@media (max-width: 960px) and (orientation: landscape) {
  .hero-banner { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue svg { animation: none; }
  .hero-scroll-cue, .whatsapp-float { transition: none; }
}

@media print {
  .hero-banner { display: none; }
  .whatsapp-float { display: none; }
}
