:root {
  --purple: #452D71;
  --violet: #8160A4;
  --lilac: #BC9BC8;
  --lilac-soft: #f4eff7;
  --text: #2b2236;
}
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); overflow-x: clip; line-height: 1.7; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 { color: var(--purple); font-weight: 700; }
a { color: var(--violet); }
a:hover { color: var(--purple); }

/* Buttons */
.btn-brand { background: var(--purple); color: #fff; font-weight: 600; border: 2px solid var(--purple); }
.btn-brand:hover, .btn-brand:focus { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-light-brand { background: #fff; color: var(--purple); font-weight: 600; border: 2px solid #fff; }
.btn-light-brand:hover, .btn-light-brand:focus { background: var(--lilac); border-color: var(--lilac); color: var(--purple); }

/* Header */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--lilac); transition: box-shadow .25s ease; }
.site-header .navbar-brand img { height: 56px; width: auto; transition: height .25s ease; }
.site-header.scrolled { box-shadow: 0 4px 16px rgba(69,45,113,.18); }
.site-header.scrolled .navbar-brand img { height: 44px; }
.site-header .nav-link { font-weight: 500; color: var(--purple); font-size: .95rem; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--violet); }

/* Hero */
.hero {
  display: flex; align-items: center; color: #fff;
  background: linear-gradient(100deg, rgba(69,45,113,.95) 40%, rgba(69,45,113,.6)), url('../images/hero-bg.svg') center/cover no-repeat;
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3.1rem); max-width: 24ch; line-height: 1.2; }
.hero p { max-width: 62ch; font-size: 1.05rem; color: #efe8f5; }
.hero .hero-eyebrow { color: var(--lilac); font-size: .8rem; font-weight: 600; letter-spacing: .08em; max-width: none; }
.hero-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: .75rem; padding: 1.25rem; }
.hero-card i { font-size: 1.6rem; color: var(--lilac); }
.hero-card h2 { color: #fff; margin: .4rem 0; }
.hero-card p { font-size: .9rem; max-width: none; }

/* Generic sections */
.section { padding: 5rem 0; }
.section-soft { background: var(--lilac-soft); }
.section-title { position: relative; padding-bottom: .75rem; margin-bottom: 1.5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; background: var(--violet); border-radius: 2px; }
.lead-text { font-size: 1.05rem; max-width: 95ch; }
.about-img { width: 100%; border-radius: .75rem; aspect-ratio: 8 / 5; object-fit: cover; }
.stat { border-left: 4px solid var(--purple); padding-left: .9rem; font-size: .9rem; line-height: 1.4; }
.stat strong { display: block; font-size: 1.15rem; color: var(--purple); }

/* Phases */
.phase-card { background: #fff; border: 1px solid var(--lilac); border-top: 5px solid var(--purple); border-radius: .75rem; padding: 1.25rem; }
.phase-no { display: inline-block; background: var(--purple); color: #fff; font-weight: 600; font-size: .8rem; padding: .15rem .7rem; border-radius: 2rem; margin-bottom: .6rem; }
.phase-card p { font-size: .92rem; }

/* Accordion */
.research-acc .accordion-item { border: 1px solid var(--lilac); margin-bottom: .75rem; border-radius: .6rem !important; overflow: hidden; }
.research-acc .accordion-button { font-weight: 600; color: var(--purple); font-size: 1.05rem; padding: 1.1rem 1.4rem; }
.research-acc .accordion-button:not(.collapsed) { background: var(--purple); color: #fff; box-shadow: none; }
.research-acc .accordion-button:not(.collapsed)::after { filter: brightness(0) invert(1); }
.research-acc .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(129,96,164,.35); }
.research-acc .accordion-body { padding: 1.6rem; }

/* Why we need studies */
.why-box { background: var(--lilac-soft); border-left: 5px solid var(--purple); border-radius: .75rem; padding: 1.75rem; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; }
.check-list li::before { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--purple); }

/* Info cards */
.info-card { display: flex; gap: .9rem; background: #fff; border: 1px solid var(--lilac); border-radius: .75rem; padding: 1.1rem; }
.info-card > i { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; font-size: 1.25rem; color: #fff; background: var(--purple); border-radius: 50%; }
.info-card h3 { color: var(--purple); margin-bottom: .25rem; }
.info-card p { font-size: .88rem; line-height: 1.55; }

/* Studies table */
.table-wrap { background: #fff; border: 1px solid var(--lilac); border-radius: .75rem; overflow-x: auto; }
.study-table { min-width: 1000px; font-size: .88rem; }
.study-table thead th { background: var(--purple); color: #fff; font-weight: 600; white-space: nowrap; border: 0; padding: .9rem .8rem; }
.study-table td { padding: .9rem .8rem; vertical-align: top; }
.study-table tbody tr:nth-child(even) { background: var(--lilac-soft); }
.status-badge { background: var(--purple); color: #fff; font-weight: 600; padding: .45em .8em; border-radius: 2rem; white-space: normal; }
.status-badge.status-soon { background: #fff; color: var(--purple); border: 1px solid var(--purple); }

/* Contact */
.contact-list li { display: flex; gap: 1rem; margin-bottom: 1.4rem; font-size: .95rem; line-height: 1.55; }
.contact-list i { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--purple); color: #fff; border-radius: 50%; font-size: 1.1rem; }
.contact-list a { word-break: break-word; }
.form-card { background: #fff; border: 1px solid var(--lilac); border-radius: .9rem; padding: 2rem; box-shadow: 0 8px 24px rgba(69,45,113,.08); }
.form-label { font-weight: 500; color: var(--purple); font-size: .9rem; }
.req { color: var(--purple); }
.form-control { padding: .7rem .9rem; border-color: var(--lilac); }
.form-control:focus { border-color: var(--violet); box-shadow: 0 0 0 .2rem rgba(129,96,164,.25); }
.alert-success-brand { background: var(--lilac-soft); color: var(--purple); border: 1px solid var(--violet); }
.alert-error-brand { background: #fff; color: var(--purple); border: 2px solid var(--purple); }

/* Footer */
.site-footer { background: var(--purple); color: #e3d7ec; }
.site-footer h5 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #e3d7ec; text-decoration: none; }
.site-footer a:hover { color: var(--lilac); }
.footer-logo {  border-radius: 50%; padding: 6px; width: 96px; height: 96px; object-fit: contain; }
.footer-bottom { padding: 12px; font-size: 14px; color: #fff; text-align: center; border-top: 1px solid var(--lilac); }

/* Responsive */
.hero { min-height: 80vh; }
@media (max-width: 1199.98px) {
  .site-header .navbar-collapse { padding: .75rem 0 1rem; }
}
@media (max-width: 991.98px) {
  .site-header .navbar-brand img { height: 48px; }
  .section { padding: 3.5rem 0; }
}
@media (max-width: 767.98px) {
  .hero { min-height: auto; padding: 2rem 0; }
  .hero .btn { display: block; width: 100%; margin: 0 0 .75rem 0 !important; }
  .research-acc .accordion-button { font-size: .98rem; padding: 1rem; }
  .research-acc .accordion-body { padding: 1.1rem; }
  .form-card { padding: 1.25rem; }
  .site-footer { text-align: center; }
  .site-footer .footer-logo { margin-left: auto; margin-right: auto; display: block; }
  .contact-list li { text-align: left; }

  /* Studies table becomes stacked cards */
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .study-table { min-width: 0; }
  .study-table thead { display: none; }
  .study-table, .study-table tbody, .study-table tr, .study-table td { display: block; width: 100%; }
  .study-table tbody tr { background: #fff !important; border: 1px solid var(--lilac); border-radius: .75rem; padding: .75rem; margin-bottom: 1rem; }
  .study-table td { padding: .45rem .25rem; border: 0; }
  .study-table td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Long emails and links must wrap instead of widening the page */
.site-footer a, .contact-list a, .site-footer p { overflow-wrap: anywhere; }

/* Accordion text: no extra space after the last paragraph */
.research-acc .accordion-body > :last-child { margin-bottom: 0; }
.research-acc .accordion-body ul { padding-left: 1.2rem; }

/* Honeypot: off-screen (not display:none, so simple bots still fill it) */
.hp-field { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#submitBtn:disabled { opacity: .7; cursor: not-allowed; }
