/*
  Emberhammer - Style Sheet
  Custom dark theme with premium minimal aesthetics & retro pixel-art animations
*/

/* Custom Variables */
:root {
  --bg-color: #0f0f10;
  --card-bg: #151517;
  --card-border: #222225;
  --accent-color: #ff5c33;
  --accent-rgb: 255, 92, 51;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --font-sans: 'Space Grotesk', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

::selection {
  background-color: rgba(var(--accent-rgb), 0.3);
  color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}
a:hover {
  color: #ff7c5c;
}

/* Sticky Navbar with Blur */
.navbar-custom {
  background-color: rgba(15, 15, 16, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem 0;
  transition: var(--transition-smooth);
  z-index: 1030;
}

.navbar-custom.scrolled {
  padding: 0.85rem 0;
  border-bottom-color: rgba(255, 92, 51, 0.15);
}

.navbar-brand {
  font-weight: 700;
  color: var(--text-primary) !important;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand span {
  color: var(--accent-color);
}

.nav-link-custom {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link-custom:hover, 
.nav-link-custom.active {
  color: var(--accent-color) !important;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero Section */
.hero-section {
  padding: 180px 0 100px 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-rgb), 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-subtitle {
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* CSS-Only Pixel Art Placeholder Animation (Flame/Ember) */
.pixel-art-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, rgba(21, 21, 23, 1) 0%, rgba(15, 15, 16, 0.4) 100%);
  border: 2px dashed #27272a;
  border-radius: 12px;
  aspect-ratio: 1;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.pixel-art-container:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.pixel-art-flame {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.flame-frame-1 {
  animation: toggle-frame-1 0.8s steps(1) infinite;
}

.flame-frame-2 {
  animation: toggle-frame-2 0.8s steps(1) infinite;
}

@keyframes toggle-frame-1 {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes toggle-frame-2 {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.pixel-art-label {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

/* Sections Base Styling */
.section-padding {
  padding: 100px 0;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 3.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.section-title-note {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* Games Grid Section */
.game-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-card-img-wrapper {
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #0c0c0d;
  position: relative;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.game-card:hover .game-card-img {
  transform: scale(1.05);
}

.game-card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.game-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.game-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.game-tag {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

/* Buttons */
.btn-accent {
  background-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.btn-accent:hover, .btn-accent:focus {
  background-color: #ff704d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-outline-custom:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-sm-custom {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* Placeholder card for empty games list */
.games-placeholder-card {
  background-color: var(--card-bg);
  border: 2px dashed #222225;
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.games-placeholder-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1.25rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* About Section */
.about-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-color);
}

.about-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Contact & Footer Section */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 0 3rem 0;
  background-color: #0c0c0d;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 1.3rem;
  transition: var(--transition-smooth);
}

.social-link:hover {
  color: var(--accent-color);
  border-color: rgba(var(--accent-rgb), 0.3);
  background-color: rgba(var(--accent-rgb), 0.05);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.1);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utilities */
.text-accent {
  color: var(--accent-color) !important;
}

/* Contact Section & Form Styling */
.contact-info-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-smooth);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-color);
}

.contact-info-card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-info-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-info-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}
.contact-info-value:hover {
  color: var(--accent-color);
}

.contact-info-text {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
}

.contact-form-wrapper {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-input-custom {
  background-color: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--transition-smooth);
}

.form-input-custom:focus {
  background-color: var(--bg-color);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
  outline: none;
}

.form-status-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Scroll Animation Classes */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 140px 0 70px 0;
    text-align: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .pixel-art-container {
    margin-top: 3rem;
  }
  .navbar-collapse {
    background-color: #0f0f10;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .about-card {
    padding: 2rem 1.5rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}

/* Scroll to Top Button */
.btn-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.4);
}

.btn-scroll-top:hover {
  background-color: #ff704d;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.5);
  color: #fff;
}

.btn-scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Keyboard Accessibility (Focus States) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.social-link:focus-visible,
.btn-scroll-top:focus-visible {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* Hero Page-Load Animation */
.hero-animate {
  opacity: 0;
  transform: translateY(28px);
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Staggered delays — her eleman bir öncekinden 120ms sonra belirir */
.hero-delay-1 { animation-delay: 0.05s; }
.hero-delay-2 { animation-delay: 0.17s; }
.hero-delay-3 { animation-delay: 0.29s; }
.hero-delay-4 { animation-delay: 0.41s; }
.hero-delay-5 { animation-delay: 0.53s; }
