:root {
  --fs-1: 1.125rem;
  --fs-2: 2.25rem;
  --fs-3: 4.5rem;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Jost Variable", Futura, sans-serif;
  font-variant-ligatures: normal;
  font-feature-settings: "ss01" on;
  font-weight: 300;
  color: #000;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #ffffff;
  overflow-x: hidden;
  font-size: var(--fs-1);
  user-select: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  align-items: center;
}
html,
body {
  overscroll-behavior-y: none;
}
a {
  text-decoration: none;
  color: #000000;
}
a:hover,
a:active,
li:hover {
  text-decoration: line-through;
}
h1,
h2,
h3 {
  font-weight: 500;
}
h1 {
  font-size: var(--fs-3);
  line-height: 1.2;
}
h2,
h3 {
  font-size: var(--fs-2);
}
p {
  line-height: 1.4;
}
b {
  font-weight: 400;
}
section,
main {
  max-width: 80vw;
  margin: 0 auto;
}
section:last-of-type {
  padding: 0 0 10vh 0;
}
ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
ul li {
  list-style-type: none;
  list-style-position: inside;
}
.flex--column {
  display: flex;
  flex-direction: column;
}
.small-caps {
  font-variant: all-small-caps;
  letter-spacing: 1px;
}
.anchor {
  position: absolute;
  transform: translateY(-5vh);
}
.heart-cursor {
  cursor:
    url("data:image/svg+xml,%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3C!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools --%3E%3Csvg fill='%23ff0000' width='22px' height='22px' viewBox='0 0 1920 1920' xmlns='http://www.w3.org/2000/svg' stroke='%23ff0000'%3E%3Cg id='SVGRepo_bgCarrier' stroke-width='0'/%3E%3Cg id='SVGRepo_tracerCarrier' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cg id='SVGRepo_iconCarrier'%3E%3Cpath d='M1771.731 291.037C1675.709 193.659 1547.944 140 1411.818 140h-.113c-136.125 0-263.777 53.66-359.573 150.924-37.618 38.07-68.571 80.997-92.294 127.426-23.61-46.429-54.563-89.356-92.068-127.313C771.86 193.659 644.208 140 507.97 140h-.113c-136.012 0-263.777 53.66-359.8 151.037-197.691 200.629-197.691 527.103 1.695 729.088l810.086 760.154 811.893-761.736c197.692-200.403 197.692-526.877 0-727.506' fill-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E"),
    pointer;
}
.border-img {
  border: 1px #000 solid;
}

/* ------------ NAV -------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  top: 0;
  min-width: 80vw;
  padding-top: 3vh;
  justify-self: center;
}
.nav-title {
  font-weight: 400;
}
.nav div a {
  padding: 0.5rem;
}
.nav-about-link::after {
  content: "";
  position: absolute;
  margin-top: 0.2rem;
  margin-left: 0.1rem;
  width: 0.6rem;
  height: 0.6rem;
  background-color: #ff0000;
  opacity: 0.7;
  border-radius: 50%;
}
.nav-about-link:hover::after {
  opacity: 1;
}

/* ------------ HOME PAGE -------------- */

.hero {
  margin: auto 0;
}
.hero ul {
  min-height: fit-content;
  display: grid;
  grid-template-columns: 1fr 3fr;
  row-gap: var(--fs-2);
}

