/* ===== GENERAL STYLES ===== */
:root {
  --background-color: #1c1c1c;
  --accent-color: #f0b232;
  --text-color: #cccccc;
  --modal-bg: #2b2b2b;
  --overlay-bg: rgba(0, 0, 0, 0.8);
  --button-bg: #333;
  --button-hover: #555;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Lato', 'Segoe UI', sans-serif;
  /* very subtle dark gradient instead of flat black */
  background: linear-gradient(180deg, #0a0a0f 0%, #0d1220 40%, #111111 100%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative; /* for ::before overlay */
  z-index: 0;
}

/* ===== BODY TEXTURE OVERLAY (CSS-only, no image) ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Two super-fine cross-grain layers to simulate noise/texture */
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.018) 0,
      rgba(255,255,255,0.018) 1px,
      transparent 1px,
      transparent 2px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.012) 0,
      rgba(255,255,255,0.012) 1px,
      transparent 1px,
      transparent 2px
    );
  mix-blend-mode: overlay;      /* interacts gently with the dark bg */
  opacity: 0.35;                /* dial this 0.2–0.45 to taste */
}

/* ===== HEADER & NAVIGATION ===== */
/* Top banner: darker blue gradient base + overlay art + reduced glow */
header {
  /* Layer order: tint (boost overlay), overlay art, soft gold glow, blue base */
  background-image:
    linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
    url('banner-image.png'),
    radial-gradient(1000px 250px at 80% -50%, #ffdc87 0%, rgba(255,220,135,0) 80%),
    linear-gradient(135deg, #070b14 0%, #0d1f38 55%, #08111c 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, 1000px 250px, cover;
  background-position: center, center, right top, center;
  background-blend-mode: normal, overlay, screen, normal;

  padding: 20px;
  border-bottom: 2px solid #444;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav.nav-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

nav button {
  background-color: var(--button-bg);
  color: var(--accent-color);
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s ease;
  font-weight: 600;
}

nav button:hover { background-color: var(--button-hover); transform: translateY(-2px); }

/* ===== MAIN CONTENT ===== */
main { flex: 1; }

.welcome-section {
  padding: 80px 20px;
  text-align: center;
  /* keep your existing hero treatment; texture sits above page bg only */
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
              url('https://example.com/vtt-bg.jpg') center/cover no-repeat;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Mission section with logo above headline */
.mission-section {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1em;
  color: #dddddd;

  /* optional subtle panel treatment; comment out if you prefer flat */
  background: linear-gradient(180deg, rgba(13,19,38,0.28), rgba(10,10,15,0.32));
  border-top: 2px solid rgba(240,178,50,0.35);
  border-bottom: 2px solid rgba(240,178,50,0.15);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(0,0,0,0.45);
}

#mission-logo {
  height: 160px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(240, 178, 50, 0.5));
}

.mission-section h3 {
  color: var(--accent-color);
  font-size: 1.6em;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(240,178,50,0.22); /* faint ambient glow */
}

.mission-section ul { list-style-type: none; padding-left: 0; margin: 10px 0 20px; }
.mission-section ul li::before { content: "🎲 "; margin-right: 5px; }

/* ===== MODAL STYLES ===== */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; }
.modal-overlay { position: absolute; width: 100%; height: 100%; background: var(--overlay-bg); backdrop-filter: blur(3px); }

.modal-content {
  position: relative;
  background-color: var(--modal-bg);
  color: #eeeeee;
  margin: 5% auto;
  padding: 30px;
  max-width: 700px;
  border-radius: 8px;
  z-index: 10000;
  box-shadow: 0 0 20px #000;
  border: 1px solid #444;
  animation: modalFadeIn 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-content h2 { color: var(--accent-color); margin-bottom: 15px; font-size: 2em; }
.modal-content h3 { color: #bbbbbb; font-style: italic; margin-bottom: 20px; font-weight: 400; }
.modal-content p { margin-bottom: 15px; }

.close-btn {
  position: absolute; top: 15px; right: 20px; font-size: 1.8em;
  background: none; color: var(--accent-color); border: none; cursor: pointer; transition: transform 0.2s ease;
}
.close-btn:hover { transform: scale(1.2); }

/* ===== PRICING CALCULATOR (unchanged) ===== */
form#pricingForm { margin-top: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--accent-color); }
select, input[type="number"] {
  width: 100%; padding: 12px; border-radius: 4px;
  border: 1px solid #444; background-color: #444; color: #fff; font-size: 1em;
}
select:focus, input[type="number"]:focus { outline: 2px solid var(--accent-color); }

.price-results {
  background-color: #1e1e1e; padding: 20px; border-radius: 6px;
  margin-top: 30px; font-size: 1.1em; border: 1px solid #333;
}
.price-results h3 { margin-bottom: 15px; color: var(--accent-color); font-size: 1.3em; }
.price-results div { margin-bottom: 8px; display: flex; justify-content: space-between; }
.price-results div:last-child { font-weight: bold; font-size: 1.2em; margin-top: 15px; padding-top: 10px; border-top: 1px dashed #444; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  background-color: #111;
  color: #888;
  border-top: 1px solid #333;
  margin-top: auto;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  header { padding: 15px; }
  nav.nav-centered { flex-wrap: wrap; gap: 8px; }

  .welcome-section { padding: 60px 20px; }
  .mission-section { padding: 30px 20px; }
  #mission-logo { height: 140px; }
  .modal-content { margin: 10% auto; width: 90%; padding: 20px; }
}

@media (max-width: 480px) {
  .welcome-section { padding: 50px 16px; }
  #mission-logo { height: 120px; }
  .modal-content { margin: 15% auto; }
}

/* ===== FOUNDRY VTT FOOTER STYLES ===== */
#foundry-footer {
  text-align: center;
  margin-top: 50px;
  padding: 30px 20px;
  border-top: 1px solid #444;
  background-color: #1c1c1c;
}

#foundry-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 5px rgba(255, 128, 0, 0.5));
}

.foundry-disclaimer {
  font-size: 0.85rem;
  color: #999;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ===== BACKGROUND D20 WATERMARK ===== */
#background-d20 {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: url('fvtt-d20.png') no-repeat center center;
  background-size: contain;
  opacity: 0.35;
  z-index: -1; /* sit below the new body::before texture */
  pointer-events: none;
}

/* ===== MODAL SCROLLING ===== */
body.modal-open { overflow: hidden; }

/* ===== FOOTER LINK STYLES ===== */
.footer-link { color: var(--accent-color); text-decoration: none; font-weight: 600; margin-left: 5px; }
.footer-link:hover { text-decoration: underline; }

/* ===== PRIVACY POLICY MODAL ===== */
#privacyModal h2 { margin-top: 0; color: var(--accent-color); }
#privacyModal h3 { margin-top: 20px; font-size: 1.1em; color: #f0f0f0; }
#privacyModal p  { margin-bottom: 12px; color: #ccc; }
.policy-update-date { font-size: 0.85em; color: #888; margin-top: 30px; text-align: right; }

/* ===== SIGN UP BUTTON ===== */
#signupBtn.highlight-button {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1em;
  transition: all 0.2s ease;
  display: inline-block;
}
#signupBtn.highlight-button:hover { background-color: #ffc14d; transform: translateY(-2px); }

/* ===== DISCORD LOGO LINK ===== */
.discord-link { margin-top: 40px; text-align: center; }
.discord-link img {
  width: 180px; height: auto; opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.discord-link img:hover { opacity: 1; transform: scale(1.05); }
.discord-invite-text { text-align: center; margin-top: 30px; font-size: 1.15em; color: #ddd; }

/* ===== YOUTUBE VIDEO SECTION ===== */
.video-section { margin: 30px 0 18px; text-align: center; }
.video-section h3 { color: var(--accent-color); margin-bottom: 12px; }
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
