/* ===================================================================
   THEME
   Change these variables to restyle the whole site.
=================================================================== */
:root {
  --bg: #000000;
  --panel: #161616;

  --text: #ededed;         /* headings / links */
  --text-muted: #a9a9a9;   /* body copy */
  --text-dim: #3d3d3d;     /* footer / icons */

  --dot-inactive: #3d3d3d;
  --dot-active: #ffffff;

  --slide-gap: 1rem;       /* space between slides */
  --slide-radius: 14px;

  --dim-opacity: 0.8;     /* how faint the side slides are */
  --dim-brightness: 0.55;

  --transition-speed: 0.6s;

  /* The fixed column width that header, intro, footer and the active slide all share.
     Fluid on small screens (viewport minus side padding), fixed from tablet up.
     Edit the breakpoints below to change where/how it grows. */
  --page-padding: 1.5rem;
  --content-width: calc(100% - (var(--page-padding) * 2));

  --edge-fade-width: 0px;  /* width of the gradient over the peeking slides, set per breakpoint below */

  --font-body: 'Inter', system-ui, sans-serif;
}

@media (min-width: 601px) {
  :root {
    --content-width: 480px;
    --edge-fade-width: 4rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --content-width: 560px;
    --edge-fade-width: 10rem;
  }
}

/* ===================================================================
   BASE
=================================================================== */
* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
  cursor:
      url("assets/cursors/cursor.svg") 0 0,
      auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

p {
  cursor:
      url("assets/cursors/text.svg") 0 0,
      auto;
}

span {
  cursor:
      url("assets/cursors/text.svg") 0 0,
      auto;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 3px 0px;
  border-radius: 4px;
}

a:hover {
  color: var(--text-muted);
  transition-duration: 0.1s;
  cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
}

.page {
  width: var(--content-width);
  margin: 0 auto;
}

.page:first-of-type {
  padding-top: 3rem;
}

.page:last-of-type {
  padding-bottom: 4rem;
}

/* ===================================================================
   PAGE LOAD
=================================================================== */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header,
.intro,
.carousel,
.site-footer,
.centered > * {
  animation: reveal 0.45s ease-out both;
}

.intro,
.centered > :nth-child(2) {
  animation-delay: 0.07s;
}

.carousel,
.centered > :nth-child(3) {
  animation-delay: 0.14s;
}

.site-footer,
.centered > :nth-child(4) {
  animation-delay: 0.21s;
}

/* ===================================================================
   HEADER
=================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.logo img { display: block; }

.social-links {
  display: flex;
}

.social-links a {
  text-decoration: none;
  display: flex;
  opacity: 0.2;
  transition-duration: 0.1s;
  padding: 9px 7px;
  border-radius: 6px;
}

.social-links a:hover {
  background: #4a4a4a;
  opacity: 0.267;
  transition-duration: 0.1s;
  cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
}

/* ===================================================================
   INTRO TEXT
=================================================================== */
.intro {
  max-width: 40rem;
  margin: 0 0 2.5rem;
}

.flags {
  display: flex;
  gap: 8px;
}

.centered {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

/* ===================================================================
   CAROUSEL
=================================================================== */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 1rem 0;
}

.carousel-track {
  display: flex;
  gap: var(--slide-gap);
  transition: transform var(--transition-speed) ease;
  will-change: transform;
}

.slide {
  display: block;
  flex: 0 0 var(--content-width);

  border-radius: var(--slide-radius);
  overflow: hidden;
  background: var(--panel);

  opacity: var(--dim-opacity);
  filter: brightness(var(--dim-brightness));
  transition: opacity var(--transition-speed) ease, filter var(--transition-speed) ease;
  will-change: opacity, filter;
  cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
}

.slide.is-active {
  opacity: 1;
  filter: brightness(1);
}

.slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Fades the peeking slides into the background on wide screens, where the
   peek areas get large. Width is 0 on mobile (set back to 0 in the base
   variables), and grows at the breakpoints above. */
