/* ==========================================================================
   RSECon27 pre-launch splash
   ========================================================================== */

body {
  background: var(--charcoal);
}

.splash {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* sit underneath the transparent nav, keeping the text clear of it */
  margin-top: calc(-1 * var(--nav-offset, var(--nav-height)));
  padding: calc(var(--nav-offset, var(--nav-height)) + clamp(3rem, 9vh, 6.5rem)) 2rem 4rem;
  overflow: hidden;
  isolation: isolate;
  color: white;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Background photo, plum tint and gradient
   -------------------------------------------------------------------------- */
.splash-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('/assets/images/kris-tian-dEEXOjHfP2M-unsplash-edinburg.jpg') center 70% / cover;
}

.splash-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* top-down fade */
    linear-gradient(to bottom,
      rgba(30, 0, 19, 0.88) 0%,
      rgba(61, 0, 38, 0.65) 28%,
      rgba(91, 0, 57, 0.25) 52%,
      rgba(0, 0, 0, 0) 68%,
      rgba(0, 0, 0, 0.45) 100%),
    /* overall plum tint? */
    linear-gradient(rgba(91, 0, 57, 0.18), rgba(91, 0, 57, 0.18));
}

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */
.splash-content {
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-blue);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--light-blue);
  margin-bottom: 1.75rem;
}

.splash-badge span {
  opacity: 0.6;
  margin: 0 0.35em;
}

.splash-name {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  letter-spacing: 0.02em;
  color: var(--white-80);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.splash-date {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.75rem, 7.5vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 1rem;
  text-shadow: 0 2px 30px rgba(30, 0, 19, 0.45);
}

.splash-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--light-blue);
  margin-bottom: 2.25rem;
}

.splash-location svg {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.splash-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.splash-btn {
  background: white;
  color: var(--plum);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
}

.splash-btn:hover {
  background: var(--light-blue);
  color: var(--dark-plum);
}

.splash-btn:focus-visible {
  outline: 3px solid var(--light-blue);
  outline-offset: 3px;
}

.splash-btn svg {
  width: 1.15em;
  height: 1.15em;
}

.splash-soon {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.25rem;
  color: var(--white-100);
}

/* --------------------------------------------------------------------------
   Photo credit
   -------------------------------------------------------------------------- */
.splash-caption {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--light-gray);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.splash-caption a {
  color: var(--light-blue);
  text-decoration: none;
}

.splash-caption a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@keyframes splashRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-content > *,
.splash-caption {
  animation: splashRise 0.7s ease-out both;
}

.splash-badge    { animation-delay: 0.15s; }
.splash-name     { animation-delay: 0.3s; }
.splash-date     { animation-delay: 0.45s; }
.splash-location { animation-delay: 0.6s; }
.splash-actions  { animation-delay: 0.75s; }
.splash-caption  { animation-delay: 1s; }

@media (prefers-reduced-motion: reduce) {
  .splash-content > *,
  .splash-caption {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Desktop: text sits in the sky to the right of the monument, right-aligned */
@media (min-width: 1025px) {
  .splash {
    align-items: flex-end;
    padding-right: 6vw;
    text-align: right;
  }

  .splash-content {
    width: min(58vw, 1000px);
    align-items: flex-end;
  }

  .splash-date {
    font-size: clamp(3.5rem, 6vw, 6.5rem);
  }

  .splash-actions {
    justify-content: flex-end;
  }
}

/* Tablet and mobile: centred, heavier fade since text overlaps the monument */
@media (max-width: 1024px) {
  .splash-bg {
    background-position: 22% 40%;
  }

  .splash-bg::after {
    background:
      linear-gradient(to bottom,
        rgba(30, 0, 19, 0.9) 0%,
        rgba(61, 0, 38, 0.72) 40%,
        rgba(91, 0, 57, 0.3) 62%,
        rgba(0, 0, 0, 0.05) 78%,
        rgba(0, 0, 0, 0.45) 100%),
      linear-gradient(rgba(91, 0, 57, 0.18), rgba(91, 0, 57, 0.18));
  }
}

@media (max-width: 768px) {
  .splash {
    padding: calc(var(--nav-offset, var(--nav-height)) + 3rem) 1.25rem 3.5rem;
  }

  .splash-actions {
    flex-direction: column;
  }

  .splash-caption {
    left: 1rem;
    right: 1rem;
    text-align: center;
  }
}
