/* First up: config and functions */
@import '_config.css';
@import '_reset.css';


/* TYPOGRAPHY =============================================================================== */

body {
  font-family: 'Roboto Condensed', avenir, helvetica, arial, sans-serif;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-3);
}
h4 {
  font-size: var(--step-2);
}
h5 {
  font-size: var(--step-1);
}
h6 {
  font-size: var(--step-0);
}
a,a:visited {
  text-decoration: none;
  font-weight: bold;
  color: var(--pop);
}

.intro a:hover {
  color: var(--light);
  background: var(--primary);
}

.section {
  background: var(--dark);
  color: var(--light);
  font-size: var(--step-0);
  text-transform: uppercase;
  font-weight: normal;
  letter-spacing: var(--space-4xs);
  padding-inline: var(--space-2xs);
  margin-bottom: calc(var(--space-m) * -1);
}
.footer {
  text-align: center;
}

/* COMPOSITION =============================================================================== */

body {
  background: var(--light);
  padding-inline: 3vw;
  padding-bottom: 3vw;
}
.poster {
  width: 100%;
  margin-bottom: var(--space-m);
}
p.descriptor {
  text-orientation: mixed;
  writing-mode: vertical-rl; 
  position: absolute;
  margin-block-start: 0;
  right: 3vw;
  top: 4vw;
  z-index: 100;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  font-size: var(--step-x);
  letter-spacing: var(--space-4xs);
}
.jcw-bug {
  width: 20vw;
  min-width: 100px;
  max-width: 500px;
  position: absolute;
  top: 68vw;
  right: 16.5vw;
  z-index: 90;
  transition: transform .2s ease-in-out;
}
.jcw-bug:hover {
  transform: rotate(-25deg);
}
.bug {
  margin: var(--space-s);
  align-self: center;
}
.reel .bug {
  width: 20vw;
  min-width: 150px;
  max-width: 200px;
}
.reel.events {
  background: var(--tint);
}
ul.origin {
  color: var(--pop);
  font-size: var(--step--1);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: var(--space-4xs);
  margin-top: var(--space-s) !important;
}

main {
  padding-inline: var(--space-s);
}
footer {
  padding-inline: var(--space-s);
  padding-block: var(--space-2xl) var(--space-s);
  margin-block-start: calc(var(--space-xl) * -1) !important;
  text-align: center;
  background: var(--primary);
  color: rgba(255,255,255,.5);
}
footer a {
  color: var(--secondary);
  &:hover {
    color: var(--pop);
  }
}

.shop img {
  transition: all .2s ease-in-out;
}
.shop img:hover {
  transform: scale(1.05);
}
.hero {
  margin-block-start: 3vw !important;
}
.poster-text {
  background: var(--primary);
  padding: 0 var(--space-m) 15vw; 
  width: 100%;
}
.poster-car {
  display: flex;
  align-items: center;
  width: 100%;
  padding-inline: var(--space-m);
}
.mini {
 min-width: 50%;
 width: 120%;
}
@media screen and (max-width: 9999px) {
  .mini {
    margin-top: -26vw;
  }
}

@media screen and (min-width: 1000px) {
  .hero {
    display: flex;
  }
  .mini {
    margin-top: 8vw;
  }
  .poster-text {
    padding: 0 15vw var(--space-m) var(--space-m);
  }
  .poster-car {
    margin-left: -18vw;
  }
  .jcw-bug {
    top: 2.5vw;
    right: 41vw;
  }
  .descriptor {
    position: absolute;
    right: .5vw;
    top: 3vw;
    color: var(--pop) !important;
    font-size: var(--step--2) !important;
    letter-spacing: var(--space-4xs);
  }
}


/* FLOW */
.flow > * + * {
  margin-block-start: var(--space-m);
}

/* GRID */
.grid {
  display: grid;
  grid-gap: var(--space-s);
}
@supports (width: min(250px, 100%)) {
  .grid {
    display: grid;
    grid-gap: var(--space-s);
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  }
}

/* SIDEBAR */
.with-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
}

.with-sidebar > :first-child {
  flex-grow: 1;
}

.with-sidebar > :first-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: 30%;
}

/* REEL */

.reel {
  display: flex;
  block-size: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #fff #000;
  align-items: center;
  justify-content: center;
}

.reel::-webkit-scrollbar {
  block-size: 1rem;
}

.reel::-webkit-scrollbar-track {
  background-color: var(--secondary);
}

.reel::-webkit-scrollbar-thumb {
  background-color: var(--secondary);
  background-image: linear-gradient(var(--secondary) 0, var(--secondary) 0.25rem, var(--tint) 0.25rem, var(--tint) 0.75rem, var(--secondary) 0.75rem);
}

.reel > * {
  flex: 0 0 auto;
  overflow: visible;
}


