/* ==========================================================================
   Replica Health — replica.health
   Hand-written stylesheet replacing the generated Webflow CSS.
   ========================================================================== */

:root {
  --navy: #17293a;
  --green: #0b6353;
  --lavender: #ebe2fe;
  --plum: #c5abfc;
  --yellow: #dfe88f;
  --white: #ffffff;
  --grid-line: rgba(197, 171, 252, 0.15);
  --font-heading: monsal-gothic, "Nunito", sans-serif;
  --font-body: "Nunito", sans-serif;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background-color: var(--white);
  /* Grid pattern: vertical + horizontal plum lines, matching the original SVG tile */
  background-image:
    repeating-linear-gradient(to right, var(--grid-line) 0 2px, transparent 2px 193px),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 2px, transparent 2px 193px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Layout helpers ---------- */

.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 5%;
  padding-right: 5%;
}

.container--small {
  max-width: 48rem;
}

.section {
  padding-top: 7rem;
  padding-bottom: 7rem;
  position: relative;
}

@media (max-width: 767px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.text-center {
  text-align: center;
}

/* ---------- Typography ---------- */

.heading-xl {
  font-size: 3.5rem;
}

.heading-lg {
  font-size: 2.5rem;
}

.heading-md {
  font-size: 2rem;
}

.heading-sm {
  font-size: 1.5rem;
}

@media (max-width: 991px) {
  .heading-xl { font-size: 3rem; }
  .heading-lg { font-size: 2.25rem; }
}

@media (max-width: 479px) {
  .heading-xl { font-size: 2.3rem; }
  .heading-lg { font-size: 2rem; }
  .heading-md { font-size: 1.6rem; }
}

.text-medium {
  font-size: 1.125rem;
}

.text-small {
  font-size: 0.875rem;
}

.text-tiny {
  font-size: 0.75rem;
}

.text-white {
  color: var(--white);
}

.text-link {
  text-decoration: underline;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  background-color: var(--plum);
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: var(--yellow);
}

.button--small {
  padding: 0.5rem 1rem;
}

.button--secondary {
  background-color: var(--yellow);
}

.button--secondary:hover {
  background-color: var(--plum);
}

/* ---------- Tag ---------- */

.tag {
  display: inline-block;
  background-color: var(--yellow);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px;
  padding: 0.25rem 0.75rem;
}

/* ---------- Forms ---------- */

.form-input {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background-color: var(--white);
  border: 1px solid var(--navy);
  border-radius: 50px;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  width: 100%;
}

.form-input::placeholder {
  color: rgba(0, 0, 0, 0.6);
}

.form-input--purple {
  background-color: var(--lavender);
  border: none;
  font-family: var(--font-heading);
}

.signup-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  max-width: 32rem;
  margin: 0 auto;
}

.signup-form .form-input {
  flex: 1;
}

@media (max-width: 479px) {
  .signup-form {
    flex-direction: column;
  }
  .signup-form .button {
    width: 100%;
  }
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--white);
  border-bottom: 1px solid rgba(23, 41, 58, 0.06);
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  padding: 0 5%;
}

