/* Starqh. One stylesheet. Design language: "Sternkarte". */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --kobalt: #2135D9;
  --nacht: #0A1045;
  --papier: #EEF0F4;
  --weiss: #FFFFFF;
  --stahl-k: #8FA0FF;
  --stahl-p: #9AA3C7;
  /* Reserved. Only the arc that moved may use this. */
  --bernstein-k: #FFB224;
  --bernstein-p: #E08A00;

  /* Width of the display type (headlines, buttons, numerals). 100 is normal, 125 is the widest Archivo goes. */
  --display-width: 100%;

  --edge: clamp(1.25rem, 12vw, 14rem);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --pad: clamp(3.5rem, 7.5vw, 8rem);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.0625rem, 1.15vw, 1.125rem);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.5;
  color: var(--nacht);
  background: var(--papier);
  font-synthesis: none;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
p { max-width: var(--measure); }

h1, h2, h3, .button, .numeral, .demo-status, .demo-week, .foot-slogan {
  font-weight: 800;
  font-stretch: var(--display-width);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 14.2vw, 5.25rem); line-height: 0.98; max-width: 9.5em; }
h2 { font-size: clamp(1.85rem, 4.2vw, 4rem); line-height: 1.04; max-width: 17em; text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); line-height: 1.15; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.2rem, 1.55vw, 1.45rem); line-height: 1.4; }
.small, .legal, .foot-links, .langs, .demo-ticks { font-size: 0.9375rem; font-weight: 500; line-height: 1.45; }
.caption { display: block; margin-top: 0.75rem; font-size: 0.875rem; font-weight: 500; line-height: 1.4; max-width: 40em; }
figure { margin: 0; }
dl, dt, dd { margin: 0; }

/* ---- fields */
.field-kobalt, .field-papier, .field-nacht { padding: var(--pad) var(--gutter) var(--pad) var(--edge); --focus: var(--nacht); }
.field-kobalt { background-color: var(--kobalt); color: var(--weiss); --focus: var(--weiss); }
.field-nacht { background: var(--nacht); color: var(--weiss); --focus: var(--weiss); }
.field-papier { background: var(--papier); color: var(--nacht); }
.field-papier + .field-papier { padding-top: 0; }

/* Chart graticule: quiet ticks along the top and left border of cobalt fields. */
.field-kobalt {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='12'%3E%3Cpath d='M.5 0v12M16.5 0v5M32.5 0v5M48.5 0v5M64.5 0v5' stroke='%238FA0FF' stroke-opacity='.55'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='80'%3E%3Cpath d='M0 .5h12M0 16.5h5M0 32.5h5M0 48.5h5M0 64.5h5' stroke='%238FA0FF' stroke-opacity='.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x, repeat-y;
  background-position: 0 0, 0 0;
}

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

.skip { position: absolute; left: var(--edge); top: -5rem; z-index: 5; padding: 0.6rem 1rem; background: var(--weiss); color: var(--nacht); font-weight: 500; }
.skip:focus { top: 0.5rem; }

/* ---- buttons: solid rectangles, display type */
.button {
  display: inline-block;
  padding: 1.05em 1.6em;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 800;
  font-stretch: var(--display-width);
  letter-spacing: 0;
  line-height: 1.1;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: var(--nacht);
  color: var(--papier);
}
.button:hover { background: var(--kobalt); color: var(--weiss); }
.field-kobalt .button { background: var(--weiss); color: var(--kobalt); }
.field-kobalt .button:hover { background: var(--nacht); color: var(--weiss); }

