/* ============================================
   HOMEPAGE STYLES
   Trailer hero, 3-up cards, devlog,
   games grid, about, contact, modal.
   ============================================ */

/* ---------- HERO TRAILER ---------- */
.hero-block { margin-bottom: 2rem; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-meta .eyebrow { color: var(--purple-bright); }
.hero-meta .meta-right {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* The trailer "player" frame */
.trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7.2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
}
.trailer:hover {
  border-color: var(--line-bright);
  box-shadow: var(--shadow-accent);
}

/* Poster image (shown when no video is loaded yet) */
.trailer-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease, filter 0.3s ease;
}
.trailer:hover .trailer-poster {
  transform: scale(1.03);
  filter: brightness(0.92);
}

/* Optional embedded video — set src in HTML when ready */
.trailer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* JS toggles this when play is pressed */
}
.trailer.playing .trailer-video { display: block; }
.trailer.playing .trailer-poster,
.trailer.playing .play-btn-wrap,
.trailer.playing .trailer-title { display: none; }

.trailer::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(5, 5, 7, 0.85) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(5, 5, 7, 0.4) 100%);
  pointer-events: none;
}
.trailer.playing::after { display: none; }

.trailer-title {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.trailer-title .gothic {
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--text);
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(0, 0, 0, 0.7);
}

.play-btn-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.play-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 6px rgba(168, 85, 247, 0.12),
    0 0 30px rgba(168, 85, 247, 0.35);
  transition: all 0.3s ease;
  cursor: pointer;
}
.trailer:hover .play-btn {
  transform: scale(1.1);
  box-shadow:
    0 0 0 10px rgba(168, 85, 247, 0.16),
    0 0 50px rgba(168, 85, 247, 0.5);
}
.play-btn svg { width: 28px; height: 28px; margin-left: 5px; }

.trailer-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ---------- 3-UP CARDS UNDER HERO ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-deep) 100%);
  transition: height 0.4s ease;
}
.card:hover {
  background: var(--surface-2);
  border-color: var(--line-bright);
  transform: translateY(-3px);
}
.card:hover::before { height: 100%; }

/* Featured game card variant */
.card-featured {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.card-featured .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line-2);
  overflow: hidden;
  flex-shrink: 0;
}
.card-featured .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.card-featured .info {
  flex: 1;
  min-width: 0;
}
.card-featured .title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.card-featured h3 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
}
.card-featured .character-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.card-featured .thumbs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.card-featured .thumbs .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Category card variant */
.card-cat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 130px;
  gap: 0.5rem;
}
.card-cat .eyebrow {
  color: var(--text-muted);
  font-size: 0.62rem;
}
.card-cat h3 {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}
.card-cat .arrow-icon {
  width: 28px;
  height: 28px;
  color: var(--purple-bright);
  margin-top: 0.4rem;
  transition: transform 0.3s ease;
}
.card-cat:hover .arrow-icon {
  transform: translateY(3px);
  color: var(--purple-glow);
}

/* ---------- DEVLOG SECTION ---------- */
.section-head .loc::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--purple);
  animation: pulse-dot 2.5s ease-in-out infinite;
  display: inline-block;
}

.devlog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.devlog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.3rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.devlog-card:hover {
  background: var(--surface-2);
  border-color: var(--line-bright);
  transform: translateY(-2px);
}
.devlog-card .date-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.devlog-card .date {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--purple-bright);
  letter-spacing: 0.05em;
}
.devlog-card .dot {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}
.devlog-card .cat {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}
.devlog-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.devlog-card .author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ---------- GAMES GRID ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.game-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.game-tile:hover {
  border-color: var(--line-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.game-tile .tile-img {
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  position: relative;
}
.game-tile .tile-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 7, 0.6) 100%);
}

.game-tile .tile-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-tile .tile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  width: fit-content;
  margin-bottom: 0.7rem;
}
.status-released {
  background: rgba(74, 222, 128, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.status-alpha {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple-bright);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.status-dev {
  background: rgba(227, 74, 61, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(227, 74, 61, 0.3);
}
.tile-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}

.game-tile h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.game-tile .tile-tagline {
  font-family: 'Pirata One', serif;
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}
.game-tile p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  flex: 1;
}
.game-tile .tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple-bright);
  transition: gap 0.2s ease;
}
.game-tile:hover .tile-cta {
  gap: 0.7rem;
  color: var(--purple-glow);
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}
.about-text,
.about-stats {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
}
.about-text p { font-size: 0.95rem; margin-bottom: 1rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.stat-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.stat-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--purple-bright);
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.contact-info,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
}
.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.contact-info .mail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--purple-bright);
  word-break: break-all;
  margin-bottom: 1.5rem;
  display: block;
}
.socials {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.social {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.social:hover {
  color: var(--purple-bright);
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.08);
}
.social svg { width: 16px; height: 16px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.contact-form input,
.contact-form textarea {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
  font-family: 'Outfit', sans-serif;
}
.contact-form .btn-primary {
  align-self: flex-start;
  margin-top: 0.3rem;
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 12, 0.92);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal.open { display: flex; }
.modal-body {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 3rem;
  max-width: 500px;
  text-align: center;
}
.modal-body h3 { margin-bottom: 0.8rem; }
.modal-body p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.modal-close {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modal-close:hover {
  color: var(--text);
  border-color: var(--purple);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .grid-3,
  .games-grid,
  .devlog-grid { grid-template-columns: 1fr; }
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .play-btn { width: 60px; height: 60px; }
  .play-btn svg { width: 22px; height: 22px; }
  .trailer-title { bottom: 1rem; }
}
