/* ====== HOME PAGE STYLING ====== */
/* Neon noir layout for the A Blushing Pen homepage */

/* Reset page margins so full-width elements (navbars/hero) reach edges */
html, body {
  margin: 0;
  padding: 0;
}

/* Ensure top-level navigation/header spans the full viewport width on the homepage */
nav,
header,
.navbar,
.site-nav,
.topbar {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  left: 0 !important;
  right: 0 !important;
}

main {
  max-width: 900px;
  margin: 5rem auto;
  padding: 2.5rem;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid #00ffff33;
  border-radius: 15px;
  box-shadow: 0 0 20px #00ffff22;
  text-align: left;
  position: relative;
}

/* === TITLE SECTION === */
main h2 {
  font-size: 2rem;
  text-align: center;
  color: #b084ff;
  text-shadow: 0 0 12px #b084ff, 0 0 25px #b084ffaa;
  margin-bottom: 1rem;
}

main p.subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 3rem;
}

/* === POEM BOX === */
.poem-box {
  padding: 2rem;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid #b084ff44;
  border-radius: 10px;
  box-shadow: 0 0 25px #b084ff22;
  max-width: 700px;
  margin: 0 auto;
}

.poem-box h3 {
  color: #b084ff;
  text-shadow: 0 0 10px #b084ff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.poem-box p {
  margin-bottom: 0.5rem;
  color: #ccc;
  text-align: left;
  font-size: 1rem;
}

/* === PIXEL CHARACTER === */
.archer {
  position: absolute;
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
  image-rendering: pixelated;
  width: 48px;
  height: 48px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) translateY(0); }
  50% { transform: translateY(-50%) translateY(-10px); }
}

/* home.css — hero section (paste near top of file) */

/* Force hero to be full width and center its contents (overrides any global flex layout) */
.hero {
  width: 100%;
  box-sizing: border-box;
  padding: 120px 20px 80px;   /* controls vertical spacing — adjust if you want */
  margin: 0 auto;
  text-align: center;
  background: transparent;    /* ensure no extra layered backgrounds here */
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 4.25rem;
  margin: 0;
  color: #d19aff; /* TRUE neon lavender */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.5px;

  text-shadow:
    0 0 6px #d19aff,
    0 0 14px #d19aff,
    0 0 28px rgba(209, 154, 255, 0.55),
    0 0 48px rgba(209, 154, 255, 0.35);
}


/* Subtitle under the title — centered and muted */
.hero p {
  font-size: 1.05rem;
  margin: 14px 0 0;
  color: rgba(210,210,210,0.88);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Remove any stray horizontal borders/dividers in the hero area */
.hero::after,
.section-divider {
  display: none !important;
}

/* If any page-layout is using .home or .library flex, make hero isolate itself */
.home .hero,
body.home .hero {
  display: block !important;
}

/* small responsive tweaks */
@media (max-width: 900px) {
  .hero h2 { font-size: 2.6rem; }
  .hero { padding: 80px 18px 50px; }
}

/* Position Archer + speech bubble in top-left of hero */
.hero .archer-wrapper {
  position: absolute;
  top: 60px;     /* adjust to taste */
  left: 80px;    /* adjust to taste */
  display: flex;
  align-items: center;
  gap: 18px;     /* space between Archer and speech bubble */
  z-index: 3;
}

/* optional fine-tuning for sprite sizing */
.hero .archer-wrapper img {
  height: 72px;
  image-rendering: pixelated;
}

/* keep the glowing speech bubble aligned nicely */
.hero .speech-bubble {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #00fff2;
  border-radius: 8px;
  padding: 6px 10px;
  color: #00fff2;
  font-size: 0.68rem;
  box-shadow: 0 0 12px #00fff2, inset 0 0 10px #00fff2;
  text-align: center;
  line-height: 1.2;
  max-width: 150px;
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 6.5rem;
  color: #d9a0ff;
  text-shadow:
    0 0 12px #7a30d4,
    0 0 24px #7a30d4,
    0 0 36px #5a1e9e,
    0 0 25px #d38bff,
    0 0 50px #c972ff,
    0 0 90px #bf5aff,
    0 0 130px #b347ff,
    0 0 180px #a92aff;
}

.hero-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    text-align: center;
    color: #cfc4ff;

    /* softer purple glow for subtitle */
    text-shadow:
        0 0 10px #b37fff,
        0 0 25px #a066ff,
        0 0 45px #944fff;
}

/* Fade utility for elements that should appear then disappear */
.fade-element {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
  pointer-events: none;
}

.fade-element.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fade-element.hidden {
  opacity: 0;
  transform: translateY(-8px);
}

/* Positioning for archer and bubble */
.archer-container {
  position: absolute; /* remove from flow so it doesn't push content */
  left: 40px;         /* adjust to taste */
  top: 120px;         /* vertical placement — tweak as needed */
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
}

.archer-sprite {
  display: block;
  width: 96px; /* fixed visual size to keep bubble close */
  height: auto;
  image-rendering: pixelated;
}

.archer-bubble {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  max-width: 260px;
  box-sizing: border-box;
}

/* Responsive: stack under image on narrow screens */
@media (max-width: 900px) {
  .archer-container { position: static; display: block; margin: 0 0 18px 0; }
  .archer-bubble { position: static; transform: none; margin-top: 8px; max-width: 100%; }
}

/* Visual scale (no layout shift) */
.archer-sprite {
  width: 96px;                 /* base visual size */
  height: auto;
  transform-origin: left center;
  transition: transform .18s ease;
  image-rendering: pixelated;
}

/* Make him look bigger without changing flow */
.archer-sprite.scale-large {
  transform: scale(1.6);       /* change scale factor as needed */
}

/* Desktop-only larger width (absolute container prevents push) */
@media (min-width: 901px) {
  .archer-sprite { width: 140px; } /* increase base size on wide screens */
}

/* Keep small screens compact so the static layout won't be pushed */
@media (max-width: 900px) {
  .archer-container { position: static; } /* ensure stack behavior */
  .archer-sprite { width: 96px; transform: none; }
}