.carousel-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100% - var(--content-width)) / 2);
  padding: 0;
  border: 0;
  appearance: none;
  background: none;
  pointer-events: auto;
  z-index: 1;
}

.carousel-edge img {
  display: none;
}

.carousel-edge--left {
  left: 0;
  cursor:
        url("assets/cursors/left.svg") 12 9,
        pointer;
}

.carousel-edge--right {
  right: 0;
  cursor:
        url("assets/cursors/right.svg") 12 9,
        pointer;
}

.carousel-edge::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(100%, var(--edge-fade-width));
  pointer-events: none;
}

.carousel-edge--left::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.carousel-edge--right::before {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

/* Used briefly by script.js to disable the crossfade during the invisible
   loop-reset jump, so the dimming swap doesn't flash. */
.carousel-track.no-transition,
.carousel-track.no-transition .slide {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .slide {
    transition: none;
  }

  .dot.is-active::before {
    animation: none;
  }

  .site-header,
  .intro,
  .carousel,
  .site-footer,
  .centered > * {
    animation: none;
  }
}

/* ===================================================================
   FOOTER
=================================================================== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 450;
}

.made-in {
  color: var(--text-dim);
  transition-duration: 0.1s;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 4px;
}

.made-in:hover {
  color: #5c5c5c;
  transition-duration: 0.1s;
}

.mobile-footer-corners {
  display: none;
}

.dots {
  display: flex;
  gap: 0px;
}

.dot-capsule {
  padding: 4px;
  border-radius: 3px;
  background: none;
  border: none;
  transition: background 0.1 ease;
  cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
}

.dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0px;
  border: none;
  border-radius: 50%;
  background: var(--dot-inactive);
  overflow: hidden;
  transition: width 0.2s ease, border-radius 0.2s ease;
}

.dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--dot-inactive);
}

.dot.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--dot-active);
  animation: dot-progress var(--autoplay-duration, 4500ms) linear forwards;
}

.dots.is-resetting .dot.is-active::before,
.dots.is-paused .dot.is-active::before {
  animation-play-state: paused;
}

.dots.is-resetting .dot.is-active::before {
  animation: none;
}

@keyframes dot-progress {
  to { width: 100%; }
}

.dot-capsule:hover {
  background: #191919;
  outline: 3px solid #191919;
}

.dot-capsule:focus-visible,
a:focus-visible,
.social-links a:focus-visible,
.made-in:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ===================================================================
   SMALL SCREENS
=================================================================== */

@media (max-width: 600px) {
  .intro {
    margin: 0 0 2.1rem;
  }
  
  .slide {
    opacity: 1;
  }
  
  .slide img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
  
  .carousel {
    margin: 0;
  }

  .carousel-edge {
    top: 50%;
    bottom: auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgb(0 0 0 / 65%);
    opacity: 0.8;
    pointer-events: auto;
    transform: translateY(-50%);
  }

  .carousel-edge::before {
    display: none;
  }

  .carousel-edge--left {
    left: 40px;
    cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
  }

  .carousel-edge--right {
    right: 40px;
    cursor:
        url("assets/cursors/link.svg") 9 0,
        pointer;
  }

  .carousel-edge img {
    display: block;
    width: 24px;
    height: 18px;
  }

  .carousel-edge:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }
}

@media (max-width: 400px) {
  .carousel-edge {
    width: 32px;
    height: 32px;
  }

  .carousel-edge--left {
    left: 40px;
  }

  .carousel-edge--right {
    right: 40px;
  }
  
  .site-footer {
    justify-content: center;
  }

  .site-footer .copyright,
  .site-footer .made-in {
    display: none;
  }

  .mobile-footer-corners {
    position: fixed;
    right: 0;
    bottom: 16px;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: var(--text-dim);
    font-size: 0.87rem;
    font-weight: 450;
  }

  .mobile-footer-corners .made-in {
    padding: 3px;
  }
}


::selection {
  background-color: #ffffff;
  color: #000000;
}
::-moz-selection {
  background-color: #ffffff;
  color: #000000;
}
