/* Landing page */

/* Theme tokens */
.landingPage {
  overflow-x: clip;
  --landing-tile-size: clamp(140px, 24vw, 220px);
  --landing-tile-radius: var(--site-radius-lg);
  --landing-hero-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  --landing-hero-shadow-active: 0 24px 54px rgba(0, 0, 0, 0.26);
  --landing-hero-drop-shadow: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.16));
  --landing-hero-drop-shadow-active: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.22));
}

html[data-ui-theme="dark"] .landingPage {
  --landing-hero-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 22px rgba(255, 255, 255, 0.04);
  --landing-hero-shadow-active: 0 24px 60px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 30px rgba(255, 255, 255, 0.06);
  --landing-hero-drop-shadow: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
  --landing-hero-drop-shadow-active: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.38));
}

/* Layout */
.landingPage > main,
.hero {
  min-height: calc(100dvh - var(--site-header-height));
  display: grid;
  place-items: center;
  align-content: center;
}

.landingPage > main {
  padding: 0;
}

.hero {
  position: relative;
  width: 100%;
  padding: 0;
}

.heroInfoZone {
  position: relative;
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  width: min(100%, 760px);
  padding: 16px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.heroInfoZone:focus-visible {
  border-radius: calc(var(--landing-tile-radius) + 8px);
  box-shadow: 0 0 0 2px var(--site-fg);
}

/* Hero media */
.heroMedia {
  position: relative;
  display: inline-block;
}

.heroImg {
  display: block;
  width: var(--landing-tile-size);
  height: var(--landing-tile-size);
  max-width: min(calc(100vw - 32px), 62vh);
  max-height: min(calc(100vw - 32px), 62vh);
  object-fit: cover;
  border: 1px solid var(--site-border);
  border-radius: var(--landing-tile-radius);
  box-shadow: var(--landing-hero-shadow);
  user-select: none;
  will-change: transform, filter;
  animation: landingPulse 3.4s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.heroInfoZone:hover .heroImg,
.heroInfoZone:focus-visible .heroImg,
.heroInfoZone:focus-within .heroImg {
  transform: scale(1.03);
  box-shadow: var(--landing-hero-shadow-active);
}

.heroGlow {
  position: absolute;
  inset: -28%;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0) 70%);
  filter: blur(22px);
  opacity: 0.65;
  transform: translateY(0) scale(1);
  pointer-events: none;
  animation: landingGlowBreath 3.8s ease-in-out infinite, landingGlowFlicker 6.2s infinite;
}

.tagline {
  max-width: calc(100% - 32px);
  overflow: hidden;
  color: var(--site-muted);
  font-size: clamp(18px, 2.6vw, 20px);
  letter-spacing: 0.2px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* About popup */
.aboutPopup {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: min(860px, calc(100% - 28px));
  max-height: calc(100dvh - var(--site-header-height) - 28px);
  overflow: auto;
  padding: 16px 16px 14px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: color-mix(in srgb, var(--site-bg-light-1) 86%, transparent);
  color: var(--site-muted);
  line-height: 1.6;
  backdrop-filter: blur(12px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

html[data-ui-theme="dark"] .aboutPopup {
  background: color-mix(in srgb, var(--site-bg-dark-1) 78%, transparent);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.60);
}

.aboutPopup--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.aboutPopup h2 {
  margin: 0 0 10px;
  color: var(--site-fg);
  font-size: 18px;
  letter-spacing: 0.2px;
}

.aboutPopup p {
  margin: 0 0 10px;
}

.aboutPopup p:last-child {
  margin-bottom: 0;
}

/* Motion */
@keyframes landingPulse {
  0% {
    transform: translateY(0) scale(1);
    filter: var(--landing-hero-drop-shadow);
  }
  50% {
    transform: translateY(-9px) scale(1.045);
    filter: var(--landing-hero-drop-shadow-active);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: var(--landing-hero-drop-shadow);
  }
}

@keyframes landingGlowBreath {
  0% {
    opacity: 0.55;
    transform: scale(0.98);
  }
  45% {
    opacity: 0.9;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.55;
    transform: scale(0.98);
  }
}

@keyframes landingGlowFlicker {
  0%,
  100% {
    filter: blur(22px);
  }
  12% {
    filter: blur(18px);
  }
  13% {
    filter: blur(26px);
  }
  26% {
    filter: blur(20px);
  }
  27% {
    filter: blur(28px);
  }
  58% {
    filter: blur(19px);
  }
  59% {
    filter: blur(27px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .heroGlow,
  .heroImg {
    animation: none;
    transition: none;
  }
}
