/*******************/
/* MARK: LETTERTYPE */
/*****************/

@font-face {
  font-family: "Seraphs";
  src: url("font/SeraphsVF.woff2") format("woff2");
  font-weight: 100 200;
  font-style: normal;
  font-display: swap;
}

/* Werkelijke variabele assen: wght 100–200; SRFS 0–60. */





/*************************/
/* MARK: KLEUREN EN BASIS */
/***********************/

:root {
  --paper: #f5f0df;
  --violet: #4c2acb;
  --acid: #e6ed62;
  --soft-violet: #ddd4f0;
  --hairline: #4c2acb38;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--violet);
  font-family: "Seraphs", serif;
  font-weight: 145;
  font-synthesis: none;
  font-variation-settings: "wght" 145, "SRFS" 10;
}

h1, p { margin: 0; }
::selection { background: var(--acid); color: var(--violet); }
:focus-visible { outline: 0.125rem dashed var(--violet); outline-offset: 0.6rem; border-radius: 0.15rem; }
.opening, .song, .colophon { width: min(100% - 2.5rem, 75rem); margin-inline: auto; }
.song { position: relative; isolation: isolate; }
.song section { position: relative; }
.song p { position: relative; transition: font-variation-settings 0.75s ease, transform 0.65s ease; }





/***********************/
/* MARK: GROTE OPENING */
/*********************/

.opening { padding-top: clamp(2rem, 7vw, 6rem); }
.artist { font-size: clamp(1rem, 2.4vw, 1.6rem); text-align: center; letter-spacing: 0.09em; font-variation-settings: "wght" 140, "SRFS" 0; }
.opening h1 { display: flex; justify-content: center; white-space: nowrap; font-size: clamp(3rem, 19vw, 15rem); font-weight: 200; font-variation-settings: "wght" 200, "SRFS" 40; line-height: 1.15; letter-spacing: -0.09em; padding: 1.25rem 0 1.75rem; }
.opening h1 span { transition: font-variation-settings 0.9s ease, transform 0.7s ease; }
.opening h1:hover span { font-variation-settings: "wght" 130, "SRFS" 60; }
.opening h1:hover span:nth-child(even) { transform: translateY(0.04em); }
.opening h1:hover span:nth-child(odd) { transform: translateY(-0.04em); }
.opening-tail { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 4rem; }
.turn-line { display: block; height: 0.0625rem; background: var(--hairline); flex: 1; }
.spark { display: inline-block; width: 2.5rem; height: 2.5rem; flex-shrink: 0; background: var(--violet); clip-path: polygon(50% 0, 61% 35%, 85% 15%, 65% 40%, 100% 50%, 65% 60%, 85% 85%, 60% 65%, 50% 100%, 40% 65%, 15% 85%, 35% 60%, 0 50%, 35% 40%, 15% 15%, 40% 35%); }
.small-spark { width: 1.25rem; height: 1.25rem; }





/****************************/
/* MARK: DE DOORLOPENDE LIJN */
/**************************/

.flow-track { position: absolute; inset: 0 -1rem 0 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0.75; }
.flow-track svg { width: 100%; height: 100%; }
.flow-track path { fill: none; stroke: var(--acid); stroke-width: 18; vector-effect: non-scaling-stroke; }
.verse-turn { display: flex; align-items: center; justify-content: center; gap: 1.25rem; width: 70%; margin: 4rem auto; }
.verse-turn .spark { width: 1.5rem; height: 1.5rem; }
.chorus-turn { display: flex; align-items: center; gap: 2rem; margin: 3rem 0; }





/****************************/
/* MARK: HET COUPLET VOLGEN */
/**************************/

