html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}

body {
  background-color: #111;
  color: #eee;
  line-height: 1.6;
  text-align: justify;
}

/* Preloader container */
#preloader {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.loading-text {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Navbar */
.navbar {
  position: fixed;
  background-color: #222;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 1.2rem 0.5rem 2rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.navbar.hide {
  transform: translateY(-100%);
}

.nav-left img {
  height: 32px;
  width: auto;
  transition: all 0.3s ease;
  cursor: pointer;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-45deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.logo-rotate {
  animation: spin 0.4s ease-in-out;
}

.navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
}

.navbar a,
.dropdown-toggle {
  display: flex;    
  align-items: center;   
  padding: 0.5rem 1rem; 
  line-height: 1;
  background: none;
  border: none;
  color: #ccc;
  font: inherit;
  font-size: 0.8rem;          
  cursor: pointer;
  gap: 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.dropdown-toggle:hover,
.navbar a:hover {
  background: #222;
}

.dropdown.show .dropdown-toggle {
  background: #333;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: #222;
  border-radius: 0.5rem;
  border: 1px solid #333;
  min-width: 120px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 99;
  display: flex;
  flex-direction: column;      
  list-style: none;    
  margin: 0;
}

.dropdown-menu li {
  display: block;      
  width: 100%;         
}

.dropdown-menu li a {
  display: block;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  color: #ccc;
  text-decoration: none;
}


.dropdown-menu li a:hover {
  background: #333;
}

.dropdown.show .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.arrow {
  font-size: 0.6rem;
  font-weight: 1;
  color: #666;
  transition: transform 0.25s ease;
}

.dropdown.show .arrow {
  transform: rotate(180deg);
}

/* Back Button */
.back-button {
  position: fixed;
  font-size: 1rem;
  font-weight: 100;
  top: 1rem;
  margin-left: 1.5rem;
  padding: 0.5rem 1rem;
  background: #222;
  color: #eee;
  border-radius: 100px;
  border: 1px solid #333;
  text-decoration: none;
  transition: background 0.3s ease;
  z-index: 999;
}

.back-button:hover {
  background: #eee;
  color: #222;
}

a.back-button::after {
  display: none !important;
}

.top-button {
  position: fixed;
  font-size: 1rem;
  font-weight: bolder;
  bottom: 1rem;
  right: 1.5rem;
  margin-left: 1.5rem;
  padding: 0.5rem 1rem;
  filter: tra;
  background: #222;
  color: #eee;
  border-radius: 100px;
  border: 1px solid #333;
  text-decoration: none;
  transition: background 0.3s ease;
  z-index: 998;
}

.top-button:hover {
  background: #eee;
  color: #222;
}

a.top-button::after {
  display: none !important;
}

/* Presentation */
.hero {
  margin-top: 3rem;
  position: relative;
  text-align: left;
  padding: 2rem;
}

.root a {
  text-decoration: none !important;
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
}

.rooti {
  font-weight: 100;
  font-size: 0.5rem;
  color: #666;
}

.hero h1 {
  font-size: 2rem;
  color: #eee;
}

.hero p {
  font-size: 1rem;
  font-weight: 300;
  color: #aaa;
}

/* Parallax */
.case {
  position: relative;
  overflow: hidden;
  text-align: center;
  height: 50vh;
  border: 0.1px solid #333;
}

.case-bg {
  background: url('asset/skulls.png');
  background-color: #222;
  background-repeat: repeat;
  background-size: auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300%;
  z-index: 9;
}

.case-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.mockup-container {
  margin-top: 1rem;
}

.mockup {
  max-width: 300px;
  transition: transform 0.2s ease-out;
}

.mockup-laptop {
  max-width: 600px;
  transition: transform 0.2s ease-out;
}

/* Overview */
.overview {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

/* product */
.product {
  max-width: 840px;
  padding: 1rem 2rem 0 2rem;
  margin: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem 2rem;
}

/* Font */
.h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.label {
  font-size: 1rem;
  color: #aaa;
}

.value{
  font-size: 1rem;
  color: #eee;
}

/* Double */
.double {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

.double-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); */
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
}

.double-grid ul {
  list-style-type: square;
  padding-left: 1rem;
}

/* Single */
.single {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

.single-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 2rem;
}

.photo {
  width: 100%;
  max-width: 840px;
  display: block;
  height: auto;
  border-radius: 1rem;
  border: 1px solid #333;
}

.photo-caption {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  right: 0px;
  padding-bottom: 1rem;
}

.photo-caption .badge {
  background: #333;
  color: #eee;
  font-size: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
}

/* More Projects */
.more-projects {
  max-width: 840px;
  margin-top: 4rem;
  padding: 4rem 2rem;
  text-align: left;
  margin: auto;
}

.more-projects h2 {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); */
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  display: block;
  background-color: #222;
  text-decoration: none;
  border-radius: 1rem;
  border: 1px solid #333;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px 2px rgba(0,0,0,0.05);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4/3;
  display: block;
  height: auto;
  object-fit: cover;
}

.project-card p {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: #eee;
}

/* Footer */
.footer-dark {
  border-top: 1px solid #333;
  padding: 4rem 2rem;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.left {
  display: flex;
  gap: 4rem;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  min-width: 80px;
}

.link-group span {
  font-size: 0.8rem;
  color: #666;
}

.link-group a {
  font-size: 0.8rem;
  color: #ccc;
  text-decoration: none;
}

.link-group a:hover {
  font-size: 0.8rem;
  color: #eee;
  text-decoration: underline;
}

.right {
  margin-top: auto;
  font-size: 0.75rem;
  color: #aaa;
}

.right span {
  color: #666;
}

@media (max-width: 1024px) {
  html {
    font-size: 12px;
  }

  .nav-left img {
  height: 24px;
  }

  .double-grid {
  grid-template-columns: 1fr;
  }
}