/* ============================================================
   MATRIX — Canonical stylesheet
   Green-on-black terminal / cyberpunk theme. Semantic classes,
   driven entirely by tokens.css. No build step, no framework.
   Class vocabulary mirrors the shared Ventus template set so
   pages are portable across themes.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");
@import url("./tokens.css");

/* ---------------- Reset / base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-mono);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(0,255,65,.25); color: var(--white-core); }
:focus-visible { outline: 1px solid var(--matrix-green); outline-offset: 3px; }

/* ---------------- Layout primitives ---------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: 6rem; position: relative; }
.section--alt { background: var(--panel-2); }
.section__head { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.eyebrow { color: var(--text-dim); }

h1, h2, h3, h4 { font-family: var(--font-mono); color: var(--matrix-green); font-weight: 400; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.lead { color: var(--text-dim); font-size: 1.02rem; }
/* prism -> glowing green accent (keeps class name for portability) */
.text-prism {
  color: var(--matrix-glow);
  text-shadow: 0 0 12px rgba(0,255,65,.7), 0 0 28px rgba(0,255,65,.4);
}

/* ---------------- Decorative helpers ---------------- */
.grid-bg { background-image: var(--grid-pattern); background-size: 40px 40px; }
.deco-line { height: 1px; background: linear-gradient(90deg, transparent, var(--matrix-green), transparent); }
.noise::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-mono); font-weight: 400; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .18em;
  padding: .8rem 1.9rem; border: 1px solid var(--matrix-dark); border-radius: var(--radius);
  transition: all var(--dur-slow) var(--ease); position: relative; overflow: hidden;
  background: transparent; color: var(--matrix-green);
}
.btn::before { content: "> "; opacity: .7; }
.btn--sm { padding: .5rem 1.1rem; font-size: .72rem; letter-spacing: .12em; }
.btn--lg { padding: .95rem 2.3rem; font-size: .9rem; letter-spacing: .2em; }
.btn--primary { background: var(--matrix-green); color: var(--void); border-color: var(--matrix-green); box-shadow: var(--glow-sm); font-weight: 700; }
.btn--primary:hover { background: var(--matrix-glow); border-color: var(--matrix-glow); box-shadow: var(--glow-md); }
.btn--outline { border-color: var(--line); color: var(--text); }
.btn--outline:hover { border-color: var(--matrix-green); color: var(--matrix-green); box-shadow: var(--glow-sm); text-shadow: var(--glow-sm); }
.btn--ghost { border-color: transparent; color: var(--text-dim); }
.btn--ghost:hover { color: var(--matrix-green); background: rgba(0,255,65,.06); }
.btn--block { width: 100%; }

/* ---------------- Badge / pill ---------------- */
.badge {
  display: inline-flex; align-items: center; padding: .3rem .8rem;
  font-size: .68rem; font-weight: 400; text-transform: uppercase; letter-spacing: .22em;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--matrix-green);
  background: rgba(0,255,65,.05);
}
.badge--accent { color: var(--matrix-green); border-color: var(--line-strong); background: rgba(0,255,65,.08); text-shadow: var(--glow-sm); }
.badge--gold { color: var(--matrix-glow); border-color: rgba(57,255,20,.4); background: rgba(57,255,20,.08); }

