/*
  File: main.css
  Author: Aiden Rubbo
  Date Created: 2026-07-10
  Date Last Modified: 2026-07-10
  Description: JAM Systems site-wide stylesheet — dark modern theme, brand purple palette
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand palette (JAM Systems UI Color Style Guide) */
  --purple-dark: #5e47a1;
  --purple: #7a5fb9;
  --purple-light: #a18dd6;
  --purple-ultra: #e2daf6;
  --silver-dark: #8c9299;
  --silver: #b0b4ba;
  --silver-light: #d2d5d9;
  --silver-ultra: #f1f2f3;
  --black-soft: #2d2d2d;
  --black: #000000;

  /* Theme */
  --bg: #0b0912;
  --bg-alt: #100d1b;
  --surface: #161226;
  --surface-hover: #1c1730;
  --border: rgba(226, 218, 246, 0.08);
  --border-strong: rgba(161, 141, 214, 0.35);
  --text: var(--silver-ultra);
  --text-muted: var(--silver);
  --text-faint: var(--silver-dark);

  --gradient-brand: linear-gradient(120deg, var(--purple-light), var(--purple) 55%, var(--purple-dark));
  --gradient-text: linear-gradient(100deg, var(--purple-ultra) 0%, var(--purple-light) 60%, var(--purple) 100%);

  /* Type */
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Spacing / misc */
  --container: 1140px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 72px;
  --transition: 0.25s ease;
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--purple-light);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

::selection {
  background: var(--purple);
  color: #fff;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--purple);
  color: #fff;
  border-radius: 8px;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
}

/* ============================================================
   3. BACKGROUND GLOW
   ============================================================ */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 85% -5%, rgba(122, 95, 185, 0.22), transparent 70%),
    radial-gradient(700px 500px at -10% 40%, rgba(94, 71, 161, 0.16), transparent 70%),
    radial-gradient(600px 480px at 70% 105%, rgba(161, 141, 214, 0.1), transparent 70%);
}

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  width: min(100% - 3rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 0.9rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   5. HEADER / NAV
   ============================================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

header.scrolled {
  background: rgba(11, 9, 18, 0.88);
  border-bottom-color: var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand img {
  height: 38px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.nav-desktop .btn {
  margin-left: 0.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: rgba(11, 9, 18, 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.75rem;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 0.8rem 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 24px rgba(122, 95, 185, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(122, 95, 185, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(122, 95, 185, 0.12);
  border-color: var(--purple-light);
}

.btn-lg {
  padding: 1rem 2.1rem;
  font-size: 1.05rem;
}

/* ============================================================
   7. HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple-ultra);
  background: rgba(122, 95, 185, 0.14);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 34em;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-jar {
  width: min(320px, 70vw);
  filter: drop-shadow(0 0 60px rgba(122, 95, 185, 0.45));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ============================================================
   8. CARDS / PRODUCTS
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.card-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--purple-ultra);
  background: rgba(122, 95, 185, 0.12);
}

.tag-beta {
  border-color: rgba(226, 218, 246, 0.4);
  background: rgba(226, 218, 246, 0.1);
  color: var(--silver-light);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}

.card > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.card-features {
  list-style: none;
  margin-bottom: 2rem;
  display: grid;
  gap: 0.55rem;
}

.card-features li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-features li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-brand);
  transform: translateY(-1px);
}

.card-cta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Feature grid (product pages / custom section) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(122, 95, 185, 0.16);
  border: 1px solid var(--border-strong);
  margin-bottom: 1.1rem;
  font-size: 1.25rem;
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   9. PHONE MOCKUP / CAROUSEL
   ============================================================ */
.phone {
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  border-radius: 38px;
  border: 2px solid rgba(226, 218, 246, 0.18);
  background: #050408;
  padding: 10px;
  box-shadow:
    0 0 0 6px rgba(22, 18, 38, 0.9),
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(122, 95, 185, 0.25);
  position: relative;
  overflow: hidden;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #0b0912;
}

.phone-screen .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.phone-screen .slide.active {
  opacity: 1;
}

.phone-screen .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(226, 218, 246, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dots button.active {
  background: var(--purple-light);
  transform: scale(1.25);
}

/* ============================================================
   10. SPLIT LAYOUT (product hero, about)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.split-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #000;
  border: 1px solid rgba(226, 218, 246, 0.25);
  border-radius: 12px;
  padding: 0.55rem 1.1rem;
  color: #fff;
  transition: border-color var(--transition), transform var(--transition);
}

.store-badge:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge .badge-text {
  line-height: 1.15;
  text-align: left;
}

.store-badge .badge-text small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver-light);
}

.store-badge .badge-text strong {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
}

/* ============================================================
   11. STATS / MISSION / ABOUT
   ============================================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat {
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.prose p strong {
  color: var(--text);
}

/* ============================================================
   12. CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(500px 260px at 50% -30%, rgba(122, 95, 185, 0.35), transparent 70%),
    var(--surface);
}

.cta-banner h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.cta-banner p {
  color: var(--text-muted);
  max-width: 46em;
  margin: 0 auto 1.8rem;
}

/* ============================================================
   13. FORMS
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-methods {
  display: grid;
  gap: 1rem;
}

.contact-method {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition);
}

.contact-method:hover {
  border-color: var(--border-strong);
}

.contact-method h3 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.contact-method a {
  font-size: 0.95rem;
}

.contact-method p {
  color: var(--text-faint);
  font-size: 0.85rem;
}

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

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--purple-light);
}

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

/* ============================================================
   14. FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  height: 46px;
  margin-bottom: 0.9rem;
  opacity: 0.85;
}

.footer-brand p {
  color: var(--text-faint);
  font-size: 0.9rem;
  max-width: 26em;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ============================================================
   15. REVEAL ANIMATIONS
   ============================================================ */
/* Hidden state only applies when JS is running (html.js set inline in <head>) */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   16. RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    text-align: center;
  }

  .hero-sub {
    margin-inline: auto;
  }

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

  .hero-visual {
    order: -1;
  }

  .hero-jar {
    width: min(200px, 50vw);
  }

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

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .split-visual {
    order: -1;
  }
}

@media (max-width: 560px) {
  .feature-grid,
  .stat-row,
  form .form-row {
    grid-template-columns: 1fr;
  }

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

  .card {
    padding: 1.6rem;
  }
}

/* ============================================================
   17. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
