/* Shared styles. Layout and sizing for each section are set inline in the HTML. */

body { margin: 0; background: #EDE1D2; }

/* Keeps hidden sections and the poster viewer hidden despite their inline display values */
[hidden] { display: none !important; }

a { color: #5D2510; }
a:hover { color: #412F26; }

.nav a { color: #4F5436; text-decoration: none; }
.nav a:hover { color: #5D2510; }
.nav a[aria-current="page"] {
  color: #5D2510;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

a:focus-visible,
button:focus-visible,
.strip:focus-visible {
  outline: 2px solid #5D2510;
  outline-offset: 4px;
  border-radius: 6px;
}
.dark a:focus-visible,
.dark button:focus-visible { outline-color: #EDE1D2; }

/* Buttons on the home page */
.cta { transition: background-color .2s, color .2s; }
.cta:hover { background: #412F26 !important; color: #EDE1D2 !important; }
.cta-ghost:hover { background: #5D2510; color: #EDE1D2 !important; }

/* Project filters */
.filter { background: transparent; color: #5D2510; }
.filter:hover { background: #F6EFE6; }
.filter[aria-pressed="true"] { background: #5D2510; color: #EDE1D2; }
.filter:focus-visible { border-radius: 999px; }

/* Slide decks */
.strip { scrollbar-width: thin; scrollbar-color: #806044 transparent; }
.slide {
  flex: 0 0 min(88%, 1040px);
  width: min(88%, 1040px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  scroll-snap-align: start;
  border-radius: 18px;
  background: #412F26;
  display: block;
}
.navbtn:hover { background: #412F26 !important; }
.navbtn:disabled { opacity: .35; cursor: default !important; }

/* Name intro on the home page */
.hero .c, .hero .p, .hero .l { display: inline-block; }
.hero .p, .hero .l { overflow: hidden; vertical-align: bottom; max-width: 1em; }
.hero.run .c { animation: cp-bounce 1.5s cubic-bezier(.33, .66, .45, 1) both; }
.hero.run .p { animation: cp-pop .55s 1.4s cubic-bezier(.3, 1.5, .5, 1) both; }
.hero.run .l { animation: cp-letter .45s ease-out both; }
.hero.run .after { animation: cp-fade .7s 2.9s ease-out both; }

@keyframes cp-bounce {
  0% { transform: translateX(-62vw) rotate(-20deg); }
  46% { transform: translateX(40vw) scaleX(1) rotate(0); }
  52% { transform: translateX(41.5vw) scaleX(.62); }
  58% { transform: translateX(40vw) scaleX(1); }
  84% { transform: translateX(-2vw); }
  100% { transform: translateX(0); }
}
@keyframes cp-pop {
  0% { max-width: 0; opacity: 0; transform: translateY(-60%); }
  60% { max-width: 1em; opacity: 1; transform: translateY(8%); }
  100% { max-width: 1em; opacity: 1; transform: none; }
}
@keyframes cp-letter {
  0% { max-width: 0; opacity: 0; transform: translateY(35%); }
  100% { max-width: 1em; opacity: 1; transform: none; }
}
@keyframes cp-fade {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero.run .c, .hero.run .p, .hero.run .l, .hero.run .after { animation: none; }
}
