/* Home & Portals Section Styles matching the visual mockup */

.home-body {
  background-color: var(--void);
  color: var(--paper);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: var(--ff-body);
}

/* Hidden state for elements before/after transitions */
.home-main.hidden,
.sparkle-container.hidden,
.home-slider-bg.hidden {
  display: none !important;
}

.home-main {
  position: relative;
  z-index: 2; /* On top of background slider */
  flex: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background-color: transparent; /* transparent to show the background slider */
  box-sizing: border-box;
}

.portals-container {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 688px; /* Decreased by 20% to look like 80% zoom */
  justify-content: center;
}

.portal-card {
  flex: 1;
  aspect-ratio: 9 / 16; /* Fixed aesthetic vertical aspect ratio */
  display: flex;
  flex-direction: column;
  background-color: #000000; /* Pure black cards */
  border: 1px solid var(--border);
  border-radius: 10px; /* Scaled down corner radius */
  padding: 10px; /* Scaled down inset padding */
  text-decoration: none;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s ease, 
              box-shadow 0.4s ease;
}

.portal-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square aspect ratio to match visual mockup */
  border-radius: 6px; /* Scaled down border radius */
  overflow: hidden;
  position: relative;
  background-color: var(--ink);
}

/* Subtle golden/lotus glow overlay on the image wrapper in default state */
.portal-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(200, 169, 126, 0.15) 0%, rgba(10, 10, 10, 0.45) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  opacity: 1;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fixed letterbox issue by using absolute positioning to guarantee card cover */
.portal-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: url(#crystalline-glass) sepia(0.3) saturate(1.4) brightness(0.65);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: filter, transform;
}

.portal-content {
  padding: 12px 3px 3px 3px; /* Scaled down typography padding */
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1; /* Stretch to fill remaining card height */
  justify-content: center; /* Center the larger text vertically */
}

.portal-content h2 {
  font-family: var(--ff-display);
  font-size: 22px; /* Scaled down from 28px to match 80% zoom size */
  font-weight: 400;
  color: var(--white);
  margin: 0;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.portal-content p {
  font-family: var(--ff-mono);
  font-size: 10px; /* Scaled down from 12px to match 80% zoom size */
  letter-spacing: 0.1em;
  color: rgba(232, 232, 228, 0.7); /* Lighter off-white tone instead of var(--ghost) */
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
  transition: color 0.3s ease;
}

/* Hover effects */
.portal-card:hover {
  transform: translateY(-5px);
  border-color: var(--lotus-dim);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.portal-card:hover .portal-image {
  transform: scale(1.04);
  filter: none;
}

.portal-card:hover .portal-image-wrapper::after {
  opacity: 0;
}

.portal-card:hover .portal-content h2 {
  color: var(--lotus);
}

.portal-card:hover .portal-content p {
  color: var(--white);
}

/* Disabled portal card (e.g. Creative Studio — not live yet) */
.portal-card--disabled {
  cursor: default;
  pointer-events: none; /* not clickable */
}

/* Dim the card contents. GSAP animates .portal-card opacity to 1 on intro,
   so dim the children instead to keep the disabled look. */
.portal-card--disabled .portal-image-wrapper,
.portal-card--disabled .portal-content h2,
.portal-card--disabled .portal-content > p:not(.portal-status) {
  opacity: 0.4;
}

.portal-status {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--lotus, rgba(232, 232, 228, 0.7));
  text-transform: uppercase;
  margin: 4px 0 0 0;
  line-height: 1.3;
}

/* WeTransfer Slider Backgrounds */
.home-slider-bg {
  position: fixed;
  top: -2%; left: -2%; 
  width: 104vw; height: 104vh;
  z-index: 1; /* Above body fallback background, below home-main */
  overflow: hidden;
  background-color: #0A0A0A;
}

.home-slider-bg .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: 100% auto;
  background-repeat: repeat;
  background-position: top center;
  opacity: 0;
  will-change: opacity, transform;
}

.home-slider-bg .slide.active {
  opacity: 1;
}

/* Overlay gradient to keep text/cards legible over the backgrounds */
.slider-overlay {
  position: absolute;
  top: 0; left: 0; 
  width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(10, 10, 10, 0.3) 0%, rgba(10, 10, 10, 0.82) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Home Content Wrapper to align portals and logo wordmark */
.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px; /* Elegant vertical spacing */
  width: 100%;
}

/* Minimal Logo Wordmark container */
.logo-wordmark-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  opacity: 0; /* Animated in by intro.js */
  transform: translateY(20px);
  will-change: opacity, transform;
}

.logo-wordmark {
  max-width: 150px; /* Minimal size */
  height: auto;
  filter: invert(1) brightness(0.9); /* Invert black PNG to show as soft white */
  opacity: 0.4; /* Subtle by default */
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-wordmark:hover {
  opacity: 0.75; /* Soft hover highlight */
  filter: invert(1) brightness(1);
  transform: scale(1.02); /* Soft micro-animation scale */
}

/* Responsive viewports */
@media (max-width: 900px) {
  .portals-container {
    flex-direction: column;
    gap: 24px;
    padding: 32px 0;
    max-width: 480px; /* Constrain width on mobile so portals don't stretch too wide */
  }
  
  .portal-card {
    width: 100%;
    aspect-ratio: auto; /* Reset fixed aspect ratio on mobile viewports */
  }
  
  .portal-image-wrapper {
    aspect-ratio: 16 / 10; /* Maintain landscape aspect ratio for mobile scrolling */
  }

  .portal-content {
    flex: none; /* Reset stretch on mobile */
    justify-content: flex-start; /* Reset centering on mobile */
  }

  .home-main {
    padding: 64px 24px;
    align-items: flex-start; /* Better scrolling flow on mobile */
  }

  .sparkle-container {
    bottom: 24px;
    right: 24px;
  }

  .home-content {
    gap: 16px; /* Tighter spacing on mobile */
  }

  .logo-wordmark {
    max-width: 100px; /* Slightly smaller on mobile screens */
    margin-bottom: 24px; /* Space at the bottom of scroll */
  }
}

