@import './ui.css';
@import './loader.css';
@import './colours.css';
@import './font.css';
@import './header.css';
@import './footer.css';
@import './category.css';
@import './contact.css';

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box; /* Ensures consistent box sizing */
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(var(--base-size) * var(--mobile-scale)); /* Responsive base font size */
}

html, body {
  height: 100%; /* Ensures full height for body */
  width: 100%; /* Ensures full width for body */
}

body {
  font-family: system-ui; /* Sets base font */
  background: inherit; /* Sets background color */
  color: inherit; /* Sets text color */
  line-height: 1.2; /* Improves readability */
}

#cursor {
  position: fixed; /* or fixed if you want it over the whole viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none; /* let clicks go through */
  z-index: 9999; /* keep it on top */
}

/*BOLD TEXT*/

.logo, footer li p:first-of-type .third-list p{
  font-weight:bold;
}


a{
  text-decoration:underline;
  text-decoration-color:transparent;
  color:inherit;
}

a:hover, #location-toggle:hover{
  color: rgb(var(--grey-600));
  text-decoration-color: rgb(var(--grey-600));
}

#location-toggle{
  transition: transform 0.3s ease, color 0.3s ease;
}

.blend-edges {
  mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
}


/*MAIN */
.site-body {
  min-height: calc(100% - var(--header-height, 60px)); /* Adjust header height */
  width: 100%;
}

.site-body .container {
  display: flex; /* Switch to flex for vertical alignment */
  flex-direction: column;
  justify-content: center; /* Vertically center */
  align-items: center; /* Horizontally center */
  height: calc(100% - 10%);
  text-align: center;
}

.headline {
  font-size: 4.5rem;
  font-weight: lighter;
  text-transform: uppercase;
  margin-bottom: 1rem; /* Space between headline and music_player */
  font-family:'Geist'
}

.headline u{
  font-style: italic;
}

.subhead {
  font-size: 1rem;
  font-weight: 450;
  letter-spacing: 1px;
  line-height: 1rem;
  font-family:'Geist'
}

.music_player {
  justify-content: center;
  flex-wrap: wrap;
  display:none;
  box-sizing: border-box;
  width: 100%; /* Full width of the viewport */
}

/*SECOND*/
.secondary-text {
  display:block;
  /*background-color:var(--grey-100);*/
  width: 100vw;
  height: auto;
  padding: 20% 0%;

}

.secondary-text ul li:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease, color 0.3s ease;
}

.secondary-text ul li:hover .tap-button {
  color: rgba(var(--grey-300));
}

.secondary-text ul {
  list-style: none; /* Remove default list styles */
  padding: 5% 0px; /* Remove padding */
  margin: 0; /* Remove margin */
  display: block; /* Use flexbox for layout */
  flex-wrap: wrap; /* Allow items to wrap */
  font-weight: bolder;
  overflow: hidden;
  font-style: italic;
  font-family: 'Geist';
}

.secondary-text ul li{
  cursor: pointer; /* Pointer cursor for interactivity */
  font-size:8rem;
  color: rgb(var(--grey-400));
  transition: all ease-in;
  
}

.secondary-text ul li:first-child {
  text-align: left; /* Align text to the left */
}

.secondary-text ul li:nth-last-child(2) {
  text-align: right; /* Align text to the right */
}



/*THIRD*/
.third-section {
  padding: 20% 5%;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 2em;
  background-color: rgb(var(--grey-150));
  border-top: 1px solid rgb(var(--grey-200));

}

.third-section span {
  text-transform: lowercase;
}

.third-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100dvh;
  height:auto
}

/* Left black box */
.third-box {
  width: 100%;
}

/* Center text */
.third-text p{
  margin: 0;
  text-align: center;
  letter-spacing: 0.02em;
  font-weight: lighter;
  font-style: italic;
  text-transform: uppercase;
  color: rgb(var(--grey-800));

}

/* Right list */
.third-list p {
  text-align: right;
  cursor: pointer;
  font-family:'Geist';
  color: rgb(var(--grey-800));
}

.tooltip:not(.nav-right) .tooltip:hover:after, .third-list .tooltip:hover:after { content: attr(title); opacity:1; color:rgb(var(--grey-300)); } 


.tooltip:not(.nav-right) .tooltip:after, .third-list .tooltip:after { content: attr(title); color:rgb(var(--grey-800));transition: all 0.3s ease-in; font-size: 0.8rem } 

/* Responsive Styles */

