:root {
  --border: 1.5px solid red;
  --orange: rgb(207, 125, 37);
  --grey: rgb(67, 67, 67);
}

@font-face {
  font-family: 'MataNui';
  src: url('mata-nui.woff2') format('woff2'),
    url('mata-nui.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}


main {
  position: relative;
  width: 70vw;
  margin: 0 auto;
  z-index: 10;
}

@media (max-width: 900px) {
  main {
    width: 90vw;
  }
  
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  scroll-behavior: smooth;
  background-color: rgb(67, 67, 67);
  font-family: "Orbitron", sans-serif;
  font-weight: 500;
  font-size: 16px;
}

h1 {
  font-family: "Staatliches", sans-serif;
  text-transform: uppercase;
  color: var(--orange);
  text-align: center;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin: 20px 5%;
}

h2 {
  color: var(--orange);
  text-align: left;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin: 20px 0;
}

h3 {
  color: white;
  text-align: center;
}

p {
  color: white;
  font-size: 1em;
  text-align: left;
}

.section-divider {
  border: none;
  height: 2px;
  background-color: #898989;
  width: 85vw;
  margin: 0 auto;
  margin-top: 10px;
  margin-bottom: 10px;
}
/* PAGE TRANSITIONS */
/* 
.fade-target {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in {
  opacity: 1;
}

.fade-out {
  opacity: 0;
} */



/* --------------HEADER STUFF-------------- */

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: black;
  padding: 5px;
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-wrap: nowrap;
}

.logo img {
  width: 35px;
  float: left;
  height: auto;
  margin-right: 15px;
}

.header.scrolled {
  background-color: var(--orange);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);

}

.header a {
  float: left;
  color: white;
  text-align: center;
  text-decoration: none;
  text-wrap: nowrap;
}

.header {
  transition: background-color 0.3s ease;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.head-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

/* _______MOBILE_______ */
.menu {
  list-style-type: none;
  display: flex;
}

.menu li {
  padding: 7px 10px;
}

.menu li a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(.9rem, 2vw, 1rem);
  transition: color 0.3s ease;
  width: 100%;
  padding: 5px;
}

