
/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section-container {
  width: 100%;
  min-height: 100svh;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 8rem 6% 4rem;
  margin-bottom: 4rem;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-section-container::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 18%;
  background: linear-gradient(to top, var(--dm-background) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-section-container::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 12%;
  background: linear-gradient(to bottom, var(--dm-background) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Text group */
.hero-items-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

/* ── Mockups peeking from the corners ─────────────────────────── */
.hero-mockups {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-mockup {
  position: absolute;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.38));
  opacity: 0;
  will-change: transform, opacity;
}

.hero-mockup .phone-zoom-outer {
  width: min(340px, 40vw);
}

.hero-mockup--ios {
  top: -16%;
  right: -14%;
  transform: rotate(18deg) translateY(-16px);
  animation: fadeSlideUpMockupIos 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-mockup--android {
  bottom: -18%;
  left: -14%;
  transform: rotate(-16deg) translateY(16px);
  animation: fadeSlideUpMockupAndroid 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

.hero-mockup-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

@keyframes fadeSlideUpMockupIos {
  from {
    opacity: 0;
    transform: rotate(18deg) translate(40px, -60px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: rotate(18deg) translateY(-16px) scale(1);
  }
}

@keyframes fadeSlideUpMockupAndroid {
  from {
    opacity: 0;
    transform: rotate(-16deg) translate(-40px, 60px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: rotate(-16deg) translateY(16px) scale(1);
  }
}

.hero-section-icon {
  width: clamp(5rem, 15vw, 8rem);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border-radius: 22%;
  corner-shape: smooth;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35), 3px 5px 30px rgba(0, 0, 0, 0.22);

  opacity: 0;
  transform: translateY(26px) scale(0.94);
  filter: blur(8px);
  animation: fadeSlideUpIcon 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
  will-change: transform, opacity, filter;

  view-transition-name: project-icon;
}

@keyframes fadeSlideUpIcon {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.hero-section-title {
  margin: 0;
  color: var(--dm-primary);
  font-size: clamp(2.2rem, 8vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;

  opacity: 0;
  transform: translateY(26px) scale(0.94);
  filter: blur(8px);
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
  will-change: transform, opacity, filter;

  view-transition-name: project-title;
}

.hero-section-subtitle {
  margin: 0;
  color: var(--dm-secondary);
  font-size: clamp(1rem, 4vw, 1.5rem);

  opacity: 0;
  transform: translateY(26px) scale(0.94);
  filter: blur(8px);
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
  will-change: transform, opacity, filter;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Scroll cue — same material/behavior as the homepage's, DormMate surfaces */
.hero-scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;

  background-color: var(--dm-surface-container-low);
  border: 1px solid var(--dm-outline-variant);
  box-shadow: var(--dm-shadow-card);

  color: var(--dm-on-surface-variant);
  text-decoration: none;

  opacity: 0;
  animation: dm-cue-in 0.6s 1.2s forwards, dm-cue-bob 1.8s 2s ease-in-out infinite alternate;
  transition: opacity 0.3s ease;
}

.hero-scroll-cue .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
}

@keyframes dm-cue-in {
  to { opacity: 1; }
}

@keyframes dm-cue-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { animation: none; opacity: 1; }
}

@media (max-width: 680px) {
  .hero-section-container {
    padding: 6rem 1.5rem 3rem;
  }
  .hero-mockup .phone-zoom-outer {
    width: min(220px, 52vw);
  }
  .hero-mockup--ios {
    top: -4%;
    right: -14%;
  }
  .hero-mockup--android {
    bottom: -6%;
    left: -14%;
  }
  /* Keep mockups peeking from the corners without crowding the centered text */
  .hero-mockups {
    -webkit-mask-image: radial-gradient(ellipse 55% 42% at center, transparent 30%, black 85%);
    mask-image: radial-gradient(ellipse 55% 42% at center, transparent 30%, black 85%);
  }
}

/* Back button floats over hero */
.back-button-container {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}
