/* ============================================================
   METAMACHINE.TOOLS — SHARED STYLESHEET
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg2: #0f1419;
  --text: #e8eef7;
  --muted: #aab6c7;
  --muted2: #6b7a8d;
  --line: rgba(255,255,255,.085);
  --line2: rgba(255,255,255,.05);
  --accent: rgba(255,255,255,.14);
  --glass: rgba(255,255,255,.03);
  --glass2: rgba(255,255,255,.05);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --shadow-sm: 0 8px 24px rgba(0,0,0,.3);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    linear-gradient(to right,  rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(900px 520px at 18% -10%, rgba(255,255,255,.09), transparent 60%),
    radial-gradient(880px 520px at 92%  8%, rgba(255,255,255,.06), transparent 55%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
p  { margin: 0; }
h1, h2, h3, h4 { margin: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

.wrap--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

/* ============================================================
   SITE NAV
   ============================================================ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  flex-shrink: 0;
}

.nav-brand-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .95;
  line-height: 1.2;
}

.nav-brand-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .01em;
  text-transform: none;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  transition: color .15s, background .15s;
  white-space: nowrap;
  letter-spacing: .01em;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.nav-cta {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.nav-cta:hover {
  color: var(--text);
  background: rgba(255,255,255,.06);
  border-color: var(--accent);
}

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
  align-items: center;
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu .nav-link { font-size: 14px; padding: 10px 12px; }

@media (max-width: 680px) {
  .nav-links   { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
  padding: 50px 0 40px;
  border-bottom: 1px solid var(--line2);
  margin-bottom: 36px;
}

.page-kicker {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.page-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.page-desc {
  font-size: 16px;
  color: rgba(232,238,247,.78);
  max-width: 66ch;
  line-height: 1.7;
}

/* ============================================================
   CARDS & GLASS
   ============================================================ */
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card--hover {
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.card--hover:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.15);
  background: var(--glass2);
}

.card-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 10px;
  display: block;
}

.card-title {
  font-size: 16px;
  letter-spacing: .01em;
  margin-bottom: 10px;
}

.card-body {
  font-size: 14px;
  color: rgba(232,238,247,.76);
  line-height: 1.65;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid {
  display: grid;
  gap: 14px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--12 { grid-template-columns: repeat(12, 1fr); }

.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (max-width: 760px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}

/* ============================================================
   PILLS & BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(6px);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  flex-shrink: 0;
}

.pill-dot--active {
  background: rgba(120,220,160,.7);
  box-shadow: 0 0 8px rgba(120,220,160,.4);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: .04em;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}

.badge--defence {
  border-color: rgba(180,160,100,.25);
  color: rgba(200,185,130,.8);
}

.badge--crypto {
  border-color: rgba(100,140,200,.25);
  color: rgba(140,175,220,.8);
}

.badge--automation {
  border-color: rgba(100,200,160,.2);
  color: rgba(130,210,170,.75);
}

.badge--new {
  border-color: rgba(200,150,100,.25);
  color: rgba(210,170,120,.8);
}

/* ============================================================
   BUTTONS & ACTIONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: rgba(232,238,247,.88);
  cursor: pointer;
  transition: transform .12s, background .12s, border-color .12s;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: var(--accent);
}

.btn:active { transform: translateY(0); }

.btn--primary {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  color: var(--text);
}

.btn--primary:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.28);
}

.btn--download {
  padding: 9px 14px;
  font-size: 12px;
}

.btn--sm {
  padding: 7px 12px;
  font-size: 12px;
}

/* ============================================================
   QUIET CTA (from original design)
   ============================================================ */
.quietCta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: rgba(232,238,247,.88);
  font-size: 14px;
  transition: transform .12s, background .12s, border-color .12s;
  white-space: nowrap;
  cursor: pointer;
}

.quietCta:hover {
  transform: translateY(-1px);
  background: var(--glass2);
  border-color: var(--accent);
}

.quietCta small { color: var(--muted); font-size: 12px; }

/* ============================================================
   SIGNALS (interactive expandable)
   ============================================================ */
.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  font-size: 12px;
  color: rgba(232,238,247,.78);
  cursor: pointer;
  user-select: none;
  transition: transform .12s, background .12s, border-color .12s;
}

.signal:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
}

.signal small { color: var(--muted); }

.signal-detail {
  display: none;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  color: rgba(232,238,247,.82);
  font-size: 13px;
  max-width: 78ch;
  line-height: 1.65;
}

.signal-detail b { color: rgba(232,238,247,.95); }

.signal-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ============================================================
   RIDDLE / CALLOUT BOX
   ============================================================ */
.riddle {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  margin-top: 14px;
}

.riddle-q {
  color: rgba(232,238,247,.9);
  font-size: 13px;
  letter-spacing: .01em;
  margin-bottom: 6px;
  font-weight: 500;
}

.riddle-a {
  color: rgba(232,238,247,.72);
  font-size: 13px;
  line-height: 1.65;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.section-label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 20px;
  display: block;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  color: rgba(232,238,247,.8);
  font-weight: 500;
  letter-spacing: .01em;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, background .15s;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted2); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a8d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option { background: #1a2030; }

.form-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(232,238,247,.45);
  font-size: 12px;
}

.site-footer a {
  color: rgba(232,238,247,.5);
  transition: color .15s;
}

.site-footer a:hover { color: rgba(232,238,247,.8); }

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   CODE / MONO
   ============================================================ */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: rgba(232,238,247,.82);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  padding: 2px 6px;
  border-radius: 7px;
  white-space: nowrap;
}

/* ============================================================
   LIST STYLE
   ============================================================ */
.mm-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.mm-list li {
  padding-left: 18px;
  position: relative;
  color: rgba(232,238,247,.78);
  font-size: 14px;
  line-height: 1.55;
}

.mm-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
}

/* ============================================================
   STAT / METRIC
   ============================================================ */
.stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   SEPARATOR ROW
   ============================================================ */
.sep {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted2);
  font-size: 12px;
  margin: 28px 0;
}

.sep::before, .sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   FADE IN ON LOAD
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .5s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: .05s; }
.fade-in:nth-child(2) { animation-delay: .12s; }
.fade-in:nth-child(3) { animation-delay: .19s; }
.fade-in:nth-child(4) { animation-delay: .26s; }
.fade-in:nth-child(5) { animation-delay: .33s; }
.fade-in:nth-child(6) { animation-delay: .40s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success-state {
  display: none;
  text-align: center;
  padding: 32px 20px;
}

.success-state.visible { display: block; }

.success-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.success-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   CHIPS / EMAIL CHIPS
   ============================================================ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  font-size: 12px;
  color: rgba(232,238,247,.78);
  cursor: pointer;
  user-select: none;
  transition: transform .12s, background .12s, border-color .12s;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
}

/* ============================================================
   FOUNDER NOTE
   ============================================================ */
.founder-note {
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(255,255,255,.02);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.founder-note h3 {
  font-size: 15px;
  letter-spacing: .02em;
  margin-bottom: 10px;
}

.founder-note p {
  color: rgba(232,238,247,.8);
  font-size: 14px;
  line-height: 1.7;
}

.founder-sig {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   AUMATRON ACCENT COLOUR (subtle green-teal)
   ============================================================ */
.auma-accent { color: rgba(120,220,180,.85); }
.auma-border { border-color: rgba(100,200,160,.2); }

.auma-card {
  border-color: rgba(100,200,160,.2);
  background: rgba(80,160,120,.04);
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .page-hero   { padding: 36px 0 28px; }
}

@media (min-width: 761px) {
  .hide-desktop { display: none !important; }
}
