/* CHIPZ Base Styles — Reset + Dark Palette Foundation */

@import url("./tokens.css");

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

html, body {
  width: 100%;
  height: 100%;
}

body {
  position: relative;
  background-color: var(--color-page-black);
  color: var(--color-text);
  font-family: var(--font-interface);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Atmospheric backdrop — fixed lit room behind everything.
   Cyan spotlight pooling top-center (behind the hero), a lime wash
   lower-right, and a faint engineering grid. Pure decoration. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-spot-cyan) 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, var(--bg-spot-lime) 0%, transparent 50%),
    radial-gradient(70% 60% at 0% 80%, rgba(31, 227, 255, 0.05) 0%, transparent 55%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 46px 46px, 46px 46px;
  background-position: 0 0, 0 0, 0 0, -1px -1px, -1px -1px;
}

/* Edge vignette — darkens the corners so accents pop center-stage. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(130% 110% at 50% 35%, transparent 55%, rgba(1, 2, 8, 0.9) 100%);
}

/* Typography reset */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-brand);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-lg); }
h3 { font-size: var(--font-size-md); }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Lists */
ul, ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-sm);
}

/* Code */
code, pre {
  font-family: "Courier New", monospace;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: var(--space-sm);
}

pre {
  overflow-x: auto;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
}

/* Forms */
input, textarea, select {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-cyan-base);
  color: var(--color-text);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-cyan-glow);
  box-shadow: 0 0 10px rgba(31, 227, 255, 0.3);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}