.hero ul li {
  grid-column: 1;
}
.hero ul li a {
  display: flex;
  gap: var(--fs-3);
}
.hero ul li a div p:first-child {
  font-weight: 400;
}
.hero ul li a > p:first-of-type {
  letter-spacing: 0.5px;
}
.hero-img {
  opacity: 0;
  transform: scale(0.8);
  position: fixed;
  display: flex;
  max-height: 70vh;
  max-width: 40vw;
  right: 10vw;
  top: 15vh;
  bottom: 15vh;
  margin: auto;
  /* transition: opacity 0.2s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.1s;
  z-index: 2;
}
.hero ul li:hover + .hero-img {
  opacity: 1;
  transform: scale(1);
}

/* ------------ ARCHIVE PAGE -------------- */

.archive-hero {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 90vh;
  justify-content: end;
  align-content: center;
}
.archive-top {
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  height: 0.4rem;
  width: 80vw;
  background-color: #000000;
  /* margin-bottom: -1px; */
  border-top: 2px solid #000000;
  display: none;
}
.archive-links-container {
  transform: translate3d(0, 0, 0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 80vw;
  padding-bottom: 3rem;
  border: 1px solid black;
  -webkit-transform: perspective(40vw) rotateX(5deg) scale(0.97);
}
.archive-front-container {
  transform: translate3d(0, 0, 0);
  transform: translateZ(0);
  backface-visibility: hidden;
  margin-top: -1.5rem;
  -webkit-transform: perspective(40vw) rotateX(-10deg) scale(1);
}
.archive-front-top {
  height: 1rem;
  width: 80vw;
  background-color: #ffffff;
  border: 1px solid black;
  border-bottom: none;
  -webkit-transform: perspective(40vw) rotateX(15deg) scale(0.997);
}
.archive-front {
  height: 10vh;
  width: 80vw;
  background-color: white;
  z-index: 99;
  border: 1px solid black;
  border-bottom: 0;
}

.archive-link {
  display: flex;
  flex-direction: column;
  width: 79vw;
  margin: 0 auto;
  -webkit-transform: perspective(40vw) rotateX(-15deg);
}
.archive-tag-container,
.archive-tag-small,
.archive-tag {
  min-width: 180px;
  max-width: 15%;
}
.archive-link .archive-tag-container {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.archive-link .archive-tag-container:hover .archive-tag,
.archive-link .archive-tag-container:hover .archive-tag-small,
.archive-link .archive-tag-container:hover .archive-tag-small + .archive-tag-year,
.archive-link .archive-tag-container:hover + .line {
  transform: translateY(-2rem);
}
.line {
  height: 2px;
  background: black;
}
.line-empty {
  height: 1px;
  margin-top: 3rem;
}
.archive-link a {
  margin-top: 1rem;
}
#archive-link-2025 {
  margin-left: 2%;
}

#archive-link-2024 {
  margin-left: 5rem;
  z-index: 5;
}
#archive-link-empty {
  margin-left: 8rem;
  z-index: 5;
}
.archive-item a:hover {
  text-decoration: none;
}
.archive-sheets-container {
  /* display: none; */
  opacity: 0;
  position: fixed;
  left: 0;
  bottom: -100%;
}

.archive-sheets-container.visible {
  opacity: 1;
  display: flex;
  flex-direction: column;
  gap: 10vh;
  position: relative;
  margin-top: 10vh;
}
.loader {
  align-self: center;
  z-index: 99;
  background-color: #fff;
  width: 1.2rem;
  height: 1.2rem;
  background: #000;
  border-radius: 50%;
  margin-bottom: 50%;
  transform: translateY(-50%);
  animation: terminal-blink 1s steps(1, end) infinite;
}

@keyframes terminal-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.2;
  }
}

.archive-tag-container {
  position: relative;
  max-height: 2rem;
  max-width: 15%;
  min-width: 180px;
}
.archive-tag {
  background: #181818;
  max-height: 2rem;
  max-width: 15%;
  min-width: 180px;
  height: 2rem;
  clip-path: polygon(0 100%, 0 30%, 7% 0, 93% 0, 100% 30%, 100% 100%);
}
.archive-tag-small {
  position: absolute;
  background: white;
  width: auto;
  height: auto;
  top: 2px;
  left: 0px;
  right: 0px;
  bottom: -5px;
  clip-path: polygon(0 100%, 0 30%, 7% 1%, 93% 1%, 100% 30%, 100% 100%);
  scale: 0.99;
  z-index: 3;
}
.archive-tag-year {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-weight: 400;
  z-index: 4;
}
/* .archive-tag-year .zero {
  font-weight: 400;
} */

.archive-item-container {
  border-top: 3px solid #181818;
  border-right: 1px solid #181818;
  border-bottom: 1px solid #181818;
  border-left: 1px solid #181818;
}
.archive-item {
  width: 24.8%;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}
.archive-img {
  width: 100%;
}
#archive-tag-container-2025 {
  justify-self: start;
  margin-left: 2%;
}
#archive-item-container-2025 {
  width: 80vw !important;
}
#archive-tag-container-2024 {
  justify-self: start;
  margin-left: 7%;
}
#archive-item-container-2024 {
  width: 80vw !important;
}

/* ------------ ABOUT PAGE -------------- */

.about {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  justify-content: end;
  margin-left: 10vw;
}
.about-text {
  max-width: 40vw;
}

