:root {
  --bg-1: #020306;
  --bg-2: #050912;
  --text: #edf3ff;
  --muted: #b7c5e2;
  --card: rgba(10, 20, 42, 0.84);
  --line: rgba(170, 194, 232, 0.22);
  --brand: #007bff;
  --brand-2: goldenrod;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 16%, rgba(22, 92, 226, 0.18) 0%, transparent 36%),
    radial-gradient(circle at 86% 0%, rgba(8, 20, 46, 0.42) 0%, transparent 40%),
    radial-gradient(circle at 72% 88%, rgba(44, 112, 216, 0.12) 0%, transparent 36%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

.texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(210, 226, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 226, 255, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 52%, transparent 100%);
  opacity: 0.25;
}

.wrap {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: 34px 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 0 26px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  color: var(--brand-2);
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 28px;
  padding-top: 30px;
  align-items: center;
}

.headline {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 4.4vw, 3rem);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.sub {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.13rem);
  line-height: 1.6;
  max-width: 58ch;
}

.button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  color: #333333;
  background: linear-gradient(120deg, #b88412, #f2cf67);
  box-shadow: 0 10px 22px rgba(170, 120, 10, 0.38);
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.button.primary {
  color: #333333;
  background: linear-gradient(120deg, #b88412, #f2cf67);
  box-shadow: 0 10px 22px rgba(170, 120, 10, 0.38);
}

.header-button {
  padding: 10px 16px;
}

.button.secondary {
  color: #333333;
  background: linear-gradient(120deg, #b88412, #f2cf67);
  border: 1px solid rgba(90, 66, 12, 0.48);
}

.button:hover {
  transform: translateY(-2px);
}

.hero-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  transform: rotate(-1.3deg);
}

.hero-panel-inner {
  border-radius: 18px;
  border: 1px dashed rgba(0, 123, 255, 0.4);
  padding: 18px;
  background: linear-gradient(180deg, rgba(14, 30, 60, 0.9), rgba(8, 18, 38, 0.88));
  transform: rotate(1.3deg);
}

.hero-panel h2 {
  margin: 0;
  font-size: 1.2rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.hero-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-kicker {
  margin: 44px 0 8px;
  color: var(--brand);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.section-title {
  margin: 0 0 16px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.01em;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card {
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
  min-height: 132px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  opacity: 0;
  animation: fade-rise 600ms ease forwards;
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(0, 123, 255, 0.68);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.58);
  background: rgba(12, 24, 48, 0.95);
}

.card-preview {
  width: 50%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  justify-self: center;
  border: 0;
  background: transparent;
}

.card-preview-image {
  width: 100%;
  height: 100%;
  display: block;
}

.contain-image {
  object-fit: contain;
}

.trivia-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1a2759;
}

.sim-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(140deg, #0062cc, #2a90ff);
}

.trivia-preview .card-preview-image {
  width: 100%;
  height: 100%;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.86rem;
}

.cta-band {
  margin-top: 34px;
  background: linear-gradient(90deg, rgba(0, 92, 198, 0.3), rgba(10, 27, 58, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(1, 3, 8, 0.78);
  backdrop-filter: blur(4px);
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.contact-modal {
  width: min(540px, 94vw);
  background: linear-gradient(180deg, rgba(10, 22, 45, 0.98), rgba(7, 14, 30, 0.98));
  border: 1px solid rgba(170, 194, 232, 0.32);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
  padding: 20px;
}

.contact-modal h3 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.35rem;
}

.modal-close {
  float: right;
  border: 1px solid rgba(170, 194, 232, 0.34);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(8, 18, 38, 0.95);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

#contactForm {
  display: grid;
  gap: 10px;
}

.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contactForm label {
  font-weight: 700;
  font-size: 0.95rem;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  border: 1px solid rgba(170, 194, 232, 0.34);
  border-radius: 10px;
  background: rgba(5, 12, 26, 0.96);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
  color: #8fa3c6;
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: 2px solid rgba(242, 207, 103, 0.6);
  outline-offset: 1px;
  border-color: rgba(242, 207, 103, 0.55);
}

.form-error {
  margin: 0;
  min-height: 1.1em;
  color: #ffd983;
  font-size: 0.9rem;
}

.form-error.success {
  color: #9ce7b3;
}

#contactSend:disabled {
  opacity: 0.72;
  cursor: wait;
}

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(2) { animation-delay: 90ms; }
.card:nth-child(3) { animation-delay: 140ms; }
.card:nth-child(4) { animation-delay: 190ms; }
.card:nth-child(5) { animation-delay: 240ms; }
.card:nth-child(6) { animation-delay: 290ms; }
.card:nth-child(7) { animation-delay: 340ms; }
.card:nth-child(8) { animation-delay: 390ms; }
.card:nth-child(9) { animation-delay: 440ms; }
.card:nth-child(10) { animation-delay: 490ms; }

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    transform: none;
  }

  .hero-panel-inner {
    transform: none;
  }

  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    justify-content: flex-start;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-preview {
    width: 58%;
  }

  .cta-band {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }
}
