/* KruxOS site — shared styles for kruxos.com
   Builds on colors_and_type.css */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--krx-bg);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--krx-green-light); text-decoration: none; }
a:hover { color: var(--krx-green); }
::selection { background: var(--krx-green-20); color: var(--fg-1); }

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

/* ----- Layout ----- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
}

/* ----- Nav ----- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--krx-border);
}
.nav__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 32px;
  display: flex; align-items: center; gap: 28px;
}
@media (max-width: 720px) {
  .nav__inner { padding: 12px 20px; gap: 16px; }
}
.nav__brand {
  display: flex; align-items: center;
  margin-right: auto;
}
.nav__brand:hover { color: var(--fg-1); }
.nav__brand-wordmark {
  display: block;
  height: 20px;
  width: auto;
}
@media (max-width: 720px) {
  .nav__brand-wordmark { height: 18px; }
}
.nav__links {
  display: flex; align-items: center; gap: 4px;
}
.nav__link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 150ms, background-color 150ms;
}
.nav__link:hover { color: var(--fg-1); background: var(--krx-border); }
.nav__link.is-active { color: var(--fg-1); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--krx-border-subtle);
  color: var(--fg-1);
  padding: 7px 12px;
  border-radius: 6px;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.nav__cta:hover {
  background: var(--krx-surface);
  border-color: var(--fg-3);
  color: var(--fg-1);
}
.nav__cta svg { display: block; flex-shrink: 0; }
.nav__hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--krx-border-subtle);
  border-radius: 4px;
  color: var(--fg-1);
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__hamburger { display: inline-flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; right: 20px; left: 20px;
    background: var(--krx-surface);
    border: 1px solid var(--krx-border-subtle);
    border-radius: 8px;
    padding: 8px;
    margin-top: 4px;
    align-items: stretch;
    gap: 2px;
  }
  .nav__links.is-open .nav__link { padding: 10px 12px; font-size: 14px; }
  .nav__links.is-open .nav__cta { margin-top: 4px; text-align: center; }
}

/* ----- Sections ----- */
section { padding: 96px 0; border-top: 1px solid var(--krx-border); }
section:first-of-type { border-top: none; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--krx-green-light);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--krx-green);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--fg-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.25; }
h4 { font-size: 15px; line-height: 1.3; }

p { margin: 0 0 16px; color: var(--fg-2); text-wrap: pretty; }
p.lede { font-size: 18px; color: var(--fg-2); max-width: 620px; }
@media (max-width: 720px) { p.lede { font-size: 16px; } }

.muted { color: var(--fg-3); }
.mono { font-family: var(--font-mono); }
.green { color: var(--krx-green-light); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms, transform 80ms;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: transparent; border-color: var(--krx-green); color: var(--fg-1); }
.btn--primary:hover { background: rgba(29,158,117,0.10); border-color: var(--krx-green-light); color: var(--fg-1); }
.btn--secondary { background: transparent; border-color: var(--krx-border-subtle); color: var(--fg-1); }
.btn--secondary:hover { background: var(--krx-surface); border-color: var(--fg-3); color: var(--fg-1); }
.btn--ghost { background: transparent; color: var(--fg-2); }
.btn--ghost:hover { color: var(--fg-1); }
.btn .arrow { transition: transform 150ms; }
.btn:hover .arrow { transform: translateX(2px); }
.btn--sm { padding: 7px 12px; font-size: 13px; }

/* ----- Cards ----- */
.card {
  background: var(--krx-surface);
  border: 1px solid var(--krx-border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 150ms;
}
.card--hover:hover { border-color: var(--krx-green-40); }
.card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}

/* ----- Pills / dots (matches dashboard.css naming) ----- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.pill--autonomous { background: var(--krx-green-10); color: var(--krx-green); border: 1px solid rgba(29,158,117,0.25); }
.pill--notify     { background: rgba(93,202,165,0.10); color: var(--krx-green-light); border: 1px solid rgba(93,202,165,0.25); }
.pill--approval   { background: var(--krx-amber-10); color: var(--krx-amber); border: 1px solid rgba(239,159,39,0.25); }
.pill--blocked    { background: var(--krx-red-10); color: var(--krx-red); border: 1px solid rgba(226,75,74,0.25); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot--green { background: var(--krx-green); }
.dot--mint  { background: var(--krx-green-light); }
.dot--amber { background: var(--krx-amber); }
.dot--red   { background: var(--krx-red); }
.dot--muted { background: var(--fg-4); }
.dot--pulse { animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ----- Code surfaces ----- */
.code, code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--krx-green-light);
}
.codeblock {
  background: #050509;
  border: 1px solid var(--krx-border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.65;
  overflow-x: auto;
}
.codeblock .prompt { color: var(--fg-4); user-select: none; }
.codeblock .cmd    { color: var(--krx-green-light); }
.codeblock .comment { color: var(--fg-4); }

/* ----- Footer ----- */
.footer {
  border-top: 1px solid var(--krx-border);
  padding: 56px 0 32px;
  background: var(--krx-bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
.footer__brand-row {
  display: flex; align-items: center;
  margin-bottom: 14px;
}
.footer__brand-wordmark {
  display: block;
  height: 24px;
  width: auto;
}
.footer__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  max-width: 240px;
  line-height: 1.6;
}
.footer__col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
}
.footer__col-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__col-list a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-2);
  transition: color 150ms;
}
.footer__col-list a:hover { color: var(--fg-1); }
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--krx-border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  gap: 16px;
  flex-wrap: wrap;
}
.footer__bottom a { color: var(--fg-4); }
.footer__bottom a:hover { color: var(--fg-2); }

/* ----- Brand mark wordmark + animated ring ----- */
.brand-mark {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.brand-mark svg { display: block; }

/* Hero ring mark */
.ring-mark {
  position: relative;
  width: 96px; height: 96px;
}
.ring-mark__circle {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--krx-green);
}
.ring-mark__inner {
  position: absolute; inset: 18px;
  border-radius: 50%;
  background: var(--krx-bg);
}
.ring-mark__pupil {
  position: absolute; inset: 32px;
  border-radius: 50%;
  background: var(--krx-green-light);
  animation: pupilPulse 3s ease-in-out infinite;
}
@keyframes pupilPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.92); } }
.ring-mark__pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--krx-green);
  opacity: 0;
  animation: ringPulse 2.4s ease-out infinite;
}
.ring-mark__pulse--2 { animation-delay: 0.8s; }
.ring-mark__pulse--3 { animation-delay: 1.6s; }
@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ----- Inline brand wordmark (Krux-o-S) ----- */
.wordmark {
  display: inline-flex; align-items: center;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.wordmark__o {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle;
}

/* ----- Utility ----- */
.flex { display: flex; }
.col { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }

/* ----- Grain (very faint, optional — disabled by default per system) ----- */
/* No background gradients. No texture. */