.reel > img {
  block-size: 100%;
  flex-basis: auto;
  width: auto;
  align-self: center;
}

.reel > * + * {
  margin-inline-start: 1rem;
}

.reel.overflowing {
  padding-block-end: 1rem;
}


.origin {
  display: flex;
  flex-wrap:wrap;
  column-gap: var(--space-s);
  justify-content: right;
}
.origin > * {
  flex-basis: auto;
  padding-right: var(--space-xs);
  border-right: 1px solid var(--pop);
}
.origin > :last-child {
  padding-right:0;
  border-right: none;
}


/* SWITCHER */

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s)
}

.switcher > * {
  flex-grow: 1;
  flex-basis: calc(( 30rem - 100%) * 999);
}

.switcher > :nth-last-child(n+ 5),
.switcher > :nth-last-child(n+ 5) ~ * {
  flex-basis: 100%;
}


/* TOOLTIP */

[tooltip]{
  margin:var(--space-m);
  position:relative;
  display:inline-block;
}
[tooltip]::after {
    content: attr(tooltip);
    position: absolute;
    left:50%;
    bottom:0;
    transform: translateX(-50%);
    min-width: 80%;
    background: rgba(255,255,255,.8);
    text-align: center;
    color: var(--dark);
    border: var(--space-3xs) solid var(--pop);
    padding: var(--space-m) var(--space-s);
    font-size: var(--step--2);
    line-height: 1.2;
    border-radius: var(--space-2xs);
    pointer-events: none;
    padding: var(--space-4xs);
    z-index:99;
    opacity:0;
}




[tooltip]:hover::after,[tooltip]:hover::before {
   opacity:1
}

/* UTILITIES =============================================================================== */

.nowrap {
  white-space: nowrap;
}
.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}


/* THUMBNAIL GALLERY */

.gallery img {
  transform: scale(1) translate(0, 0);
  transition: transform .2s ease-in;
}

.gallery figure {
  display: grid;
  grid-template-areas: "card";
  place-items: end;
  border-radius: var(--space-2xs);
  overflow: hidden;
  position: relative;
}

.gallery figure > * {
  grid-area: card;
}

.gallery figcaption {
  background-color: hsl(0 0% 100% / 87%);
  /* provide stacking context */
  z-index: 1;
  text-align: center;
  margin: 0 auto;
  width: 100%;
  position: absolute;
  left:0;
  right: 0;
  bottom: 0;
  transition: all .2s ease-in;
}

.gallery figure:hover figcaption,
.gallery figure:focus figcaption {
  transform: translateY(0);
}

.gallery figure:hover img,
.gallery figure:focus img {
  transform: scale(1.2);
}

.gallery figure:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

@media (any-hover: hover) and (any-pointer: fine) {
.gallery figcaption {
  transform: translateY(100%);
}
}

@media (prefers-reduced-motion: reduce) {
  .gallery * {
    transition-duration: 0ms !important;
  }
  
  .gallery img {
    transform: none !important;
  }
  
  .gallery figcaption {
    transition-delay: 0ms;
  }
}

/* Vignette */
.gallery figure::after {
  content: "";
  grid-area: card;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 2rem 1rem hsl(0 0% 0% / 65%);
  position: relative;
}

/* IMAGES */
img {
  max-width: 100%;
}


/* Button */
.button {
  text-decoration: none;
  background: rgba(255,255,255,.8);
  border-radius: var(--space-xs);
  padding: var(--space-3xs) var(--space-2xs);
}
.button:hover {
  background: rgba(255,255,255,1);
}

/* Lightbox */

.lightbox {
  background: rgba(0, 0, 0, 0.8);
  display: none;
  position: fixed;
  z-index: 1000;
  color: #fff;
  text-align: center;
}

.lightbox:target {
  align-items: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  right: 0;
  top: 0;
}
.lightbox .content {
  animation: fade_in_show 1s
}

@keyframes fade_in_show {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}



.art img {
  border-radius: var(--space-xs);
  display: block;
  margin: auto;
  margin-bottom: var(--space-m);
  max-height: 80vh;
  max-width: 90vh;
}

.lightbox .close {
  color: #fff;
  font-size: var(--step-2);
  font-weight: bold;
  position: fixed;
  right: var(--space-xs);
  top: var(--space-xs);
  z-index: 1001;
  text-decoration: none;
}
.lightbox .prev,
.lightbox .next {
  color: #fff;
  font-size: var(--step-2);
  font-weight: bold;
  position: fixed;
  z-index: 1001;
  text-decoration: none;
}
.lightbox .prev {
  top: 50vh;
  left: var(--space-m);
}
.lightbox .next {
  top: 50vh;
  right: var(--space-m);
}

.art p {
  font-size: var(--step-0);
}

.art h2 {
  font-size: var(--step-1);
  }