/*  apc-C-S17-1a.css  */

@import 'https://unpkg.com/open-props' layer(design.system);
@import 'https://unpkg.com/open-props/normalize.dark.min.css'
  layer(base.normalize);

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200..900&family=Pacifico&display=swap');

@import 'https://www.unpkg.com/layout-craft@0.1.1/dist/utilities.css'
  layer(design.utilities);

/* 
Source code of these utilities: 
https://github.com/mobalti/layout-craft/blob/main/lib/utilities.css 
*/

@layer base.normalize-overrides {
  :root {
    font-family: 'Inter', sans-serif;

    --brand: oklch(64% 0.24 18);

    --nav-block-size: 4.625rem;
  }

  body {
    -webkit-font-smoothing: antialiased;
  }

  ul {
    list-style: none;
  }

  :is(ul, li) {
    padding: 0;
  }

  li {
    max-inline-size: unset;
  }

  figure {
    all: unset;
  }
}

@layer base.app {
  body {
    background: black;
  }

/* CSS StyleSheet */
  .italic-text {
    font-style: italic;
  }
}

@layer base.containers {
  .Navbar {
    min-block-size: var(--nav-block-size);
    justify-items: center;
    padding-inline: var(--size-fluid-3);
    background-color: black;
  }

  .Menu {
    @media (width < 1024px) {
      position: fixed;
      inset-inline: 0;
      inset-block-end: 0;
      block-size: var(--nav-block-size);
      overflow-x: auto;

      .ItemContent {
        display: none;
      }
    }

    @media (width >= 768px) {
      .NavIcon {
        display: none;
      }
    }

    @media (width < 768px) {
      .NavLink:hover {
        text-decoration: none;
      }
      .NavLinkTitle {
        display: none;
      }
    }
  }
  .NavItem {
    block-size: 100%;
    position: relative;
  }

  .ItemContent {
    background-color: white;
    border-radius: var(--radius-3);
    box-shadow: var(--shadow-4);
    inline-size: max(100%, 370px);
    inset-block-start: var(--nav-block-size);
    opacity: 0;
    padding: var(--size-8);
    position: absolute;
    transition: 0.2s ease;
    visibility: hidden;
    z-index: var(--layer-3);

    a {
      color: black;
      text-decoration: none;
      display: flex;
      justify-content: space-between;
      gap: var(--size-5);
      transition: 0.2s ease;

      &::after {
        font-family: 'Inter', sans-serif;
        content: '\2191';
        font-weight: bold;
        color: var(--brand);
        display: inline-flex;
        rotate: 90deg;
        opacity: 0;
        transform: translateY(10px);
        transition: 0.2s ease;
      }

      &:is(:focus-visible, :hover) {
        color: var(--brand);

        &::after {
          opacity: 1;
          transform: translateY(0px);
        }
      }
    }

    .NavItem:hover & {
      visibility: visible;
      opacity: 1;
    }

    .NavItem:focus-within & {
      visibility: visible;
      opacity: 1;
    }
  }

 
/*  MAIN CAROUSEL WRAPPER STARTS HERE  */
/* =================================== */


/* 1) GLOBAL RESET & BOX-SIZING  */

*, *::before, *::after {
  box-sizing: border-box; 
}


/* 2) FORCE ROOT VIEWPORT DIMENSIONS  */

html, body {
  display: flex;
  flex-direction: column;
  min-height: 90vh;  
     /* try 100vh to see if body fills entire viewport porperly  */
  margin: 0;
}


/* 3) MAIN LAYOUT  */

.main { 
  flex: 1;
  height: 90vh;
  width: 100%;
}


/* 4) Container & Wrapper Heights  */ 

.carouselWrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
}


/* 5) .carousel   */

.carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: 90vh;  
  max-height: 90vh;
  overflow: hidden;
  background-color: #000000;
/* CHANGED: Added black background to eliminate transparent flashing during crossfades */
}


/* 6) .carousel-track this section new in this version */

.carousel-track {
  width: 100%;
  height: 100%;   /* CHANGED from auto again  */
  position: relative;
}


/* 7) Base slide Rules */

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1.2s ease-in-out;
}

/* 8) .slide.active Rules */

.slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto; /* Re-enable interactions */
}


/* 9) .slide-figure Rules  */

.slide figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: block; 
  position: relative; 
}


/* 10) .slide img Rules  */

.slide img {
  width: 100%;
  height: 100%; 
  max-height: 90vh;   
       /* Keeps 2500x1300 images from overflowing vertically */
  object-fit: cover;  
       /* Crops if needed to match container bounds */
  display: block;
}

/* 10b) The fix for the panorama */
.carousel-img.panoramic {
  object-fit: contain;
  background-color: #000; /* Optional: adds a background color (like black bars) to fill the empty vertical space */
}


/* 11) Slides Layering & Fade Animation  */

.slides-container {
  position: relative;
  height: 100%; 
  max-height: 90vh;
  width: 100%;
}