.menu li a:hover {
  color: rgb(255, 193, 87);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.line {
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px;
  transition: transform 0.3s ease;
}
@media (max-width: 900px) {
  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .menu.active {
    display: flex;
  }

  .hamburger {
    display: block;
    left: 0;
    padding: 5px;
  }

  .hamburger.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .line:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ____________HERO SECTIONS____________ */

.hero-wrapper {
  position: relative;
}

.hero {
  position: relative;
  max-height: 50vh;
  overflow: hidden;
}

.hero img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

@media (min-width: 1400px) {
  .hero img {
    transition: transform 1s ease;
    transform: translateY(-10%);
  }

}

/* Concentric Circles */
/* .grey-circle {
  position: absolute;
  width: 130px;
  height: 130px;
  background-color: rgb(67, 67, 67);
  clip-path: circle(50% at 50% 50%);
  left: 50%;
  bottom: -70px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.rings {
  position: relative;
  width: 100%;
  height: 100%;
}

.rings img{
  position: absolute;
  width: 100%;
}

#ring1 {
  animation: spin-left 4s linear infinite;
}

#ring2 {
  animation: spin-right 2s linear infinite;
}

#ring3 {
  animation: spin-left 25s linear infinite;
}

#ring4 {
  animation: spin-right 10s linear infinite;
}


@keyframes spin-right {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


@keyframes spin-left {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
} */

.hex {
  width: 100vw;
  height: 50vh;
  position: absolute;
}

.hex-grey {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='29' height='50.115' patternTransform='scale(1) rotate(30)'><rect x='0' y='0' width='100%' height='100%' fill='%232b2b3100'/><path d='M14.498 16.858L0 8.488.002-8.257l14.5-8.374L29-8.26l-.002 16.745zm0 50.06L0 58.548l.002-16.745 14.5-8.373L29 41.8l-.002 16.744zM28.996 41.8l-14.498-8.37.002-16.744L29 8.312l14.498 8.37-.002 16.745zm-29 0l-14.498-8.37.002-16.744L0 8.312l14.498 8.37-.002 16.745z'  stroke-width='3' stroke='%233f3f3fff' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>")
  }

.hex-fade {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30%; /* controls fade height */
  background: linear-gradient(to bottom, transparent, rgb(67, 67, 67));
  pointer-events: none;
}


.head-group {
  position: relative;
  z-index: 2;
}
/* ___________________ HOME ___________________ */
  .featuredvideos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* Switch straight to 1 column below 900px wide */
  @media (max-width: 900px) {
    .featuredvideos {
      grid-template-columns: 1fr;
    }
  }

  .video-card {
    padding: 1rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
  }

  .video-card h1 {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    text-wrap: nowrap;
  }

  .video-card p {
    text-align: center;
  }

  .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    margin: 15px 0;
  }

  .video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

/* ________________ SUPPORT ________________ */

.support-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.support-options > div {
  width: 40vw;
  max-width: 500px;
  padding: 20px;
}

.support-options img {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .support-options>div {
    width: 100%;
  }
}

/* ___________________ WATCH ___________________ */

.watch-container {
  display: flex;
  justify-content: center;
  aspect-ratio: 16 / 9;
}

.watch-container iframe {
  width: 100%;
  height: 100%;
}


/* ___________________ TALES ___________________ */


.chronicler {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.chronicler-img img {
  object-fit: contain;
  max-width: 300px;
  height: auto;
}

.chronicler p {
  flex: 1;
  max-width: 50em;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .chronicler {
    flex-direction: column;
    text-align: center;
  }

  .chronicler img {
    width: 50%;
    max-width: 200px;
  }

  .chronicler p {
    padding: 1rem;
  }
}

.tales-entries a {
  text-decoration: none;
  color: var(--orange);
}

.tales-entries p {
  margin: 15px;
}

.tales-entries button {
  color: black;
  padding: 10px 50px;
  font-size: 1em;
  display: block;
  margin: 0 auto;
}

/* _____________Story Modals_____________ */

.modal-page {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(0, 0, 0);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-page:target {
  display: flex;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 2px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 90px rgba(230, 145, 57, 0.5);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  background-color: black;
  scrollbar-color: #666 #111;
  margin-top: 1.5em;
}

.texture {
  background-image: url(Images/dots.png);
  background-size: contain;
  background-repeat: no-repeat;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 60px 30px black inset;
}

.modal-controls {
  border: .7px solid var(--orange);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 1em;
  left: 1em;
  align-items: center;
  background: transparent;
  border-radius: 12px;
  padding-bottom: .5em;
  max-width: 3%;
  margin-bottom: -5em;
}

#play-btn, #close, #top-btn {
  width: 1.5em;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

#top-btn {
  margin-top: 1em;
  clip-path: polygon(52.68% 0.25%, 98.34% 48.98%, 70.25% 48.98%, 70.25% 87%, 35.13% 87%, 35.13% 48.98%, 7.03% 48.98%);
  background-color: var(--orange);
  border: none;
}

.close-btn {
  color: var(--orange);
  text-decoration: none;
  font-size: 2.5em;
}

.audio-btn {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  border: none;
  background-color: transparent;
  width: 2em;
  height: 2em;
}

.audio-btn.play-btn {
  background-image: url(Images/play-btn.svg);
}

.audio-btn.pause-btn {
  background-image: url(Images/pause-btn.svg);
}


.close-btn:hover, .close-btn:focus-visible {
  color: #ffaa4d;
}



.modal-content::-webkit-scrollbar-track {
  background: #111;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 6px;
  border: 3px solid #111;
}

@media (max-width: 900px) {
  .modal-controls {
    left: .2em;
    top: .2em;
    max-width: 2.5em;
  }

  .modal-content {
    max-width: 97vw;
  }
}

/* Story text styles */

.story-head {
  padding: 0 2em 0 5em;
  align-self: center;
}

.story-text {
  padding: 0 2em 0 5em;
}

@media (max-width: 900px) {
  .story-head {
  padding: 0 1em 0 3em;
}

  .story-text {
    padding: 0 1em 0 3em;
  }
}

.story-text span,
.story-text p {
  color: rgba(255, 255, 255, 0.829);
  font-weight: 500;
  letter-spacing: 1.3px;
  line-height: 1.6;
  margin-bottom: 1em;
  margin-top: 1em;
}

.story-text span.speech {
  color: white;
}

.story-text span.thought {
  font-style: italic;
  font-weight: 100;
}

.story-text span.sound {
  font-weight: 200;
  font-family: monospace;
  letter-spacing: 0.05em;
}

.chroniclers-note {
  font-style: italic;
  margin: 1em 0;
  text-align: center;
  opacity: .7;
}

.indent {
  margin-left: 4em;
}

.letter p {
  margin-left: 2em;
  opacity: 1;
}

h4 {
  padding: .5em 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.555);
}

.text-center {
  text-align: center;
}

.text-dots {
  text-align: center; 
  margin: 2em 0;
}

.space-break {
  margin: 4em 0;
}


/* ____________THE GAME____________ */
.game-container {
  position: relative;
  border: 1px solid gray;
  height: 70vh;
  padding: 40px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: var(--grey);
}

.game-container button {
  margin: 20px;
  padding: 10px;
}

.scenes {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  inset: 0;
  padding: 60px;
  box-sizing: border-box;
  overflow-y: auto;
  pointer-events: none;
}

.scenes.visible {
  opacity: 1;
  pointer-events: auto;
}


/* ___________________ ENCYCLOPEDIA ___________________ */

.encyclopedia {
  display: flex;
  position: relative;
}

.encyclopedia a {
  color: var(--orange);
}

.name-list {
  flex: 0 0 auto;
}

.name-list h1 {
  text-align: left;
}

.name-list a {
  display: block;
  padding: 10px 30px;
  color: var(--orange);
}

.info-section {
  flex: 1;
  background-color: var(--grey);
  border: 2px solid rgb(135, 135, 135);
  box-shadow: 0 4px 90px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  transition: border 0.9s ease, box-shadow 0.9s ease;
  padding: 2rem;
}

/* When no div selected */
.info-section > div {
  display: none;
  scroll-margin-top: 220px;
  height: 100%;
}
/* When a div selected */
.info-section div:target {
  display: flex;
}

.info-text {
  flex: 3;
}

.info-img {
  flex: 1;
}

.info-img img {
  position: sticky;
  max-width: 15rem;
  top: 10rem;
}

.info-section h2 {
  padding: 20px;
  text-decoration: none;
}

.info-section:has(> div:target) {
  animation: glowingBorder 2s ease-out forwards;
}

.back-button {
  display: none;
}

/* Mobile */

@media (max-width: 900px) {

  .name-list {
    transition: opacity 0.4s ease;
  }

  .info-section {
    display: none;
    flex-direction: column;
    position: absolute;
  }

  .info-section > div:target {
    flex-direction: column-reverse;
  }

  .info-section:has(> div:target) {
    animation: glowingBorder .5s ease-out forwards;
    display: flex;
}

  .back-button {
  display: block;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: #333;
  color: var(--orange);
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.2em;
}
}

@media (min-width: 901px) {
  .back-button {
    display: none !important;
  }
}

/* Animation */

@keyframes glowingBorder {
  0% {
    border: 2px solid gray;
    box-shadow: 0 4px 90px rgba(0, 0, 0, 0.5);
    opacity: 0;
  }

  10% {
    border: rgb(255, 132, 0);
    ;
    box-shadow: 20px 20px 80px 80px rgb(255, 132, 0);
  }

  100% {
    border: rgb(230, 145, 57);
    box-shadow: 0 4px 90px rgba(0, 0, 0, 0.4);
    opacity: 1;
  }
}


#imersive {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  z-index: 1000;
}

