/* The Freelance Bubble — final visual-system and conversion polish */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --tfb-purple: #5b21b6;
  --tfb-purple-deep: #34115e;
  --tfb-plum: #241333;
  --tfb-ink: #241333;
  --tfb-text: #63596b;
  --tfb-mint: #dff5ec;
  --tfb-mint-strong: #9be0c3;
  --tfb-line: #e9e2ee;
  --tfb-porcelain: #faf8fc;
}

html { scroll-behavior: smooth; }
body,
button,
input,
select,
textarea { font-family: Inter, Arial, sans-serif !important; }
h1,
h2,
h3,
h4,
h5,
h6,
.headline-title {
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif !important;
  letter-spacing: -.035em;
}
:target { scroll-margin-top: 120px; }

/* Homepage: retain the strong dark opening, but use the new signature visual. */
body.page-id-3018 #hap-banner {
  background-color: #100a18 !important;
  background-image: linear-gradient(90deg, rgba(8, 5, 15, .86) 0%, rgba(8, 5, 15, .68) 42%, rgba(8, 5, 15, .12) 76%), url('../images/tfb-home-science-made-visible.webp') !important;
  background-position: center center !important;
  background-size: cover !important;
}
body.page-id-3018 #hap-banner .headline-title {
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif !important;
  font-size: clamp(40px, 4.35vw, 64px) !important;
  letter-spacing: -.045em !important;
  line-height: 1.08 !important;
}
body.page-id-3018 #hap-banner .hap-banner-text > p {
  max-width: 650px;
  font-size: 17px !important;
  line-height: 1.75 !important;
}

/* Core landing-page heroes: shorter, sharper, and specific to each discipline. */
.tfb-core .tfb-hero {
  padding: 74px 0 68px !important;
  background: radial-gradient(ellipse at 4% 7%, #eefbf5 0, transparent 42%), #fff !important;
}
.tfb-core .tfb-hero .tfb-shell {
  gap: clamp(38px, 4.5vw, 64px) !important;
}
.tfb-core .tfb-hero .tfb-intro {
  max-width: 690px;
  font-size: 17px !important;
  line-height: 1.72 !important;
}
.tfb-core .tfb-hero .tfb-actions { margin-bottom: 0 !important; }
.tfb-core .tfb-hero .tfb-hero-note { display: none !important; }
.tfb-core .tfb-hero .tfb-media-wrap {
  position: relative !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  border: 1px solid rgba(91, 33, 182, .15) !important;
  border-radius: 18px !important;
  background-color: #160b22 !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  box-shadow: 0 24px 60px rgba(36, 19, 51, .14) !important;
}
.tfb-core .tfb-hero .tfb-media-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, .06), transparent 44%);
}
body.page-id-5425 .tfb-hero .tfb-media,
body.page-id-5532 .tfb-hero .tfb-media,
body.page-id-5538 .tfb-hero .tfb-media,
body.page-id-5548 .tfb-hero .tfb-media,
body.page-id-5557 .tfb-hero .tfb-media,
body.page-id-5562 .tfb-hero .tfb-media { display: none !important; }
body.page-id-5425 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-medical-writing.webp') !important; }
body.page-id-5532 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-multi-omics.webp') !important; }
body.page-id-5538 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-biostatistics.webp') !important; }
body.page-id-5548 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-explainable-ai.webp') !important; }
body.page-id-5557 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-healthcare-business.webp') !important; }
body.page-id-5562 .tfb-hero .tfb-media-wrap { background-image: url('../images/tfb-rcm-credentialing.webp') !important; }

