@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;
}
@font-face {
  font-family: "Raleway-Med";
  src: url("fonts/Raleway-Medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Teletext";
  src: url("fonts/teletext-signal.otf") format("opentype");
  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;
  background: linear-gradient(to bottom, #030303 0%, #000000 100%);
  color: #ffffff;
  line-height: 1.5;
  text-align: center;
}

h5 {
font-family: "Teletext";
font-size: 28px;
color:rgb(15, 232, 15);
}

h4 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 5lvh;
  margin:-10px
}

/* 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;
}




/* Splash screen */
#splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #000000 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;
}

.site-header {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/TB_WebsiteBG.gif") center/cover no-repeat;
  opacity: 0.65;
  z-index: 0;
  transform: scale(1.02);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 1;
}

/* 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;
  position: relative;
  z-index: 2;
}

.carousel {
  position: block;
  max-width: 480px;
  width: 100%;
  margin: 1rem auto 1.5rem;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.4);
}

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

.slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide picture,
.slide img {
  width: 100%;
  height: 100%;
}

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

.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, #000000 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: 12px;
    max-width: 80vw;
    width: 80vw;
  }
  .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.9;
}
.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);
  width:10lvh;
  height:7.5lvh;
}
.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(120px, 24vw, 180px);
  height: clamp(120px, 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-promo {
  margin: 2rem auto 2.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
  text-align: center;
  max-width: min(1120px, 92vw);
}

.series-promo h2 {
  margin: 0 0 0.35rem 0;
  font-family: "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.series-promo p {
  margin: 0.35rem 0;
}

.series-promo-hero {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto;
}

.series-promo-logo {
  display: block;
  margin: 0 auto 1rem;
  max-width: min(100%, 420px);
  height: auto;
  transform: translateX(var(--logo-shift, 0));
  transition: transform 0.2s ease;
  
}

.series-promo-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  text-align: center;
}

.series-promo-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 720px) {
  .series-promo {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .series-promo-body {
    align-items: center;
    text-align: center;
  }

  .series-promo-logo {
    max-width: min(340px, 80vw);
    display: block;
  }
  .series-promo-visual {
    width: 100%;
  }
}

/* Home: my.enigmats.com promo banner */
.promo-banner {

  margin: 1.5rem auto 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.promo-banner h2 {
  margin: 0 0 0.4rem 0;
  font-family: "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.promo-banner h2 a {
  color: #fff;
  text-decoration: none;
}
.promo-banner p {
  margin: 0.4rem 0 0.75rem;
}

.my-promo-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
}
.my-promo-tile {
  width: 80%;
  height: 80%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  cursor: pointer;
  margin-top: 10px;
  margin-bottom:20%;
}

/* MyEnigmats demo video */
.my-promo-video {
  width: 50%;
  clip-path: inset(0 15px 0 15px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.75rem;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.promo-professor {
  max-width: 220px;
  width: 100%;
  margin: 0.5rem auto;
}

.seven-locks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem auto 1rem;
  width: 100%;
  max-width: min(960px, 100%);
  justify-items: center;
}

.seven-locks-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: inherit;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seven-locks-card:hover,
.seven-locks-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.seven-locks-card-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.seven-locks-card-copy h3 {
  margin: 0;
  font-size: 1.2rem;
}

.seven-locks-card-copy p {
  margin: 0.2rem 0;
}

.seven-locks-card-copy .age-range {
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 960px) {
  .seven-locks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }
}

@media (max-width: 600px) {
  .seven-locks-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2d55, #ff7a00);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}

.btn-buy:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.btn-buy:focus-visible {
  outline: 3px solid rgba(255,255,255,0.8);
  outline-offset: 3px;
}

.teletext-heading {
  font-family: "Teletext", "KeepCalm", "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0.04em;
}
