/* ============================================================
   NEUK SynBio — stylesheet
   Edit colours and fonts in the :root block below.
   Each thing is defined in exactly one place.
   ============================================================ */

:root {
  /* --- Colour ---------------------------------------------- */
  /* Taken from the NEUK logo: navy #012169 to red #C8102E.     */
  --ink:        #012169;   /* logo navy — text, dark sections     */
  --ink-2:      #4A5C82;   /* secondary text                      */
  --ink-3:      #5F6B88;   /* muted text, captions                */
  --paper:      #F2F4F8;   /* page background                     */
  --surface:    #FFFFFF;   /* cards, panels                       */
  --line:       #D9DEE8;   /* hairlines, borders                  */

  --brand:       #C8102E;  /* logo red — links, buttons, nodes    */
  --brand-light: #FF7A8F;  /* lighter red, for navy backgrounds   */
  --accent:      #1E4BA8;  /* mid blue — "next event", map edges  */
  --deep:        #7A1B52;  /* the plum where the gradient crosses */

  --focus:       #1E4BA8;

  /* --- Type ------------------------------------------------ */
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  /* --- Layout ---------------------------------------------- */
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
}

/* ============================================================
   Base
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.4rem); letter-spacing: -0.015em; }

p { margin: 0 0 1.1em; max-width: 68ch; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff;
  padding: .75rem 1.25rem; z-index: 200;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ============================================================
   Header
   ------------------------------------------------------------
   Logo size: the 52px on .brand svg
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242, 244, 248, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 2rem;
  min-height: 110px;
}

.brand {
  display: inline-flex; align-items: center;
  margin-right: auto;
  text-decoration: none;
  line-height: 0;
}
.brand-logo { height: 86px; width: auto; display: block; }

@media (max-width: 600px) {
  .brand-logo { height: 56px; max-width: 58vw; }
  .site-header .wrap { gap: 1rem; }
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .95rem; font-weight: 500;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--brand);
}
.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: #fff;
  border-bottom: none;
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem .7rem; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; inset: 86px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .9rem; text-align: center; border-bottom: none; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--body); font-weight: 600; font-size: .97rem;
  padding: .78rem 1.5rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
button.btn { line-height: inherit; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #A00D25; color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-onDark { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.45); }
.btn-onDark:hover { background: var(--paper); color: var(--ink); }

/* ============================================================
   Section rhythm
   ============================================================ */

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section.tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.band-ink { background: var(--ink); color: var(--paper); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink p { color: #C3CCE0; }
.band-ink a { color: var(--brand-light); }

.band-surface { background: var(--surface); }

.section-head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
.band-ink .section-head p { color: #AAB6D2; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ============================================================
   Hero
   ------------------------------------------------------------
   Map size: the two fr values on .hero-grid, and the 118% on
   .hero-figure which lets it overhang its column.
   ============================================================ */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 { margin-bottom: .45em; }

.hero-lede {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  color: var(--ink-2);
  max-width: 46ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.hero-figure { position: relative; }
.hero-figure figcaption {
  font-size: .85rem; color: var(--ink-3);
  margin-top: .75rem; max-width: 34ch;
}

@media (min-width: 901px) {
  .hero-figure { width: 118%; margin-left: -9%; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 520px; }
}

/* ============================================================
   Map
   ------------------------------------------------------------
   Label size: the 16px on .map-label (21px on small screens)
   ============================================================ */

.map-land { fill: rgba(120, 190, 205, .06); stroke: none; }

/* the coast is a real edge, so it is solid */
.map-coast {
  fill: none; stroke: var(--ink-3); stroke-width: 1.2;
  opacity: .6; stroke-linejoin: round; stroke-linecap: round;
}
/* the inland border is administrative, so it is dashed */
.map-inland {
  fill: none; stroke: var(--ink-3); stroke-width: 1;
  opacity: .35; stroke-dasharray: 3 4; stroke-linejoin: round;
}
.map-leaders path {
  fill: none; stroke: var(--ink-3); stroke-width: .8; opacity: .3;
}

.map-edge {
  stroke: var(--accent); stroke-width: 1.1; fill: none; opacity: .38;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: draw 1.5s ease-out forwards;
}
.map-edge:nth-of-type(even) { animation-delay: .18s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .map-edge { stroke-dashoffset: 0; animation: none; }
}

.map-node-uni { fill: var(--brand); }
.map-halo { fill: var(--brand); opacity: .13; }
.map-label {
  font-family: var(--body); font-size: 16px; font-weight: 600;
  fill: var(--ink);
}
@media (max-width: 900px) {
  .map-label { font-size: 21px; }
}

/* ============================================================
   Next event strip
   ------------------------------------------------------------
   Text sizes and the poster thumbnail are all set here.
   ============================================================ */

.next-event {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.next-poster {
  width: 120px; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  align-self: center;
}
.next-event .when {
  text-align: center; min-width: 76px;
  border-right: 1px solid var(--line); padding-right: 1.5rem;
}
.next-event .when .d {
  font-family: var(--display); font-size: 3rem; font-weight: 700;
  line-height: 1; display: block; letter-spacing: -0.04em;
}
.next-event .when .m { font-size: 1rem; color: var(--ink-2); }
.next-event h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.next-event .meta { color: var(--ink-2); font-size: 1.05rem; margin: 0; }
.next-event .tag {
  display: inline-block; font-size: .88rem; font-weight: 600;
  color: var(--accent); margin-bottom: .5rem;
}

@media (max-width: 780px) {
  .next-event { grid-template-columns: 1fr; }
  .next-event .when {
    text-align: left; border-right: none; padding-right: 0;
    border-bottom: 1px solid var(--line); padding-bottom: .85rem;
    display: flex; align-items: baseline; gap: .5rem;
  }
  .next-event .when .d { font-size: 2.2rem; }
}

/* ============================================================
   Three strands
   ============================================================ */

.strands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.strand { border-top: 3px solid var(--brand); padding-top: 1.25rem; }
.strand:nth-child(2) { border-top-color: var(--accent); }
.strand:nth-child(3) { border-top-color: var(--deep); }
.strand h3 { margin-bottom: .5rem; }
.strand p { color: var(--ink-2); font-size: 1rem; margin-bottom: 0; }

/* ============================================================
   Institutions
   ============================================================ */

.institutions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.institution { background: var(--surface); padding: 1.5rem 1.4rem; }
.institution strong { display: block; font-family: var(--display); font-size: 1.02rem; }
.institution span { font-size: .88rem; color: var(--ink-3); }

/* ============================================================
   Speaker and committee cards
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.speaker-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
}
.speaker-card .pic {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  object-fit: cover; margin-bottom: 1rem;
}
.speaker-card h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.speaker-card .role { font-size: .9rem; color: var(--ink-2); margin: 0 0 .9rem; }
.speaker-card .talk {
  font-size: .95rem; color: var(--ink); margin: 0 0 .9rem;
  padding-left: .9rem; border-left: 2px solid var(--brand);
}
.speaker-card .date { font-size: .85rem; color: var(--ink-3); margin: auto 0 0; }

/* ============================================================
   Event list
   ============================================================ */

.event-list { list-style: none; margin: 0; padding: 0; }
.event-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 1.5rem; align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.event-row:first-child { border-top: 1px solid var(--line); }
.event-row .e-date { color: var(--ink-2); font-size: .95rem; font-variant-numeric: tabular-nums; }
.event-row h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.event-row h3 a { color: inherit; text-decoration: none; }
.event-row h3 a:hover { color: var(--brand); text-decoration: underline; }
.event-row .e-meta { font-size: .92rem; color: var(--ink-3); margin: 0; }
.event-more {
  font-size: .92rem; font-weight: 600;
  color: var(--brand); text-decoration: none;
  white-space: nowrap;
}
.event-more:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .event-row { grid-template-columns: 1fr; gap: .4rem; }
}

/* ============================================================
   Single event page
   ============================================================ */

.lede-speaker {
  font-size: 1.1rem; font-weight: 600;
  color: var(--ink); margin: 0 0 .35rem;
}
.detail-summary {
  font-size: 1.1rem; color: var(--ink-2);
  margin-top: 1.5rem; max-width: 62ch;
}
.event-poster {
  display: block;
  width: 100%; max-width: 420px; height: auto;
  margin: 2rem 0 .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.resource {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  padding: 1rem 1.25rem;
  text-decoration: none;
}
.resource:hover { border-left-color: var(--accent); }
.resource strong { display: block; color: var(--ink); font-size: 1rem; }
.resource span { font-size: .88rem; color: var(--ink-3); }

/* ============================================================
   Numbers for funders
   ============================================================ */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.figure .n {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1; letter-spacing: -0.04em;
  color: var(--brand-light);
  font-variant-numeric: tabular-nums;
  display: block;
}
.figure p { font-size: .95rem; margin: .6rem 0 0; max-width: 24ch; }

/* ============================================================
   Split panel
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  padding: .85rem 0 .85rem 1.75rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 1rem;
}
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 1.35rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
}
.band-ink .checklist li { border-bottom-color: rgba(255,255,255,.14); color: #D5DCEB; }
.band-ink .checklist li::before { background: var(--brand-light); }

/* ============================================================
   Partner logo wall
   ============================================================ */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.logo-cell {
  background: var(--surface);
  min-height: 96px;
  display: grid; place-items: center;
  padding: 1.25rem;
  text-align: center;
}
.logo-cell img { max-height: 46px; width: auto; }
.logo-cell span { font-size: .9rem; color: var(--ink-3); font-weight: 500; }

.tier-label {
  font-size: .95rem; font-weight: 600; color: var(--ink-2);
  margin: 2.5rem 0 1rem;
}
.tier-label:first-of-type { margin-top: 0; }

/* ============================================================
   Forms
   ============================================================ */

.signup {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.5rem; max-width: 520px;
}
.signup input[type="email"] {
  flex: 1 1 260px;
  font: inherit; font-size: 1rem;
  padding: .78rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.signup input::placeholder { color: var(--ink-3); }
.band-ink .signup input[type="email"] {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: #fff;
}
.band-ink .signup input::placeholder { color: #93A0BD; }

.field { margin-bottom: 1.15rem; }
.field label {
  display: block; font-size: .93rem; font-weight: 600;
  margin-bottom: .4rem; color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: .7rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-pair {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
}

.form-note { font-size: .85rem; color: var(--ink-3); margin-top: .9rem; }
.band-ink .form-note { color: #93A0BD; }
.form-done {
  border-left: 3px solid var(--brand);
  padding: 1rem 1.25rem;
  background: var(--surface);
  margin: 0;
}
.form-error { color: #A32D2D; font-size: .92rem; margin-top: .9rem; }

/* ============================================================
   Luma calendar embed
   ============================================================ */

.luma-embed {
  width: 100%;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--ink); color: #A9B6D0;
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.site-footer h4 {
  font-size: .9rem; color: #fff; margin-bottom: .9rem;
  font-family: var(--body); font-weight: 600; letter-spacing: 0;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #A9B6D0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  padding-top: 1.75rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between;
  font-size: .85rem; color: #7382A3;
}

/* ============================================================
   Utilities
   ============================================================ */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