.verse { padding-top: 1rem; }
.lyric-line { display: grid; gap: 0.65rem; margin-bottom: 3.5rem; }
.young-man { display: block; font-size: clamp(2.7rem, 9.5vw, 6.8rem); font-variation-settings: "wght" 185, "SRFS" 20; line-height: 1.04; letter-spacing: -0.065em; transition: font-variation-settings 0.75s ease, transform 0.6s ease; }
.line-copy { display: block; padding-left: 0.5rem; font-size: clamp(1.3rem, 4.6vw, 2.5rem); line-height: 1.35; }
.aside { display: inline-block; font-size: 0.65em; font-variation-settings: "wght" 120, "SRFS" 0; white-space: nowrap; }
.lyric-line:is(:hover, :focus-visible) .young-man { font-variation-settings: "wght" 200, "SRFS" 60; transform: translateX(0.025em); }
.down, .ground, .new-town { display: inline-block; font-variation-settings: "wght" 180, "SRFS" 20; transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.3, 1), font-variation-settings 0.75s; }
.lyric-line:is(:hover, :focus-visible) .down { transform: translateY(0.2em) rotate(4deg); font-variation-settings: "wght" 100, "SRFS" 0; }
.lyric-line:is(:hover, :focus-visible) .ground { transform: translateY(-0.18em) rotate(-4deg); font-variation-settings: "wght" 200, "SRFS" 30; }
.new-town { background-image: linear-gradient(var(--acid), var(--acid)); background-repeat: no-repeat; background-position: 0 90%; background-size: 100% 0.16em; transition: background-size 0.6s, font-variation-settings 0.6s; }
.lyric-line:is(:hover, :focus-visible) .new-town { background-size: 100% 0.85em; font-variation-settings: "wght" 200, "SRFS" 40; }
.unhappy-line { text-align: center; font-size: clamp(1.75rem, 6vw, 4.7rem); line-height: 1.2; margin: 5rem 0; letter-spacing: -0.035em; }
.unhappy { display: inline-block; position: relative; font-variation-settings: "wght" 190, "SRFS" 30; transition: font-variation-settings 0.75s, letter-spacing 0.75s; }
.unhappy::after { content: ""; position: absolute; left: -2%; right: -2%; top: 57%; height: 0.06em; background: var(--violet); transform: scaleX(0); transform-origin: left; transition: transform 0.6s; }
.unhappy-line:is(:hover, :focus-visible) .unhappy { font-variation-settings: "wght" 100, "SRFS" 0; letter-spacing: 0.015em; }
.unhappy-line:is(:hover, :focus-visible) .unhappy::after { transform: scaleX(1); }
.stay-line { text-align: center; font-size: clamp(1.2rem, 4vw, 2.6rem); line-height: 1.4; padding-top: 1.5rem; }
.stay-line:is(:hover, :focus-visible) { font-variation-settings: "wght" 180, "SRFS" 30; }
.good-time { text-align: center; font-size: clamp(1.3rem, 4vw, 2.8rem); margin: 2.5rem 0 0; line-height: 1.3; }
.good-time-large { display: inline-block; font-size: clamp(3.8rem, 16vw, 12rem); font-variation-settings: "wght" 190, "SRFS" 40; letter-spacing: -0.07em; line-height: 1.15; transition: font-variation-settings 0.8s, transform 0.8s; }
.good-time:is(:hover, :focus-visible) .good-time-large { font-variation-settings: "wght" 200, "SRFS" 60; transform: rotate(-3deg); }





/****************************/
/* MARK: TERUGKEREND REFREIN */
/**************************/

.chorus { padding-top: 1rem; }
.chorus-line { text-align: center; margin: 0 0 2rem; }
.chorus-intro { display: block; font-size: clamp(1.3rem, 4vw, 2.7rem); line-height: 1.35; }
.chorus-title { display: block; font-size: clamp(3.2rem, 18.4vw, 13.8rem); letter-spacing: -0.085em; line-height: 1.3; font-variation-settings: "wght" 200, "SRFS" 40; transition: font-variation-settings 0.8s ease, transform 0.8s ease; }
.second-chorus .chorus-title { color: var(--paper); -webkit-text-stroke: 0.0625rem var(--violet); text-shadow: 0.035em 0.025em 0 var(--soft-violet); }
.chorus-line:is(:hover, :focus-visible) .chorus-title { font-variation-settings: "wght" 150, "SRFS" 60; transform: rotate(-2deg); }
.second-chorus:is(:hover, :focus-visible) .chorus-title { color: var(--violet); transform: rotate(2deg); }
.bridge { margin: 4rem auto; width: min(100%, 52rem); display: grid; gap: 2.5rem; }
.bridge p { font-size: clamp(1.5rem, 4.8vw, 3.1rem); line-height: 1.35; }
.bridge p:nth-child(2) { text-align: right; }
.emphasis { font-variation-settings: "wght" 190, "SRFS" 20; background-image: linear-gradient(var(--acid), var(--acid)); background-position: 0 90%; background-repeat: no-repeat; background-size: 100% 0.15em; transition: background-size 0.6s, font-variation-settings 0.6s; }
p:is(:hover, :focus-visible) .emphasis { background-size: 100% 0.85em; font-variation-settings: "wght" 200, "SRFS" 60; }
.clean-meal { text-align: center; margin: 3.5rem 0; font-size: clamp(1.25rem, 4.5vw, 3rem); line-height: 1.5; }
.finale { text-align: center; font-size: clamp(2.5rem, 9.5vw, 7rem); line-height: 1.05; letter-spacing: -0.045em; padding: 1rem 0 4rem; }
.finale > span { display: inline-block; }
.finale .final-feel { font-size: 1.4em; font-variation-settings: "wght" 200, "SRFS" 40; transition: font-variation-settings 0.9s, transform 0.9s; }
.finale:is(:hover, :focus-visible) .final-feel { font-variation-settings: "wght" 130, "SRFS" 60; transform: rotate(-4deg); }





