:root {
  --slate: #4f5478;
  --ink: #1d2230;
  --muted: #5a6172;
  --white: #ffffff;
  --card: rgba(40, 38, 72, 0.72);
  --card-line: rgba(255, 255, 255, 0.08);
  --pink: #e4589f;
  --blue: #5d6fe6;
  --sky: #45a8ec;
  --page-bg: #f6f6f9;
  --max: 1120px;
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid #ececf2;
  position: relative;
  z-index: 2;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 68px;
  gap: 8px 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand img { height: 32px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.nav a {
  color: #4a4f5c;
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* Brain background: drop the licensed image at /images/brain-bg.jpg.
   Until it exists, the gradient underneath keeps the same pink/blue look. */
.brain-bg {
  position: relative;
  color: var(--white);
  background-color: var(--slate);
  background-image:
    linear-gradient(rgba(60, 60, 100, 0.25), rgba(60, 60, 100, 0.35)),
    url("/images/brain-bg.jpg"),
    radial-gradient(ellipse 45% 60% at 30% 45%, rgba(228, 88, 159, 0.95), transparent 70%),
    radial-gradient(ellipse 45% 60% at 68% 45%, rgba(93, 111, 230, 0.95), transparent 70%),
    linear-gradient(160deg, #5b5f8a, #474b6e);
  background-size: cover, cover, auto, auto, auto;
  background-position: center, center, center, center, center;
  background-repeat: no-repeat;
}

/* Hero */
.hero {
  text-align: center;
  padding: 88px 0 56px;
}
.hero h1 {
  font-size: clamp(38px, 6.5vw, 76px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  text-shadow: 0 2px 18px rgba(30, 20, 60, 0.35);
}
.hero .lead {
  font-size: clamp(18px, 2.3vw, 24px);
  max-width: 34em;
  margin: 0 auto 44px;
  text-shadow: 0 1px 10px rgba(30, 20, 60, 0.4);
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-begin {
  background: var(--white);
  color: #111;
  font-size: clamp(20px, 2.4vw, 27px);
  padding: 16px 36px;
  box-shadow: 0 6px 24px rgba(20, 15, 50, 0.25);
}
.btn-begin:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20, 15, 50, 0.35); }
.btn-sub {
  background: var(--sky);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 26px;
}
.btn-sub:hover { background: #2f97e0; }
.btn:focus-visible, .nav a:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.mailing { margin-top: 64px; }
.mailing h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 4px;
  text-shadow: 0 1px 10px rgba(30, 20, 60, 0.4);
}
.mailing p { margin: 0 0 20px; text-shadow: 0 1px 10px rgba(30, 20, 60, 0.4); }

/* Translucent cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  padding: 24px 20px 80px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  padding: 28px 26px 32px;
}
.card h2, .card h3 {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.12;
  margin: 0 0 14px;
  font-weight: 600;
}
.card p { margin: 0; font-size: 17px; }
.card a { color: #9ecdff; }

/* Team */
.team-head {
  text-align: center;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  padding: 72px 20px 20px;
  text-shadow: 0 2px 18px rgba(30, 20, 60, 0.35);
}
.team { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.person h2 { font-size: clamp(22px, 2.1vw, 28px); min-height: 3.4em; }
@media (max-width: 560px) { .person h2 { min-height: 0; } }
.person img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto 26px;
}
.person p { font-size: 16px; }

/* Light prose section */
.page { padding: 56px 0 64px; }
.prose { max-width: 44em; }
.prose h2 { font-size: 28px; margin: 36px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.types { list-style: none; padding: 0; display: grid; gap: 10px; }
.types li {
  background: var(--white);
  border: 1px solid #e3e3ec;
  border-radius: 10px;
  padding: 12px 16px;
}
.types strong { color: #3f4fc4; }
.ref {
  font-size: 15px;
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 14px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: #2e3050;
  color: #c9cbe0;
  font-size: 14px;
  padding: 28px 0 32px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.site-footer a { color: #e2e4f5; }
.credit { color: #a5a8c4; }

/* 404 */
.notfound { text-align: center; padding: 120px 20px; }
.notfound h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 12px; }
.notfound a { color: #fff; }

@media (max-width: 560px) {
  .site-header .wrap { justify-content: center; }
  .nav { justify-content: center; gap: 4px 18px; }
  .nav a { font-size: 15px; }
  .hero { padding: 56px 0 40px; }
  .mailing { margin-top: 48px; }
}
