/* ==========================================================================
   LANDING HERO & WELCOME STYLES
   ========================================================================== */

landing-hero,
landing-welcome {
  display: block;
  width: 100%;
}

/* =========================================
   HERO CONTAINER
   ========================================= */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--color-slate-950);
}

.hero-images {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#imgCurrent {
  z-index: 1;
}

#imgNext {
  z-index: 2;
  will-change: clip-path;
  clip-path: path("M0 0 L0 0 L0 0 Z");
  filter: contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 3, 8, 0.35) 0%, rgba(20, 3, 8, 0.55) 70%, rgba(20, 3, 8, 0.8) 100%);
}

/* Hero Synced Heading */
.hero-heading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vh, 5.5rem);
  color: #fff;
  pointer-events: none;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.hero-heading__row {
  display: flex;
  width: 100%;
}

.hero-heading__row--left {
  justify-content: flex-start;
}

.hero-heading__row--right {
  justify-content: flex-end;
  margin-top: 0.1em;
}

.hero-heading__line {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(2.75rem, 9vw, 8.5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #ffffff;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

.hero-heading__row--right .hero-heading__line {
  text-align: right;
  transition-delay: 0.15s;
  color: var(--color-accent-glow);
}

.hero-heading.is-visible .hero-heading__line {
  opacity: 1;
  transform: translateY(0);
}

.hero-heading__line .glyph {
  display: inline-block;
  transform-origin: 50% 50%;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.hero-heading__line .glyph--flip {
  transform: rotateX(90deg);
  opacity: 0;
}

/* Scroll CTA */
.hero-scroll-cta {
  position: absolute;
  bottom: clamp(16px, 3vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  animation: hero-bounce 2s infinite;
}

.hero-scroll-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: var(--fs-xl);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.hero-scroll-cta a:hover {
  background: var(--color-accent);
  color: var(--color-slate-950);
}

@keyframes hero-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-8px) translateX(-50%); }
  60% { transform: translateY(-4px) translateX(-50%); }
}

/* Custom Cursor (desktop only, replaces the system pointer within the hero) */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-accent-glow);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  box-shadow: 0 0 12px var(--color-accent-glow);
  transition: opacity var(--transition-fast);
}

.cursor-dot--active {
  opacity: 0.85;
}

@media (hover: hover) and (pointer: fine) {
  .hero {
    cursor: none;
  }
}

@media (max-width: 768px) {
  .hero {
    /* 100vh includes the area behind a mobile browser's address/nav bar;
       100svh is the guaranteed-visible viewport, so the arrow stays above it. */
    height: 100svh;
    min-height: 100svh;
  }

  .hero-heading {
    /* clears the scroll-cta arrow's footprint (bottom offset + height + gap)
       so the heading text never sits underneath it. */
    padding: 0 5vw clamp(5rem, 14vh, 6.5rem);
  }

  .hero-heading__line {
    font-size: clamp(2.25rem, 13vw, 4.25rem);
  }

  .hero-scroll-cta {
    bottom: max(clamp(12px, 2vh, 20px), env(safe-area-inset-bottom, 0px));
  }

  .cursor-dot {
    display: none;
  }
}

@media (max-width: 576px) {
  /* One more step down than the 768px tier — two stacked lines at that
     tier's size still ran large relative to a phone viewport. */
  .hero-heading__line {
    font-size: clamp(1.75rem, 9vw, 3rem);
  }
}

/* =========================================
   WELCOME SECTION (simple department intro)
   ========================================= */

.welcome-section {
  /* extra top clearance so content isn't buried under the fixed navbar
     when the hero's down-arrow scrolls straight to #welcome */
  padding: calc(var(--spacing-2xl) * 2 + var(--spacing-md)) 0 var(--spacing-2xl);
}

.welcome-heading {
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-lg);
}

.welcome-heading__intro {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.welcome-heading__dept {
  font-weight: 600;
  color: var(--color-slate-900);
}

.welcome-heading__name {
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--color-primary);
  -webkit-text-fill-color: transparent;
}

.welcome-text {
  width: 100%;
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--spacing-lg);
  text-align: justify;
  text-align-last: left;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  width: 100%;
}

.welcome-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem 2.6rem;
  background: var(--color-bg-pure);
  border: 1.5px solid var(--color-primary);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  color: var(--color-primary);
  text-decoration: none;
  text-align: center;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.welcome-btn--left {
  border-radius: var(--radius-xl) 0 0 0;
}

.welcome-btn--right {
  border-radius: 0 0 var(--radius-xl) 0;
}

.welcome-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

/* News column, placed beside .welcome-section in the same grid row —
   top-padded to match .welcome-section so the two headings line up. */
.news-col {
  padding: calc(var(--spacing-2xl) * 2 + var(--spacing-md)) 0 var(--spacing-2xl);
}

@media (max-width: 768px) {
  .news-col {
    padding: 0 0 var(--spacing-xl);
  }

  .welcome-section {
    padding: calc(var(--spacing-xl) + var(--spacing-lg) + var(--spacing-md)) 0 var(--spacing-xl);
  }

  .welcome-heading {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .welcome-text {
    max-width: 100%;
  }

  .welcome-btn {
    padding: 0.9rem 1.4rem;
    font-size: var(--fs-sm);
  }
}

@media (max-width: 576px) {
  /* flex: 1 1 0 has no minimum width, so on phones the two buttons
     were free to shrink side by side until their label text wrapped
     awkwardly — stack them instead. */
  .welcome-actions {
    flex-direction: column;
  }

  .welcome-btn--left,
  .welcome-btn--right {
    border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg);
  }
}