/* New specialist pages now inherit the same light, two-column landing-page language. */
.tfb-detail {
  --tfb-purple: #5b21b6;
  --tfb-purple-deep: #34115e;
  --tfb-ink: #241333;
  --tfb-text: #63596b;
  --tfb-mint: #dff5ec;
  --tfb-line: #e9e2ee;
  --tfb-soft: #faf8fc;
  color: var(--tfb-text) !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.75 !important;
}
.tfb-detail h1,
.tfb-detail h2,
.tfb-detail h3 {
  color: var(--tfb-ink) !important;
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif !important;
}
.tfb-detail .wrap { width: min(100% - 64px, 1180px) !important; }
.tfb-detail .hero {
  overflow: hidden;
  padding: 74px 0 68px !important;
  background: radial-gradient(ellipse at 4% 7%, #eefbf5 0, transparent 42%), #fff !important;
  color: var(--tfb-text) !important;
}
.tfb-detail .hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 1fr);
  grid-template-rows: repeat(4, max-content);
  gap: clamp(38px, 4.5vw, 64px);
  align-content: center;
  align-items: center;
}
.tfb-detail .hero .wrap > * { grid-column: 1; min-width: 0; }
.tfb-detail .hero .wrap::after {
  content: '';
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(91, 33, 182, .15);
  border-radius: 18px;
  background-color: #160b22;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 24px 60px rgba(36, 19, 51, .14);
}
body.page-id-900278 .tfb-detail .hero .wrap::after { background-image: url('../images/tfb-evidence-engine.webp'); }
body.page-id-900280 .tfb-detail .hero .wrap::after { background-image: url('../images/tfb-molecular-simulations.webp'); }
body.page-id-900282 .tfb-detail .hero .wrap::after { background-image: url('../images/tfb-rna-seq.webp'); }
.tfb-detail .hero .wrap > p:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 2px !important;
}
.tfb-detail .hero .wrap > p:first-child::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #71ba9e;
}
.tfb-detail .hero .crumb {
  color: var(--tfb-purple) !important;
  font: 700 12px/1.5 Inter, Arial, sans-serif !important;
  letter-spacing: .12em;
  text-decoration: none !important;
  text-transform: uppercase;
}
.tfb-detail .hero h1 {
  max-width: 720px !important;
  margin: 0 0 18px !important;
  font-size: clamp(38px, 4.6vw, 62px) !important;
  font-weight: 800 !important;
  letter-spacing: -.045em !important;
  line-height: 1.1 !important;
}
.tfb-detail .hero .wrap > p:not(:first-child) {
  max-width: 690px !important;
  margin: 0 0 24px !important;
  color: var(--tfb-text) !important;
  font-size: 17px !important;
  line-height: 1.72 !important;
}
.tfb-detail .hero a.cta,
.tfb-detail a.cta {
  justify-self: start;
  min-height: 52px;
  margin: 0 !important;
  padding: 13px 24px !important;
  border: 1px solid var(--tfb-purple) !important;
  border-radius: 9px !important;
  background: var(--tfb-purple) !important;
  color: #fff !important;
  font: 700 14px/1.7 Inter, Arial, sans-serif !important;
  text-decoration: none !important;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.tfb-detail a.cta:hover {
  border-color: var(--tfb-purple-deep) !important;
  background: var(--tfb-purple-deep) !important;
  transform: translateY(-1px);
}
.tfb-detail .band { padding: clamp(54px, 6.5vw, 88px) 0 !important; }
.tfb-detail .soft { background: var(--tfb-soft) !important; }
.tfb-detail .card {
  border: 1px solid var(--tfb-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 28px rgba(36, 19, 51, .045);
}

/* One enquiry experience everywhere: same card, fields, focus and submit treatment. */
html body .tfb-core.tfb-form-section,
html body.page-id-3018 .elementor-element-62c0e46 {
  padding: 76px 28px !important;
  color: #f7f5ff !important;
  background-color: #130a20 !important;
  background-image: linear-gradient(90deg, rgba(10, 7, 18, .84), rgba(10, 7, 18, .48)), url('../images/tfb-home-science-made-visible.webp') !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
html body .tfb-form-section > .elementor-container,
html body.page-id-3018 .elementor-element-62c0e46 > .elementor-container {
  max-width: 1280px !important;
  gap: 34px !important;
  align-items: center !important;
}
html body.page-id-3018 .elementor-element-62c0e46 .elementor-element-85987c6 { order: 2; }
html body.page-id-3018 .elementor-element-62c0e46 .elementor-element-a447387 { order: 1; }
html body .tfb-form-section .tfb-form-panel,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 {
  padding: 32px !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 20px !important;
  background: rgba(21, 12, 34, .82) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18) !important;
  backdrop-filter: blur(10px);
}
html body .tfb-form-section .tfb-form-panel { color: #fff !important; }
html body .tfb-form-section .tfb-contact-intro h2,
html body.page-id-3018 .elementor-element-62c0e46 .headline-title {
  color: #fff !important;
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif !important;
  font-size: clamp(32px, 3.2vw, 48px) !important;
  letter-spacing: -.035em !important;
  line-height: 1.16 !important;
}
html body .tfb-form-section .tfb-contact-intro p,
html body.page-id-3018 .elementor-element-62c0e46 .pera-content p {
  color: #eee8f5 !important;
  font-size: 17px !important;
  line-height: 1.75 !important;
}
html body .tfb-form-section .wpcf7 label,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 label {
  display: block !important;
  margin-bottom: 7px !important;
  color: #fff !important;
  font: 600 13px/1.6 Inter, Arial, sans-serif !important;
}
html body .tfb-form-section .wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=hidden]),
html body .tfb-form-section .wpcf7 select,
html body .tfb-form-section .wpcf7 textarea,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=hidden]),
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 select,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 textarea {
  width: 100% !important;
  min-height: 56px !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--tfb-ink) !important;
  font: 500 15px/1.65 Inter, Arial, sans-serif !important;
  box-shadow: none !important;
}
html body .tfb-form-section .wpcf7 textarea,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 textarea {
  min-height: 150px !important;
  height: 150px !important;
  resize: vertical;
}
html body .tfb-form-section .hap-contact-select::before,
html body .tfb-form-section .hap-contact-select::after,
html body.page-id-3018 .elementor-element-62c0e46 .hap-contact-select::before,
html body.page-id-3018 .elementor-element-62c0e46 .hap-contact-select::after { display: none !important; }
html body .tfb-form-section .wpcf7 form p,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 form p {
  margin: 0 0 17px !important;
  color: #eee8f5 !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}
html body .tfb-form-section .wpcf7 form p a,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 form p a {
  color: #fff !important;
  text-decoration: underline !important;
}
html body .tfb-form-section .wpcf7 button[type=submit],
html body .tfb-form-section .wpcf7 input[type=submit],
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 button[type=submit],
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 input[type=submit] {
  display: block !important;
  width: 100% !important;
  min-height: 56px !important;
  padding: 14px 22px !important;
  border: 1px solid var(--tfb-mint) !important;
  border-radius: 10px !important;
  background: var(--tfb-mint) !important;
  background-image: none !important;
  color: var(--tfb-ink) !important;
  font: 700 15px/1.6 Inter, Arial, sans-serif !important;
  text-transform: none !important;
  cursor: pointer;
}
html body .tfb-form-section .wpcf7 button[type=submit]:hover,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 button[type=submit]:hover {
  border-color: var(--tfb-mint-strong) !important;
  background: var(--tfb-mint-strong) !important;
}
html body .tfb-form-section .wpcf7 input:focus-visible,
html body .tfb-form-section .wpcf7 select:focus-visible,
html body .tfb-form-section .wpcf7 textarea:focus-visible,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 input:focus-visible,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 select:focus-visible,
html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 textarea:focus-visible {
  outline: 3px solid var(--tfb-mint-strong) !important;
  outline-offset: 3px !important;
}

@media (max-width: 900px) {
  .tfb-detail .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 34px;
    align-content: normal;
  }
  .tfb-detail .hero .wrap::after {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  body.page-id-1928 .tfb-mobile-project { display: none !important; }
  .tfb-core .tfb-hero,
  .tfb-detail .hero { padding: 50px 0 46px !important; }
  .tfb-core .tfb-shell,
  .tfb-detail .wrap { width: min(100% - 36px, 1180px) !important; }
  .tfb-core .tfb-hero .tfb-shell { gap: 32px !important; }
  .tfb-core .tfb-hero .tfb-intro,
  .tfb-detail .hero .wrap > p:not(:first-child) {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  .tfb-core .tfb-hero .tfb-media-wrap,
  .tfb-detail .hero .wrap::after {
    aspect-ratio: 4 / 3 !important;
    border-radius: 14px !important;
  }
  body.page-id-3018 #hap-banner {
    background-image: linear-gradient(rgba(8, 5, 15, .77), rgba(8, 5, 15, .72)), url('../images/tfb-home-science-made-visible.webp') !important;
    background-position: 64% center !important;
  }
  html body .tfb-core.tfb-form-section,
  html body.page-id-3018 .elementor-element-62c0e46 { padding: 48px 18px !important; }
  html body .tfb-form-section .tfb-form-panel,
  html body.page-id-3018 .elementor-element-62c0e46 .wpcf7 {
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }
  html body.page-id-3018 .elementor-element-62c0e46 .elementor-element-85987c6,
  html body.page-id-3018 .elementor-element-62c0e46 .elementor-element-a447387 { order: initial; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
