@font-face {
  font-family: "KeepCalm";
  src: url("fonts/KeepCalm-Medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "KeepCalm";
  src: url("fonts/KeepCalm-Medium.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto,
    Arial, sans-serif;
  /* Azure blue to black vertical gradient */
  background: linear-gradient(to bottom, #007fff 0%, #000000 100%);
  color: #ffffff;
  line-height: 1.5;
  text-align: center;
}

/* Series 1 page wallpaper */
body.series-page {
  /* Fallback color behind pattern */
  background-color: #2c0052;
  /* Dimmed repeating wallpaper (25% overlay for readability) */
  background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url("assets/Series2_Wallpaper.png");
  background-repeat: cover;
  background-size: 100%;
}

/* Corner ribbon banner for Series page */
.series-page .corner-banner {
  /* Angled ribbon that scrolls with the page */
  --ribbon-top: 220px;     /* move down/up */
  --ribbon-left: -50px;   /* pull in/out from left */
  --ribbon-width: 500px;  /* total ribbon length */
  --ribbon-rotate: -35deg; /* ribbon angle */

  position: absolute; /* scrolls with content */
  top: var(--ribbon-top);
  left: var(--ribbon-left);
  width: var(--ribbon-width);
  transform: rotate(var(--ribbon-rotate));
  transform-origin: left center;
  background: linear-gradient(90deg, #ff2d55 0%, #ff7a00 50%, #ffb703 100%);
  color: #fff;
  text-align: center;
  padding: 0.7rem 1rem;
  z-index: 9999;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  /* allow clicking to jump to bonus section */
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.series-page .corner-banner a { color: inherit; text-decoration: none; display: block; }
.series-page .corner-banner { cursor: pointer; }

/* Smooth anchor scroll for in-page links */
html { scroll-behavior: smooth; }
.series-page .corner-banner .banner-text {
  font-family: "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.5;
  text-transform: uppercase;
  font-size: clamp(10px, 2vw, 14px);
  text-shadow: 0 3px 8px rgba(0,0,0,0.55);
  white-space: nowrap;
  padding: 0 10px;
}

@media (max-width: 480px) {
  .series-page .corner-banner {
    --ribbon-top: 110px;
    --ribbon-left: -220px;
    --ribbon-width: 1400px;
    --ribbon-rotate: -35deg;
    padding: 0.6rem 0.8rem;
  }
}

.series-page .puzzle-item h3 {
  font-family: "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
}

/* Series page: bump header sizes by ~5px */
.series-page h1 { font-size: calc(2em + 5px); }
.series-page h2 { font-size: calc(1.5em + 5px); }
.series-page h3 { font-size: calc(1.17em + 5px); }

/* Primary CTA */
.primary-cta {
  margin: 0.5rem auto 1rem;
}

.btn-buy {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #727272 0%, #646464 100%);
/*  background: linear-gradient(180deg, #ffd166 0%, #ffb703 100%);*/
  color: #111; /* readable on warm button */
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  filter: brightness(1.03);
}

.btn-buy:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.btn-buy:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Splash screen */
#splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:url("assets/Series2_Wallpaper.png");
  /* background: linear-gradient(to bottom, #431c53 0%, #000000 100%);*/
  z-index: 9999;
  animation: splashFade 4000ms ease forwards;
}

#splash img {
  width: 60vw;
  max-width: 680px;
  max-height: 70vh;
  height: auto;
}

@keyframes splashFade {
  0% { opacity: 1; }
  50% { opacity: 1; }  /* hold ~3s */
  100% { opacity: 0; } /* fade out ~3s */
}



.site-header,
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
}

/* Tighter spacing between logo and CTA on Series page */
.series-page .site-header {
  padding-bottom: 0.75rem;
}
.series-page .logo {
  margin-bottom: 0.25rem;
}
.series-page .primary-cta {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.logo {
  height: 360px; /* increased by ~25% */
  width: auto;
  display: block;
  margin: 0 auto 0.5rem;
}

.carousel {
  position: relative;
  max-width: 375px; /* shrunk by ~25% from 500px */
  width: 15%; /* shrunk by ~25% from 20% */
  margin: 1rem auto;
  overflow: hidden;
  border-radius: 15px; /* fixed corner radius */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
}

.slide img {
  width: 100%;
  display: block;
}

.nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 1.6rem;
  color: inherit;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav.prev {
  left: 16px;
}

.nav.next {
  right: 16px;
}

.copy {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1.25rem 1rem;
}

.copy h2 {
  font-weight: 700;
  margin-top: 0;
}

.copy ul {
  padding-left: 0;
  list-style-position: inside;
  text-align: center;
}

.copy h2,
.copy h3,
.copy p,
.copy li {
  color: #ffffff;
}

@media (max-width: 640px) {
  #splash img {
    width: 70vw;
    max-width: 90vw;
  }
  .logo {
    height: auto;
    max-height: 200px; /* increased by ~25% on small screens */
  }
  .copy {
    padding: 1rem 0.875rem;
    border-radius: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(to bottom, #003a7a 0%, #000000 100%);
    color: #ffffff;
  }
  .nav {
    background: rgba(255, 255, 255, 0.5);
    color: #fff;
  }
}

/* Mobile fine-tuning */
@media (max-width: 640px) {
  .carousel {
    border-radius: 10px; /* keep fixed radius on mobile */
    max-width: 60vw; /* shrink by ~25% */
    width: 60vw; /* shrink by ~25% */
  }
  .nav {
    font-size: 1.4rem;
    padding: 0.35rem 0.65rem;
  }
  .nav.prev {
    left: 12px;
  }
  .nav.next {
    right: 12px;
  }
}

/* Footer brand image */
.footer-brand {
  display: block;
  margin: 1rem auto 0;
  width: 100%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

/* Back to home – polished pill link */
.series-page .back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  backdrop-filter: saturate(120%) blur(2px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.series-page .back-home::before {
  content: "←";
  font-size: 1rem;
  opacity: 0.1;
}
.series-page .back-home:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}
.series-page .back-home:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}
.series-page .back-home:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Legal/contact bar below footer */
.site-legal {
  text-align: center;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, #ff2d55 0%, #ff7a00 50%, #ffb703 100%);
  color: #fff;
}
.site-legal p { margin: 0.25rem 0; }
.site-legal .social-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin-bottom: 0.35rem;
}
.site-legal .social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.92);
  color: #111;
  text-decoration: none;
  font-weight: 800;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.site-legal .social-link:hover { filter: brightness(1.05); }
.site-legal .legal-email {
  display: inline-block;
  background: rgba(255,255,255,0.92);
  color: #111;
  text-decoration: none;
  font-weight: 800;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.site-legal .legal-email:hover { filter: brightness(1.05); }

/* Series page tiles */
.puzzle-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1rem 0 2.5rem;
}

.puzzle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.puzzle-tile {
  width: clamp(100px, 24vw, 180px);
  height: clamp(100px, 24vw, 180px);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  cursor: pointer;
}

.puzzle-copy h3 {
  margin: 0.25rem 0 0.25rem 0;
}

/* Preview modal */
.preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  z-index: 10000;
  padding: 1rem;
}
.preview-modal[aria-hidden="false"] { display: flex; }
.preview-image {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.85);
  color: #111;
  font-size: 24px;
  cursor: pointer;
}
.preview-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Series 1 promo on homepage */
.series-promo {
  max-width: 1040px;
  margin: 2rem auto 2.5rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem 1.25rem;
  align-items: center;
}
.series-promo h2 {
  margin: 0 0 0.25rem 0;
  font-family: "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.series-promo-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  justify-items: center;
}
.promo-tile {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
@media (max-width: 720px) {
  .series-promo { grid-template-columns: 1fr; }
  .series-promo-tiles { grid-template-columns: repeat(4, 1fr); }
  .promo-tile { width: 64px; height: 64px; }
}