/* 12) .slide .container Rules */

.slide .container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;  
  pointer-events: none; 
  display: flex;
  align-items: flex-end; 
  justify-content: flex-start;
  z-index: 5; 
}


/* 13) .text-overlay Rules (Hidden by default) */

.slide .text-overlay {
  position: relative;
  text-align: left;
  z-index: 10;
  color: #ffffff;
  padding: 20px 40px;
  margin: 0 0 30px 250px;  
     /* 40 to 30 moves text down, 60 to 80 moves text right */
  border-radius: 8px;
  pointer-events: none;     /* changed from auto  */
  width: max-content;   
       /* max-width: 80%;  vs. max-content;  */
       /* Initial hidden state */
  opacity: 0;
  transform: translateY(25px);  
  transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}


/* 14) Only reveal text when the slide is active */

.slide.active .text-overlay {
  opacity: 1;  
  transform: translateY(0);
  pointer-events: auto;  
  transition: opacity 0.8s ease-out 0.5s, transform 0.8s ease-out 0.5s; 
}


/* 15) .text-overlay Rules */

.text-overlay h1 {
  margin: 0 0 9px 0;
  font-size: 1.8rem;
  white-space: nowrap;
}

.text-overlay h2 {
  margin: 0 0 9px 0;
  font-size: 1.4rem;
  white-space: nowrap;
}


.text-overlay p {
  margin: 5px 0;
  font-size: 20px;
  white-space: nowrap;
}


/* 16) .nav-dots Rules */

.nav-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;  
  display: flex;
  gap: 35px;   /* was 20.  Increases spaces between buttons   */
}


/*  17) INITIAL LOAD STATE  */
/* Before JS adds .carousel-loaded), manually force Slide 1 visible */

.carousel:not(.carousel-loaded) .slide:first-child {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2 !important;
}

/*  18) INITIAL LOAD STATE continued  */

.carousel:not(.carousel-loaded) .carousel-track > .slide:first-child .text-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition: none !important;
}


/* 19) Ensure all OTHER slides stay completely hidden during load */

.carousel:not(.carousel-loaded) .slide:not(:first-child),
.carousel:not(.carousel-loaded) .slide:not(:first-child) .text-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
}



/* 20) .dot Rules */
.dot {
  width: 20px;    /* increased from 15px to 20px to make buttons larger  */
  height: 20px;   /* increased from 15px to 20px to make buttons larger  */

  border-radius: 50%;
  background-color: #d5f4e6;
  border: 1px solid rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.8); 
}


/* 21) GLOW EFFECT: Triggers on hover and active states */
.dot:hover,
.dot.active {
  border-color: #00e5ff;   /* Change to your preferred glow color */
  box-shadow: 0 0 22px #00e5ff, 0 0 25px rgba(0, 229, 255, 0.6);  /*  increased from 15 to 22px  */
  transform: scale(1.1);
}


/* 22) .dot.active Rules */
.dot.active {
  background-color: #ffffff;
  transform: scale(1.1);
}


/* 23) FOOTER ARCHITECTURE */
footer, .Footer {
  position: fixed;
  bottom: 0;
  right: 30px;		
  z-index: 999;		
  /*  padding: 1rem; */
  display: flex !important;
  white-space: nowrap !important;
  width: max-content !important; 	
}

.Footer p {
  margin: 0 !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

.Footer #currentYear:empty::before {
  conent: "2027";  /* uses a placeholder  */
  visibility: hidden;  /* hides the placeholder while keeping its width  */
}


/*  END OF ACTIVE CAROUSEL WRAPPER  */
/* ================================ */


/*  ADDITIONAL FORMATTING CODE */

@layer base.components {
  .Logo {
    inline-size: var(--size-11);

    margin: 0;
    padding: 0;
  }

  .NavLink {
    padding-inline: var(--size-4);
    block-size: 100%;

    color: white;
    background-color: inherit;
    font-size: var(--font-size-2);

    text-decoration-color: currentColor;
    font-weight: var(--font-weight-6);
    text-underline-offset: 1ex;

    @media (width > 1024px) {
      :is(.NavItem:focus-within, .NavItem:hover) & {
        text-decoration: underline;
        color: var(--brand);
      }
    }
  }

  .ButtonLink {
    color: white;
    background: var(--gradient-21);
    font-size: var(--font-size-2);
    font-weight: var(--font-weight-6);
    padding: var(--size-relative-2) var(--size-relative-5);
    border-radius: var(--radius-4);
    text-decoration: none;
    transition: filter 0.2s ease;

    &:hover {
      filter: contrast(200%);
    }
  }

  .ItemTitle {
    color: var(--brand);
  }

  .NavIcon {
    font-size: var(--font-size-5);
    font-weight: var(--font-weight-4);

    .NavLink:focus & {
      color: var(--brand);
    }
  }

  .CodePen {
    padding-inline: var(--size-fluid-3);
    block-size: 100%;
  }
}





