/* Splash / welcome page styles */
@font-face {
  font-family: stMarthaFont;
  src: url('fonts/GillSansLight.otf');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Santini';
  src: url('fonts/Santini-Regular.otf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Santini';
  src: url('fonts/Santini-Bold.otf');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --splash-bg: url('../images/splash-background.png');
  --splash-overlay: rgb(7 24 46 / 29%);
  --splash-text: #f8f4ec;
  --splash-accent: #cda642;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Gill Sans', 'Gill Sans MT', 'Gill Sans Std', stMarthaFont, sans-serif;
  color: var(--splash-text);
  background-color: #1f3d63;
}

body {
  display: flex;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: #fff;
  color: #000;
  padding: 0.35rem 0.75rem;
  z-index: 10;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.splash {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  background-image: var(--splash-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--splash-overlay);
  pointer-events: none;
}

.splash__content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  width: auto;
  max-width: min(650px, 90%);
  max-height: 95vh;
  max-height: 95svh;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border-radius: 8px;
  background-color: rgba(52, 77, 107, 0.65);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  overflow-y: auto;
}

.splash__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.8rem;
  margin: 0 0 1rem;
}

.splash h1 {
  font-family: 'Santini', 'Times New Roman', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0 0 0.5rem;
}

.splash__subhead {
  font-size: clamp(1rem, 3vw, 1.25rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

.splash__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 8px;
  overflow: visible;
}

.splash__flyer {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  max-height: calc(90svh - 4rem);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* PDF container for splash screen */
#splash-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(400px, 80vw);
  min-height: min(520px, calc(85vh - 8rem));
}

#splash-pdf canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(85vh - 8rem);
  border-radius: inherit;
}

.splash__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--splash-text, #f8f4ec);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


.splash__close {
  position: absolute;
  top: clamp(0.5rem, 1.5vw, 1rem);
  right: clamp(0.5rem, 1.5vw, 1rem);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  color: #f8f4ec;
  text-decoration: none;
  background: rgba(20, 40, 64, 0.7);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: none;
  outline: none;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease;
}

.splash__close:hover,
.splash__close:focus-visible {
  color: #ffffff;
  transform: scale(1.1);
}

.splash__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  color: var(--splash-text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  background: rgba(0, 0, 0, 0.15);
}

.splash__cta:hover,
.splash__cta:focus-visible {
  background: var(--splash-accent);
  border-color: var(--splash-accent);
  color: #0e1e2f;
}

.splash__cta--primary {
  width: 100%;
  font-weight: 600;
  background: var(--splash-accent);
  border-color: transparent;
  color: #0b1524;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.splash__cta--primary:hover,
.splash__cta--primary:focus-visible {
  background: #e4bd56;
  color: #050a12;
}

.noscript-message {
  text-align: center;
  margin: 1rem;
  color: var(--splash-text);
}

/* Large screens (≥1200px) - adjust height constraint, fit container to image */
@media (min-width: 1200px) {
  .splash__content {
    width: auto;
    max-width: min(750px, 90%);
  }

  .splash__flyer {
    max-height: calc(85vh - 6rem);
    max-height: calc(85svh - 6rem);
  }
}

/* Mid screens (768px - 1199px) - tablets and small laptops */
@media (min-width: 768px) and (max-width: 1199px) {
  .splash__flyer {
    max-height: calc(88vh - 5rem);
    max-height: calc(88svh - 5rem);
  }
}

/* Landscape orientation with limited height */
@media (orientation: landscape) and (max-height: 700px) {
  .splash__content {
    max-height: 98vh;
    max-height: 98svh;
  }

  .splash__flyer {
    max-height: calc(80vh - 4rem);
    max-height: calc(80svh - 4rem);
  }
}

/* Very short viewports (landscape phones) */
@media (max-height: 500px) {
  .splash__flyer {
    max-height: calc(75vh - 3rem);
    max-height: calc(75svh - 3rem);
  }

  .splash__cta {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .splash__content {
    border-radius: 12px;
    padding: 1.1rem;
  }

  .splash__eyebrow {
    letter-spacing: 0.3em;
  }

  .splash__cta {
    width: 100%;
  }
}

/* Very small screens (<376px) */
@media (max-width: 375px) {
  .splash__content {
    padding: 0.75rem;
  }

  .splash__cta {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
  }
}
