/* ===== Design System ===== */
:root {
  --bg: #070b14;
  --bg-soft: #0f1628;
  --panel: #131c31;
  --panel-2: #1a2540;
  --text: #e9f0ff;
  --text-muted: #9fb2d8;
  --line: rgba(158, 181, 227, 0.2);
  --primary: #22d3ee;
  --primary-2: #38bdf8;
  --accent: #a3e635;
  --danger: #fb7185;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 20px 45px rgba(2, 8, 23, 0.45);
}

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

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

/* Skip link – Accessibility (focus only) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at 85% 5%, rgba(163, 230, 53, 0.14), transparent 26%),
    linear-gradient(180deg, #070b14 0%, #0b1223 55%, #070b14 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.7;
}

main {
  padding: 0 0 3.2rem;
}

a {
  color: var(--primary);
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ===== Header and Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid rgba(158, 181, 227, 0.16);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(5, 9, 19, 0.96);
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 8px 28px rgba(2, 8, 23, 0.45);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.site-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.16);
}

.site-nav a:focus-visible,
.logo:focus-visible,
.nav-toggle:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(19, 28, 49, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.3);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

body.nav-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Typography ===== */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.55rem;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  max-width: 14ch;
  margin-bottom: 0.9rem;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.14rem;
  margin-bottom: 0.45rem;
}

p {
  color: var(--text-muted);
  max-width: 76ch;
  margin-bottom: 0.95rem;
}

.section-intro {
  max-width: 64ch;
}

/* ===== Hero ===== */
.page-hero {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(163, 230, 53, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 50%, rgba(56, 189, 248, 0.06), transparent 45%),
    linear-gradient(160deg, rgba(19, 28, 49, 0.97) 0%, rgba(13, 20, 36, 0.95) 50%, rgba(16, 24, 42, 0.9) 100%);
  border: 1px solid var(--line);
  border-left: none;
  border-right: none;
  border-radius: 0;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: clamp(2.25rem, 6vw, 4rem) 0;
  margin-bottom: 2rem;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 11, 20, 0.4) 100%);
  pointer-events: none;
}

/* Hero content full width with comfortable padding */
.page-hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1200px, 94%);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

.page-hero h1,
.page-hero .section-intro,
.page-hero p {
  max-width: none;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
  min-height: 120px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

.page-hero .hero-content .eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
}

.page-hero .hero-content h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.page-hero .hero-content .section-intro {
  margin-bottom: 0.9rem;
  line-height: 1.7;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--text-muted);
}

.page-hero .hero-content p {
  margin-bottom: 0.8rem;
  font-size: clamp(0.875rem, 1.6vw, 0.95rem);
  line-height: 1.65;
  color: var(--text-muted);
}

.page-hero .hero-content p:last-child {
  margin-bottom: 0;
}

.hero-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
  min-height: 220px;
  padding: 1rem;
}

.hero-icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: var(--primary);
  opacity: 0.9;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 16px;
  transition: transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.hero-icon-item:hover {
  transform: scale(1.08);
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.2);
}

.hero-icon-item svg {
  width: 36px;
  height: 36px;
}

.hero-icon-1 { transform: rotate(-5deg); }
.hero-icon-1:hover { transform: rotate(-5deg) scale(1.08); }
.hero-icon-2 { transform: rotate(4deg); }
.hero-icon-2:hover { transform: rotate(4deg) scale(1.08); }
.hero-icon-3 { transform: rotate(-3deg); }
.hero-icon-3:hover { transform: rotate(-3deg) scale(1.08); }
.hero-icon-4 { transform: rotate(6deg); }
.hero-icon-4:hover { transform: rotate(6deg) scale(1.08); }
.hero-icon-5 { transform: rotate(-2deg); }
.hero-icon-5:hover { transform: rotate(-2deg) scale(1.08); }

