/* ============================================================
   Wirraway Software — Main Stylesheet
   ============================================================ */

:root {
  --color-bg:        #0f1114;
  --color-bg-alt:    #1a1d23;
  --color-bg-card:   #22262e;
  --color-surface:   #2a2f38;
  --color-text:      #e0e0e0;
  --color-text-muted:#9a9faa;
  --color-heading:   #ffffff;
  --color-accent:    #d4a84b;
  --color-accent-hover: #e8c06a;
  --color-link:      #6bb8e8;
  --color-link-hover:#9dd0f5;
  --color-overlay:   rgba(10, 12, 16, 0.72);
  --font-heading:    'Rokkitt', 'Rubik', serif;
  --font-body:       'Roboto', sans-serif;
  --max-width:       1100px;
  --nav-height:      72px;
  --radius:          8px;
  --transition:      0.25s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 800;
  line-height: 1.2;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(15, 17, 20, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  height: 46px;
  width: auto;
  transition: opacity var(--transition);
}
.nav-brand:hover .nav-logo { opacity: 0.85; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--color-heading); }

.nav-discord {
  color: #fff !important;
  background: #5865F2;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.8rem !important;
  transition: background var(--transition), color var(--transition);
}
.nav-discord:hover {
  background: #4752c4;
  color: #fff !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    width: 260px;
    height: calc(100vh - var(--nav-height));
    background: var(--color-bg-alt);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1rem; }
}

/* ============================================================
   HERO SECTIONS
   ============================================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 3rem) 1.25rem 4rem;
  background: var(--hero-img, none) center / cover no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
  .hero { background-attachment: scroll; }
}

@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
    background-attachment: scroll;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero h1,
.hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.75rem;
  color: var(--color-accent);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

.store-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.store-badges img {
  height: 72px;
  width: auto;
  transition: transform var(--transition), opacity var(--transition);
}
.store-badges a:hover img { transform: scale(1.05); opacity: 0.9; }

.steam-widget {
  margin-top: 0.5rem;
}
.steam-widget iframe {
  max-width: 100%;
  border-radius: var(--radius);
}

/* ============================================================
   GAME DETAILS SECTIONS
   ============================================================ */
.game-details {
  padding: 4rem 0;
  background: var(--color-bg-alt);
}
.game-details:nth-of-type(even) {
  background: var(--color-bg);
}

.game-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.feature-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto 3rem;
  display: grid;
  gap: 0.9rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.65;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ============================================================
   SCREENSHOT GALLERIES
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.gallery-grid--portrait {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.gallery-thumb {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery-thumb img {
  transition: transform 0.35s ease, filter 0.35s ease;
  width: 100%;
}
.gallery-thumb:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ============================================================
   PRESS SECTION
   ============================================================ */
.press-section {
  position: relative;
  padding: 5rem 0;
  background: var(--hero-img, none) center / cover no-repeat fixed;
  overflow: hidden;
}

@media (max-width: 768px) {
  .press-section { background-attachment: scroll; }
}

.press-inner {
  position: relative;
  z-index: 2;
}

.press-section h2 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 2.5rem;
  color: var(--color-accent);
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.press-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.press-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.press-card p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-heading);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.press-card cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-accent);
}
.press-card cite a { color: inherit; }
.press-card cite a:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* ============================================================
   OTHER GAMES
   ============================================================ */
.other-games {
  padding: 4rem 0;
  background: var(--color-bg-alt);
}

.other-games h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 2rem;
}

.game-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  padding: 2rem;
}

.game-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.game-card-body p {
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

@media (max-width: 600px) {
  .game-card { grid-template-columns: 1fr; }
  .game-card-body { padding: 1.5rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.65rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover {
  background: transparent;
  color: var(--color-accent);
  transform: translateY(-1px);
}


/* ============================================================
   DOWNLOADS
   ============================================================ */
.downloads-section {
  padding: 4rem 0;
  background: var(--color-bg);
}

.downloads-section h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 1.5rem;
}

.download-list {
  list-style: none;
  max-width: 500px;
  margin: 0 auto;
}
.download-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.download-list li:last-child { border-bottom: none; }
.download-list a {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.download-list a::before {
  content: '\2193';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--color-surface);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  position: relative;
  padding: 5rem 0;
  background: var(--hero-img, none) center / cover no-repeat fixed;
  overflow: hidden;
}

@media (max-width: 768px) {
  .about-section { background-attachment: scroll; }
}

.about-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  color: var(--color-accent);
}

.about-inner p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.photo-credit {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 2.5rem 0;
  background: #0a0c0e;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.site-footer .legal {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  max-width: 600px;
  margin: 0.5rem auto 0;
  line-height: 1.5;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  object-fit: contain;
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 2.5rem;
  line-height: 1;
  padding: 0.5rem;
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 2001;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  transform: scale(1.15);
}

.lightbox-close { top: 1rem; right: 1.5rem; font-size: 3rem; }
.lightbox-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.15); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.15); }

/* ============================================================
   UTILITIES & TRANSITIONS
   ============================================================ */
/* ============================================================
   PROSE / INNER PAGES
   ============================================================ */
.prose-page {
  padding: calc(var(--nav-height) + 3rem) 0 4rem;
  min-height: calc(100vh - 120px);
}

.prose-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.prose-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.prose-page p {
  max-width: 700px;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.back-link {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.back-link:hover { color: var(--color-heading); }

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