/****************************/
/* MARK: BEWEGING EN EINDE */
/**************************/

.colophon { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-block: 2rem 3rem; border-top: 0.0625rem solid var(--hairline); font-size: 0.85rem; }
.colophon .spark { width: 1.2rem; height: 1.2rem; }

@media (prefers-reduced-motion: no-preference) {
  .opening h1 span { animation: opening-type 3.5s ease-in-out 1; }
  .opening h1 span:nth-child(2) { animation-delay: 0.15s; }
  .opening h1 span:nth-child(3) { animation-delay: 0.3s; }
  .opening h1 span:nth-child(4) { animation-delay: 0.45s; }
  .chorus-line:is(:hover, :focus-visible) .chorus-title { animation: chorus-sway 2.4s ease-in-out 1; }
  .verse-turn:has(+ .lyric-line:hover) .spark { animation: turn 1.5s ease 1; }
}

@keyframes opening-type {
  0%, 100% { font-variation-settings: "wght" 200, "SRFS" 40; }
  50% { font-variation-settings: "wght" 110, "SRFS" 0; }
}

@keyframes chorus-sway {
  0%, 100% { font-variation-settings: "wght" 150, "SRFS" 60; }
  40% { font-variation-settings: "wght" 200, "SRFS" 0; }
  75% { font-variation-settings: "wght" 180, "SRFS" 30; }
}

@keyframes turn { to { transform: rotate(180deg); } }





/****************************/
/* MARK: GROTERE SCHERMEN */
/**************************/

