/* ============================================
   HOME - CLEAN MINIMAL
   ============================================ */

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0 3rem;
  z-index: 2;
}

/* Background animation */
#bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: none;
}

#bg-animation canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Hero content above animation */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 42rem;
}

.hero-tag {
  font-family: var(--font-family-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-title {
  font-family: var(--font-family-sans);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-dim);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-cta-secondary {
  background: transparent;
  color: var(--color-text-dim);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem 1.75rem;
  border: 1px solid var(--color-border-strong);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}
.hero-cta-secondary:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  text-shadow: none;
}

/* Stats bar */
.hero-stats {
  --line-scale: 0;
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  position: relative;
}

.hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-border);
  transform-origin: left;
  transform: scaleX(var(--line-scale));
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-stat-value {
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-white);
}

.hero-stat-label {
  font-family: var(--font-family-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Video — full-width hero background */
.home-video {
  position: relative;
  width: calc(100% + var(--padding) * 2);
  margin-left: calc(var(--padding) * -1);
  overflow: hidden;
}
.home-video video {
  width: 100%;
  height: auto;
  display: block;
}
.home-video::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, transparent 10%, transparent 90%, var(--color-bg) 100%);
  pointer-events: none;
}

/* Portfolio grid */
.home-grid {
  display: grid;
  list-style: none;
  grid-gap: 1px;
  line-height: 0;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-flow: dense;
  background: var(--color-border);
}
.home-grid li {
  position: relative;
  --cols: 1;
  --rows: 1;
  overflow: hidden;
  background: var(--color-bg);
  line-height: 0;
}
.home-grid li:first-child { --cols: 2; --rows: 2; }
.home-grid li:nth-child(5) { --cols: 2; }
.home-grid li:nth-child(6) { --rows: 2; }
.home-grid li:nth-child(7) { --cols: 2; }
.home-grid a {
  display: block;
  height: 10rem;
}
.home-grid img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}
.home-grid li:hover img {
  transform: scale(1.03);
}
.home-grid figcaption {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  position: absolute;
  color: #fff;
  top: 0; right: 0; bottom: 0; left: 0;
  line-height: 1;
  padding: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.home-grid li:hover figcaption { opacity: 1; }

@media screen and (min-width: 45em) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
  .home-grid li {
    grid-column-start: span var(--cols);
    grid-row-start: span var(--rows);
  }
  .home-grid a { padding-bottom: 52.65%; }
}

/* Mobile hero background — hidden on desktop */
.mobile-hero-bg {
  display: none;
}

@media screen and (max-width: 768px) {
  .hero {
    min-height: 65vh;
    padding-top: 10rem;
    margin-top: 0;
  }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }

  .blur-overlay {
    background: rgba(255, 255, 255, 0.6);
  }

  /* Kill any gap above hero on mobile */
  .main:has(.hero) {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

@media screen and (max-width: 768px) {
  .hero-cta-secondary {
    font-size: 0.875rem;
  }
}
