/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Univers';
  src: url('univ_font/univers67condensedbold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

:root {
  --font-primary: 'Inter', sans-serif;
  --font-landing: 'Univers', 'Inter', sans-serif;
  --color-text: #000000;
  --color-accent: #111111;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-teal: #00c2b8;
  --color-orange: #ff5f38;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow: hidden; /* Prevent scrolling */
  height: 100vh;
  width: 100vw;
}

body {
  background: linear-gradient(135deg, 
    var(--color-teal) 0%, 
    #2ad8c9 25%, 
    #ff8e38 75%, 
    var(--color-orange) 100%);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  color: var(--color-text);
  position: relative;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Landing screen styles */
.landing-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: inherit;
  transition: opacity 1s ease;
}

.landing-screen.fade-out {
  opacity: 0;
}

.company-name {
  text-align: center;
}

.company-name h1 {
  font-family: var(--font-landing);
  font-size: 72px;
  font-weight: bold;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Main content transition */
#mainContent {
  transition: opacity 1s ease;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px;
}

/* Header styles */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-top {
  width: 32px;
  height: 32px;
}

.nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 24px;
}

.nav-item {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: 0.01em;
  transition: opacity 0.3s ease;
}

.nav-item:hover {
  opacity: 0.7;
}

/* Hide top desktop nav on About and Research pages (all viewports) */
.about-page .desktop-nav,
.research-page .desktop-nav {
  display: none !important;
}

/* Desktop: center nav on Home page only */
@media screen and (min-width: 769px) {
  .home-page .desktop-nav {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Mobile navigation styles */
.mobile-nav {
  position: absolute;
  bottom: 122px; /* Increased from 80px to account for browser navigation bar */
  left: 0;
  width: 100%;
  padding: 0 24px;
  z-index: 10;
  display: none; /* Hidden by default, shown on mobile */
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 12px;
  text-align: center;
  margin-bottom: 20px; /* Extra bottom margin for safety */
}

.mobile-nav-item {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: 0.01em;
  padding: 4px 0;
}

/* Tagline styles */
.tagline-container {
  position: absolute;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  text-align: right;
  width: auto;
  max-width: 50%;
  display: none; /* Hide tagline on all viewports */
}

.tagline {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-align: right;
}

/* Main content styles */
.main-content {
  grid-row: 2;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

#blockAnimation {
  width: 100%;
  height: 100%;
}

/* Home page tagline near animation */
.home-tagline {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #F9F6EF;
  text-align: center;
  max-width: 90vw;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  /* Keep desktop nav visible; hide mobile bottom menu */
  .mobile-nav {
    display: none;
  }
  /* On home page, show bottom mobile menu and hide desktop nav */
  .home-page .mobile-nav {
    display: block;
  }
  .home-page .desktop-nav {
    display: none;
  }
  /* On About and Research pages, hide desktop nav and tagline on mobile */
  .about-page .desktop-nav,
  .research-page .desktop-nav {
    display: none;
  }
  .about-page .tagline-container,
  .research-page .tagline-container {
    display: none;
  }
  /* On Home page, hide tagline on mobile as well */
  .home-page .tagline-container {
    display: none;
  }
  /* On mobile, show new home tagline above animation */
  .home-page .main-content {
    flex-direction: column-reverse;
  }
  .home-page .home-tagline {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 14px;
  }
  
  /* Mobile tagline styling - keep right aligned but adjust position */
  .tagline-container {
    top: 24px;
    bottom: auto;
    z-index: 15; /* Ensure tagline is always visible */
  }
  
  .tagline {
    font-size: 12px;
  }
  
  /* Adjust animation container size for mobile */
  .animation-container {
    transform: scale(0.65); /* Decrease size by 35% */
  }
  
  .company-name h1 {
    font-size: 48px;
  }
  
  /* Use minimal safe padding at bottom on mobile */
  .wrapper {
    padding-bottom: 24px;
  }
  
  /* Adjust safe area for iOS devices */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .wrapper {
      padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
  }
}

@media screen and (max-width: 480px) {
  .company-name h1 {
    font-size: 36px;
  }
}
