/* ═══════════════════════════════════════
   Althera Games — Custom CSS
   Dark Gaming Aesthetic
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Cinzel:wght@700;900&display=swap');

/* ─── CSS Variables ─── */
:root {
  --space:        #0a0a0f;
  --card:         #0f0f1a;
  --card-hover:   #141425;
  --border:       #1e1e35;
  --border-light: #2a2a45;
  --gold:         #f59e0b;
  --gold-light:   #fbbf24;
  --gold-dark:    #d97706;
  --purple:       #7c3aed;
  --purple-light: #8b5cf6;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-faint:   #475569;
  --green:        #10b981;
  --red:          #ef4444;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--space);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--space);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--space); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.font-display { font-family: 'Cinzel', serif; }

/* ─── Logo (white-bg PNG → dark theme fix) ─── */
img[alt="Althera Games"] {
  filter: invert(1);
  transition: filter 0.2s;
}

/* ─── Navbar ─── */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* Hero üstüne koyu gradient — logo arka planı görünmez olur */
#navbar:not(.nav-scrolled)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.82) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

#navbar.nav-scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.nav-link:hover, .nav-link.nav-active {
  color: var(--text);
}

.nav-link:hover::after, .nav-link.nav-active::after {
  width: 100%;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--gold);
  color: var(--space);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.06);
}

.btn-steam {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1b2838;
  color: #c7d5e0;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid #2a475e;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-steam:hover {
  background: #2a475e;
  border-color: #4fc3f7;
  transform: translateY(-1px);
}

/* ─── Section ─── */
.section {
  padding: 100px 0;
}

.section-sm {
  padding: 60px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
}

/* ─── Cards ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ─── Game Cards ─── */
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(245, 158, 11, 0.08);
}

.game-card-coming .game-card-inner {
  background: linear-gradient(135deg, #0f0f1a 0%, #12101e 50%, #0d0d1a 100%);
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-soon {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* ─── Hero ─── */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,15,0.5) 0%,
    rgba(10,10,15,0.4) 40%,
    rgba(10,10,15,0.85) 80%,
    rgba(10,10,15,1) 100%
  );
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-title .accent {
  color: var(--gold);
  -webkit-text-stroke: 0px;
}

/* ─── Divider / Glow Lines ─── */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

/* ─── Timeline ─── */
.timeline-item {
  position: relative;
  padding-left: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 22px;
  width: 2px;
  height: calc(100% + 16px);
  background: linear-gradient(to bottom, var(--gold-dark), transparent);
}

.timeline-item:last-child::after { display: none; }

/* ─── Value Cards ─── */
.value-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.value-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
}

.value-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 1.2rem;
}

/* ─── Contact Form ─── */
.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.form-input::placeholder { color: var(--text-faint); }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

/* ─── Scroll Animations ─── */
[data-animate] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
              transform 0.65s cubic-bezier(0.16,1,0.3,1);
}

[data-animate="left"] {
  transform: translateX(-32px);
}

[data-animate="right"] {
  transform: translateX(32px);
}

[data-animate="scale"] {
  transform: scale(0.92);
}

[data-animate].animate-in {
  opacity: 1;
  transform: none;
}

/* ─── Footer ─── */
footer {
  margin-top: 4rem;
}

.footer-link {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--gold); }

/* ─── Noise Overlay (Subtle Texture) ─── */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* ─── Loading Spinner ─── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(245,158,11,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Pulse Dot (Live indicator) ─── */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ─── NightRecord Glitch Effect ─── */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
}

.game-card-coming:hover .glitch::before {
  opacity: 0.6;
  color: #a78bfa;
  clip-path: inset(30% 0 40% 0);
  transform: translateX(-3px);
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

.game-card-coming:hover .glitch::after {
  opacity: 0.6;
  color: #f59e0b;
  clip-path: inset(60% 0 10% 0);
  transform: translateX(3px);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0%   { clip-path: inset(20% 0 50% 0); }
  25%  { clip-path: inset(60% 0 10% 0); }
  50%  { clip-path: inset(10% 0 65% 0); }
  75%  { clip-path: inset(45% 0 25% 0); }
  100% { clip-path: inset(5% 0 80% 0); }
}

/* ─── Screenshot Grid ─── */
.screenshot-item {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.screenshot-item:hover {
  transform: scale(1.02);
  border-color: var(--border-light);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.screenshot-item:hover img { transform: scale(1.05); }

/* ─── Lightbox ─── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .hero-title { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .section-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 50px 0; }
  .btn-primary, .btn-secondary { padding: 11px 22px; font-size: 0.85rem; }
}

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Map ─── */
.map-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ─── Social Icons ─── */
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  font-size: 1rem;
}

.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245,158,11,0.08);
}

/* ─── Misc ─── */
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple-light); }
.text-muted { color: var(--text-muted); }
.border-subtle { border-color: var(--border); }