@media (min-width: 45rem) {
  .opening, .song, .colophon { width: min(100% - 6rem, 75rem); }
  .opening-tail { margin-bottom: 6rem; }
  .lyric-line { grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; margin-bottom: 5rem; }
  .young-man { font-size: clamp(3rem, 6.5vw, 6.6rem); }
  .line-copy { font-size: clamp(1.5rem, 3vw, 2.6rem); padding-left: 0; }
  .unhappy-line { margin-block: 7rem; }
  .verse-turn { margin-block: 5rem; }
  .flow-track { inset-inline-end: -2.5rem; }
  .bridge { grid-template-columns: 1fr 1fr; gap: 3rem; margin-block: 6rem; }
  .bridge p { font-size: clamp(1.5rem, 3vw, 2.6rem); }
  .bridge p:nth-child(2) { padding-top: 3rem; }
  .chorus-turn { margin-block: 4rem; }
  .chorus-line { margin-bottom: 3rem; }
  .chorus-title { font-size: clamp(5rem, 16vw, 13.2rem); }
  .finale { padding-block: 3rem 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (forced-colors: active) {
  .second-chorus .chorus-title { color: CanvasText; -webkit-text-stroke: 0; text-shadow: none; }
}





/****************************/
/* MARK: VAN WOORD NAAR BOOG */
/**************************/

/* Eén overerfbare waarde buigt alle letters samen, zonder JavaScript. */
@property --curve {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.good-time-large {
  --curve: 0;
  display: inline-flex;
  justify-content: center;
  font-size: clamp(3rem, 12vw, 9rem);
  letter-spacing: -0.065em;
  padding-bottom: 2.1em;
  padding-top: 0.25em;
  margin-bottom: -0.2em;
  transition: --curve 1.2s cubic-bezier(0.22, 0.7, 0.2, 1), font-variation-settings 0.8s;
}

.arc-letter {
  --lift: 0em;
  --shift: 0em;
  --turn: 0deg;
  display: inline-block;
  flex: 0 0 0.48em;
  width: 0.48em;
  white-space: pre;
  transform: translate(calc(var(--shift) * var(--curve)), calc(var(--lift) * var(--curve))) rotate(calc(var(--turn) * var(--curve)));
  transform-origin: center;
}

.arc-letter:nth-child(1) { --lift: 1.9em; --turn: -85deg; }
.arc-letter:nth-child(2) { --lift: 1.14em; --shift: -0.35em; --turn: -67deg; }
.arc-letter:nth-child(3) { --lift: 0.49em; --shift: -0.41em; --turn: -45deg; }
.arc-letter:nth-child(4) { --lift: 0.12em; --shift: -0.26em; --turn: -23deg; }
.arc-letter:nth-child(6) { --lift: 0.12em; --shift: 0.26em; --turn: 23deg; }
.arc-letter:nth-child(7) { --lift: 0.49em; --shift: 0.41em; --turn: 45deg; }
.arc-letter:nth-child(8) { --lift: 1.14em; --shift: 0.35em; --turn: 67deg; }
.arc-letter:nth-child(9) { --lift: 1.9em; --turn: 85deg; }
.good-time:is(:hover, :focus-visible) .good-time-large { --curve: 1 !important; transform: none; }





/****************************/
/* MARK: SCROLLEN ALS RITME */
/**************************/

/* Elke regel krijgt een eigen tijdlijn. De voortgang volgt de scrollpositie. */
@supports (animation-timeline: view()) and (animation-range: entry 0% exit 100%) {
  @media (prefers-reduced-motion: no-preference) {
    .lyric-line { view-timeline-name: --verse; view-timeline-axis: block; }
    .young-man {
      animation: verse-morph linear both;
      animation-timeline: --verse;
      animation-range: entry 0% exit 100%;
    }
    .line-copy {
      animation: verse-drift linear both;
      animation-timeline: --verse;
      animation-range: entry 0% exit 100%;
    }
    .lyric-line:nth-of-type(even) .young-man { animation-direction: reverse; }
    .down {
      animation: word-down linear both;
      animation-timeline: --verse;
      animation-range: entry 0% exit 100%;
    }
    .ground {
      animation: word-up linear both;
      animation-timeline: --verse;
      animation-range: entry 0% exit 100%;
    }
    .good-time { view-timeline-name: --good-time; view-timeline-axis: block; }
    .good-time-large {
      animation: curve-word linear both;
      animation-timeline: --good-time;
      animation-range: entry 0% exit 100%;
    }
    .chorus-line { view-timeline-name: --chorus; view-timeline-axis: block; }
    .chorus-line .chorus-title {
      animation: chorus-scroll linear both;
      animation-timeline: --chorus;
      animation-range: entry 0% exit 100%;
    }
    .second-chorus .chorus-title { animation-direction: reverse; }
    .unhappy-line {
      animation: loosen-type linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .verse-turn .spark, .chorus-turn .spark {
      animation: scroll-spin linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .finale { view-timeline-name: --finale; view-timeline-axis: block; }
    .final-feel {
      animation: finale-open linear both;
      animation-timeline: --finale;
      animation-range: entry 0% cover 60%;
    }
    /* Hover en toetsenbordfocus blijven directe controle bieden. */
    .lyric-line:is(:hover, :focus-visible) .young-man,
    .lyric-line:is(:hover, :focus-visible) .down,
    .lyric-line:is(:hover, :focus-visible) .ground,
    .chorus-line:is(:hover, :focus-visible) .chorus-title,
    .finale:is(:hover, :focus-visible) .final-feel { animation: none; }
  }
}

@keyframes verse-morph {
  from { font-variation-settings: "wght" 110, "SRFS" 0; translate: -0.06em 0.12em; }
  50% { font-variation-settings: "wght" 200, "SRFS" 40; translate: 0 0; }
  to { font-variation-settings: "wght" 160, "SRFS" 60; translate: 0.06em -0.1em; }
}

@keyframes verse-drift {
  from { translate: 0.2em 0.6em; font-variation-settings: "wght" 110, "SRFS" 0; }
  50% { translate: 0 0; font-variation-settings: "wght" 155, "SRFS" 10; }
  to { translate: -0.15em -0.4em; font-variation-settings: "wght" 170, "SRFS" 20; }
}

@keyframes word-down {
  from { translate: 0 -0.35em; rotate: -5deg; }
  to { translate: 0 0.3em; rotate: 6deg; }
}

@keyframes word-up {
  from { translate: 0 0.35em; rotate: 5deg; }
  to { translate: 0 -0.3em; rotate: -6deg; }
}

@keyframes curve-word {
  0%, 12% { --curve: 0; font-variation-settings: "wght" 150, "SRFS" 0; }
  48%, 78% { --curve: 1; font-variation-settings: "wght" 200, "SRFS" 60; }
  100% { --curve: 0; font-variation-settings: "wght" 170, "SRFS" 20; }
}

@keyframes chorus-scroll {
  from { font-variation-settings: "wght" 100, "SRFS" 0; translate: -1% 0.1em; rotate: -3deg; }
  50% { font-variation-settings: "wght" 200, "SRFS" 40; translate: 0 0; rotate: 0deg; }
  to { font-variation-settings: "wght" 160, "SRFS" 60; translate: 1% -0.1em; rotate: 3deg; }
}

@keyframes loosen-type {
  from { letter-spacing: -0.055em; translate: 0 0.3em; }
  to { letter-spacing: 0.005em; translate: 0 -0.3em; }
}

@keyframes scroll-spin { from { rotate: -90deg; } to { rotate: 180deg; } }

@keyframes finale-open {
  from { font-variation-settings: "wght" 100, "SRFS" 0; translate: 0 0.3em; scale: 0.94; }
  to { font-variation-settings: "wght" 200, "SRFS" 60; translate: 0 0; scale: 1; }
}

/* Een vaste, rechte compositie wanneer minder beweging is ingesteld. */
@media (prefers-reduced-motion: reduce) {
  .good-time-large { --curve: 0 !important; padding-bottom: 0.25em; }
  .arc-letter { transform: none; }
}
