/* Site-wide hero typography: prioritise comfortable reading at every viewport. */
.hero h1,
.hero-copy h1,
.page > h1 {
  font-size: clamp(38px, 4.4vw, 66px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.035em !important;
  word-spacing: 0.06em;
}

.hero .eyebrow,
.hero-copy .eyebrow,
.page > .eyebrow {
  letter-spacing: 0.025em !important;
  word-spacing: 0.1em;
}

.hero-intro,
.hero > p,
.hero-copy > p:not(.eyebrow),
.page > .intro {
  font-size: clamp(15px, 1.25vw, 17px) !important;
  line-height: 1.68 !important;
  letter-spacing: 0.005em;
  word-spacing: 0.045em;
}

.mobile-flow-map { display: none; }

@media (max-width: 780px) {
  .hero h1,
  .hero-copy h1,
  .page > h1 {
    font-size: clamp(34px, 9.2vw, 48px) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.028em !important;
    word-spacing: 0.05em;
  }

  .hero .eyebrow,
  .hero-copy .eyebrow,
  .page > .eyebrow {
    font-size: 13px !important;
    line-height: 1.45 !important;
    letter-spacing: 0.035em !important;
  }
}

/* Mobile: keep the evidence flow readable instead of letting animated cards collide. */
@media (max-width: 600px) {
  .hero-copy > .eyebrow[style] {
    font-size: 11px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.055em !important;
  }

  .hero-proof {
    display: grid !important;
    gap: 13px !important;
  }

  .hero-proof span {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 0 !important;
  }

  .hero-proof b {
    width: 38px;
    margin: 0 !important;
  }

  .evidence-graphic {
    min-height: 730px !important;
  }

  .evidence-graphic .flow-map {
    display: none;
  }

  .evidence-graphic::after {
    display: none;
  }

  .evidence-graphic .mobile-flow-map {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .mobile-flow-paths path {
    fill: none;
    stroke: #58cfc2;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 5 7;
    filter: drop-shadow(0 0 3px rgba(78,215,203,.55));
    animation: mobile-flow-dash 3.5s linear infinite;
  }

  .mobile-flow-particles circle {
    fill: #eaffc8;
    stroke: #28b7aa;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 5px #4ed7cb);
  }

  .evidence-graphic .data-node {
    width: 128px;
    animation: mobile-node-signal 5.4s ease-in-out infinite !important;
  }

  .evidence-graphic .node-source { animation-delay: 0s !important; }
  .evidence-graphic .node-review { animation-delay: -1.35s !important; }
  .evidence-graphic .node-output { animation-delay: -2.7s !important; }
  .evidence-graphic .node-evidence { animation-delay: -4.05s !important; }

  .evidence-graphic .node-source {
    top: 92px;
    left: 16px;
  }

  .evidence-graphic .node-review {
    top: 510px;
    right: auto;
    left: 16px;
  }

  .evidence-graphic .node-evidence {
    top: 92px;
    bottom: auto;
    left: auto;
    right: 16px;
  }

  .evidence-graphic .node-output {
    top: 510px;
    right: 16px;
    bottom: auto;
  }

  .evidence-graphic .node-engine {
    top: 286px;
    left: calc(50% - 64px);
    animation: mobile-node-signal 5.4s ease-in-out infinite -2.1s !important;
  }

  .evidence-graphic .graphic-bottom {
    right: 16px;
    bottom: 18px;
    left: 16px;
    font-size: 8px;
  }

  /* The orbit had been hidden on phones; retain a small moving visual. */
  .workflow-console .console-orbit {
    display: block !important;
    width: 88px;
    height: 88px;
    margin: 46px auto 20px;
    box-shadow: 0 0 0 13px rgba(78,215,203,.07), 0 0 0 29px rgba(78,215,203,.035);
  }

  .workflow-console .console-orbit b {
    inset: 24px;
    font-size: 18px;
  }

  .workflow-rail .rail-line {
    display: block !important;
    z-index: 3;
    pointer-events: none;
    top: 76px;
    bottom: 38px;
    left: 53px;
    height: auto;
  }

  .workflow-rail .rail-line i {
    position: absolute;
    top: 0;
    height: 76px;
    animation: mobile-rail-flow 3.8s linear infinite !important;
  }

  .site-footer .footer-logo {
    width: 150px !important;
  }

  .site-footer .association-logo {
    width: 128px !important;
    margin: 16px 0 !important;
    border: 0 !important;
    clip-path: inset(0 0 2px 0);
  }
}

@keyframes mobile-node-signal {
  0%, 100% { transform: translateY(0); box-shadow: 7px 10px 20px rgba(38,93,84,.08); border-color: rgba(195,220,212,.9); }
  50% { transform: translateY(-7px); box-shadow: 0 0 0 5px rgba(78,215,203,.13), 10px 14px 25px rgba(38,93,84,.14); border-color: rgba(78,215,203,.9); }
}

@keyframes mobile-flow-dash { to { stroke-dashoffset: -48; } }

@keyframes mobile-rail-flow {
  0% { top: 0; opacity: 0; }
  8%, 88% { opacity: 1; }
  92%, 100% { top: calc(100% - 76px); opacity: 0; }
}

@media (max-width: 420px) {
  .hero h1,
  .hero-copy h1,
  .page > h1 {
    font-size: clamp(32px, 9vw, 39px) !important;
    letter-spacing: -0.02em !important;
  }
}

/* Home-page section headings and module cards. */
.section-heading h2,
.workflow-title h2,
.method-intro h2,
.trust-section h2,
.roadmap-section h2 {
  font-size: clamp(34px, 3.35vw, 50px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.032em !important;
  word-spacing: 0.06em;
}

.module-card h3,
.workflow-list h3 {
  letter-spacing: -0.025em !important;
  line-height: 1.22 !important;
  word-spacing: 0.055em;
}

/* Public tab pages (Overview and individual modules). */
#overview h1,
#module h1 {
  font-size: clamp(38px, 4.4vw, 66px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.035em !important;
  word-spacing: 0.06em;
}

#overview h2,
#module h2,
.shell .section-head h2 {
  font-size: clamp(28px, 3vw, 44px) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.027em !important;
  word-spacing: 0.065em;
}

#overview h3,
#module h3,
.shell .section-head h3,
.shell .steps h3 {
  line-height: 1.28 !important;
  letter-spacing: -0.018em !important;
  word-spacing: 0.06em;
}

/* Contact and legal/public pages keep their compact hierarchy but gain air. */
.page h2,
.page h3,
.contact-aside h2,
.contact-form h2 {
  line-height: 1.25 !important;
  letter-spacing: -0.018em !important;
  word-spacing: 0.06em;
}

@media (max-width: 780px) {
  .section-heading h2,
  .workflow-title h2,
  .method-intro h2,
  .trust-section h2,
  .roadmap-section h2 {
    font-size: clamp(30px, 8vw, 40px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.024em !important;
  }

  #overview h2,
  #module h2,
  .shell .section-head h2 {
    font-size: clamp(26px, 7vw, 35px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
  }

  #overview h3,
  #module h3,
  .shell .steps h3 {
    line-height: 1.34 !important;
    letter-spacing: -0.012em !important;
  }
}
