/* Demo Landing Page Styles
   Resurrect64 Palette by Kerrie Lake (Lospec)
   Shader-style pixelated background
*/

:root {
  /* Resurrect64 - Core palette */
  --r64-bg-dark: #2e222f;
  --r64-bg-mid: #3e3546;
  --r64-bg-light: #625565;

  /* Resurrect64 - Warm accents (ember replacements) */
  --demo-ember: #f57d4a;
  --demo-ember-soft: #fbb954;
  --demo-ember-hot: #ea4f36;

  /* Resurrect64 - Cool accents (moss replacements) */
  --demo-moss: #0eaf9b;
  --demo-moss-soft: #30e1b9;
  --demo-moss-deep: #0b8a8f;

  /* Resurrect64 - Additional accents */
  --r64-purple: #905ea9;
  --r64-pink: #cf657f;
  --r64-yellow: #f9c22b;
  --r64-green: #91db69;
  --r64-blue: #4d9be6;
  --r64-cream: #c7dcd0;

  /* Pixel-perfect sizing (7px base × 2x scale) */
  --pixel-radius: 14px;
  --pixel-border: 2px;
  --pixel-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  --card-bg: rgba(46, 34, 47, 0.88);
}

/* ============================================
   WEBGL SHADER BACKGROUND
   ============================================ */
#oily-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Fallback if WebGL fails - otherwise transparent to show shader */
.demo-page {
  position: relative;
  background-color: transparent;
}

/* Only show fallback color if no WebGL */
@supports not (background: paint(something)) {
  .demo-page:has(~ #oily-background:empty) {
    background-color: var(--r64-bg-dark);
  }
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.demo-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ============================================
   TEXT READABILITY ENHANCEMENTS
   ============================================ */
.demo-page h1, .demo-page h2, .demo-page h3 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.demo-page p, .demo-page li, .demo-page dd, .demo-page dt {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* ============================================
   HERO SECTION
   ============================================ */
.demo-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: none;
}

.demo-hero__content {
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 32px;
  background: transparent;
}

/* Title + Badge */
.demo-hero__title-area {
  margin-bottom: 20px;
}

.demo-hero__title {
  font-family: var(--title);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--r64-cream);
  margin: 0;
  line-height: 1.1;
  text-shadow: 3px 3px 0 var(--r64-bg-dark);
}

.demo-hero__badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--demo-ember);
  color: var(--white);
  font-family: var(--title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: var(--pixel-border) solid var(--r64-bg-dark);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  image-rendering: pixelated;
}

/* Taglines */
.demo-hero__tagline {
  font-family: var(--title);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 600;
  color: var(--demo-ember-soft);
  margin: 0 0 8px;
}

.demo-hero__clarity {
  font-family: 'Cascadia Code', monospace;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--r64-cream);
  opacity: 0.85;
  margin: 0 0 24px;
}

.demo-hero__status {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.8rem;
  color: var(--r64-cream);
  margin: 0 0 20px;
  padding: 8px 14px;
  border: var(--pixel-border) dashed var(--demo-moss);
  border-radius: var(--pixel-radius);
  background: var(--card-bg);
  display: inline-block;
}

/* Hero Media */
.demo-hero__media {
  margin: 0 auto 24px;
  max-width: 640px;
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
  background: var(--r64-bg-dark);
  image-rendering: pixelated;
}

.demo-hero__video,
.demo-hero__placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Dual CTAs */
.demo-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.demo-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 32px;
  min-width: 200px;
  text-decoration: none;
  border: var(--pixel-border) solid var(--r64-cream);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  transition: all 0.15s ease;
  image-rendering: pixelated;
}

.demo-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
  text-decoration: none;
}

.demo-cta--discord {
  background: var(--demo-moss);
  color: var(--white);
}

.demo-cta--discord:hover {
  background: var(--demo-moss-soft);
  color: var(--dark);
}

.demo-cta--newsletter {
  background: var(--demo-ember);
  color: var(--white);
}

.demo-cta--newsletter:hover {
  background: var(--demo-ember-soft);
  color: var(--dark);
}

.demo-cta__label {
  font-family: var(--title);
  font-size: 1.1rem;
  font-weight: 700;
  color: inherit;
}

.demo-cta__micro {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 4px;
  color: inherit;
}

/* Access Line */
.demo-hero__access {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: var(--r64-cream);
  opacity: 0.7;
  margin: 0 0 20px;
}

