/* ==========================================================================
   Mavrixanix — design tokens
   Motif: concentric scan rings and clearance level. Ring count encodes
   depth — a direct nod to security clearance tiers and an active scan.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* color */
  --void:    #0a1014;
  --panel:   #101923;
  --panel-2: #16212e;
  --amber:   #ff8a3d;
  --amber-2: #ffb27a;
  --steel:   #243440;
  --paper:   #eef3f2;
  --mist:    #7f9298;

  /* type */
  --display: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  /* layout */
  --max: 1120px;
  --edge: 1px solid var(--steel);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

a { color: inherit; text-decoration: none; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

em, .accent-word { font-style: normal; color: var(--amber-2); font-weight: 600; }

p { margin: 0 0 1em; color: var(--mist); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--amber);
  border-radius: 50%;
  display: inline-block;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 16, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: var(--edge);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand .scan-mark { width: 22px; height: 22px; flex-shrink: 0; }

.main-nav {
  display: flex;
  gap: 32px;
  font-size: 0.92rem;
}

.main-nav a {
  color: var(--mist);
  transition: color 0.15s ease;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--paper); }

.nav-toggle {
  display: none;
  background: none;
  border: var(--edge);
  color: var(--paper);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--void);
    flex-direction: column;
    padding: 32px 24px;
    gap: 22px;
    font-size: 1.1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-2), var(--amber) 65%, #d9631c);
  color: #12100b;
  font-weight: 700;
}
.btn-primary:hover { box-shadow: 0 6px 24px -6px rgba(255, 138, 61, 0.5); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--steel);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--amber); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Hero — the scan, sweeping outward
   ========================================================================== */

.hero {
  position: relative;
  padding: 96px 0 84px;
  overflow: hidden;
  border-bottom: var(--edge);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--paper);
  margin-top: 18px;
}

.hero .lede {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-scan {
  justify-self: center;
  width: min(320px, 78vw);
}

.hero-scan svg { width: 100%; height: auto; overflow: visible; }

@keyframes ring-in {
  from { opacity: 0; transform: scale(0.55); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-scan { order: -1; width: 210px; margin-bottom: 8px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--panel); border-top: var(--edge); border-bottom: var(--edge); }

.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 14px; }

/* ==========================================================================
   Product catalogue
   ========================================================================== */

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--steel);
  border: var(--edge);
}

.product-card {
  background: var(--panel);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.2s ease;
}
.product-card:hover { background: var(--panel-2); }

.product-card .scan-icon { width: 36px; height: 36px; }

.product-card .kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

.product-card h3 { font-size: 1.2rem; margin: 0; color: var(--paper); }
.product-card .tagline { font-size: 0.9rem; margin: 0; flex-grow: 1; }

.product-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: var(--edge);
  padding-top: 14px;
  margin-top: 4px;
}

.price {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--amber-2);
}
.price.is-free { color: var(--paper); }

.card-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mist);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-card:hover .card-link { color: var(--amber-2); }

/* ==========================================================================
   Feature / advantages grid
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.feature .scan-mark { width: 28px; height: 28px; margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--paper); }
.feature p { font-size: 0.94rem; margin: 0; }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { border-top: var(--edge); max-width: 76ch; }

.faq-item { border-bottom: var(--edge); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--paper);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item .plus {
  font-family: var(--mono);
  color: var(--amber-2);
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] .plus { transform: rotate(45deg); }

.faq-item .faq-a { padding: 0 4px 22px; max-width: 64ch; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: var(--edge);
  padding: 56px 0 32px;
  background: var(--panel);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--paper); font-size: 0.92rem; }
.footer-col a:hover { color: var(--amber-2); }

.footer-brand p { max-width: 34ch; font-size: 0.9rem; }

.footer-bottom {
  border-top: var(--edge);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--mist);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Generic content pages (about / legal)
   ========================================================================== */

.page-hero {
  padding: 64px 0 48px;
  border-bottom: var(--edge);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 14px; }
.page-hero .lede { max-width: 60ch; font-size: 1.05rem; }

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2em; color: var(--paper); }
.prose h2:first-child { margin-top: 0; }
.prose ul { color: var(--mist); padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--paper); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--panel);
  border: var(--edge);
  padding: 28px;
}
.contact-card h3 { color: var(--paper); font-size: 1rem; margin-bottom: 6px; }
.contact-card a.mono-link {
  font-family: var(--mono);
  color: var(--amber-2);
  font-size: 0.95rem;
}

/* ==========================================================================
   Product detail (product.html)
   ========================================================================== */

.product-hero {
  padding: 56px 0 48px;
  border-bottom: var(--edge);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

.product-hero .kind-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin-top: 14px; }
.product-hero .tagline-lg { font-size: 1.1rem; max-width: 52ch; margin-top: 14px; }

.buy-panel {
  background: var(--panel);
  border: var(--edge);
  padding: 28px;
  position: sticky;
  top: 96px;
}

.buy-panel .price-lg {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--amber-2);
  margin-bottom: 4px;
}
.buy-panel .price-lg.is-free { color: var(--paper); }

.buy-panel .format-line {
  font-size: 0.88rem;
  color: var(--mist);
  margin-bottom: 20px;
}

.buy-panel .scan-icon-lg { width: 72px; height: 72px; margin-bottom: 18px; }

@media (max-width: 860px) {
  .product-hero-grid { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; gap: 40px; } }

.module-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--edge);
}
.module-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: var(--edge);
  font-size: 0.96rem;
  color: var(--paper);
}
.module-list .tick-mark {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border: 1.5px solid var(--amber-2);
  border-radius: 50%;
}

.audience-box {
  background: var(--panel);
  border: var(--edge);
  padding: 24px;
}
.audience-box h3 { font-size: 0.95rem; color: var(--paper); margin-bottom: 10px; }
.audience-box p { margin: 0; font-size: 0.95rem; }

.ethics-note {
  background: var(--panel);
  border: 1px solid var(--steel);
  border-left: 3px solid var(--amber);
  padding: 18px 20px;
  margin-top: 20px;
  font-size: 0.88rem;
}
.ethics-note p { margin: 0; color: var(--mist); }
.ethics-note strong { color: var(--paper); }

/* ==========================================================================
   Loading page
   ========================================================================== */

.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  text-align: center;
  padding: 24px;
}

.loading-mark { width: 76px; height: 76px; }
.loading-mark .ping-ring { animation: ping-out 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.loading-mark .ping-ring:nth-child(2) { animation-delay: 0.4s; }
.loading-mark .ping-ring:nth-child(3) { animation-delay: 0.8s; }

@keyframes ping-out {
  0% { opacity: 0.9; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(1.4); }
}

.loading-screen h1 { font-size: 1.3rem; }
.loading-screen p { max-width: 40ch; }

.loading-fallback { display: none; margin-top: 12px; }
.loading-fallback.is-visible { display: block; }

/* ==========================================================================
   404 / empty state
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 120px 24px;
}
.empty-state .scan-icon-lg { margin: 0 auto 24px; width: 64px; height: 64px; }

/* ==========================================================================
   Utility
   ========================================================================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