/* ------------ 404 PAGE ---------------- */
.not-found {
  min-height: 100%;
  flex-grow: 1;
  display: flex;
  align-items: end;
  margin-left: 10vw;
  padding: 0;
  transform: translateY(3.4rem);
}
.not-found-title {
  font-weight: 500;
  font-size: 10rem;
}
.not-found-container {
  height: 7rem;
  margin-bottom: 3.5rem;
  margin-left: 1rem;
  border-left: 2px solid #000000;
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.not-found-text {
  padding-left: 1rem;
}
/* ------------ PROJECT ------------------ */

.project-container {
  display: grid;
  width: 80vw;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 10vh auto;
  column-gap: 2.5vw;
  align-content: space-between;
  justify-content: space-between;
  margin-top: 21vh;
  margin-bottom: 10vh;
  border: 1px solid #000;
  padding: 2.5vw;
}
.project-title {
  font-size: 8vw;
  margin-top: -0.5vw;
  grid-column: 1 / 3;
  line-height: 1;
}
.project-desc-container {
  grid-column: 3;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  text-align: end;
  align-self: end;
}
.project-team {
  grid-column: 3;
  text-align: end;
}
.project-parts {
  grid-row: 3;
  grid-column: 2;
  border-left: 1px solid #000;
  padding-left: 2.5vw;
}

.project-concept {
  grid-row: 3;
  grid-column: 1;
  /* text-align: end; */
}
.project-img-container {
  display: flex;
  flex-direction: column;
  gap: 10vh;
  width: 80vw;
}
.project-img,
.project-split-img {
  width: 80vw;
}
.project-split-img {
  display: flex;
  flex-direction: row;
  gap: 10vh;
}
.project-split-img img {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ------------ FOOTER ------------------ */

footer {
  padding: 0 10vw 1.5rem 10vw;
  gap: 2rem;
  width: 100%;
}
footer a {
  color: #ffffff;
}
.made-with-love:hover {
  color: rgb(243, 0, 0);
  text-decoration: none;
}
.footer-license {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.license-icons {
  display: flex;
  gap: 0.2rem;
  justify-content: center;
}

.license-icons img {
  opacity: 95%;
  width: 1rem;
}

/* ------------ Gerador de Constelações ------ */

.constellation-panel-container {
  display: flex;
  align-items: left;
  gap: 1rem;
}
.constellation-panel-container h3 {
  display: none;
}
.constellation-panel-description h3 {
  display: block;
}
.constellation-panel-description {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.constellation-panel-btns {
  margin-top: -1.25rem;
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.btn-action {
  background: #fff;
  border: 1px solid #000;
  padding: 0.5rem 1rem;
  font-size: var(--fs-1);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action:hover {
  transform: translateY(-3px);
}

.canvas-wrapper {
  width: 100%;
  max-width: 25vw;
  border: 1px solid #000;
  background-color: #fff;
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
}

#skyCanvas {
  width: 100%;
  height: auto;
  display: block;
}

/* -------------- Cronometro ------------*/

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  color: white;
}

#time-display {
  color: #fff;
  font-weight: 400;
  margin-bottom: -0.3rem;
}
#btn-start-timer,
#btn-spin {
  width: 180px;
  text-align: center;
  display: inline-block;
  border-radius: 20px;
}

.dot,
#btn-open-timer,
#btn-open-roller {
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#btn-time-minus,
#btn-time-plus {
  transition: opacity 1s ease;
}
.btn-close {
  position: fixed; /* Muda de absolute para fixed para ancorar na tela do navegador */
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: white;
  font-size: 3rem; /* Aumentado levemente para melhorar a área de toque no celular */
  cursor: pointer;
  line-height: 1;
  z-index: 10000; /* Garante que fique acima de tudo */
  transition: color 0.2s ease;
  font-weight: 250;
}

.btn-close:hover {
  color: #888; /* Feedback visual sutil ao passar o mouse */
}

/* A Grade de Pontos */
.dot-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: white;
  transition: background-color 0.5s ease;
}

.dot.spent {
  background-color: #111; /* Quase preto para sumir no fundo, mas manter uma leve textura */
}

/* Controles de Tempo */
.timer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: monospace;
  font-size: 1.5rem;
}

.time-adjust {
  background: none;
  border: 1px solid #000;
  color: white;
  padding: 0.2rem 0.8rem;
  cursor: pointer;
  font-size: 1.2rem;
}

.btn-start {
  background: white;
  color: black;
  border: none;
  padding: 0.8rem 2rem;
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
}

/* ----------------- Roleta ---------- */

/* ==========================================================================
   Módulo: Roleta Minimalista (2D6)
   ========================================================================== */

.roller-content {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* O círculo fixado exatamente na borda esquerda (left: 0) */
.roller-container {
  position: absolute;
  top: 50%;
  left: 0;
  width: 130vw; /* O raio será de 65vw, passando um pouco do meio da tela */
  height: 130vw;
  transform: translate(-50%, -50%); /* Centraliza o eixo X exatamente na borda */
  pointer-events: none;
}

/* A roda com a nova curva de tensão */
.roller-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #222; /* Borda bem sutil */
  /* Curva ajustada: Início menos abrupto (0.25) e final agonizante (0.1, 1) durando 7 segundos */
  transition: transform 7s cubic-bezier(0.25, 0.1, 0.05, 1);
}

.roller-number {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: "Jost", sans-serif;
  font-size: 3.5rem; /* Um pouco maior para preencher melhor a tela */
  font-weight: 700;
  color: #333;
  transition: color 0.3s ease;
  transform-origin: center;
}

/* O indicador ajustado para alinhar com a nova roda */
.roller-indicator {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  background-color: #333;
  border-radius: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* O botão fixado embaixo */
.btn-spin-bottom {
  position: absolute;
  bottom: 10vh; /* Fica a 10% da borda inferior da tela */
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Garante leitura sobre a linha da roda */
}