.navbar-inner {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  width: 150px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-menu a:not(.button) {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.navbar-menu a:not(.button):hover,
.navbar-menu a.active {
  color: var(--green);
}

.navbar-menu .button {
  margin-left: 1rem;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--navy);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 991px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1rem 5% 1.5rem;
    border-bottom: 1px solid rgba(23, 41, 58, 0.1);
  }

  .navbar-menu.open {
    display: flex;
  }

  .navbar-menu .button {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  body.nav-open .navbar-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  body.nav-open .navbar-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .navbar-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Page content starts below the fixed navbar */
main {
  padding-top: 4.5rem;
}

/* ---------- Two-column feature rows ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.split-image img {
  margin: 0 auto;
}

@media (max-width: 767px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.split h2,
.split h3 {
  margin-bottom: 1rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-content .signup-block {
  margin-top: 2.5rem;
}

.hero-image {
  max-width: 689px;
  margin: 4rem auto 0;
}

.terms-note {
  margin-top: 1rem;
}

/* Particle stream canvas (home hero, full-bleed band below the intro text) */
.stream-canvas {
  display: block;
  width: 100%;
  height: clamp(200px, 34vh, 320px);
  margin-top: 3.5rem;
  pointer-events: none;
}

/* Decorative floating shapes */
.shape {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.shape--green-hexagon   { top: 12%; left: 4%; }
.shape--purple-ball     { top: 30%; right: 6%; }
.shape--yellow-hexagon  { bottom: 18%; right: 3%; }
.shape--purple-ball-2   { bottom: 30%; left: 8%; }
.shape--yellow-ball     { top: 55%; left: 3%; }
.shape--blue-hexagon    { top: 8%; right: 12%; }
.shape--purple-line     { bottom: 6%; left: 45%; }

@media (max-width: 767px) {
  .shape {
    display: none;
  }
}

/* ---------- App features timeline (home) ---------- */

.section--app-features {
  background-color: var(--white);
  border-top: 1px solid var(--navy);
  position: relative;
  overflow: hidden;
}

.app-features-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .app-features-grid {
    grid-template-columns: 1fr;
  }
}

.timeline-step {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 2.5rem;
  padding-bottom: 4rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step .icon {
  width: 5rem;
  height: 5rem;
}

.timeline-step h3 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 479px) {
  .timeline-step {
    grid-template-columns: 3.5rem 1fr;
    gap: 1.25rem;
  }
  .timeline-step .icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.blob--yellow {
  top: 0;
  left: 0;
  max-width: 50%;
}

.blob--purple {
  bottom: 0;
  right: 0;
  max-width: 40%;
}

/* ---------- CTA bands ---------- */

.cta-band {
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
}

.cta-band--green {
  background-color: var(--green);
}

.cta-band--navy {
  background-color: var(--navy);
}

.cta-band h2 {
  margin-bottom: 1rem;
}

.cta-band .signup-block {
  margin-top: 2rem;
}

.cta-band .button {
  margin-top: 2rem;
}

/* ---------- Cards (capabilities, research) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {
  .card-grid,
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 567px) {
  .card-grid,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }
}

.card img {
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.card .tag {
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

a.card:hover h3 {
  color: var(--green);
}

/* ---------- Partners ---------- */

.partners {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
}

.partners img {
  max-height: 5rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 991px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 567px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-member img {
  filter: grayscale(1);
  border-radius: 0.5rem;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  margin-bottom: 1.25rem;
}

.team-member .name {
  font-size: 1.25rem;
  font-weight: 700;
}

.team-member .role {
  margin-bottom: 0.75rem;
}

.team-member .social {
  margin-top: 1rem;
}

.team-member .social svg {
  width: 24px;
  height: 24px;
}

.team-member .social a:hover {
  color: var(--green);
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  margin-top: 2rem;
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
}

.field .form-input {
  border-radius: 0.25rem;
}

.field textarea.form-input {
  min-height: 11rem;
  resize: vertical;
}

/* ---------- Research article ---------- */

.article-header {
  max-width: 48rem;
}

.article-header .tag {
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 479px) {
  .article-header h1 {
    font-size: 1.9rem;
  }
}

.article-image {
  max-width: 48rem;
  margin: 2.5rem 0;
}

.article-image img {
  border-radius: 1rem;
}

.article-body {
  max-width: 48rem;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body a {
  color: var(--green);
  text-decoration: underline;
}

.article-body .citation {
  font-size: 0.875rem;
  color: rgba(23, 41, 58, 0.75);
  border-left: 3px solid var(--plum);
  padding-left: 1rem;
}

/* ---------- Legal pages ---------- */

.legal-header {
  text-align: center;
}

.legal-body {
  max-width: 48rem;
  margin: 0 auto;
}

.legal-body h2,
.legal-body h3,
.legal-body h4 {
  margin: 2rem 0 1rem;
}

.legal-body p,
.legal-body li {
  margin-bottom: 1rem;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.5rem;
}

.legal-body a {
  color: var(--green);
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.footer {
  background-color: var(--white);
  border-top: 1px solid rgba(23, 41, 58, 0.06);
  padding: 5rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

@media (max-width: 767px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

.footer-logo img {
  width: 109px;
}

.footer .signup-form {
  justify-content: flex-start;
  margin: 1rem 0 0.75rem;
  max-width: 36rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.footer-legal a {
  text-decoration: underline;
}

.footer-social {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

.footer-social svg {
  width: 24px;
  height: 24px;
  fill: var(--navy);
}

.footer-social a:hover svg {
  fill: var(--green);
}

@media (max-width: 567px) {
  .footer-social {
    margin-left: 0;
  }
}

.footer-credit {
  text-align: center;
  font-weight: 600;
  padding: 2rem 0 1rem;
}

/* ---------- Book a Demo modal ---------- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(23, 41, 58, 0.6);
}

.modal-content {
  position: relative;
  background-color: var(--white);
  border-radius: 1rem;
  max-width: 36rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem 2.5rem;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  color: var(--navy);
}

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 479px) {
  .modal-form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 ---------- */

.utility-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.utility-page .button {
  margin-top: 1.5rem;
}

/* ---------- Scroll fade-up animation ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Company-story additions ---------- */

.eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.tag--purple {
  background-color: var(--lavender);
}

.card-date {
  font-size: 0.875rem;
  color: rgba(23, 41, 58, 0.6);
  margin-left: 0.5rem;
  white-space: nowrap;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  margin-top: 2.5rem;
}

.stat .stat-number {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat .stat-label {
  font-size: 0.9375rem;
  color: rgba(23, 41, 58, 0.75);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--plum);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.stack-card {
  border: 1px solid rgba(23, 41, 58, 0.15);
  border-radius: 1rem;
  padding: 1.75rem;
  background-color: var(--white);
}

.stack-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.stack-card .stack-kind {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

/* Product showcase: presents a program's native design language inside a
   deliberately neutral "stage" so it reads as intentional, not off-brand. */
.showcase {
  background-color: #f5f2ec;
  border-top: 1px solid rgba(23, 41, 58, 0.08);
  border-bottom: 1px solid rgba(23, 41, 58, 0.08);
}

.showcase-label {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(23, 41, 58, 0.55);
  margin-bottom: 3rem;
}

.phone-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.phone {
  max-width: 272px;
  text-align: center;
}

/* CSS iPhone body around a raw screen capture */
.device {
  background-color: #17181a;
  padding: 9px;
  border-radius: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 40px rgba(23, 41, 58, 0.22);
}

.device img {
  border-radius: 2.5rem;
}

.phone-caption {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: rgba(23, 41, 58, 0.7);
}

/* live CSS MacBook (shared treatment with the standalone DeepLarynx site) */
.mac-shot {
  max-width: 56rem;
  margin: 5rem auto 0;
}

.mac-shot .phone-caption {
  text-align: center;
}

.macbook-lid {
  background: #0e0f11;
  border: 1px solid #313438;
  border-bottom: none;
  border-radius: 2.6% / 4.2%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 1.9%;
}

.macbook-screen {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 3024 / 1890;   /* source minus the menu-bar band */
  container-type: inline-size;
}

.macbook-screen img {
  width: 100%;
  margin-top: -2.4471%;        /* crops the menu-bar band */
  border-radius: 0;
}

.macbook-screen .patch {
  position: absolute;
  left: 74%;
  right: 0;
  top: 0;
  height: 9.4%;
  background: #f3f2f2;
}

.macbook-screen .patch-label {
  position: absolute;
  left: 74.2%;
  top: 4.1%;
  font-family: Lora, Georgia, serif;
  font-size: 0.675cqw;
  letter-spacing: 0.16em;
  color: #7d7979;
}

.macbook-base {
  width: 119%;
  margin-left: -9.5%;
  height: clamp(10px, 2.6vw, 24px);
  background: linear-gradient(#eceded 0%, #d4d6d8 55%, #9fa3a7 100%);
  border-radius: 3px 3px 16px 16px;
  position: relative;
}

.macbook-base::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 15%;
  height: 40%;
  background: linear-gradient(#b3b7bb, #d7d9db);
  border-radius: 0 0 10px 10px;
}

.avatar-initials {
  aspect-ratio: 1 / 1.15;
  border-radius: 0.5rem;
  background-color: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
