@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;600&display=swap");

/* Visually hidden (accessible) utility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Reset default body margin and ensure full-height layout */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background-color: #f6f6f6; /* ensure light gray shows through */
}

/* Start screen overlay */
.start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.start-button {
  background-color: #f6f6f6;
  color: #161616;
  border: 2px solid #161616;
  border-radius: 50%;
  width: clamp(140px, 50vw, 140px);
  aspect-ratio: 5 / 2;
  font-family: "Inconsolata", monospace;
  font-size: clamp(18px, 3.2vw, 20px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-button:hover {
  background-color: #161616;
  color: #f6f6f6;
}

.start-button:focus {
  outline: 2px solid #161616;
  outline-offset: 2px;
}

/* Hidden content initially */
.hidden {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

/* Logo fixed at top-left */
.navbar {
  position: fixed;
  top: 0%;
  left: 0%;
  z-index: 10;
}
.logo {
  display: inline-block;
  padding: 0.2rem 0.8rem; /* small inset around the logo */
}
.logo img {
  width: clamp(35px, 8.5vw, 40px);
  height: clamp(61px, 15vw, 70px);
  display: block;
}

/* Hero section centers nav-links */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Background video covers the entire viewport */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1; /* behind content */
  opacity: 1; /* simple white effect via page background */
  /* Ensure video loads and plays even when parent is hidden */
  visibility: visible !important;
}

/* Centered nav links styling */
.nav-links {
  display: flex;
  gap: clamp(0.75rem, 6vw, 15rem);
  z-index: 1;
  /* fade in after 200ms, linear */
  opacity: 0;
  flex-wrap: nowrap;
  justify-content: center;
}

/* Animation class applied when content becomes visible */
.nav-links.animate-in {
  animation: aboutFadeIn 200ms ease 300ms forwards;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #161616; /* fill black */
  border: 2px solid #161616; /* black outline */
  color: #f6f6f6; /* text white */
  border-radius: 50%; /* circle */
  width: clamp(90px, 42vw, 400px); /* responsive circle width */
  aspect-ratio: 7 / 2; /* keep it a circle */
  text-decoration: none;
  font-family: "Inconsolata", monospace;
  font-size: clamp(20px, 5vw, 24px);
  line-height: 1.1;
  white-space: nowrap; /* keep single line */
  margin: 0 50px;
}

/* Optional: footer spacing removed when visually hidden */
footer.visually-hidden {
  display: block; /* keep in DOM for SEO */
}

/* Artwork submenu layout */
.artwork-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.artwork-menu .submenu-group {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: clamp(170px, 30vw, 260px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms linear;
  z-index: 2;
}
.artwork-menu .submenu-group a {
  width: 90%; /* match group width clamp */
  aspect-ratio: 7 / 2;
  /* Slightly smaller text than main circles */
  font-size: clamp(16px, 2vw, 18px);
  background-color: #191919; /* softer dark for submenu */
  border-color: #191919; /* match border to background */
}
/* Only enable hover-triggered submenu on devices that actually support hover */
@media (hover: hover) and (pointer: fine) {
  .artwork-menu:hover .submenu-group {
    opacity: 1;
    pointer-events: auto;
  }
}
/* Keep submenu visible when JS toggles 'open' */
/* Keep submenu visible when JS toggles 'open' */
.artwork-menu.open .submenu-group {
  opacity: 1;
  pointer-events: auto;
}
.artwork-menu .submenu-group.top {
  bottom: calc(100% + 1.5rem);
}
.artwork-menu .submenu-group.bottom {
  top: calc(100% + 1.5rem);
}

/* About page circular container */
.about-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #161616;
  color: #f6f6f6;
  border: 2px solid #161616;
  border-radius: 50%;
  width: clamp(700px, 80vw, 850px);
  aspect-ratio: 5 / 2;
  padding: 1.5rem;
  font-family: "Inconsolata", monospace;
  opacity: 0; /* start hidden */
  will-change: opacity, transform;
  animation: aboutFadeIn 200ms ease 300ms forwards;
}
.about-content {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 80%;
  max-height: 80%;
  line-height: 1.4;
  font-size: clamp(14px, 2vw, 16px);
  text-align: center; /* center the about text */
}
.about-content p {
  margin: 0 0 1rem 0;
}
.about-close {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #f6f6f6;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
}
.about-close:focus-visible {
  outline: 2px solid #f6f6f6;
  outline-offset: 2px;
}

/* Fade-in animation for about circle */
@keyframes aboutFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1200px) {
  .nav-links a {
    margin: 0;
  }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .navbar {
    position: absolute;
  }

  .nav-links a {
    aspect-ratio: 6 / 2;
  }

  .logo {
    display: none;
  }

  .artwork-menu .submenu-group a {
    aspect-ratio: 6 / 2;
  }
}

@media (max-width: 640px) {
  .about-circle {
    aspect-ratio: 10 / 5;
  }
}

@media (max-width: 530px) {
  .about-circle {
    aspect-ratio: 10 / 7;
  }
}

@media (max-width: 460px) {
  .about-circle {
    aspect-ratio: 10 / 9;
  }
}

@media (max-width: 415px) {
  .about-circle {
    aspect-ratio: 10 / 12;
  }
}

@media (max-width: 380px) {
  .about-circle {
    aspect-ratio: 10 / 15;
  }
}

/* Accessibility: respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .about-circle {
    animation: none;
    opacity: 1;
  }
  .nav-links {
    animation: none;
    opacity: 1;
  }
}
