/* Physiome - B+R project page.
   Every value here is lifted from the original Elementor CSS (kit post-7, page post-2,
   header post-73, footer post-113) rather than eyeballed, so the rebuild matches 1:1.

   NOTE ON THE BODY FONT: the kit sets `font-family:"Nocturne Serif"` for body and h2, but
   the site only ever declares @font-face families 'Vilane' and 'Nocturne'. "Nocturne
   Serif" therefore matches nothing and falls through to the generic sans-serif. That is
   reproduced here deliberately so the rebuild renders identically. Aliasing it to the
   real Nocturne file is a one-line change if that bug should be fixed. */

/* -------------------------------------------------- Fonts (self-hosted, from the original) */
@font-face {
  font-family: 'Vilane';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Vilane-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Vilane';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Vilane-Thin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nocturne';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/BORUTTA-GROUP-Nocturne-Serif-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Nocturne';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/BORUTTA-GROUP-Nocturne-Serif-Italic.woff2') format('woff2');
}
/* Nunito Sans is variable (weight 200-1000); one file serves the 400 and 700 the site uses. */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunitosans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunitosans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------- Tokens (Elementor kit post-7) */
:root {
  --bg: #ffffff;
  --ink: #000000;          /* --e-global-color-primary / text / accent */
  --ink-soft: #808080;     /* --e-global-color-secondary */
  --icon: #ffffff;         /* --e-global-color-ece18da: footer list icons are white */
  --rule: rgba(0, 0, 0, .12);
  --vilane: 'Vilane', Sans-serif;
  --nocturne: 'Nocturne', Georgia, serif;
  --nunito: 'Nunito Sans', Sans-serif;
  /* Reproduces the original's missing family, which resolves to generic sans-serif. */
  --body-font: 'Nocturne Serif', Sans-serif;
}

/* -------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;                 /* kit: 16px, 13px at <=1024 */
  line-height: 1.5em;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 1024px) { body { font-size: 13px; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Kit heading scale */
h1 { font-family: var(--vilane); font-weight: 600; font-size: 4.5em; color: var(--ink); }
h2 { font-family: var(--body-font); font-size: 3.5em; color: var(--ink); }
h3 { font-family: var(--vilane); font-weight: 600; font-size: 2.5em; line-height: 1.1em; color: var(--ink); }
h4 { font-size: 1.5em; }
h5 { font-size: 1.2em; font-family: var(--vilane); font-weight: 600; }
h6 { font-size: 1em; }

/* -------------------------------------------------- Header (post-73) */
.site-head {
  display: flex;
  align-items: center;
  padding: 40px;
  z-index: 99;
}
@media (max-width: 1024px) { .site-head { padding: 30px 30px 0; } }
@media (max-width: 767px)  { .site-head { padding: 20px 10px 0; } }

.site-head .col-social { width: 20%; text-align: left; }
.site-head .col-gap    { width: 59.666%; }
.site-head .col-mark   { width: 20%; text-align: end; }

.social { display: flex; gap: .6em; }
.social a {
  display: inline-grid;
  place-items: center;
  padding: .3em;                 /* --icon-padding: 0.3em */
  color: var(--ink);
  background: transparent;
}
.social svg { width: 18px; height: 18px; fill: currentColor; }  /* --icon-size: 18px */

.site-head .mark { width: 55px; margin-left: auto; }

/* -------------------------------------------------- Hero (post-2) */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;   /* align-content: space-between */
  text-align: center;
  padding-inline: 20px;
}
@media (max-width: 767px) { .hero { margin-top: -65px; } }

.wordmark { width: min(500px, 86%); }   /* original: img width 500px */

/* Scroll cue. The original was a 60px Lottie of a bouncing chevron; same motion in CSS,
   rather than shipping a ~250KB player for one animation. */
.scroll-cue { display: block; width: 60px; padding-bottom: 30px; color: var(--ink); }
.scroll-cue svg {
  width: 100%; height: auto;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  animation: nudge 1.8s cubic-bezier(.45, 0, .3, 1) infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(-4px); opacity: .45; }
  50%      { transform: translateY(6px);  opacity: 1; }
}

/* Funder logos. The original was an Elementor carousel set to show all four at once, so
   on desktop it was simply a centred row. */
.funders {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3.5vw, 44px);
  flex-wrap: wrap;
  width: 100%;
  padding-bottom: 30px;
}
.funders img { height: clamp(28px, 4vw, 46px); width: auto; object-fit: contain; }

/* -------------------------------------------------- Intro (post-2) */
.intro {
  max-width: 600px;              /* original container max-width */
  min-height: 25vh;
  margin-inline: auto;
  padding-inline: 20px;
  text-align: center;
}
.intro-eyebrow { margin-bottom: 0; }                 /* h3, 2.5em from the kit */
.intro-title   { margin: 0 0 40px 0; }               /* h5, 1.2em, 40px gap below */
.intro-body {
  font-family: var(--vilane);
  font-size: 1.2em;
  font-weight: 400;
  line-height: 1.5em;
  color: var(--ink);
}
.intro-body p + p { margin-top: 1em; }
.intro-body a { text-decoration: underline; }

/* -------------------------------------------------- Footer (post-113) */
.site-foot {
  margin-top: auto;
  padding: 5em 2em;
  display: flex;
  align-items: center;
  font-family: var(--nunito);
  font-weight: 700;
  color: var(--ink);
}
@media (max-width: 1024px) { .site-foot { padding: 3em 2em; } }
@media (max-width: 767px)  { .site-foot { padding: 1em; } }

.site-foot > * { width: 33.333%; }
.site-foot ul { list-style: none; padding: 0; }
.site-foot a { text-decoration: none; transition: color .3s; }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--ink-soft); }
.site-foot .col-mark { text-align: center; }
.site-foot .col-mark img { width: 55px; margin-inline: auto; }
.site-foot .col-legal { text-align: end; }

.site-copy {
  padding: 1em 2em;
  text-align: center;
  font-family: var(--nunito);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2em;
}

@media (max-width: 767px) {
  .site-foot { flex-direction: column; gap: 1.2em; text-align: center; }
  .site-foot > * { width: 100%; }
  .site-foot .col-legal { text-align: center; }
}

/* -------------------------------------------------- Legal pages */
.legal { padding: clamp(28px, 6vh, 64px) 2em; max-width: 860px; margin-inline: auto; width: 100%; }
.legal-body h1 { font-size: 2.5em; line-height: 1.1em; margin-bottom: .5em; }
.legal-body h2 { font-family: var(--vilane); font-weight: 600; font-size: 1.5em; margin: 1.8em 0 .5em; }
.legal-body h3 { font-size: 1.2em; margin: 1.4em 0 .4em; }
.legal-body p, .legal-body ul, .legal-body ol { margin-bottom: 1em; }
.legal-body ul, .legal-body ol { padding-left: 1.3em; }
.legal-body li { margin-bottom: .35em; }
.legal-body a { text-decoration: underline; }
.legal-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; font-size: .95em; }
.legal-body th, .legal-body td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-body .scroll-x { overflow-x: auto; }   /* wide tables scroll, the page never does */

/* -------------------------------------------------- 404 */
.nf { flex: 1; display: grid; place-content: center; text-align: center; padding: 4em 2em; }
.nf p { color: var(--ink-soft); margin: .6em 0 1.4em; }
.nf a.back { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 4px; font-family: var(--nunito); font-weight: 700; }
.nf a.back:hover { border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue svg { animation: none; opacity: .8; }
}
