/* ===========================================================
   Duskvein — Home page styles
   Hero (cinematic), Features grid, Devlog teaser,
   Newsletter, CTA wishlist block.
   =========================================================== */

/* ===========================================================
   HERO — cinematic, full-bleed, layered
   =========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  /* Keep content clear of the fixed header (top) and the
     'Descend' scroll cue (bottom) even at short viewport heights. */
  padding: 7rem 0 6rem;
}
@media (max-height: 720px) {
  .hero { padding: 6rem 0 5rem; }
}

/* --- background layers (parallax via JS) --- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 70%, rgba(139, 26, 26, 0.25), transparent 60%),
    radial-gradient(circle 400px at 50% 35%, rgba(184, 33, 27, 0.15), transparent 70%),
    linear-gradient(180deg, #0b0510 0%, #1a0a14 40%, #2a0d12 70%, #0a0508 100%);
}
.hero__moon {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8c4a8 0%, #8a6f56 50%, #2a1f18 80%);
  box-shadow:
    0 0 80px rgba(216, 196, 168, 0.2),
    0 0 160px rgba(139, 26, 26, 0.25),
    inset -30px -20px 50px rgba(0,0,0,0.6);
  opacity: 0.55;
  filter: blur(0.5px);
}
.hero__moon::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(216, 196, 168, 0.08) 0%, transparent 60%);
  border-radius: 50%;
}

/* Mountain / spire silhouette layers — simple SVG shapes,
   parallax via JS scroll handler */
.hero__layer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  will-change: transform;
}
.hero__layer--far    { bottom: 8%;  opacity: 0.45; }
.hero__layer--mid    { bottom: 0;   opacity: 0.7; }
.hero__layer--near   { bottom: -2%; opacity: 0.9; }
.hero__layer--fore   { bottom: -5%; opacity: 1; }

.hero__layer svg {
  width: 100%;
  height: auto;
  display: block;
}

/* --- content --- */
.hero__content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 var(--sp-5);
  max-width: 900px;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--parchment);
  font-weight: 500;
  margin-bottom: var(--sp-5);
  opacity: 0;
  animation: heroFadeIn 1.2s 0.4s var(--ease-out) forwards;
}

.hero__eyebrow-line {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 var(--sp-3);
  box-shadow: 0 0 8px var(--accent-glow);
}

.hero__title {
  font-family: var(--font-display);
  /* Scale down on short viewports so the stacked hero fits without colliding with the fixed nav or scroll cue. */
  font-size: min(var(--fs-hero), 22vh);
  line-height: 0.9;
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.04em;
  margin: 0 0 var(--sp-5);
  text-shadow:
    0 0 30px rgba(184, 33, 27, 0.3),
    0 0 80px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: heroFadeIn 1.4s 0.6s var(--ease-out) forwards;
}

.hero__title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: heroLetter 1.2s var(--ease-out) forwards;
}
.hero__title span:nth-child(1) { animation-delay: 0.6s; }
.hero__title span:nth-child(2) { animation-delay: 0.7s; }
.hero__title span:nth-child(3) { animation-delay: 0.8s; }
.hero__title span:nth-child(4) { animation-delay: 0.9s; }
.hero__title span:nth-child(5) { animation-delay: 1.0s; }
.hero__title span:nth-child(6) { animation-delay: 1.1s; }
.hero__title span:nth-child(7) { animation-delay: 1.2s; }
.hero__title span:nth-child(8) { animation-delay: 1.3s; }

@keyframes heroFadeIn { to { opacity: 1; } }
@keyframes heroLetter {
  to { opacity: 1; transform: translateY(0); }
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: var(--sp-4) 0 var(--sp-6);
  text-shadow: 0 0 16px var(--accent-glow);
  opacity: 0;
  animation: heroFadeIn 1.4s 1.5s var(--ease-out) forwards;
}

.hero__divider {
  opacity: 0;
  animation: heroFadeIn 1.4s 1.3s var(--ease-out) forwards;
}