/* ---- language switch */
.langs { display: flex; gap: 1.1rem; }
.langs a { text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.langs a:hover, .langs a[aria-current] { border-bottom-color: currentColor; }

/* ---- hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  padding-bottom: clamp(2.5rem, 6vw, 5.5rem);
}
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding-top: clamp(1.5rem, 2.6vw, 2.5rem); }
.lockup { display: block; }
.lockup svg { display: block; height: clamp(2.6rem, 3.8vw, 3.6rem); width: auto; }
.hero-net { position: absolute; z-index: 0; top: 3.5rem; right: -20vw; width: 124vw; height: auto; }
.hero-net--wide { display: none; }
.hero-text { position: relative; z-index: 1; margin-top: auto; padding-top: 50vw; }
.hero .lead { margin-top: clamp(1.25rem, 2.2vw, 2.25rem); max-width: 30em; }
.hero .button { margin-top: clamp(1.5rem, 2.4vw, 2.5rem); }

.hn-arc { fill: none; stroke: var(--weiss); stroke-width: 2; }
.hn-arc--inner { opacity: 0.6; }
.hn-arc--outer { opacity: 0.35; }
.hn-arc--moved { stroke: var(--bernstein-k); stroke-width: 3.5; }
.hn-node { fill: var(--weiss); }
/* Every i in the headline: its own dot is clipped away and a round node drawn in its place.
   Archivo 800: the dot lies 0.154 to 0.28 em below the top of the inline box, the stem starts at 0.351 em.
   The network's hub sits under the i of "optimal" on desktop and of "Sustain" on phones (.hub-wide, .hub-tall). */
.dot-i { position: relative; }
.dot-i > span { clip-path: inset(0.3em 0 0 0); }
.dot-i::after { content: ""; position: absolute; left: calc(50% + 0.01em); top: 0.205em; width: 0.164em; height: 0.164em; border-radius: 50%; background: var(--weiss); transform: translate(-50%, -50%); }

@media (min-width: 720px) {
  h1 { font-size: clamp(4.5rem, 9vw, 12rem); }
  .hero-net { top: 50%; right: -2vw; width: min(56vw, 115vh); transform: translateY(-72%); }
  .hero-net--wide { display: block; }
  .hero-net--tall { display: none; }
  .hero-text { padding-top: 8rem; }
}

/* The one orchestrated moment. Only with JS and only if motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-text { animation: appear 0.5s ease-out both; }
  .js .hn-arc { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: calc(0.5s + var(--i) * 70ms); }
  .js .hn-arc--moved { animation: draw 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards, moved 2.2s ease-in-out 4s both; }
  .js .hn-node { animation: appear 0.6s ease-out both; animation-delay: calc(1s + var(--i) * 60ms); }
}
@keyframes appear { from { opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes moved { from { stroke: var(--weiss); stroke-width: 2; opacity: 0.6; } to { stroke: var(--bernstein-k); stroke-width: 3.5; opacity: 1; } }

/* ---- text sections */
section > h2 + p, .problem-text > h2 + p, .steps, .pairs { margin-top: clamp(1.5rem, 2.6vw, 2.75rem); }
p + p { margin-top: 1rem; }
.problem { padding-bottom: clamp(3.5rem, 7vw, 7rem); }
.problem-chart { margin-top: clamp(2rem, 4vw, 3.5rem); max-width: 46rem; }
.p-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 2.5rem; max-width: 20rem; }
@media (min-width: 600px) { .p-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; } }
@media (min-width: 1100px) {
  .problem { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: 4rem; align-items: end; }
  .problem-chart { margin-top: 0; }
}
.p-chart { display: block; width: 100%; height: auto; }
.p-title { fill: var(--nacht); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.p-tick { fill: var(--nacht); font-size: 13px; font-weight: 500; opacity: 0.7; }
.p-axis { fill: none; stroke: var(--nacht); stroke-width: 1.5; }
.p-limit { fill: none; stroke: var(--stahl-p); stroke-width: 1.5; stroke-dasharray: 4 4; }
.p-line { fill: none; stroke: var(--nacht); stroke-width: 2.5; stroke-linejoin: round; }

/* App-window mockups */
.u-panel { display: block; width: 100%; height: auto; }
.u-frame { fill: var(--weiss); stroke: var(--stahl-p); stroke-width: 1; }
.u-rule { fill: none; stroke: var(--stahl-p); stroke-width: 1; }
.u-app { fill: var(--nacht); font-size: 14px; font-weight: 800; }
.u-title, .u-tick { fill: var(--nacht); font-size: 13px; font-weight: 500; opacity: 0.7; }
.u-head { fill: var(--nacht); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.u-text { fill: var(--nacht); font-size: 15px; font-weight: 500; }
.u-note { fill: var(--nacht); font-size: 13px; font-weight: 500; opacity: 0.7; }
.u-spark { fill: none; stroke: var(--stahl-p); stroke-width: 1.5; stroke-linejoin: round; }
.u-spark--moved { stroke: var(--bernstein-p); stroke-width: 2.5; }
.u-arc { fill: none; stroke: var(--stahl-p); stroke-width: 1.2; }
.u-arc--moved { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.u-label { fill: var(--nacht); font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.u-dot { fill: var(--nacht); }


.steps { max-width: 62rem; }
.steps li { position: relative; padding: 1.75rem 0 2rem; border-top: 1px solid var(--stahl-p); }
.step-text { max-width: 34rem; }
.step-panel { max-width: 24rem; margin-top: 1.5rem; }
@media (min-width: 1000px) {
  .steps li { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 3rem; align-items: start; }
  .step-panel { margin-top: 0.4rem; }
}
.steps li:last-child { border-bottom: 1px solid var(--stahl-p); }
.steps h3 + p { margin-top: 0.5rem; }
.numeral { display: block; font-size: clamp(3.5rem, 7vw, 7rem); line-height: 0.8; margin-bottom: 1rem; color: var(--stahl-p); }
.how .small { margin-top: 1.5rem; }
@media (min-width: 900px) {
  .numeral { position: absolute; right: 100%; top: 1.9rem; margin: 0 clamp(1.25rem, 2.2vw, 2.25rem) 0 0; }
}

.fits { padding-bottom: clamp(3.5rem, 6vw, 6rem); }
.pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; max-width: 62rem; }
.pairs dt { font-weight: 800; letter-spacing: -0.01em; }
.pairs dt h3 { font-size: clamp(1.15rem, 1.4vw, 1.35rem); }
.pairs dd { margin-top: 0.3rem; max-width: 34em; }
/* Sector strip: slides sideways, bleeds off the right edge. */
.strip { display: flex; gap: clamp(1rem, 2vw, 1.75rem); margin: clamp(1.5rem, 2.6vw, 2.75rem) calc(-1 * var(--gutter)) 0 0; padding: 0 var(--gutter) 0.5rem 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 0 var(--gutter); scrollbar-width: none; cursor: grab; }
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip li { flex: 0 0 clamp(15rem, 26vw, 22rem); scroll-snap-align: start; }
.strip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.strip figcaption { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.4; }
.strip figcaption b { display: block; font-weight: 800; letter-spacing: -0.01em; font-size: 1.0625rem; }
@media (max-width: 719px) { .strip { margin-left: calc(-1 * var(--edge)); padding-left: var(--edge); scroll-padding-inline: var(--edge) var(--gutter); } .strip li { flex-basis: 72vw; } }
@media (min-width: 720px) { .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Questions: native details, question in display type, a plus sign drawn with two lines. Instant. */
.qs { max-width: 46rem; margin-top: clamp(1.5rem, 2.6vw, 2.75rem); border-top: 1px solid var(--stahl-k); }
.q { border-bottom: 1px solid var(--stahl-k); }
.q summary { position: relative; list-style: none; cursor: pointer; padding: 1.1rem 3rem 1.1rem 0; }
.q summary::-webkit-details-marker { display: none; }
.q summary h3 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); }
.q summary::before, .q summary::after { content: ""; position: absolute; right: 0.6rem; top: 50%; width: 1.25rem; height: 2px; margin-top: -1px; background: currentColor; }
.q summary::after { transform: rotate(90deg); }
.q[open] summary::after { display: none; }
.q p { padding: 0 3rem 1.4rem 0; max-width: 34em; }
.status .button { margin-top: clamp(1.5rem, 2.4vw, 2.5rem); }


/* ---- demo */
.demo { padding-top: clamp(4rem, 7vw, 7rem); padding-bottom: clamp(4rem, 7vw, 7rem); }
.demo-caption { font-size: clamp(1.4rem, 2.5vw, 2.4rem); line-height: 1.12; max-width: 26em; }
.demo-stage { margin: clamp(2rem, 4vw, 4rem) 0 clamp(1.5rem, 3vw, 3rem) calc(var(--gutter) - var(--edge)); }
.demo-svg { display: block; width: 100%; height: auto; margin: 0 auto; }
.demo-svg--wide { max-width: 78rem; }
.demo-svg--tall { display: none; max-width: 32.5rem; }
@media (max-width: 999px) {
  .demo-svg--wide { display: none; }
  .demo-svg--tall { display: block; }
}
@media (max-width: 560px) { .demo-stage { margin-right: calc(-1 * var(--gutter)); margin-left: calc(-1 * var(--edge)); } }
.demo-net { min-width: 0; }
.demo-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; margin: 1rem auto 0; font-size: 0.875rem; font-weight: 500; }
.demo-legend li { display: flex; align-items: center; gap: 0.5rem; }
.demo-legend svg { height: 1.25rem; width: auto; }
@media (max-width: 560px) { .demo-legend { padding: 0 var(--gutter); } }

.d-arc { fill: none; stroke: var(--weiss); stroke-width: 2; stroke-linecap: round; opacity: 0.75; }
.d-arc--moved { stroke: var(--bernstein-k); }
.d-arc[data-k] { opacity: 1; }
.d-dot, .d-marker { fill: var(--weiss); }
.d-mask { fill: var(--kobalt); }
.d-bar { fill: none; stroke: var(--stahl-k); stroke-width: 2; }
.d-alarm { fill: none; stroke: var(--weiss); stroke-width: 2; }
.d-text { fill: var(--weiss); font-size: 16px; font-weight: 500; font-stretch: 92%; letter-spacing: 0; }
.d-label { paint-order: stroke; stroke: var(--kobalt); stroke-width: 6px; stroke-linejoin: round; }
.d-note-tick { fill: none; stroke: var(--bernstein-k); stroke-width: 2; }

.demo-status { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.2; max-width: 30em; min-height: 3.6em; }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin: 1rem 0 2rem; }
html:not(.js) .demo-controls { display: none; }
.demo-play { min-width: 8.5em; min-height: 44px; text-align: center; }
.demo-week { font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: 1; min-width: 6.2em; }
.demo-track { flex: 1 1 100%; max-width: 40rem; }
.demo-range:focus-visible { outline-offset: 0; }
.demo-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; color: inherit; cursor: pointer; touch-action: pan-y; }
.demo-range::-webkit-slider-runnable-track { height: 2px; background: var(--weiss); }
.demo-range::-moz-range-track { height: 2px; background: var(--weiss); }
.demo-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -10px; border: 0; border-radius: 0; background: var(--weiss); }
.demo-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 0; background: var(--weiss); }
.demo-ticks { display: flex; justify-content: space-between; margin-top: 0.4rem; padding: 0 11px; color: var(--weiss); }
.demo-ticks span { display: flex; justify-content: center; width: 0; }
@media (min-width: 900px) {
  .demo-status { min-height: 2.4em; }
  .demo-track { flex: 1 1 20rem; }
}

/* ---- footer */
footer { padding-top: clamp(3.5rem, 6vw, 6rem); padding-bottom: clamp(2.5rem, 4vw, 4rem); }
.foot-slogan { font-size: clamp(1.4rem, 2.5vw, 2.4rem); line-height: 1.1; max-width: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem; margin-top: 1.75rem; }
footer .langs { margin-top: 1.25rem; }
.legal { display: grid; grid-template-columns: repeat(2, minmax(0, 26rem)); gap: 2rem 4rem; margin-top: clamp(3rem, 5vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--stahl-p); font-weight: 400; }
.legal h2 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.legal p + p { margin-top: 0.75rem; }
.legal section { scroll-margin-top: 2rem; }
.credit { margin-top: 1.25rem; font-size: 0.8125rem; color: var(--stahl-k); }
@media (max-width: 719px) { .legal { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 719px) { :root { --edge: 1.5rem; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