.hero-media {
  min-height: 250px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dashboard {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
  box-sizing: border-box;
}

.hero-dashboard img {
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: var(--radius-md);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(158, 181, 227, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-dashboard img:hover {
  transform: scale(1.02);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(34, 211, 238, 0.08);
}

.hero-with-image .hero-image-wrap {
  width: 100%;
  max-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.hero-with-image .hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Layout Blocks ===== */
.section {
  padding: 1.35rem 0;
}

.section-image {
  margin: 1rem 0 1.5rem;
  text-align: center;
}

.section-image img {
  max-width: 280px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(158, 181, 227, 0.1);
}

/* Section split: content + image side by side */
.section-split .section-split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
  margin-top: 0.75rem;
}

.section-split-content {
  min-width: 0;
}

.section-split-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.section-split-image img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(158, 181, 227, 0.1);
}

/* Register: image left, content right - order in HTML is image then content, so no extra class needed */
.section-split-inner.section-image-left .section-split-image {
  order: 1;
}

.section-split-inner.section-image-left .section-split-content {
  order: 2;
}

@media (max-width: 760px) {
  .section-image {
    margin: 0.75rem 0 1.25rem;
  }

  .section-image img {
    max-width: 260px;
  }

  .section-split .section-split-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 0.5rem;
  }

  .section-split-inner.section-image-left .section-split-image,
  .section-split-inner.section-image-left .section-split-content {
    order: unset;
  }

  .section-split-image {
    justify-content: center;
  }

  .section-split-image img {
    max-width: 260px;
  }
}

@media (max-width: 480px) {
  .section-image img {
    max-width: 220px;
  }

  .section-split-image img {
    max-width: 220px;
  }
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.columns-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.text-block,
.card,
.entry,
.form-card,
.simple-form,
.simple-table {
  background: linear-gradient(155deg, rgba(19, 28, 49, 0.95), rgba(16, 24, 42, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.text-block,
.entry,
.form-card,
.simple-form {
  padding: 1rem;
}

.text-block,
.entry,
.game-card,
.blog-card,
.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.text-block:hover,
.entry:hover,
.game-card:hover,
.blog-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(3, 9, 24, 0.45);
  border-color: rgba(56, 189, 248, 0.52);
}

/* ===== Media Cards ===== */
.media-thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 0.75rem;
  aspect-ratio: 16 / 10;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-grid,
.blog-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-card,
.blog-card,
.feature-card {
  background: linear-gradient(155deg, rgba(19, 28, 49, 0.95), rgba(16, 24, 42, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

/* ===== Buttons ===== */
.actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.65rem 1.05rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #05131f;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.28);
}

.btn-ghost {
  border-color: rgba(34, 211, 238, 0.44);
  color: var(--text);
  background: rgba(34, 211, 238, 0.08);
}

.btn-ghost:hover {
  background: rgba(34, 211, 238, 0.2);
}

/* ===== Lists and Tables ===== */
.bullets,
.steps {
  max-width: 72ch;
  padding-left: 1.2rem;
  margin: 0.4rem 0 0.95rem;
}

.bullets li,
.steps li {
  color: var(--text-muted);
  margin-bottom: 0.42rem;
}

.bullets li::marker,
.steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.entry {
  margin-bottom: 0.85rem;
}

.entry time {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.blog-card time {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.65rem;
  overflow: hidden;
}

.simple-table th,
.simple-table td {
  padding: 0.72rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.simple-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
}

/* ===== Forms ===== */
.form-card,
.simple-form {
  display: grid;
  gap: 0.6rem;
}

.simple-form {
  max-width: 700px;
}

.form-card label,
.simple-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-card input,
.form-card textarea,
.form-card select,
.simple-form input,
.simple-form textarea,
.simple-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.68rem 0.75rem;
  color: var(--text);
  background: rgba(7, 11, 20, 0.45);
  font: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus,
.simple-form input:focus,
.simple-form textarea:focus,
.simple-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.form-card input::placeholder,
.form-card textarea::placeholder,
.simple-form input::placeholder,
.simple-form textarea::placeholder {
  color: rgba(159, 178, 216, 0.8);
}

.small {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.simple-form [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050913;
  padding: 1.55rem 0 1.8rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.32rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.footer-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.copy {
  margin-top: 1rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ===== Utility ===== */
.cta-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-layout,
  .two-col,
  .columns-3,
  .game-grid,
  .blog-grid,
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: 1.75rem;
  }

  .page-hero .hero-content {
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }

  .hero-dashboard {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero-dashboard img {
    max-width: 100%;
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: sticky;
  }

  .nav-wrap {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-wrap nav {
    width: 100%;
    order: 3;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  body.nav-open .nav-wrap nav {
    max-height: 280px;
    opacity: 1;
  }

  .site-nav {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0 0;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .page-hero {
    padding: clamp(1.5rem, 5vw, 2rem) 0;
    margin-bottom: 1.5rem;
  }

  .page-hero .container {
    max-width: 98%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-layout {
    gap: 1.5rem;
  }

  .page-hero .hero-content {
    padding: 1rem 0.75rem;
  }

  .page-hero .hero-content .eyebrow {
    padding: 0.3rem 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  .page-hero .hero-content h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 0.7rem;
  }

  .page-hero .hero-content .section-intro,
  .page-hero .hero-content p {
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
  }

  .hero-dashboard {
    min-height: 140px;
    padding: 0 0.5rem;
  }

  .hero-dashboard img {
    max-height: 280px;
    border-radius: 12px;
  }

  .hero-dashboard img:hover {
    transform: none;
  }

  .hero-icon-item {
    width: 52px;
    height: 52px;
  }

  .hero-icon-item svg {
    width: 28px;
    height: 28px;
  }

  .logo-icon {
    height: 36px;
    max-width: 140px;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 1.25rem 0;
  }

  .page-hero .hero-content h1 {
    font-size: 1.35rem;
  }

  .hero-dashboard img {
    max-height: 240px;
  }
}
