/* ===== Custom Properties ===== */
:root {
  --orange: #ff6101;
  --orange-light: #ff8a3d;
  --cream: #f7f4e1;
  --bg: #0b0b0f;
  --bg-lighter: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text: #e8e6df;
  --text-muted: #8a8a8f;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --radius-lg: 20px;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-display: "Changa", system-ui, sans-serif;
  --nav-height: 72px;
  --container-max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ===== Utilities ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 680px;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--cream);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 97, 1, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 80% 20%, rgba(255, 138, 61, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 1000px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title-line {
  display: block;
}

.hero-title .accent {
  color: var(--orange);
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--orange), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 97, 1, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
  box-shadow: 0 6px 28px rgba(255, 97, 1, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 20px rgba(255, 97, 1, 0.15);
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--cream);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ===== Sections ===== */
.section {
  padding: 120px 24px;
  position: relative;
}

.section-dark {
  background: var(--bg-lighter);
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 520px;
  margin-bottom: 48px;
  font-weight: 500;
}

/* ===== About Cards ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 97, 1, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.about-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 97, 1, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.about-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--orange);
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 97, 1, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.game-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-lighter), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-placeholder svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  opacity: 0.3;
}

.game-card-info {
  padding: 24px;
}

.game-card-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.game-card-info p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.game-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 97, 1, 0.12);
  color: var(--orange);
}

/* ===== Contact Form ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 97, 1, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.btn-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.btn-submit svg {
  width: 16px;
  height: 16px;
}

.btn-submit.loading svg {
  animation: spin 0.8s linear infinite;
}

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

.form-success {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 97, 1, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.form-success svg {
  width: 48px;
  height: 48px;
  color: var(--orange);
  margin: 0 auto 16px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-muted);
}

.form-error {
  padding: 14px 20px;
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.25);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.form-error p {
  color: #ff6b6b;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 24px 32px;
  background: var(--bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  height: 24px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 300px;
  line-height: 1.7;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--cream);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ===== Focus & Accessibility ===== */
.nav-links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 97, 1, 0.15);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(11, 11, 15, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section {
    padding: 80px 20px;
  }

  .hero {
    padding-bottom: 60px;
  }

  .btn-submit {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }
}
