/* ===================================================
   1701.co — Retro-Futuristic LCARS × 1980s Neon
   =================================================== */

/* --- Reset & Variables --- */

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

:root {
  --gold: #e8a32e;
  --cyan: #00d4ff;
  --magenta: #ff2d78;
  --lavender: #9977bb;
  --blue: #6688cc;
  --bg-primary: #0a0a1e;
  --bg-card: rgba(14, 14, 36, 0.82);
  --text-primary: #ddddf0;
  --text-secondary: rgba(200, 200, 220, 0.65);
}

/* --- Base --- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Saira", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Neon gradient strip at very top */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan), var(--gold));
  z-index: 1001;
}

/* Subtle grid overlay (Tron / 80s) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
      rgba(0, 212, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(0, 212, 255, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 1;
}

/* --- Starfield Canvas --- */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Scanlines (CRT) --- */

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.025) 2px,
    rgba(0, 0, 0, 0.025) 4px
  );
  pointer-events: none;
  z-index: 999;
}

/* --- LCARS Components --- */

.lcars-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  position: relative;
  z-index: 10;
}

.lcars-bar--top {
  padding-top: 22px; /* clear the gradient strip */
  opacity: 0;
  animation: slideInLeft 0.7s ease-out 0.1s forwards;
}

.lcars-bar--bottom {
  opacity: 0;
  animation: slideInRight 0.7s ease-out 2.2s forwards;
}

.lcars-cap {
  height: 28px;
  width: 90px;
  border-radius: 14px 4px 4px 14px;
  flex-shrink: 0;
}

.lcars-cap--right {
  border-radius: 4px 14px 14px 4px;
}

.lcars-cap--small {
  width: 50px;
}

.lcars-cap--gold {
  background: var(--gold);
}
.lcars-cap--cyan {
  background: var(--cyan);
}
.lcars-cap--magenta {
  background: var(--magenta);
}

.lcars-block {
  height: 28px;
  border-radius: 4px;
  flex-shrink: 0;
}

.lcars-block--lavender {
  background: var(--lavender);
  width: 40px;
}
.lcars-block--blue {
  background: var(--blue);
  width: 28px;
}
.lcars-block--cyan {
  background: var(--cyan);
  width: 24px;
}

.lcars-rule {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
}

.lcars-pip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lcars-pip--gold {
  background: var(--gold);
}
.lcars-pip--magenta {
  background: var(--magenta);
}
.lcars-pip--lavender {
  background: var(--lavender);
}

/* LCARS Divider (between hero & products) */

.lcars-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 44px 0 36px;
  position: relative;
  z-index: 10;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1.3s forwards;
}

.lcars-divider__label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 4px;
}

/* --- Main Content --- */

main {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* --- Hero --- */

.hero {
  text-align: center;
  padding: 56px 0 24px;
}

.hero__logo {
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.2s forwards;
}

.hero__logo-svg {
  width: 72px;
  height: auto;
}

.logo-star {
  animation: starPulse 4s ease-in-out infinite;
}

.hero__title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 14px;
  margin-bottom: 18px;
  text-shadow: 0 0 12px rgba(232, 163, 46, 0.45),
    0 0 36px rgba(232, 163, 46, 0.18), 0 0 72px rgba(232, 163, 46, 0.08);
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero__tagline {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.8rem, 2vw, 1.05rem);
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.hero__rule {
  width: 180px;
  height: 2px;
  margin: 0 auto 28px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cyan),
    var(--gold),
    transparent
  );
  opacity: 0;
  animation: fadeIn 1s ease-out 1s forwards;
}

.hero__description {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.1s forwards;
}

/* --- Products Grid --- */

.products {
  position: relative;
  z-index: 10;
  padding-bottom: 48px;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* --- Product Card --- */

.product-card {
  display: flex;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px 14px 14px 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  opacity: 0;
  animation: fadeInUp 0.7s ease-out forwards;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5),
    0 0 28px color-mix(in srgb, var(--card-accent) 22%, transparent);
}

.product-card:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 4px;
}

.product-card__accent {
  width: 10px;
  flex-shrink: 0;
  background: var(--card-accent);
  transition: box-shadow 0.35s ease;
}

.product-card:hover .product-card__accent {
  box-shadow: 4px 0 18px color-mix(in srgb, var(--card-accent) 30%, transparent);
}

.product-card__body {
  padding: 28px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__icon {
  font-size: 2rem;
  margin-bottom: 14px;
  line-height: 1;
}

.product-card__name {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--card-accent);
  margin-bottom: 12px;
  letter-spacing: 1.5px;
}

.product-card__description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 22px;
  font-size: 0.92rem;
  flex: 1;
}

.product-card__cta {
  color: var(--card-accent);
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  transition: gap 0.3s ease;
}

.product-card:hover .product-card__cta {
  gap: 14px;
}

.product-card__arrow {
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__arrow {
  transform: translateX(3px);
}

/* --- Footer --- */

.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 36px 24px 48px;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 2.4s forwards;
}

.footer__contact {
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.footer__social {
  margin-bottom: 28px;
}

.footer__social a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer__social a:hover {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(232, 163, 46, 0.4);
}

.footer__social svg {
  flex-shrink: 0;
}

.footer__copyright {
  font-size: 0.72rem;
  color: rgba(200, 200, 220, 0.25);
  letter-spacing: 1px;
}

/* --- Keyframes --- */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes starPulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

/* --- Responsive --- */

@media (max-width: 768px) {
  main {
    padding: 0 20px;
  }

  .hero {
    padding: 40px 0 16px;
  }

  .hero__logo-svg {
    width: 54px;
  }

  .hero__title {
    letter-spacing: 8px;
  }

  .hero__tagline {
    letter-spacing: 3px;
  }

  .hero__rule {
    width: 120px;
  }

  .lcars-bar {
    padding: 12px 16px;
  }

  .lcars-cap {
    width: 56px;
  }

  .lcars-cap--small {
    width: 32px;
  }

  .lcars-block--lavender {
    width: 24px;
  }
  .lcars-block--blue {
    width: 18px;
  }

  .products__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .lcars-divider {
    padding: 32px 0 28px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    letter-spacing: 5px;
  }

  .hero__tagline {
    letter-spacing: 2px;
    font-size: 0.72rem;
  }

  .lcars-divider__label {
    letter-spacing: 3px;
    font-size: 0.62rem;
  }
}

/* --- Accessibility --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