.hero__lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--bone-soft);
  font-weight: 400;
  max-width: 620px;
  margin: 0 auto var(--sp-7);
  line-height: 1.5;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: heroFadeIn 1.6s 1.8s var(--ease-out) forwards;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeIn 1.4s 2.1s var(--ease-out) forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: var(--parchment);
  font-size: var(--fs-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0;
  animation: heroFadeIn 1.4s 2.5s var(--ease-out) forwards;
}
.hero__scroll::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--parchment), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@media (max-height: 720px) {
  .hero__scroll { font-size: 0.65rem; bottom: var(--sp-3); }
  .hero__scroll::after { height: 22px; }
}
@media (max-height: 560px) {
  .hero__scroll { display: none; }
}

/* Compact spacing for short viewports — keeps the stacked hero
   inside the available height between fixed nav and scroll cue. */
@media (max-height: 720px) {
  .hero__eyebrow  { margin-bottom: var(--sp-3); letter-spacing: 0.35em; }
  .hero__subtitle { margin: var(--sp-2) 0 var(--sp-4); font-size: var(--fs-md); }
  .hero__lede     { margin-bottom: var(--sp-5); font-size: var(--fs-base); }
  .hero__title    { margin-bottom: var(--sp-3); }
  .divider-mark   { margin: var(--sp-2) 0; }
}
@media (max-height: 560px) {
  .hero__lede { display: none; }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(0.6); opacity: 0.4; }
}

/* ===========================================================
   Platforms band (just below hero)
   =========================================================== */
.platforms {
  padding: var(--sp-6) 0;
  border-top: 1px solid rgba(239, 230, 210, 0.05);
  border-bottom: 1px solid rgba(239, 230, 210, 0.05);
  background: rgba(0,0,0,0.4);
  text-align: center;
}
.platforms__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
}
.platform {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--parchment);
  font-size: var(--fs-sm);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.platform svg { width: 22px; height: 22px; fill: currentColor; }
.platform__divider {
  width: 1px;
  height: 24px;
  background: rgba(239, 230, 210, 0.1);
}

/* ===========================================================
   Features grid
   =========================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 720px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature {
  position: relative;
  padding: var(--sp-7) var(--sp-6);
  background:
    linear-gradient(180deg, rgba(29, 23, 34, 0.5), rgba(12, 8, 16, 0.85));
  border: 1px solid rgba(239, 230, 210, 0.06);
  border-radius: var(--radius);
  transition: all 350ms var(--ease-out);
  overflow: hidden;
}
.feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 300ms;
}
.feature:hover {
  border-color: rgba(184, 33, 27, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.8);
}
.feature:hover::before { opacity: 1; }

.feature__sigil {
  width: 56px; height: 56px;
  margin-bottom: var(--sp-5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature__sigil::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 400ms var(--ease-out);
}
.feature:hover .feature__sigil::before {
  transform: rotate(135deg);
  box-shadow: 0 0 16px var(--accent-glow);
}
.feature__sigil svg {
  width: 28px; height: 28px;
  stroke: var(--accent-bright);
  fill: none;
  stroke-width: 1.5;
  position: relative;
  z-index: 1;
}
.feature h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feature p {
  color: var(--parchment);
  font-size: var(--fs-base);
  margin: 0;
}

/* ===========================================================
   Showcase (alternating image/text rows)
   =========================================================== */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  margin-bottom: var(--sp-9);
}
.showcase:last-child { margin-bottom: 0; }
.showcase--reverse > :first-child { order: 2; }
@media (max-width: 820px) {
  .showcase, .showcase--reverse { grid-template-columns: 1fr; gap: var(--sp-6); }
  .showcase--reverse > :first-child { order: 0; }
}
.showcase__art {
  position: relative;
  aspect-ratio: 4/3;
  border: 1px solid rgba(239, 230, 210, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, var(--accent-soft), transparent 60%),
    var(--char);
}
.showcase__art::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
  pointer-events: none;
}
.showcase__art .placeholder { position: absolute; inset: 0; }
.showcase h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}
.showcase__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  display: block;
}
.showcase__text p {
  color: var(--parchment);
  font-size: var(--fs-md);
  line-height: 1.7;
}

/* ===========================================================
   Wishlist CTA — full-bleed dramatic block
   =========================================================== */
