/* Kidex Games — corridor / torch / beacon palette */
:root {
  --bg-deep: #07080c;
  --bg-panel: #0e1018;
  --bg-elevated: #141824;
  --text: #e8eaef;
  --text-muted: #8b92a8;
  --torch: #ff6b35;
  --torch-dim: #c44e28;
  --beacon: #4cc9f0;
  --beacon-glow: #00b4d8;
  --vine: #2d6a4f;
  --stone: #1a1d28;
  --border-glow: rgba(255, 107, 53, 0.45);
  --radius: 16px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

a {
  color: var(--beacon);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--torch);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ——— Background layers (corridor depth) ——— */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 14, 22, 0.92), rgba(7, 8, 12, 0.97)),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(76, 201, 240, 0.08), transparent 55%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(255, 107, 53, 0.03) 40px,
      rgba(255, 107, 53, 0.03) 41px
    );
  pointer-events: none;
  z-index: 0;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ——— Nav ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: linear-gradient(to bottom, rgba(7, 8, 12, 0.92), rgba(7, 8, 12, 0.75), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--torch), var(--beacon));
  box-shadow: 0 0 12px var(--border-glow);
  animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 8px var(--border-glow);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6), 0 0 32px rgba(76, 201, 240, 0.25);
    opacity: 0.95;
  }
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  z-index: 1;
}

.hero-parallax {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.corridor-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(140%, 900px);
  height: 45vh;
  background: linear-gradient(
    to top,
    rgba(20, 24, 36, 0.95) 0%,
    rgba(14, 16, 24, 0.6) 40%,
    transparent 100%
  );
  clip-path: polygon(8% 100%, 12% 20%, 50% 0%, 88% 20%, 92% 100%);
  border-top: 1px solid rgba(255, 107, 53, 0.15);
  box-shadow: 0 -20px 80px rgba(76, 201, 240, 0.06);
  will-change: transform;
}

.corridor-layer.layer-back {
  opacity: 0.5;
  width: min(160%, 1000px);
  height: 38vh;
  filter: blur(1px);
}

.corridor-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(76, 201, 240, 0.35), transparent 70%);
  animation: beacon-flicker 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes beacon-flicker {
  0%,
  100% {
    opacity: 0.85;
    transform: translateX(-50%) scale(1);
  }
  33% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
  66% {
    opacity: 0.75;
    transform: translateX(-50%) scale(0.98);
  }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--torch);
  margin-bottom: 1rem;
  animation: torch-flicker 3s ease-in-out infinite;
}

@keyframes torch-flicker {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
  }
  50% {
    opacity: 0.88;
    text-shadow: 0 0 28px rgba(255, 107, 53, 0.55);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #fff 0%, #a8b0c4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--beacon-glow), var(--beacon));
  color: #041014;
  box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.4), 0 8px 32px rgba(0, 180, 216, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.6), 0 12px 40px rgba(0, 180, 216, 0.45);
}

.btn-ghost {
  background: rgba(255, 107, 53, 0.12);
  color: var(--torch);
  border: 1px solid rgba(255, 107, 53, 0.35);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.15);
  animation: btn-lava 3s ease-in-out infinite;
}

@keyframes btn-lava {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 107, 53, 0.35);
    border-color: rgba(255, 107, 53, 0.55);
  }
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 107, 53, 0.2);
}

/* ——— Sections ——— */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beacon);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 2.5rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about {
  background: linear-gradient(180deg, transparent, rgba(14, 16, 24, 0.5) 30%, rgba(14, 16, 24, 0.5) 70%, transparent);
}

.about-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.about-single {
  max-width: 720px;
  margin: 0 auto;
}

.about-card {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--torch), var(--beacon));
  opacity: 0.85;
}

.about-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.about-card p {
  margin: 0;
  color: var(--text-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tag.highlight {
  color: var(--beacon);
  border-color: rgba(76, 201, 240, 0.35);
}

.focus-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .focus-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.focus-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.focus-card:hover {
  border-color: rgba(76, 201, 240, 0.2);
  transform: translateY(-2px);
}

.focus-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.focus-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Games */
.games-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .games-grid:not(.games-grid--single) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.games-grid--single {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
}

a.game-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.game-card-link .game-body h3 {
  color: var(--text);
}

a.game-card-link:hover .game-body h3 {
  color: var(--beacon);
}

.game-card-cta {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--beacon);
  letter-spacing: 0.02em;
}

.game-card {
  background: var(--stone);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 2px solid rgba(40, 45, 60, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 107, 53, 0.12),
    0 16px 48px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.5), transparent 40%, rgba(76, 201, 240, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  animation: border-shimmer 4s ease-in-out infinite;
}

@keyframes border-shimmer {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 107, 53, 0.25),
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(76, 201, 240, 0.08);
}

.game-card-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.game-icon-wrap {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 107, 53, 0.2);
}

.game-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.game-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(76, 201, 240, 0.12);
  color: var(--beacon);
  border: 1px solid rgba(76, 201, 240, 0.35);
}

.status-pill.soon {
  background: rgba(255, 107, 53, 0.1);
  color: var(--torch);
  border-color: rgba(255, 107, 53, 0.35);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-glow 2s ease-in-out infinite;
}

.game-card.placeholder .game-icon-wrap {
  background: linear-gradient(145deg, var(--bg-elevated), #1a1f2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}

/* Footer / contact */
.footer {
  padding: 4rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1;
  position: relative;
}

.footer-contact-section {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  padding: 2rem 1.75rem;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.footer-contact-lead {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 38ch;
}

.footer-contact-mail {
  margin: 0;
}

.footer-mail-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--beacon);
  word-break: break-word;
}

.footer-mail-link:hover {
  color: var(--torch);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-copy {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.75;
}

/* Game detail page (Corridor Escape) */
.game-detail-page {
  position: relative;
  z-index: 1;
  padding: 6.5rem 1.5rem 3rem;
  min-height: 60vh;
}

.game-detail-inner {
  max-width: 720px;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--beacon);
}

.breadcrumb span[aria-hidden="true"] {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.game-detail-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.game-detail-icon-wrap {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 107, 53, 0.25);
}

.game-detail-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-detail-hero-text {
  flex: 1;
  min-width: 200px;
}

.game-detail-label {
  margin-bottom: 0.35rem;
}

.game-detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.game-detail-tagline {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.app-store-cta {
  margin-bottom: 0;
}

.game-detail-copy {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.75rem 1.85rem;
  margin-bottom: 2rem;
}

.game-detail-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.game-detail-copy p:last-of-type {
  margin-bottom: 0;
}

.game-detail-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.75rem 0 0.85rem;
  color: var(--text);
}

.game-detail-copy .game-detail-h2:first-child {
  margin-top: 0;
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.feature-list li {
  margin-bottom: 0.35rem;
}

.game-detail-back {
  margin: 0;
}

.link-back {
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .game-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .game-icon-wrap {
    margin: 0 auto;
  }
}
