@font-face {
  font-family: "Jost";
  src: url("assets/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --indigo: #36346e;
  --indigo-deep: #161441;
  --white: #ffffff;
  --yellow: #fdc802;
  --yellow-dim: #caa002;
  --cyan: #0ef1ed;
  --green: #07fea3;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; }

html { background: var(--indigo-deep); }

body {
  font: 400 1.125rem/1.5 "Jost", system-ui, sans-serif;
  color: var(--white);
  background: linear-gradient(172deg, var(--indigo) 20%, var(--indigo-deep) 85%);
  overflow-x: hidden;
}

a { color: var(--yellow); text-underline-offset: .18em; }
a:hover { color: var(--yellow-dim); }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

/* Header sits on top of the hero */
.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 3vw, 36px) var(--gutter);
}
.logo { display: block; width: clamp(84px, 8vw, 112px); height: auto; }
.bar-mail { text-decoration: none; }
.bar-mail:hover { text-decoration: underline; }

/* Hero: the peaks fade into the page, so no edge runs across it */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(128px, 19vh, 190px) var(--gutter) 0;
}
h1 {
  position: relative;
  z-index: 1;
  max-width: 7em;
  font-size: min(7.4vw, 13.5vh);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.012em;
}
/* Read by search engines and screen readers; the heart stands in for it on screen */
.hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.heart {
  width: .78em;
  height: .72em;
  fill: var(--yellow);
  vertical-align: -.02em;
}
.ridge {
  position: absolute;
  right: -2vw;
  bottom: 0;
  display: block;
  width: 60vw;
  overflow: visible;
}
.funnel { fill: var(--white); }
.trail {
  fill: none;
  stroke-width: 1.7;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgb(14 241 237 / .45));
}

/* Portrait screens: headline on top, mark across the full width */
@media (max-aspect-ratio: 11/10) {
  /* Capped by height too, and reserved as padding, so the mark can never reach the headline.
     .544 = height of the mark plus the line's arc (168) over its width (309). */
  .hero { --ridge-width: min(128vw, 75vh); padding-bottom: calc(var(--ridge-width) * .544 + 24px); }
  h1 { font-size: clamp(2.75rem, min(13.4vw, 11vh), 7rem); }
  .ridge { right: auto; left: 50%; width: var(--ridge-width); transform: translateX(-50%); }
  .trail { stroke-width: 2; }
}
/* Landscape phones: a smaller mark keeps the line clear of the headline */
@media (max-height: 480px) and (min-aspect-ratio: 11/10) {
  .ridge { width: 46vw; }
}
@media (max-width: 480px) {
  .bar-mail { font-size: 1rem; }
  .hero { padding-top: 26vh; }
}

.reading { padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(32px, 5vw, 72px); }
h2 {
  font-size: clamp(1.75rem, 4.6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.008em;
}
.reading-line { display: flex; gap: .32em; }
.reading-line + .reading-line { margin-top: .35em; }
.glyph {
  flex: none;
  width: 1.5em;
  height: .62em;
  margin-top: .3em;
  fill: var(--white);
}
.glyph-funnel { fill: var(--yellow); }

/* Contact */
.contact {
  padding: clamp(56px, 9vw, 130px) 0 clamp(32px, 4vw, 56px);
}
.contact-lead, .contact-mail, .foot { margin-inline: var(--gutter); }
.contact-lead { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 300; }
.contact-mail {
  display: inline-block;
  font-size: clamp(1.5rem, 7.3vw, 6.75rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.012em;
  text-decoration: none;
}
.wave {
  display: block;
  width: 100%;
  height: clamp(64px, 9vw, 120px);
  margin-top: clamp(4px, 1vw, 14px);
}
.wave path {
  fill: none;
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: clamp(32px, 5vw, 64px);
}
address { font-style: normal; }
.foot-links { display: flex; gap: 24px; }

/* Imprint page */
.page { background: var(--indigo-deep); }
.page .bar { position: static; }
.legal {
  max-width: 68ch;
  padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 120px);
  overflow-wrap: anywhere;
}
.legal h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); max-width: none; margin-bottom: .6em; }
.legal h2 { font-size: 1.5rem; font-weight: 400; line-height: 1.3; margin-top: 2em; }
.legal h3 { font-size: 1.25rem; font-weight: 400; line-height: 1.3; margin-top: 2em; }
.legal p { margin-top: .6em; }

/* The one orchestrated moment: the line draws, each shape lights as it passes */
@media (prefers-reduced-motion: no-preference) {
  .trail { stroke-dasharray: 1; animation: draw 2.8s cubic-bezier(.45, .05, .4, 1) .3s both; }
  .peak-left { animation: light .7s ease-out 1.1s both; }
  .funnel { animation: light .7s ease-out 1.6s both; }
  .peak-right { animation: light .7s ease-out 1.95s both; }
  .heart { transform-origin: 50% 60%; animation: beat .7s ease-in-out 3s both; }

  @supports (animation-timeline: scroll()) {
    /* tied to page scroll so it always finishes by the last pixel, even on short pages */
    .wave { animation: reveal linear both; animation-timeline: scroll(root block); animation-range: 60% 98%; }
  }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes light { from { fill-opacity: .12; } to { fill-opacity: 1; } }
@keyframes beat { 35% { transform: scale(1.2); } }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
