/* ===================================
   BARBY'S ART
   nav.css - Shared Navigation Styles
   =================================== */

:root                { color-scheme: light dark; }
[data-theme="light"] { color-scheme: light;      }
[data-theme="dark"]  { color-scheme: dark;       }

:root {
  /* Nav color tokens */
  --clr-nav-link-bg:          hsla(200, 70%, 82%, 1);   /* light blue block bg     */
  --clr-nav-link:             hsl(325, 75%, 60%);        /* bright pink text        */
  --clr-nav-link-border:      hsl(263, 75%, 45%);        /* bold violet 2px border  */
  --clr-nav-link-hover-bg:    hsl(263, 75%, 45%);        /* purple flip on hover    */
  --clr-nav-link-hover:       hsla(200, 70%, 82%, 1);    /* light blue hover text   */
  --clr-nav-link-active-bg:   hsl(263, 75%, 45%);        /* purple active           */
  --clr-nav-link-active-text: hsla(200, 70%, 82%, 1);    /* light blue active text  */
  --clr-nav-hamburger:        hsl(263, 75%, 45%);        /* purple hamburger btn    */
  --clr-nav-shadow:           var(--clr-shadow-md, hsla(220, 20%, 0%, 0.16));

  /* Letter block tokens */
  --blk-bg:           hsla(200, 70%, 82%, 1);
  --blk-border:       hsla(270, 65%, 42%, 1);
  --blk-border-dark:  hsla(270, 65%, 28%, 1);
  --blk-pink:         hsla(320, 90%, 58%, 1);
  --blk-shadow:       3px 3px 0 hsla(270, 65%, 28%, 1), 5px 5px 8px hsla(270, 50%, 15%, 0.6);
  --blk-shadow-final: 4px 4px 0 hsla(270, 65%, 28%, 1), 6px 6px 10px hsla(270, 50%, 15%, 0.7);

  --nav-spacing-normal:  20px;
  --nav-spacing-compact: 15px;
}

/* ===================================
   NAV LAYOUT
   =================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  height: 100px;
  background-image: url('../images/cloudy-sky.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo .mobile-logo {
  display: none;
}

.nav-logo img.mobile-logo {
  height: 60px;
  width: auto;
  border: 8px solid hsla(215, 83%, 65%, 0.2);
  border-radius: 14px;
}

/* ===================================
   LETTER BLOCKS — BARBY'S ART LOGO
   =================================== */
.barby-blocks {
  display: flex;
  align-items: center;
  gap: 3px;
  transition: gap 0.5s ease, border-radius 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
}

.letter-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--blk-bg);
  border: 2.5px solid var(--blk-border);
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--blk-pink);
  box-shadow: var(--blk-shadow);
  flex-shrink: 0;
  opacity: 0;
  transition: border-color 0.5s ease, background 0.5s ease, font-size 0.5s ease,
              box-shadow 0.5s ease, border-radius 0.5s ease, opacity 0.5s ease;
}

#block-B {
  opacity: 1;
}

.spacer-block {
  width: 10px;
  height: 34px;
  background: transparent;
  border: none;
  flex-shrink: 0;
  transition: background 0.5s ease;
}

/* ===================================
   LETTER BLOCK ANIMATIONS
   =================================== */
@keyframes bounce-spin-z {
  0%   { transform: translateY(0px) rotate(0deg); }
  25%  { transform: translateY(-8px) rotate(90deg); }
  50%  { transform: translateY(-10px) rotate(180deg); }
  75%  { transform: translateY(-8px) rotate(270deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

@keyframes pop-in-bounce {
  0%   { opacity: 0; transform: translateY(6px) scale(0.85); }
  50%  { opacity: 1; transform: translateY(-1px) scale(1.04); }
  70%  { transform: translateY(1px) scale(0.98); }
  85%  { transform: translateY(-1px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0px) scale(1); }
}

@keyframes finale-bounce {
  0%   { transform: translateY(0px); }
  40%  { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.letter-spin-z { animation: bounce-spin-z 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.letter-reveal  { animation: pop-in-bounce 0.35s cubic-bezier(0.3, 0, 0.2, 1) forwards; }
.letter-finale  { animation: finale-bounce 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* ===================================
   NAV LINKS
   =================================== */
.nav-links {
  list-style: none;
  display: flex;
  gap: var(--nav-spacing-normal);
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  background: var(--clr-nav-link-bg);
  color: var(--clr-nav-link);
  border: 2px solid var(--clr-nav-link-border);
  font-size: 1.01rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 5px;
  letter-spacing: 0.03rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover:not(.active) {
  background: var(--clr-nav-link-hover-bg);
  color: var(--clr-nav-link-hover);
  border-color: var(--clr-nav-link-hover-bg);
}

.nav-links a.active {
  display: none;
}

/* ===================================
   HAMBURGER BUTTON
   =================================== */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  border-radius: 5px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--clr-nav-hamburger);
  padding: 5px 10px;
}

/* ===================================
   TABLET
   =================================== */
@media (width <= 1176px) {
  .letter-block {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .spacer-block {
    width: 7px;
    height: 28px;
  }
}

@media (width <= 1024px) {
  .nav-logo {
    margin-right: auto;
    margin-left: -15px;
  }
  .nav-links {
    gap: var(--nav-spacing-compact);
  }
}

@media (width <= 900px) {
  .nav-links {
    gap: 8px;
    font-size: 0.8rem;
  }
  .letter-block {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .spacer-block {
    width: 6px;
    height: 24px;
  }
}

/* ===================================
   MOBILE
   =================================== */
@media (width < 768px) {
  .nav-logo .desktop-logo {
    display: none;
  }

  .nav-logo .mobile-logo {
    display: block;
    height: 60px;
    margin-left: 15px;
  }

  .hamburger-btn {
    display: block;
    background-color: var(--clr-nav-link-hover-bg);
    color: var(--clr-nav-link-hover);
    font-weight: bolder;
    border-radius: 8px;
    border: 2px solid var(--clr-nav-link-border);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 50%;
    right: 0;
    background-color: hsla(220, 25%, 12%, 0.97);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px var(--clr-nav-shadow);
    gap: 10px;
  }

  .nav-links.open {
    display: flex;
  }
}

/* ===================================
   DROPDOWN — future use
   =================================== */
/*
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: hsla(220, 25%, 12%, 0.97);
  list-style: none;
  padding: 10px 0;
  border-radius: 5px;
  box-shadow: 0 4px 10px var(--clr-nav-shadow);
  min-width: 160px;
  z-index: 1001;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 20px;
  white-space: nowrap;
}

.dropdown:hover .dropdown-menu {
  display: block;
}
*/
