*,
::before,
::after {
  box-sizing: border-box;
}

:root {
  /* colors */
  --white: white;
  --black: hsl(0, 0%, 10%);
  --black-medium: hsl(0, 0%, 30%);
  --grey: hsl(0, 0%, 70%);
  --light-grey: hsl(0, 0%, 94%);
  --yellow: hsl(50, 94%, 67%);
  --light-yellow: hsl(50, 90%, 95%);
  --blue: hsl(210, 90%, 45%);
  --red: hsl(0, 82%, 45%);

  /* typography */
  --font-main: 'Neutraface';
  --font-main-bold: 'Neutraface Bold';
  --font-secondary: 'Open Sans';

  /* scale */
  --ratio: 1.16;
  --s-5: calc(var(--s-4) / var(--ratio));
  --s-4: calc(var(--s-3) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-1: calc(var(--s0) / var(--ratio));
  --s0: 1rem;
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --s4: calc(var(--s3) * var(--ratio));
  --s5: calc(var(--s4) * var(--ratio));
  --s6: calc(var(--s5) * var(--ratio));
  --s7: calc(var(--s6) * var(--ratio));
  --s8: calc(var(--s7) * var(--ratio));
  --s9: calc(var(--s8) * var(--ratio));

  /* dimensions */
  --margin: 3vw;
  --spacing-big: 15vmin;
  --spacing-medium: 8vmin;

  /* animations */
  --fast: 150ms;
  --medium: 300ms;
  --slow: 500ms;

  --scrollbar-width: 6px;
  --sl-focus-ring: solid 1px var(--black);
}

html,
body,
figure {
  margin: 0;
}

body {
  font-family: var(--font-secondary);
  color: var(--black);
  scroll-behavior: smooth;
  text-rendering: optimizeSpeed;
  background: var(--white);
  scrollbar-width: var(--scrollbar-width);
  scrollbar-color: var(--white) var(--grey);
}

@view-transition {
  navigation: auto;
}

:focus:not(:focus-visible) {
  outline: 0;
}

:focus-visible {
  outline: 1px solid var(--black);
  outline-offset: 2px;
}

main {
  animation: fadeInAnimation ease var(--fast);
  animation-iteration-count: 1;
}

main::before {
  content: "";
  display: block;
  height: var(--s2);
  margin-top: calc(var(--main-padding-top) * -1px);
  pointer-events: none;
  visibility: hidden;
}

*::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

*::-webkit-scrollbar-track {
  background: var(--white);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--grey);
  cursor: pointer;
}

p {
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: normal;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

picture {
  display: block;
}

figcaption {
  font-size: var(--s-1);
  margin-block-start: var(--s-4);
}

iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

a {
  text-decoration: none;
  color: inherit;
}

p a {
  text-decoration: underline;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  border: none;
  color: inherit;
  background: none;
  padding: 0;
}

button:hover {
  cursor: pointer;
}

button[disabled]:hover {
  pointer-events: none;
}

svg {
  display: block;
}

svg:not([fill]) {
  fill: inherit;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

input,
textarea,
button,
select,
a {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

::selection {
  background: var(--yellow);
}

::-moz-selection {
  background: var(--yellow);
}

#pixel-to-watch {
  position: absolute;
  width: 1px;
  height: 1px;
  top: 12vh;
  left: 0;
}

#notice {
  background: var(--white);
  border: 1px solid var(--black-medium);
  position: fixed;
  left: var(--margin);
  right: var(--margin);
  bottom: var(--s2);
  z-index: 10000;
  max-width: 76ch;
  display: flex;
  opacity: 1;
  transition: opacity var(--fast) ease;
}

#notice .content {
  color: var(--black);
  width: 100%;
  padding: var(--s0);
}

#notice .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#notice .content > * + * {
  margin-top: var(--s-2);
}

#notice p {
  font-size: var(--s0);
}

#notice .close {
  stroke: var(--black);
}

#notice.closed {
  opacity: 0;
  visibility: hidden;
}

#notice .image {
  display: none;
  flex: 0 0 30%;
}

#notice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#notice .notice-button {
  --background: var(--background);

  font-size: var(--s0);
  text-transform: uppercase;
  letter-spacing: -0.05em;
  background: var(--background, --yellow);
  display: inline-block;
  padding: var(--s-2) var(--s0);
  margin-block-start: var(--s0);
  transition: all var(--fast) ease;
}

#notice .notice-button:hover {
  color: var(--white);
  background: var(--black);
}

.marquee-container {
  position: fixed;
  bottom: 0;
  z-index: 10000;
  width: 100%;
  padding: var(--s-4) var(--s0);
  background: var(--yellow);
}

.marquee {
  --gap: var(--s3);

  display: flex;
  gap: var(--gap);
  overflow: hidden;
  user-select: none;
}

.marquee[data-playing="true"] .part {
  display: flex;
  animation: marquee-scroll 25s linear 3s infinite;
}

.marquee[data-playing="false"] {
  justify-content: center;
}

.marquee .part {
  display: flex;
  flex-shrink: 0;
  gap: var(--gap);
}

.marquee .part[data-visible="false"] {
  display: none;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}

@media (hover: hover) {
  body.nav-open {
    padding-inline-end: 6px;
  }

  .sl-scroll-lock sl-drawer::part(panel) {
    right: var(--scrollbar-width);
  }
}

@media (min-width: 824px) {
  :root {
    --ratio: 1.2;
    --margin: calc(3vw + var(--s1));
  }

  #notice .image {
    display: block;
  }
}