#imersive:target {
  display: block;
}

.imer-background {
  width: 100%;
  height: auto;
  object-fit: contain;
}


.close-imer {
  position: fixed;
  padding: 10px;
  top: 40px;
  left: 20px;
  width: 2rem;
  height: auto;
  font-size: 3rem;
  color: var(--orange);
  text-decoration: none;
  clip-path: circle(50%);
}
/* ___________________ HIRING ___________________ */

.join > div {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
}

.join img,
.join video {
  flex: 1 1 300px;
  max-width: 400px;
  max-height: 400px;
  height: auto;
  object-fit: contain;
}

.join-text {
  flex: 2 1 400px;
  display: flex;
  flex-direction: column;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.6;
  height: fit-content;
}

.join-text h2 {
  margin-bottom: 10px;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

@media (max-width: 768px) {
  .join>div {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.join a {
  text-decoration: none;
  color: var(--orange);
  text-decoration: underline;
}

/* ___________________ ABOUT ___________________ */

.about p {
  padding: 15px;
}

.the-show {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.the-show img {
  flex: 1 1 300px;
  max-width: 400px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.the-show p {
  flex: 2 1 400px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .the-show {
    flex-direction: column;
    text-align: center;
  }

  .the-show img {
    max-width: 90%;
  }

  .the-show p {
    padding: 0 1rem;
  }
}

.staff {
  padding-left: 10%;
  line-height: 1.6;
}

/* ___________________ FOOTER STUFF ___________________ */
footer {
  color: var(--orange);
  text-align: center;
  padding: 1.5rem 1rem;
  font-family: 'Orbitron', sans-serif;
  position: relative;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 1;
  color: var(--orange);
  margin-top: 10px;
}

.links a {
  color: var(--orange);
  text-decoration: underline;
  font-weight: bold;
  transition: color 0.3s;
  white-space: nowrap;
}

.links a:hover {
  color: #ffaa4d;
}


.links::after,
.links::before {
  content: '';
}

.links a:not(:last-child)::after {
  content: '|';
  margin-left: 0.5rem;
  color: var(--orange);
}

footer p {
  margin: 30px;
  text-align: center;
  color: gray;
}
