/* Systems Sciences Group – landing page
   Plain CSS, no build step. One grotesk, black plus one yellow, flat surfaces, a 12-column grid.
   Yellow is only ever a fill (hover, highlight, the figure) with black on top, never text on white. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff;
  --ink: #111;
  --muted: #5c5c5c;
  --line: #d8d8d8;
  --hl: #ffd500;       /* the yellow of uni-graz.at (--bs-primary) */
  --on-hl: #000;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --col-gap: clamp(16px, 2vw, 32px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --ink: #f1f1f1;
    --muted: #a3a3a3;
    --line: #2e2e2e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.125rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--hl);
  color: var(--on-hl);
}

h1,
h2,
p,
dl,
dd,
ul,
figure {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.3rem 0.7rem;
  background: var(--hl);
  color: var(--on-hl);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---------- Header ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1.5rem;
}

.name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bar a {
  padding: 0.1em 0.4em;
  margin-inline: -0.4em;
  text-decoration: none;
}

.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  font-weight: 500;
}

/* Yellow fill with black text on hover, as on uni-graz.at */
.bar a:hover,
.body a:hover,
.foot a:hover,
.index a:hover .t,
.index a:focus-visible .t {
  background: var(--hl);
  color: var(--on-hl);
}

/* ---------- Hero ---------- */

.hero {
  align-items: end;
  row-gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6.5rem);
}

.hero h1 {
  grid-column: 1 / 8;
  grid-row: 1;
  font-size: clamp(3.25rem, 1.6rem + 6.6vw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lede {
  grid-column: 1 / 7;
  grid-row: 2;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  line-height: 1.5;
}

.affil {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.hero figure {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
}

.hero svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

figcaption {
  max-width: 28em;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* Phase portrait: the highlighted loop is a yellow fill, so the black dot and inner loops sit on yellow */
.orbit {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.3;
  stroke-width: 1.25;
  stroke-linejoin: round;
}

.orbit.in {
  stroke: #000;
  stroke-opacity: 0.4;
}

.orbit.hl {
  fill: var(--hl);
  stroke: var(--ink);
  stroke-opacity: 1;
  stroke-width: 2.5;
}

.arrow {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.axis {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
}

.fp {
  fill: #000;
}

.lbl {
  fill: var(--muted);
  font-size: 13px;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 1.25rem clamp(3.5rem, 8vw, 6.5rem);
  border-top: 2px solid var(--ink);
}

h2 {
  grid-column: 1 / 5;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.body {
  grid-column: 6 / 13;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.body > * + * {
  margin-top: 1.1rem;
}

.body p {
  max-width: 34em;
}

.body a,
.foot a {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* Facts */
.body > .facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem var(--col-gap);
  margin-top: 2.5rem;
}

.facts > div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.875rem;
}

dd {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Link index */
.index {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.index li {
  border-top: 1px solid var(--line);
}

.index li:last-child {
  border-bottom: 1px solid var(--line);
}

.index a {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: baseline;
  padding-block: 1.15rem;
  text-decoration: none;
}

.index .t {
  grid-column: 1 / 6;
  justify-self: start;
  padding-inline: 0.25em;
  margin-inline: -0.25em;
  font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.index .d {
  grid-column: 6 / 12;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.index a::after {
  content: "";
  grid-column: 12;
  justify-self: end;
  align-self: center;
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: no-preference) {
  .index a::after {
    transition: transform 0.15s;
  }

  .index a:hover::after {
    transform: translate(2px, -2px);
  }
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.foot nav {
  display: flex;
  gap: 0 1.5rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1,
  .lede,
  .hero figure,
  h2,
  .body {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  h2 {
    margin-bottom: 1rem;
  }

  .hero figure {
    max-width: 30rem;
  }

  .body > .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .index a {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.25rem;
  }

  .index .t,
  .index .d {
    grid-column: 1;
  }

  .index a::after {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}
