/* =========================================
   Custom Fonts
========================================= */
@font-face {
  font-family: 'Toolkit';
  src: url('/toolkit.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Grotesk';
  src: url('/overusedgrotesk.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* =========================================
   Global / Body Styles
========================================= */
html body {
  min-height: 100vh;
}

body {
  background: url("/castle.png"), linear-gradient(to bottom, #1678b2, #64d2ff) repeat-x;
  background-repeat: repeat-x;
  background-position: bottom;
  color: #ffffff;
  font-family: 'Grotesk', "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  padding-bottom: 200px; 
  font-size: 18px;
}

@keyframes scrollx {
  0% {  background-position: 0 0; }
  100% { background-position: 100% 0; }
}

/* Links */
a {
  color: #ffd600; /* Bright gold */
  text-decoration: underline;  
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: #fffa80;
  text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* Global button */
button {
  display: block;
  width: 100%;
  background-color: #28c0ff;
  color: #ffffff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  font-size: 18px;
  font-family: 'Toolkit';
}
button:hover {
  background-color: #00b5ff;
}

/* =========================================
   Header (Fixed Nav) - Desktop First
========================================= */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-image: url("/tac.png");
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  padding: 2px 0;
  display: flex;
  align-items: center;
  background-repeat: repeat;
  animation: scrollBg 240s linear infinite;
}

@keyframes scrollBg {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 1000%;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.logo-line {
  display: flex;
  align-items: center;
  gap: 5px;
}
.logo-line img {
  max-height: 50px; 
}

/* =========================================
   Navigation - Desktop First
========================================= */
/* Display nav in a row (desktop) */
.header-nav {
  display: flex;
  position: static;
  flex-direction: row;
  gap: 8px;
}

/* Nav links */
.header-nav a {
  display: inline-block;
  color: #ffd600;
  text-decoration: none;
  padding: 4px 16px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  margin-bottom: 4px;
}
.header-nav a:hover {
  background-color: #ffd600;
  color: #333;
}

/* =========================================
   Page Wrapper - Desktop First
========================================= */
.page-wrapper {
  margin-top: 60px;  /* Space under fixed header */
  padding: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;

  /* Desktop grid layout by default */
  display: grid;
  grid-template-columns: 640px auto;
  grid-gap: 20px;
  grid-template-areas: "main purchase";
  align-items: start;
  justify-items: stretch;
}

.main-content {
  grid-area: main;
}

/* =========================================
   Purchase Box - Desktop First
========================================= */
.purchase-box {
  background-image: url("/rect.png");
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  margin-bottom: 0; /* No bottom margin on desktop */
  max-width: 300px;
  font-size: 16px;
  grid-area: purchase;
  position: sticky;
  top: 80px;
}

.purchase-box ul {
  list-style: disc inside;
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
}
.purchase-box li {
  margin-bottom: 0;
}
.purchase-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}
.purchase-box h3 {
  text-align: center;
  margin: auto;
}
.support-price {
  display: block;
  text-align: center;
  color: #ffd600;
  font-size: 1.8em;
  line-height: 1.5em;
}

/* =========================================
   Support Subscriptions
========================================= */
.support-subscriptions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}
.subscription-box {
  background-color: #1678b2;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  box-sizing: border-box;
  flex: 1 1 100%;
  line-height: 1em;
}
.subscription-box ul {
  list-style: disc inside;
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
}

/* =========================================
   Typography
========================================= */
h1, h2 {
  color: #ffffff;
  margin: 0.5em 0;
  line-height: 1.3;
  font-family: 'Toolkit', Helvetica, Arial, sans-serif;
}
h1 { font-size: 3em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

p, li {
  color: #ffffff;
  margin-bottom: 1em;
  line-height: 1.2;
}

/* Hero & Sections */
.hero {
  margin-bottom: 40px;
  text-align: left;
}
.hero img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
}
.section {
  margin-bottom: 40px;
}

/* =========================================
   Footer
========================================= */
.footer-bar {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
}

/* =========================================
   Changelog
========================================= */
.changelog-entry {
  margin-bottom: 1.5rem;
}
.changelog-header {
  display: flex;
  align-items: baseline;
  font-weight: bold;
  margin-bottom: 0.5rem;
  gap: 10px;
}
.changelog-header .dashed-line {
  flex: 1;
  border: none;
  border-top: 2px dashed #ffd600;
  margin: 0;
}
.changelog-header .date {
  color: #ffd600;
  font-size: 0.9em;
}
hr {
  border: none;
  border-top: 1px solid #ffd600;
}

/* =========================================
   Hamburger Menu (Hidden on Desktop)
========================================= */
#menu-toggle,
.hamburger {
  display: none;
}
/* We still need the hidden checkbox for toggling, even if invisible */
#menu-toggle:checked ~ .header-nav {
  display: flex; /* activated on mobile when checked */
}

/* Labels to show/hide on desktop vs. mobile */
.desktop-label {
  display: inline-block;
}
.mobile-label {
  display: none;
}

/* =========================================
   Mobile Overrides (max-width: 899px)
========================================= */
@media (max-width: 899px) {
  .page-wrapper {
    display: block;
  }

  /* Center and space purchase box */
  .purchase-box {
    margin: 0 auto 20px;
    position: static; /* no sticky on mobile */
  }

  /* Hide any large hero images if desired */
  .hero-image {
    display: none;
  }

  /* Show hamburger menu, hide desktop nav by default */
  .header-nav {
    display: none;
    flex-direction: column;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 60px;
    background-image: url("/rect.png");
    border-radius: 8px;
  }
  #menu-toggle {
    display: none; /* hidden checkbox - label triggers it */
  }
  .hamburger {
    display: inline-block;
    cursor: pointer;
    width: 30px;
    height: 24px;
    margin-left: 10px;
  }
  .hamburger span {
    display: block;
    height: 3px;
    margin-bottom: 5px;
    background: #ffd600;
    transition: 0.3s ease;
  }

  /* Labels for small screens */
  .desktop-label {
    display: none;
  }
  .mobile-label {
    display: inline-block;
  }
}
/* End of CSS */