/* ---------------- Navbar ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(0,0,0,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-faint);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark { width: 1.5rem; height: 1.5rem; background: var(--matrix-green); box-shadow: var(--glow-sm); position: relative; }
.brand__mark::after { content: ""; position: absolute; inset: 4px; background: var(--void); }
.brand__name { font-family: var(--font-mono); font-weight: 400; font-size: 1.05rem; color: var(--matrix-green); letter-spacing: .12em; text-transform: uppercase; text-shadow: var(--glow-sm); }
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__link { font-size: .9rem; color: var(--text-dim); transition: color var(--dur), text-shadow var(--dur); text-transform: uppercase; letter-spacing: .08em; }
.nav__link:hover { color: var(--matrix-green); text-shadow: var(--glow-sm); }
.nav__cta { display: none; }
.nav__toggle { display: inline-flex; color: var(--matrix-green); padding: .25rem; }
.nav__mobile { display: none; border-top: 1px solid var(--line-faint); background: var(--panel-2); }
.nav__mobile.open { display: block; }
.nav__mobile ul { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 0; }
.nav__mobile a { display: block; padding: .6rem 0; font-size: .95rem; color: var(--text-dim); }
.nav__mobile a:hover { color: var(--matrix-green); }
.nav__mobile .btn { margin-top: .75rem; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__cta { display: block; }
  .nav__toggle { display: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 8rem 0 6rem; overflow: hidden; text-align: center; background: var(--void);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.hero__glow {
  position: absolute; top: 42%; left: 50%; width: 1000px; height: 1000px;
  transform: translate(-50%, -50%); background: var(--glow-radial); pointer-events: none; z-index: 1;
}
.hero__inner { position: relative; z-index: 10; max-width: 56rem; margin-inline: auto; }
.hero__terminal {
  max-width: 30rem; margin: 0 auto 2rem; text-align: left; font-size: .95rem;
  border: 1px solid var(--line); background: var(--overlay); padding: 1rem 1.25rem;
}
.hero__terminal .prompt { color: var(--text-mute); font-size: .8rem; margin-bottom: .4rem; }
.hero__terminal .typed { color: var(--matrix-green); }
.hero__title { font-size: clamp(2.4rem, 7vw, 5rem); margin: 1.25rem 0; letter-spacing: .08em; animation: pulse-glow 4s ease-in-out infinite; }
.hero__desc { max-width: 34rem; margin: 0 auto 2.5rem; color: var(--text-dim); font-size: 1.05rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------------- Features ---------------- */
.features__grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.feature {
  padding: 1.75rem; background: var(--panel); border: 1px solid var(--line-faint);
  transition: border-color var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.feature:hover { border-color: var(--line-strong); box-shadow: var(--glow-sm); }
.feature__icon { color: var(--matrix-green); margin-bottom: 1rem; filter: drop-shadow(0 0 6px rgba(0,255,65,.5)); }
.feature__icon svg { width: 1.5rem; height: 1.5rem; }
.feature__title { font-size: 1.1rem; margin-bottom: .5rem; }
.feature__desc { font-size: .9rem; color: var(--text-dim); }
@media (min-width: 768px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Pricing ---------------- */
.pricing__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
.tier { position: relative; padding: 2.25rem; background: var(--panel); border: 1px solid var(--line-faint); }
.tier:hover { border-color: var(--line); }
.tier--featured { background: var(--panel-2); border: 1px solid var(--matrix-green); box-shadow: var(--glow-pulse); }
.tier__flag { position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%); }
.tier__name { text-align: center; font-size: 1.1rem; margin-bottom: .5rem; }
.tier__price { text-align: center; display: flex; align-items: baseline; justify-content: center; gap: .25rem; }
.tier__amount { font-family: var(--font-mono); font-size: 2.75rem; font-weight: 400; }
.tier__amount.text-prism { line-height: 1.1; }
.tier__period { color: var(--text-mute); }
.tier__desc { text-align: center; font-size: .85rem; color: var(--text-dim); margin: .5rem 0 2rem; }
.tier__features { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.tier__features li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--text); }
.tier__features svg { width: 1rem; height: 1rem; color: var(--matrix-green); flex-shrink: 0; }
@media (min-width: 768px) { .pricing__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Testimonials ---------------- */
.tst__grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.tst {
  padding: 1.75rem; background: var(--panel); border: 1px solid var(--line-faint);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.tst:hover { border-color: var(--line); }
.tst__quote { color: var(--text); font-size: .96rem; line-height: 1.7; }
.tst__quote::before { content: "> "; color: var(--matrix-green); }
.tst__who { display: flex; align-items: center; gap: .85rem; }
.tst__avatar {
  width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; color: var(--void); background: var(--matrix-green); box-shadow: var(--glow-sm);
}
.tst__name { font-size: .9rem; color: var(--matrix-green); font-weight: 400; }
.tst__role { font-size: .78rem; color: var(--text-mute); }
@media (min-width: 768px) { .tst__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- FAQ ---------------- */
.faq { max-width: 44rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line-faint); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 0; text-align: left; font-family: var(--font-mono); font-size: 1rem; color: var(--matrix-green); text-transform: uppercase; letter-spacing: .04em;
}
.faq__q svg { width: 1.1rem; height: 1.1rem; color: var(--matrix-green); flex-shrink: 0; transition: transform var(--dur) var(--ease); }
.faq__item.open .faq__q svg { transform: rotate(180deg); }
.faq__a { overflow: hidden; max-height: 0; transition: max-height var(--dur) var(--ease); }
.faq__a p { padding: 0 0 1.3rem; color: var(--text-dim); font-size: .95rem; }

/* ---------------- CTA ---------------- */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta__glow { position: absolute; inset: 0; background: var(--glow-radial); opacity: .8; }
.cta__inner { position: relative; z-index: 10; max-width: 40rem; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* ---------------- Footer ---------------- */
.footer { background: var(--void); border-top: 1px solid var(--line-faint); }
.footer__inner { padding-block: 4rem; }
.footer__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-bottom: 3rem; }
.footer__brand { grid-column: 1 / -1; }
.footer__brand p { font-size: .9rem; color: var(--text-mute); max-width: 20rem; margin-top: 1rem; }
.footer__col h4 { font-family: var(--font-mono); font-size: .7rem; font-weight: 400; text-transform: uppercase; letter-spacing: .22em; color: var(--matrix-green); margin-bottom: 1rem; }
.footer__col li { margin-bottom: .6rem; }
.footer__col a { font-size: .9rem; color: var(--text-dim); transition: color var(--dur); }
.footer__col a:hover { color: var(--matrix-green); }
.footer__bottom { padding-top: 2rem; border-top: 1px solid var(--line-faint); display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.footer__copy { font-size: .78rem; color: var(--text-mute); text-align: center; }
.footer__made { display: flex; align-items: center; gap: 1.25rem; }
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__brand { grid-column: auto; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------------- Scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__title { animation: none; }
  html { scroll-behavior: auto; }
}