/* Trust Row */
.demo-hero__trust {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.7rem;
  color: var(--r64-cream);
  opacity: 0.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.demo-hero__trust span {
  font-family: inherit;
  color: inherit;
}

.demo-hero__trust-sep {
  opacity: 0.4;
}

/* ============================================
   GENERAL SECTIONS
   ============================================ */
.demo-section {
  padding: 60px 0;
  border-top: 2px dashed var(--r64-bg-light);
  border-top-style: dashed;
  opacity: 1;
}

.demo-hero + .demo-section {
  border-top: none;
}

.demo-section__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px;
  background: var(--card-bg);
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.demo-section__title {
  font-family: var(--title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--r64-cream);
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--demo-ember);
  display: inline-block;
}

/* ============================================
   IN THIS BUILD
   ============================================ */
.demo-build__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.demo-build__list li {
  font-family: 'Cascadia Code', monospace;
  font-size: 1.1rem;
  padding: 12px 0 12px 32px;
  position: relative;
  border-bottom: 1px solid rgba(199, 220, 208, 0.15);
  color: var(--r64-cream);
}

.demo-build__list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--demo-moss);
  font-weight: bold;
}

/* ============================================
   PROOF OF UNIQUENESS
   ============================================ */
.demo-proof__intro,
.demo-proof__outro {
  font-family: var(--summary);
  font-size: 1.1rem;
  color: var(--r64-cream);
  margin: 0 0 20px;
}

.demo-proof__examples {
  margin: 24px 0;
}

.demo-proof__combo {
  font-family: 'Cascadia Code', monospace;
  font-size: 1rem;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--r64-bg-mid);
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  color: var(--r64-cream);
}

.demo-proof__combo strong {
  color: var(--demo-ember);
}

.demo-proof__media {
  margin-top: 32px;
  max-width: 480px;
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
}

.demo-proof__video,
.demo-proof__placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ============================================
   MEDIA GALLERY
   ============================================ */
.demo-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.demo-gallery__item {
  margin: 0;
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
  transition: all 0.15s ease;
}

.demo-gallery__item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--demo-moss);
  border-color: var(--demo-moss);
}

.demo-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ============================================
   ALPHA EXPECTATIONS
   ============================================ */
.demo-alpha {
  background: none;
}

.demo-alpha__intro {
  font-family: var(--summary);
  font-size: 1.1rem;
  margin: 0 0 20px;
  color: var(--r64-cream);
}

.demo-alpha__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.demo-alpha__list li {
  font-family: 'Cascadia Code', monospace;
  font-size: 1rem;
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--r64-cream);
  opacity: 0.8;
}

.demo-alpha__list li::before {
  content: "!";
  position: absolute;
  left: 0;
  color: var(--demo-ember);
  font-weight: bold;
}

.demo-alpha__wip {
  margin: 24px 0;
  max-width: 400px;
}

.demo-alpha__wip img {
  display: block;
  width: 100%;
  border: var(--pixel-border) dashed var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  filter: grayscale(30%);
}

.demo-alpha__wip figcaption {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: var(--r64-cream);
  opacity: 0.7;
  margin-top: 8px;
  font-style: italic;
}

.demo-alpha__invite {
  font-family: var(--summary);
  font-size: 1.1rem;
  color: var(--demo-moss-soft);
  font-weight: 600;
  margin: 0;
}

/* ============================================
   ROADMAP
   ============================================ */
.demo-roadmap {
  background: none;
}

.demo-roadmap__column {
  margin-bottom: 24px;
}

.demo-roadmap__heading {
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--demo-ember);
  margin: 0 0 12px;
  letter-spacing: 0.05em;
}

.demo-roadmap__heading--done {
  color: var(--demo-moss);
}

.demo-roadmap__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.demo-roadmap__list li {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.95rem;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--r64-cream);
}

.demo-roadmap__list li::before {
  content: "-";
  position: absolute;
  left: 0;
}

.demo-roadmap__list--done li {
  color: var(--r64-cream);
  opacity: 0.5;
}

.demo-roadmap__list--done s {
  text-decoration: line-through;
}

/* ============================================
   FAQ
   ============================================ */
.demo-faq__list {
  margin: 0 0 32px;
}

.demo-faq__list dt {
  font-family: var(--title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--r64-cream);
  margin-top: 20px;
  padding-left: 20px;
  position: relative;
}

.demo-faq__list dt::before {
  content: "Q";
  position: absolute;
  left: 0;
  color: var(--demo-moss);
}

.demo-faq__list dd {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.95rem;
  color: var(--r64-cream);
  opacity: 0.8;
  margin: 8px 0 0 20px;
  padding-left: 0;
}

