/* Headie Spice - Main Stylesheet */

/* Font Imports */
@font-face {
  font-family: 'Slackey';
  src: url('../fonts/Slackey-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #E6B800;
    --dark-color: #2C3E50;
    --light-color: #F7F9F9;
    --transition-speed: 0.5s;
    --border-radius: 15px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    --nav-height: 120px;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Slackey', cursive;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
    transition: background-color var(--transition-speed) ease;
    line-height: 1.6;
    position: relative;
}

/* Old background image removed for mosaic */
/*
body::before {
    height: 100%;
    background-image: url('../images/hslogo-tile.png');
    background-repeat: repeat;
    background-size: 20px 20px; 
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}
*/

/* Navigation Styles */
.nav {
  width: 100vw;
  /* position: fixed; */
  top: 0;
  left: 0;
  z-index: 1000;
  background: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* pointer-events: none; */
}

.nav-container {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* pointer-events: none; */
}

.nav-logo {
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-logo img {
    height: 100px;
    width: auto;
    max-width: none;
    display: block;
    margin: 0;
    padding: 0;
}

.nav-links {
  display: flex;
  gap: 0;
  align-items: flex-start;
  justify-content: center;
  margin: 32px 0 0 0;
  pointer-events: auto;
}

.nav-links a {
  color: var(--light-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: auto;
}

.nav-links a:hover,
.nav-links a:focus {
    background-color: var(--primary-color);
    color: var(--light-color);
    outline: none;
}

.nav-links a img {
  width: 128px;
  height: 128px;
  margin: 0;
  padding: 0;
  display: block;
}

/* Header Styles */
.header {
    background: transparent;
    text-align: center;
    padding: 2rem;
    margin-top: 40px;
    margin-bottom: 2rem;
}

/* Welcome image optimization */
.header picture {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.header img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    /* Prevent layout shift with aspect ratio placeholder */
    aspect-ratio: 3/1;
    object-fit: contain;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-top: 1rem;
    opacity: 0.9;
}

/* Gallery Styles */
.gallery {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.gallery-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.control-btn:hover,
.control-btn:focus {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
    outline: none;
}

/* Color Preview */
.color-preview {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    z-index: 1001;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Footer Styles */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer a:hover,
.footer a:focus {
    color: var(--primary-color);
    outline: none;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--dark-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow);
    }

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

    .mobile-menu-toggle {
        display: block;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .nav-logo img {
        height: 80px;
    }

    .nav-container {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .header {
        padding: 2rem 1rem;
    }

    .nav-container {
        height: 80px;
    }

    .nav-logo img {
        height: 60px;
    }
}

@media (max-width: 600px) {
  .hamburger {
    display: flex !important;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1100;
    align-items: center;
    justify-content: center;
  }
  
  .nav-links {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255,255,255,0.95);
    position: absolute;
    top: 8px;
    left: 88px;
    width: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1099;
    margin: 0;
    padding: 8px;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    padding: 0;
  }
  
  .nav-links a img {
    width: clamp(64px, 18vw, 104px);
    height: clamp(64px, 18vw, 104px);
    margin: 0;
  }
}

/* Print Styles */
@media print {
    .nav,
    .controls,
    .color-preview {
        display: none;
    }

    .header {
        background: none;
        color: black;
    }
}

/* Background mosaic styles */
#bg-mosaic {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-tile {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.15;
  user-select: none;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: none;
  display: block;
  box-sizing: border-box;
}

h1, .moonrocks {
  font-family: 'Slackey', cursive;
}

/* Hamburger menu styles */
.hamburger {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Example for background image fallback */
.bg-logo {
  background-image: url('../images/hslogo-tile.webp');
} 