.wishlist-cta {
  position: relative;
  padding: var(--sp-10) 0;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid rgba(239, 230, 210, 0.06);
  border-bottom: 1px solid rgba(239, 230, 210, 0.06);
}
.wishlist-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--pitch), var(--void));
  z-index: -1;
}
.wishlist-cta h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--sp-4);
  text-shadow: 0 0 40px var(--accent-glow);
}
.wishlist-cta p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--bone-soft);
  margin: 0 auto var(--sp-7);
  max-width: 540px;
}
.wishlist-cta__release {
  margin-top: var(--sp-6);
  font-size: var(--fs-xs);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
}
.wishlist-cta__release strong { color: var(--accent-bright); font-weight: 500; }

/* ===========================================================
   Devlog teaser
   =========================================================== */
.devlog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 820px) {
  .devlog-grid { grid-template-columns: 1fr; }
}
.devlog-card {
  background: rgba(12, 8, 16, 0.6);
  border: 1px solid rgba(239, 230, 210, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 300ms var(--ease-out);
  display: flex;
  flex-direction: column;
}
.devlog-card:hover {
  border-color: rgba(184, 33, 27, 0.3);
  transform: translateY(-3px);
}
.devlog-card__art {
  aspect-ratio: 16/9;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, var(--accent-soft), transparent 60%),
    var(--char);
  position: relative;
  overflow: hidden;
}
.devlog-card__art .placeholder { position: absolute; inset: 0; }
.devlog-card__body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.devlog-card__meta {
  display: flex;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.devlog-card__meta span:first-child { color: var(--accent); }
.devlog-card h3 {
  font-size: var(--fs-md);
  margin: 0;
  letter-spacing: 0.04em;
}
.devlog-card p {
  color: var(--parchment);
  font-size: var(--fs-sm);
  margin: 0;
  flex: 1;
}
.devlog-card__link {
  color: var(--accent-bright);
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.devlog-card__link::after {
  content: '→';
  transition: transform 200ms;
}
.devlog-card__link:hover::after { transform: translateX(4px); }

/* ===========================================================
   Newsletter
   =========================================================== */
.newsletter {
  background:
    linear-gradient(180deg, var(--pitch), var(--void));
  position: relative;
  padding: var(--sp-9) 0;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.newsletter__inner {
  position: relative;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}
.newsletter__inner h2 {
  font-size: var(--fs-2xl);
}
.newsletter__inner p {
  color: var(--parchment);
  margin-bottom: var(--sp-6);
}
.newsletter__form {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.newsletter__form input {
  flex: 1;
  min-width: 220px;
  padding: 0.9rem 1.2rem;
  background: rgba(12, 8, 16, 0.7);
  border: 1px solid rgba(239, 230, 210, 0.15);
  border-radius: var(--radius-sm);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  transition: all 200ms;
}
.newsletter__form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(12, 8, 16, 0.95);
}
.newsletter__note {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: var(--sp-4);
  letter-spacing: 0.05em;
}
.newsletter__success {
  display: none;
  padding: var(--sp-5);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--bone);
}
.newsletter.is-success .newsletter__form { display: none; }
.newsletter.is-success .newsletter__success { display: block; }

/* ===========================================================
   Community block
   =========================================================== */
.community {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 820px) {
  .community { grid-template-columns: 1fr; }
}
.community-card {
  position: relative;
  padding: var(--sp-6);
  background: rgba(12, 8, 16, 0.6);
  border: 1px solid rgba(239, 230, 210, 0.06);
  border-radius: var(--radius);
  text-align: center;
  transition: all 300ms var(--ease-out);
  overflow: hidden;
}
.community-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 300ms;
}
.community-card:hover {
  border-color: rgba(184, 33, 27, 0.3);
  transform: translateY(-3px);
}
.community-card:hover::before { opacity: 1; }
.community-card svg {
  width: 40px; height: 40px;
  margin: 0 auto var(--sp-4);
  color: var(--accent-bright);
  position: relative;
  z-index: 1;
}
.community-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.community-card p {
  font-size: var(--fs-sm);
  color: var(--parchment);
  margin: 0 0 var(--sp-4);
  position: relative;
  z-index: 1;
}
.community-card__link {
  color: var(--bone);
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.community-card__link::after { content: ' →'; }
