/* ==========================================================================
   BestInOnline Landing — shared styles
   Replace values in :root when deploying with final brand assets.
   ========================================================================== */

:root {
  /* Accent palette */
  --color-accent-lime: #a2e305;
  --color-accent-purple: #5856d6;
  --color-accent-red: #ff3b30;

  /* Backgrounds & surfaces */
  --color-bg-deep: #010311;
  --color-bg-elevated: #0a0d1f;
  --color-bg-card: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(162, 227, 5, 0.35);

  /* Text */
  --color-text: #e8eaf2;
  --color-text-muted: #8b90a8;
  --color-text-dim: #5c6178;

  /* Layout */
  --max-width: 1120px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.35s var(--ease-out);
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-bg-deep);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-lime);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: #c4f04a;
}

ul {
  list-style: none;
}

/* Ambient background (repeated on all pages) */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--color-bg-deep);
  pointer-events: none;
}

.page-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 86, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 86, 214, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.page-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}

.page-bg__glow--lime {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: var(--color-accent-lime);
  opacity: 0.12;
}

.page-bg__glow--purple {
  width: 380px;
  height: 380px;
  bottom: 10%;
  left: -100px;
  background: var(--color-accent-purple);
  opacity: 0.18;
}

.page-bg__glow--red {
  width: 280px;
  height: 280px;
  top: 40%;
  right: 15%;
  background: var(--color-accent-red);
  opacity: 0.08;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(1, 3, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--color-text);
}

.brand__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-accent-lime);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent-lime), #7ab804);
  color: var(--color-bg-deep);
  box-shadow: 0 0 24px rgba(162, 227, 5, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(162, 227, 5, 0.5);
  color: var(--color-bg-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent-purple);
  color: var(--color-accent-purple);
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-purple);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.section__lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 52ch;
}

/* ========== HOME: Hero ========== */
.hero {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-accent);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--color-accent-lime);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-sm);
}

.hero__title span {
  background: linear-gradient(90deg, var(--color-accent-lime), var(--color-accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 38ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* HUD stat strip — unique home element */
.hud-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.75rem;
}

.hud-strip__item {
  text-align: center;
  padding: 0.5rem;
  border-right: 1px solid var(--color-border);
}

.hud-strip__item:last-child {
  border-right: none;
}

.hud-strip__value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent-lime);
  margin-bottom: 0.15rem;
}

.hud-strip__label {
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Phone showcase */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-stage__ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px dashed rgba(162, 227, 5, 0.25);
  border-radius: 50%;
  animation: spin-slow 24s linear infinite;
}

.phone-stage__ring--inner {
  width: 260px;
  height: 260px;
  border-color: rgba(88, 86, 214, 0.3);
  animation-direction: reverse;
  animation-duration: 18s;
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.phone-frame {
  position: relative;
  width: 240px;
  padding: 12px;
  background: linear-gradient(160deg, #1a1d2e, #0d0f18);
  border-radius: 36px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(162, 227, 5, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.phone-frame__notch {
  width: 80px;
  height: 22px;
  background: #000;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 8px;
}

.phone-frame__screen {
  aspect-ratio: 9 / 19.5;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
}

.phone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-frame__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-text-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}

/* Screenshot carousel strip */
.screens-row {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) 0 var(--space-lg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-purple) transparent;
}

.screens-row::-webkit-scrollbar {
  height: 6px;
}

.screens-row::-webkit-scrollbar-thumb {
  background: var(--color-accent-purple);
  border-radius: 3px;
}

.screen-card {
  flex: 0 0 200px;
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  transition: transform var(--transition), border-color var(--transition);
}

.screen-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent-lime);
}

.screen-card__frame {
  aspect-ratio: 9 / 19.5;
  background: #0d1018;
  position: relative;
}