/* Base headline scaling across breakpoints (largest → smallest) */
@media (max-width: 1000px) {
  /* Layout */
  .container {
    grid-template-columns: repeat(6, 1fr); /* your mobile grid */
  }

  /* Animations (define once here to avoid duplicates) */
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s ease-out forwards;
  }

    .fade-in-d {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 1.2s ease-out forwards;
  }
  .fade-in.delayed { animation-delay: 1s; }
  .fade-in.staggered:nth-child(1) { animation-delay: 0.3s; }
  .fade-in.staggered:nth-child(2) { animation-delay: 0.5s; }
  .fade-in.staggered:nth-child(3) { animation-delay: 0.7s; }

  @keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
  }

  .site-body .container {
    text-align: center;
    justify-content: center;
  }

  /* Headline at <=1000px (step down from desktop) */
  .headline {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .subhead {
    font-size: 0.7rem;
    margin: 0 auto;
    transition: font-size 1s ease-in;
    width: 75%;
  }

  .music_player {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .transition-space.active .secondary-text {
    opacity: 0;
    height: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, height 0.6s ease;
  }

  .container.collapse { padding: 0; }

  .secondary-text ul li {
    font-size: 3rem; /* mobile phone second text */
    color: rgb(var(--grey-400));
    transition: all 0.3s ease-in;
  }

  .third-section { padding: inherit 2%; opacity:0.9; }

  .third-grid {
    grid-template-columns: 1fr;
    text-align: center;
    /* Fix: avoid iPad landscape vh issues */
    min-height: 60dvh;
    height: auto;
  }

  .third-box {
    max-width: 200px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    justify-content: center;   /* horizontal centering */
    height: 100%;
  }

  .third-text p {
    text-align: center;
    font-size: 1.5rem;
  }

  .third-list {
    height: auto;
    overflow: hidden;
    min-height: 150px;
    padding: 0 2%
  }

  .third-list p {
    font-size: .9rem;
    color: rgb(var(--grey-600))!important;
    position: relative;
    /* animation: chromatic-glitch 1.5s infinite linear, move-horizontal 6s infinite ease-in-out; */
    transform: translateZ(0);  /* Force GPU acceleration */
    will-change: text-shadow, transform;
    transform-origin: center;
    margin-bottom: 1rem;
  }

  /* Chromatic text (visible space reserved for GSAP) */

  #chromatic-text {
    display: block;
    min-height: 1em;   /* line-height space */
    visibility: hidden; /* remain in layout */
  }
  #chromatic-text.is-visible { visibility: visible; }

  #chromatic-text div {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  #chromatic-text .red  { color: rgb(var(--grey-400)); z-index: 1; }
  #chromatic-text .cyan { color: rgb(var(--grey-700)); z-index: 2; }
  #chromatic-text .main { color: rgb(var(--grey-800)); z-index: 3; position: relative; }

  /* Chromatic Aberration Animation */
  @keyframes chromatic-glitch {
    0% {   text-shadow:  2px  2px 0 rgb(var(--grey-150)), -2px -2px 0 rgb(var(--grey-400)),  4px  4px 0 rgb(var(--grey-800)); }
    50% {  text-shadow: -2px  2px 0 rgb(var(--grey-150)),  2px -2px 0 rgb(var(--grey-400)), -4px  4px 0 rgb(var(--grey-800)); }
    100% { text-shadow:  2px  2px 0 rgb(var(--grey-150)), -2px -2px 0 rgb(var(--grey-400)),  4px  4px 0 rgb(var(--grey-800)); }
  }

  /* Horizontal Movement */
  @keyframes move-horizontal {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(30px); }
  }

  .third-list p:first-of-type { text-align: left;  width: 100%; }
  .third-list p:nth-of-type(2){ text-align: center; }
}

/* Step down at <=900px */
@media (max-width: 900px) {
  .headline { font-size: 2rem; }
}

/* Phones / narrow tablets <=768px */
@media (max-width: 768px) {
  .headline { font-size: 1.5rem; }
}



/* Very large screens (you had these) */
@media (min-width: 1000px) and (min-height: 1000px) {
  .secondary-text ul li { font-size: 12rem; }
}
@media (min-width: 2000px) and (min-height: 1000px) {
  .secondary-text ul li { font-size: 18rem; }
}

/* iPad landscape (more reliable than device-width) */
@media (orientation: landscape) and (max-width: 1024px) {
  .third-section { font-size: 1em; }
  /* Ensure GSAP has scroll space on iPad landscape */
  .third-grid { min-height: 100dvh; height: auto; }
}