:root {
  --bg: #050705;
  --panel: #0a0f0a;
  --text: #f4f7e8;
  --muted: #aab5a3;
  --green: #48b84f;
  --white: #f4f4e8;
  --yellow: #ffd92f;
  --line: #a8d742;
  --shadow: #121912;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.015) 0,
    rgba(255,255,255,.015) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
}

a { color: inherit; }

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid rgba(168,215,66,.35);
  background: rgba(5,7,5,.9);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #1f2d14;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  box-shadow: 3px 3px 0 #172014;
}

.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero-logo {
  width: min(100%, 1050px);
  display: block;
  margin: 0 auto 26px;
  filter: drop-shadow(0 0 18px rgba(122, 208, 76, .08));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .84rem;
}

h1, h2, h3 {
  line-height: 1.15;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  letter-spacing: -.05em;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(to bottom, var(--green), var(--white) 52%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-block;
  text-decoration: none;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: #0a0e09;
  color: var(--text);
  box-shadow: 5px 5px 0 #172014;
  font-weight: 700;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #172014;
}

.button.primary {
  color: #050705;
  background: linear-gradient(to bottom, var(--green), var(--white) 52%, var(--yellow));
  border-color: var(--yellow);
}

.section {
  padding: 50px 0;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card,
.terminal-panel {
  border: 1px solid rgba(168,215,66,.42);
  background: rgba(10,15,10,.82);
  padding: 24px;
  box-shadow: 7px 7px 0 #121912;
}

.card h3 { color: var(--yellow); }
.card p, .terminal-panel p { color: var(--muted); }

.terminal-panel::before {
  content: "HAI://SYSTEM";
  display: block;
  color: var(--green);
  border-bottom: 1px solid rgba(168,215,66,.28);
  padding-bottom: 10px;
  margin-bottom: 18px;
  font-size: .85rem;
  letter-spacing: .12em;
}

.page-hero {
  padding: 70px 0 30px;
}

.page-hero h1 { margin-bottom: 12px; }

.contact-form {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--yellow);
  font-weight: 700;
}

input, textarea {
  width: 100%;
  border: 1px solid rgba(168,215,66,.5);
  background: #070a07;
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255,217,47,.12);
}

textarea { min-height: 170px; resize: vertical; }

.site-footer {
  border-top: 1px solid rgba(168,215,66,.25);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: .9rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .nav { align-items: flex-start; padding: 16px 0; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-logo { margin-bottom: 12px; }
}

/* Products */
.muted-copy {
  color: var(--muted);
  margin: 0;
}

.product-header {
  margin-bottom: 26px;
}

.product-header .section-title { margin-bottom: 8px; }

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.product-list {
  display: grid;
  gap: 28px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(0, 1.6fr);
  border: 1px solid rgba(168,215,66,.42);
  background: rgba(10,15,10,.82);
  box-shadow: 8px 8px 0 #121912;
  overflow: hidden;
}

.product-card.newest-product {
  border-color: var(--yellow);
  box-shadow: 8px 8px 0 #172014;
}

.product-image-wrap {
  min-height: 260px;
  border-right: 1px solid rgba(168,215,66,.35);
  background: #070a07;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.product-placeholder {
  color: var(--green);
  letter-spacing: .12em;
}

.product-content {
  padding: 28px;
}

.product-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.45rem);
  margin-bottom: 14px;
}

.product-content p {
  color: var(--muted);
  white-space: pre-line;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--green);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.product-links { margin-top: 24px; }

code {
  color: var(--yellow);
  font-family: inherit;
}

@media (max-width: 760px) {
  .product-card { grid-template-columns: 1fr; }
  .product-image-wrap { border-right: 0; border-bottom: 1px solid rgba(168,215,66,.35); }
}

/* Product detail (blog-post style) */
.post-image-wrap {
  border: 1px solid rgba(168,215,66,.42);
  background: #070a07;
  overflow: hidden;
  margin-bottom: 28px;
}

.post-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.post-body {
  max-width: 760px;
  color: var(--text);
  white-space: pre-line;
}

.post .product-links {
  margin-top: 28px;
}

.back-link {
  margin-top: 40px;
}
