/*
 * De homepage van TimerOverrated, bovenop Bootstrap 5.3.
 *
 * Volgt de oorspronkelijke homepage (het templatemo-sjabloon "Elegance"): het
 * grote logo en de grote titel direct op de sterrenhemel, het doorschijnende
 * blok voor de timer met de witte zandloper, de witte knop en de sociale knoppen
 * als kolom aan de rechterrand. Bootstrap levert het fundament (reboot, raster,
 * knoppen, hulpklassen); hier staat alleen wat de pagina eigen maakt.
 *
 * Elke beweging gebruikt alleen `transform` en `opacity`, zodat de browser hem
 * zonder herberekening van de opmaak kan afspelen, en staat uit voor wie in het
 * besturingssysteem minder beweging heeft gekozen.
 */

@font-face {
  font-family: 'Raleway';
  src: url('/fonts/raleway/raleway-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Raleway';
  src: url('/fonts/raleway/raleway-latin-ext-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

:root,
[data-bs-theme='dark'] {
  --bs-body-font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #fff;
  --bs-body-bg: #6b2445;
  --bs-link-color-rgb: 255, 255, 255;
  --bs-link-hover-color-rgb: 255, 255, 255;
  --bs-focus-ring-color: rgba(255, 255, 255, 0.6);

  --to-twitch: #9146ff;
  --to-paneel: rgba(255, 255, 255, 0.08);
  --to-paneel-rand: rgba(255, 255, 255, 0.16);
  --to-tegel: rgba(255, 255, 255, 0.1);
  --to-gloed: rgba(255, 120, 150, 0.45);
  --to-zacht: cubic-bezier(0.2, 0.7, 0.2, 1);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bs-body-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------------ */
/* De hemel: achtergrond, waas en fonkelende sterren                  */
/* ------------------------------------------------------------------ */

.hemel {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* De sterrenhemel zoomt heel langzaam in en uit, als een camera die ademt. */
.hemel__beeld {
  position: absolute;
  inset: -4%;
  background: var(--bs-body-bg) url('/images/achtergrond-1280.webp') center / cover no-repeat;
  animation: adem 40s ease-in-out infinite alternate;
  will-change: transform;
}

@media (min-width: 900px) {
  .hemel__beeld {
    background-image: url('/images/achtergrond-2560.webp');
  }
}

/* De blauwgrijze waas van 35% uit het oude sjabloon: die maakt van de rode
   sterrenhemel het herkenbare roze-paars. */
.hemel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(66, 135, 245, 0.35) 0%, rgba(83, 85, 88, 0.35) 100%);
}

/* Twee lagen kleine sterren die op verschillende momenten oplichten. */
.hemel__sterren {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 33%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 84%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 69% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 83% 46%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 77%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 55%, #fff 50%, transparent 51%);
  opacity: 0;
  animation: fonkel 5s ease-in-out infinite;
}

.hemel__sterren--2 {
  background-image:
    radial-gradient(1px 1px at 18% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 61%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 63% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 66%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 21%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 92%, #fff 50%, transparent 51%);
  animation-duration: 7s;
  animation-delay: 2.5s;
}

/* ------------------------------------------------------------------ */
/* Inhoud                                                             */
/* ------------------------------------------------------------------ */

.welkom {
  max-width: 62rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.logo-houder {
  position: relative;
  width: clamp(9.5rem, 22vw, 15.625rem);
  margin: 0 auto 0.75rem;
}

/* Een zachte roze gloed achter de roos die langzaam op en neer ademt. */
.logo-houder::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--to-gloed) 0%, transparent 70%);
  filter: blur(18px);
  animation: gloed 6s ease-in-out infinite;
}

.logo {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(40, 0, 25, 0.35));
  animation:
    logo-in 1s var(--to-zacht) both,
    zweef 7s ease-in-out 1s infinite;
}

.titel {
  margin: 0;
  font-weight: 700;
  /* 9vw houdt "TimerOverrated" op een telefoon van 320 pixels op één regel. */
  font-size: clamp(1.75rem, 9vw, 5.75rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  /* Geen text-shadow: die schijnt door de doorzichtige letters van de glans
     heen en maakt de titel grijs. Een filter valt eromheen. */
  filter: drop-shadow(0 4px 22px rgba(40, 0, 25, 0.4));
}

/* Een lichtstreep die één keer over de titel glijdt, na het verschijnen. */
.titel__glans {
  background: linear-gradient(110deg, #fff 0%, #fff 40%, #ffe3ec 50%, #fff 60%, #fff 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glans 2.4s ease-in-out 1.1s both;
}

.ondertitel {
  margin: 0.75rem 0 0;
  font-weight: 500;
  opacity: 0.92;
}

/* ------------------------------------------------------------------ */
/* Het timerblok                                                      */
/* ------------------------------------------------------------------ */

.status {
  min-height: 11.5rem;
  display: grid;
  align-items: center;
}

.paneel {
  position: relative;
  padding: 1.75rem clamp(1rem, 4vw, 2.5rem);
  border-radius: 1rem;
  background: var(--to-paneel);
  border: 1px solid var(--to-paneel-rand);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  overflow: hidden;
}

/* Een wisseling van toestand komt rustig in beeld in plaats van te springen. */
[data-staat]:not([hidden]) {
  animation: verschijn 0.5s var(--to-zacht) both;
}

[data-staat][hidden] {
  display: none !important;
}

.paneel__icoon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: #fff;
}

/* De zandloper draait om, zoals een echte. */
.paneel__icoon--zandloper {
  width: 36px;
  animation: omdraaien 4s var(--to-zacht) 1.5s infinite;
}

.paneel__icoon--storing {
  color: #ffd9a0;
}

.paneel__titel {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.paneel__tekst {
  max-width: 40rem;
  margin: 0 auto;
  opacity: 0.9;
}

.paneel__hint {
  margin: 0.5rem auto 0;
  font-size: 0.85em;
  opacity: 0.7;
}

.laden {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

/* De drie stuiterende stippen van het oude laadscherm. */
.laden__stip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: stuiter 0.6s infinite alternate;
}

.laden__stip:nth-child(2) {
  animation-delay: 0.2s;
}

.laden__stip:nth-child(3) {
  animation-delay: 0.3s;
  margin-right: 0.6rem;
}

.timer {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timer iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

/* ------------------------------------------------------------------ */
/* Knoppen                                                            */
/* ------------------------------------------------------------------ */

/* De witte knop van het oude sjabloon, op een Bootstrap-knop. */
.knop-stream {
  --bs-btn-padding-x: 2.2rem;
  --bs-btn-padding-y: 0.85rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 700;
  --bs-btn-color: #222;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-border-width: 2px;
  --bs-btn-border-radius: 10px;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: #222;
  --bs-btn-active-bg: #f1f1f1;
  --bs-btn-active-border-color: #fff;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  overflow: hidden;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(30, 0, 20, 0.25);
  transition:
    color 0.4s ease,
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.25s var(--to-zacht);
}

.knop-stream svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  color: var(--to-twitch);
  transition: color 0.4s ease;
}

/* Een lichtstreep die af en toe over de knop glijdt. */
.knop-stream::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: skewX(-20deg) translateX(0);
  animation: streep 6s ease-in-out 2.5s infinite;
  pointer-events: none;
}

.knop-stream:hover,
.knop-stream:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.knop-stream:hover svg,
.knop-stream:focus-visible svg {
  color: #fff;
}

.knop-stream:hover::after,
.knop-stream:focus-visible::after {
  animation: none;
  opacity: 0;
}

/* De omgekeerde variant, voor "opnieuw proberen". */
.knop-rand {
  --bs-btn-color: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: #222;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: #222;
  --bs-btn-active-bg: #f1f1f1;
  --bs-btn-border-radius: 10px;
  --bs-btn-font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knop-rand svg {
  width: 0.95rem;
  height: 0.95rem;
}

.knop-rand:hover svg {
  animation: draai 0.8s var(--to-zacht);
}

/* ------------------------------------------------------------------ */
/* Sociale media: een kolom aan de rechterrand, zoals voorheen        */
/* ------------------------------------------------------------------ */

.socials {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 5;
  transform: translateY(-50%);
}

.socials ul {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials li {
  animation: inschuiven 0.6s var(--to-zacht) both;
}

.socials li:nth-child(1) { animation-delay: 0.5s; }
.socials li:nth-child(2) { animation-delay: 0.58s; }
.socials li:nth-child(3) { animation-delay: 0.66s; }
.socials li:nth-child(4) { animation-delay: 0.74s; }
.socials li:nth-child(5) { animation-delay: 0.82s; }
.socials li:nth-child(6) { animation-delay: 0.9s; }

.socials a {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: var(--to-tegel);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    transform 0.25s var(--to-zacht);
}

.socials li:first-child a {
  border-top-left-radius: 10px;
}

.socials li:last-child a {
  border-bottom-left-radius: 10px;
}

.socials a:hover,
.socials a:focus-visible {
  background: #fff;
  color: #1e1e1e;
  transform: translateX(-4px);
}

.socials svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--to-zacht);
}

.socials a:hover svg {
  transform: scale(1.15);
}

/* ------------------------------------------------------------------ */
/* Voet                                                               */
/* ------------------------------------------------------------------ */

.voet {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ------------------------------------------------------------------ */
/* Verschijnen                                                        */
/* ------------------------------------------------------------------ */

/* Het fadeInUp van het oude animate.css, met een kleine vertraging per
   onderdeel zodat de pagina van boven naar beneden opbouwt. */
.verschijn {
  animation: verschijn 0.9s var(--to-zacht) both;
}

.verschijn--2 { animation-delay: 0.15s; }
.verschijn--3 { animation-delay: 0.3s; }
.verschijn--4 { animation-delay: 0.45s; }
.verschijn--5 { animation-delay: 0.6s; }

/* ------------------------------------------------------------------ */
/* Bewegingen                                                         */
/* ------------------------------------------------------------------ */

@keyframes verschijn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(0.85) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

@keyframes zweef {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes gloed {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes adem {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1%, -1%, 0); }
}

@keyframes fonkel {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.9; }
}

@keyframes glans {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@keyframes omdraaien {
  0%, 70% { transform: rotate(0deg); }
  85%, 100% { transform: rotate(180deg); }
}

@keyframes streep {
  0%, 70% { transform: skewX(-20deg) translateX(0); }
  100% { transform: skewX(-20deg) translateX(450%); }
}

@keyframes inschuiven {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: none; }
}

@keyframes stuiter {
  to { transform: translateY(-0.6em); }
}

@keyframes draai {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .hemel__sterren {
    opacity: 0.6;
  }
}

/* ------------------------------------------------------------------ */
/* Telefoon en smal scherm                                            */
/* ------------------------------------------------------------------ */

/* Op een smal scherm zou de kolom over de inhoud vallen. De oude pagina
   maakte de knoppen daar 25 pixels breed; hier komen ze als rij onder de
   inhoud, op vingergrootte. */
@media (max-width: 767.98px) {
  .socials {
    position: static;
    transform: none;
    padding: 0 1rem 0.75rem;
  }

  .socials ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .socials li {
    animation-name: verschijn;
  }

  .socials a,
  .socials li:first-child a,
  .socials li:last-child a {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .socials a:hover,
  .socials a:focus-visible {
    transform: translateY(-3px);
  }

  .knop-stream {
    width: 100%;
    max-width: 22rem;
  }
}

@media (max-width: 380px) {
  .socials ul {
    gap: 0.35rem;
  }

  .socials a,
  .socials li:first-child a,
  .socials li:last-child a {
    width: 42px;
    height: 42px;
  }
}