.demo-faq__sysreq {
  padding: 16px 20px;
  background: var(--r64-bg-mid);
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
}

.demo-faq__sysreq h3 {
  font-family: var(--title);
  font-size: 0.9rem;
  margin: 0 0 8px;
  color: var(--r64-cream);
}

.demo-faq__sysreq p {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: var(--r64-cream);
  opacity: 0.8;
  margin: 0;
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */
.demo-feedback {
  text-align: center;
}

.demo-feedback__intro {
  font-family: var(--summary);
  font-size: 1.1rem;
  color: var(--r64-cream);
  margin: 0 0 24px;
}

.demo-cta--feedback {
  background: var(--r64-purple);
  color: var(--r64-cream);
  display: inline-flex;
  border-radius: var(--pixel-radius);
}

.demo-cta--feedback:hover {
  background: #a884f3;
  color: var(--r64-bg-dark);
}

/* ============================================
   FOOTER CTAs + NEWSLETTER
   ============================================ */
.demo-footer-ctas {
  text-align: center;
}

.demo-footer__ctas {
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.demo-newsletter-inline {
  background: var(--r64-bg-mid);
  border: var(--pixel-border) solid var(--r64-bg-light);
  border-radius: var(--pixel-radius);
  box-shadow: var(--pixel-shadow);
  padding: 20px 24px;
  min-width: 300px;
  max-width: 400px;
  text-align: left;
}

.demo-newsletter__label {
  font-family: var(--title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--demo-ember);
  display: block;
}

.demo-newsletter__micro {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: var(--r64-cream);
  opacity: 0.7;
  display: block;
  margin-bottom: 12px;
}

.demo-newsletter__row {
  display: flex;
  gap: 8px;
}

.demo-newsletter__input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-bottom: 2px solid var(--r64-bg-light);
  background: transparent;
  font-family: 'Cascadia Code', monospace;
  font-size: 14px;
  color: var(--r64-cream);
}

.demo-newsletter__input::placeholder {
  color: var(--r64-bg-light);
}

.demo-newsletter__input:focus {
  outline: 2px solid var(--demo-ember);
  outline-offset: 2px;
}

.demo-newsletter__btn {
  padding: 10px 16px;
  background: var(--demo-ember);
  color: var(--r64-bg-dark);
  border: var(--pixel-border) solid var(--demo-ember);
  border-radius: var(--pixel-radius);
  font-family: var(--title);
  cursor: pointer;
  transition: all 0.15s;
}

.demo-newsletter__btn:hover {
  background: var(--demo-ember-soft);
}

.demo-footer__creator {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: var(--r64-cream);
  opacity: 0.7;
  margin-top: 32px;
}

/* ============================================
   STICKY MOBILE CTA BAR
   ============================================ */
.demo-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--r64-bg-dark);
  border-top: var(--pixel-border) solid var(--r64-bg-light);
  box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.4);
}

.demo-sticky-cta__btn {
  flex: 1;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 700;
}

.demo-sticky-cta__btn--discord {
  background: var(--demo-moss);
  color: var(--white);
}

.demo-sticky-cta__btn--newsletter {
  background: var(--demo-ember);
  color: var(--white);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 768px) {
  .demo-hero {
    min-height: auto;
    padding: 40px 20px 60px;
  }

  .demo-hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .demo-cta {
    width: 100%;
    max-width: 300px;
  }

  .demo-section {
    padding: 40px 0;
  }

  .demo-gallery__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 480px) {
  .demo-page {
    padding-bottom: 100px; /* Space for sticky bar */
  }

  .demo-hero__media {
    margin-left: -20px;
    margin-right: -20px;
    max-width: calc(100% + 40px);
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .demo-sticky-cta {
    display: flex;
  }

  .demo-hero__trust {
    font-size: 0.65rem;
  }

  .demo-cta {
    padding: 12px 20px;
  }

  .demo-newsletter-inline {
    min-width: auto;
    width: 100%;
  }

  .demo-newsletter__row {
    flex-direction: column;
  }

  .demo-newsletter__btn {
    width: 100%;
  }
}

/* ============================================
   ABOVE-THE-FOLD OPTIMIZATION
   Cap hero media height on mobile to keep CTAs visible
   ============================================ */
@media (max-height: 700px) and (max-width: 480px) {
  .demo-hero__media {
    max-height: 200px;
  }

  .demo-hero__video {
    max-height: 200px;
    object-fit: cover;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .demo-sticky-cta {
    display: none !important;
  }
}
