:root {
  --font-family: "Cardo", sans-serif;
  --font-style: italic;

  --font-size-base: 3rem;
  --font-size-mobile: 1rem;
  --font-size-heading: 3rem;
  --font-size-heading-mobile: 1.5rem;
  --font-size-tap: clamp(1rem, 2vw, 1.5rem);

  --line-height-base: 1.5;
  --line-height-body: 1.6;

  --footer-height: 5.5rem;

  --color-bg: white;
  --color-text: black;
  --color-link: black;
  --color-link-visited: black;
  --color-tap: red;

  --yellow: #ffe099;
  --blue: #99afff;
  --pink: #ff99f0;
}

* {
  box-sizing: border-box;
  font-family: var(--font-family);
  font-style: var(--font-style);
}

body {
  margin: 0;
  padding: 0 1rem 6rem;
  max-width: 100vw;

  display: grid;
  grid-template-columns: 1fr 3fr 1fr;

  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 2ch;
  font-size: var(--font-size-heading);
  font-weight: 200;
  line-height: 1.2;
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
}

a {
  color: var(--color-link);
  text-decoration: underline;
}

a:visited {
  color: var(--color-link-visited);
}

a:hover {
  text-decoration: none;
}

b {
  font-style: italic;
}

img {
  display: block;
  width: min(50%, 700px);
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
}

/* Header */
header {
  grid-column: 1 / -1;

  display: flex;
  align-items: baseline;
  justify-content: center;
  justify-self: center;

  width: 70vw;
  max-width: 100%;
  margin: 2em 0;

  font-size: var(--font-size-base);
  transform: translateX(-3vw);
}

#nav {
  flex: 1;
}

#nav ul {
  display: flex;
  align-items: baseline;

  width: 100%;
  margin: 0;
  padding: 0;

  list-style: none;
}

#nav ul li {
  margin-left: 2vw;
  margin-right: 2vw;
  font-size: var(--font-size-base);
}

#nav ul li:first-child {
  margin-right: auto;
}

#nav ul li:last-child {
  margin-right: 2vw;
}

/* Main */
main {
  grid-row: 2;
  grid-column: 1 / -1;

  position: relative;
  justify-self: center;

  width: 60vw;
  max-width: 100%;
  font-size: var(--font-size-base);
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  grid-column: 1 / 4;
  display: flex;
  align-items: center;

  height: var(--footer-height);
  margin: 0;
  padding: 0 1rem;

  background-color: var(--color-bg);
  font-size: var(--font-size-base);
}

/* Decorative sphere */
.sphere {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 30vw;
  height: 30vw;
  min-width: 180px;
  min-height: 180px;
  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 55%,
    rgba(255, 255, 255, 0.55) 60%,
    rgba(255, 255, 255, 0) 78%,
    rgba(255, 255, 255, 0) 100%
  );

  filter: blur(20px);
}

#tapText {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  color: var(--color-tap);
  font-size: var(--font-size-tap);
  font-style: italic;
  pointer-events: none;
}

audio {
  display: none;
}

/* Marquee */
.marquee {
  position: relative;
  overflow: hidden;

  width: 100vw;
  height: var(--footer-height);
  padding: 0.5rem;

  font-size: var(--font-size-base);
}

.marquee div {
  position: absolute;
  display: flex;

  width: 200%;
  height: 100%;
  overflow: hidden;

  animation: marquee 10s linear infinite;
}

.marquee span {
  width: 50%;
  float: left;
}

@keyframes marquee {
  0% {
    left: 0%;
  }

  100% {
    left: -100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    display: block;
    padding: 0 1rem 5rem;
    font-size: var(--font-size-mobile);
  }

  header {
    display: block;
    width: 100%;
    margin: 1rem 0 2rem;
    transform: none;
    font-size: var(--font-size-mobile);
  }

  #nav {
    width: 100%;
  }

  #nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    width: 100%;
  }

  #nav ul li {
    margin: 0;
    font-size: var(--font-size-mobile);
  }

  #nav ul li:first-child {
    margin-right: 0;
  }

  main {
    width: 100%;
    font-size: var(--font-size-mobile);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: var(--font-size-heading-mobile);
    line-height: 1.2;
  }

  p {
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-body);
  }

  img {
    width: 100%;
    margin: 1.5rem auto;
  }

  footer {
    position: fixed;
     bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    min-height: 5.5rem;
    padding: 1rem 0;
    font-size: var(--font-size-mobile);
  }

  .sphere {
    width: 60vw;
    height: 60vw;
    min-width: 0;
    min-height: 0;
    filter: blur(16px);
  }

  #tapText {
    width: 80vw;
    font-size: var(--font-size-mobile);
    text-align: center;
  }

  .marquee {
    height: 2.5rem;
    font-size: var(--font-size-mobile);
  }

  .marquee div {
    height: 2.5rem;
  }
}