/* VARIABLES & STRUCTURE */
:root {
  --font-primary: "Instrument Sans", sans-serif;
}

body {
  font-family: var(--font-primary);
  /* font-weight: 400; */
  font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem);
  line-height: 1.6;
  color: #111;
  background-color: #f9f9f9;
  margin: 0;
}

/* TYPOGRAPHY HIERARCHY */
h1,
h2,
h3,
h4 {
  font-family: var(--font-primary);
  line-height: 1.1;
  margin-bottom: 0.5em;
  margin-top: 0;
}

h1 {
  letter-spacing: -0.04em;
}

h2 {
  letter-spacing: -0.02em;
}

h3 {
  letter-spacing: -0.01em;
}

/* NAVIGATION BAR */
.minimal-header {
  position: fixed;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
}

.brand-initials {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: #111;
  text-decoration: none;
  margin-right: 0rem;
  padding-right: 0rem;
}

.square-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-square {
  display: flex;
  align-items: center;
  background-color: #e9e9e9;
  height: 2rem;
  border-radius: 0.3rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.nav-square:hover {
  background-color: #e1e1e1;
}

.nav-num {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-label-wrapper {
  display: grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-square.is-expanded .nav-label-wrapper {
  grid-template-columns: 1fr;
}

.nav-label {
  overflow: hidden;
  white-space: nowrap;
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  padding-right: 0;
  opacity: 0;
  transition:
    padding-right 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease 0.1s;
}

.nav-square.is-expanded .nav-label {
  padding-right: 1.25rem;
  opacity: 1;
}

/* =========================================
   MINIMAL FOOTER
========================================= */
.minimal-footer {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 4rem 10%; /* Matches your global layout margins */
  margin-top: 4rem;
}

.footer-left {
  display: flex;
  gap: 0.5rem;
}

/* Base Typographic Styling */
.footer-label,
.footer-links a {
  font-family: var(--font-primary);
  font-weight: 400;

  font-size: clamp(
    0.75rem,
    1vw,
    0.875rem
  ); /* Matches the navigation font sizing */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  text-decoration: none;
}

/* Links Container */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2.5rem; /* Matches the spacing of your desktop nav bar */
}

/* Hover Interaction */
.footer-links a {
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  font-weight: 600;
}

/* Desktop Alignment */
@media (min-width: 768px) {
  .nav-square:hover .nav-label-wrapper {
    grid-template-columns: 1fr;
  }

  .nav-square:hover .nav-label {
    padding-right: 1.25rem;
    opacity: 1;
  }

  .minimal-footer {
    flex-direction: row;
    justify-content: space-between; /* Pushes copyright left, links right */
    align-items: center;
  }
}

/* MOBILE */
/* MOBILE */
/* =========================================
   MOBILE NAVIGATION OVERRIDE
========================================= */
@media (max-width: 767px) {
  /* Locks the header alignment to the top so expansion goes down */
  .minimal-header {
    align-items: flex-start;
  }

  /* Keeps GR vertically centered with the closed 36px box */
  .brand-initials {
    height: 36px;
    display: flex;
    align-items: center;
  }

  .square-nav {
    flex-direction: column;
    width: 36px;
    height: 36px;
    overflow: hidden;
    background-color: #e5e5e5;
    border-radius: 4px;
    gap: 0;
    cursor: pointer;
    transition:
      width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      height 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
  }

  .square-nav.menu-open {
    width: 150px;
    height: 144px; /* Drops down to fit exactly 4 links */
    transition:
      height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      width 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
  }

  .nav-square {
    background-color: transparent !important;
    width: 100%;
    height: 36px;
    flex-shrink: 0;
    pointer-events: none;
  }

  .nav-square.is-expanded {
    order: -1;
  }

  .square-nav.menu-open .nav-square {
    pointer-events: auto;
  }

  .nav-square.is-expanded .nav-label-wrapper {
    grid-template-columns: 0fr;
  }

  .nav-square.is-expanded .nav-label {
    opacity: 0;
  }

  .square-nav.menu-open .nav-label-wrapper {
    grid-template-columns: 1fr;
  }

  .square-nav.menu-open .nav-label {
    padding-right: 1.25rem;
    opacity: 1;
    transition: opacity 0.2s ease 0.4s;
  }

  /* Returns the numbers to their natural 1-2-3-4 order when the menu is open */
  .square-nav.menu-open .nav-square.is-expanded {
    order: 0;
  }

  /* Highlights the active page's number and label so it stands out */
  .square-nav.menu-open .nav-square.is-expanded .nav-num {
    color: #111; /* Changes from grey to black */
    font-weight: 700;
  }

  .square-nav.menu-open .nav-square.is-expanded .nav-label {
    font-weight: 700;
  }

  /* FOOTER */
  .minimal-footer {
    gap: 1rem;
    padding-top: 0rem;
  }

  .footer-links {
    gap: 0.5rem;
  }
}
