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

body {
  background-color: #ffffff;
  min-height: 300vh; 
  font-family: "Inter", system-ui, sans-serif;
}

/* ---- Z-INDEX LAYERING STRATEGY ---- */
.dot-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(#5e5e5ea1 1.4px, transparent 1.4px);
  background-size: 70px 70px;
  pointer-events: none;
  z-index: 99; /* Top layer */
}

/* ---- MAIN FIXED HERO/HEADER CARD ---- */
#main-header-card {
  position: fixed;
  z-index: 50; 
  
  /* == UPDATED: FULL SCREEN WITH EQUAL PADDING == */
  /* 1. Define the equal gap for all sides (responsive) */
  --edge-gap: clamp(24px, 4vw, 48px);

  /* 2. Position using the gap */
  top: var(--edge-gap);
  left: var(--edge-gap);
  right: var(--edge-gap);
  
  /* 3. Height is full viewport minus top gap and bottom gap */
  height: calc(100vh - (var(--edge-gap) * 2));
  
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Glass Styles */
  background: rgba(167, 184, 188, 0.15);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);

  /* Smooth transition for all changing properties */
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: top, left, right, height, border-radius;
}

/* Header Grain */
#main-header-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.15;
  pointer-events: none;
  border-radius: inherit;
}

/* HEADER STATE (When Scrolled: Minimized) */
#main-header-card.header-minimized {
  /* This overrides the full screen vars above */
  top: 16px;
  left: 16px;
  right: 16px;
  height: 80px; /* Fixed height for header mode */
  
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* LOGO STYLES */
.logo {
  font-family: "Doto", sans-serif;
  /* Increased max size slightly for the full screen effect */
  font-size: clamp(2rem, 10vw, 8rem);
  font-weight: 300;
  font-variation-settings: "ROND" 100;
  color: #1a1a1a;
  transition: font-size 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-header-card.header-minimized .logo {
   font-size: 2.5rem;
}


/* ---- CONTENT STREAM & SCROLL BLOCKS ---- */
.content-stream {
  position: relative;
  z-index: 10; 
}

.scroll-block {
  height: 150vh; 
  position: relative;
  margin-bottom: 2rem;
}

.sticky-wrapper {
  position: sticky;
  top: 120px; 
  display: flex;
  justify-content: center;
  
  opacity: 0.4;
  transform: scale(0.95);
  transition: all 0.8s ease;
}

.sticky-wrapper.is-active {
    opacity: 1;
    transform: scale(1);
}

/* ---- 1. TEXT CONTAINER ---- */
.text-container {
  background: rgba(167, 184, 188, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-radius: 24px;
  position: relative;
  overflow: hidden;

  width: 100%;
  max-width: 700px;
  padding: 4rem;
  color: #333;
  margin: 0 20px;
}

.text-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.1;
  pointer-events: none;
  z-index: 2;
}

.text-container h2 {
    font-family: "Doto", sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}
.text-container p {
    font-size: 1.2rem;
    line-height: 1.6;
}

/* ---- 2. IMAGE CONTAINER ---- */
.image-container {
  background: rgba(167, 184, 188, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-radius: 24px;
  position: relative;
  overflow: hidden;

  /* Sizing: 75% of viewport width */
  width: 75vw;
  aspect-ratio: 16/9; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px; 
}

.image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.1;
  pointer-events: none;
  z-index: 2;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px; 
}

/* ---- MOBILE ADJUSTMENTS ---- */
@media (max-width: 768px) {
  .image-container {
     width: calc(100% - 32px); 
     aspect-ratio: 4/3; 
     margin: 0 auto;
  }
  
  .text-container {
     padding: 2rem; 
  }
}