.screen-card__frame.is-placeholder::after {
  content: "Add PNG";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background:
    linear-gradient(rgba(88, 86, 214, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 86, 214, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.screen-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-card__caption {
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* Feature pipeline — diagonal accent blocks */
.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  position: relative;
}

.pipeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent-purple), var(--color-accent-lime), transparent);
  z-index: 0;
  transform: translateY(-50%);
}

.pipeline__step {
  position: relative;
  z-index: 1;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.pipeline__step:hover {
  border-color: var(--color-accent-lime);
  transform: translateY(-4px);
}

.pipeline__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.pipeline__step:nth-child(2) .pipeline__num {
  background: var(--color-accent-lime);
  color: var(--color-bg-deep);
}

.pipeline__step:nth-child(3) .pipeline__num {
  background: var(--color-accent-red);
}

.pipeline__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pipeline__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Feature tiles — staggered layout */
.features-mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.feature-tile {
  grid-column: span 4;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.feature-tile::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(162, 227, 5, 0.12), transparent 70%);
  pointer-events: none;
}

.feature-tile:hover {
  border-color: rgba(162, 227, 5, 0.4);
}

.feature-tile--wide {
  grid-column: span 8;
}

.feature-tile--tall {
  grid-row: span 1;
}

.feature-tile__icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent-lime);
}

.feature-tile:nth-child(even) .feature-tile__icon {
  color: var(--color-accent-purple);
}

.feature-tile__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-tile__text {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.feature-tile__list {
  margin-top: var(--space-sm);
}

.feature-tile__list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.feature-tile__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--color-accent-red);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* Game genre tags — repeating visual motif */
.genre-marquee {
  overflow: hidden;
  padding: var(--space-lg) 0;
  border-block: 1px solid var(--color-border);
  background: rgba(88, 86, 214, 0.06);
}

.genre-marquee__track {
  display: flex;
  gap: var(--space-md);
  animation: marquee 28s linear infinite;
  width: max-content;
}

.genre-marquee__track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.genre-tag {
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-deep);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: var(--space-xl);
  background: linear-gradient(135deg, rgba(88, 86, 214, 0.2), rgba(162, 227, 5, 0.08));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.cta-band__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.cta-band__text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.site-footer__brand {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.site-footer__meta {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.site-footer h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.site-footer ul li {
  margin-bottom: 0.4rem;
}

.site-footer ul a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer ul a:hover {
  color: var(--color-accent-lime);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

/* ========== Legal pages ========== */
.page-legal {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
}

.legal-doc__header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.legal-doc__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.legal-doc__meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.legal-doc h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--color-accent-lime);
}

.legal-doc h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--color-text);
}

.legal-doc p,
.legal-doc li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.legal-doc ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: var(--space-md);
}

.legal-doc li {
  margin-bottom: 0.35rem;
}

.legal-callout {
  padding: var(--space-md);
  background: rgba(88, 86, 214, 0.12);
  border-left: 3px solid var(--color-accent-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-md) 0;
}

.legal-callout p {
  margin-bottom: 0;
  color: var(--color-text);
}

/* ========== Contact page ========== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-card {
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.contact-card__row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.contact-card__row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--color-accent-purple);
}

.contact-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  margin-bottom: 0.2rem;
}

.contact-card__value {
  font-size: 1rem;
  font-weight: 500;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--color-text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: var(--space-md);
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent-lime);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin-top: var(--space-sm);
}

/* Scroll reveal (subtle, no JS dependency for content) */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle,
  .section__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .phone-stage {
    order: -1;
    margin-bottom: var(--space-md);
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline::before {
    display: none;
  }

  .features-mosaic {
    grid-template-columns: 1fr;
  }

  .feature-tile,
  .feature-tile--wide {
    grid-column: span 1;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-md);
    background: rgba(1, 3, 17, 0.98);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hud-strip {
    grid-template-columns: 1fr;
  }

  .hud-strip__item {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .hud-strip__item:last-child {
    border-bottom: none;
  }
}
