/* web3.unykorn.ai — Sovereign Web3 Architecture & Protocol Specification
   Aesthetic: Genesis402 light glassmorphic system (#uk-steel & #uk-ember),
   Archivo & IBM Plex typography, interactive protocol inspector, zero commercial prices.
*/

:root {
  --ink: #0e1621;
  --ink2: #26324a;
  --muted: #56637a;
  --orange: #d9631f;
  --orange-light: #fff7ed;
  --orange-border: #fed7aa;
  --volt: #2f7bff;
  --volt-light: #eff6ff;
  --volt-border: #bfdbfe;
  --ok: #128a66;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  --glass: rgba(255, 255, 255, 0.78);
  --glass-b: rgba(255, 255, 255, 0.94);
  --glass-card: rgba(255, 255, 255, 0.9);
  --line: rgba(14, 22, 33, 0.09);
  --line-strong: rgba(14, 22, 33, 0.16);

  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --shadow: 0 10px 30px rgba(14, 22, 33, 0.05), 0 1px 3px rgba(14, 22, 33, 0.04);
  --shadow-hover: 0 16px 40px rgba(14, 22, 33, 0.09), 0 2px 6px rgba(14, 22, 33, 0.06);
}

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

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  background: linear-gradient(180deg, #eaf0f7 0%, #f7f9fb 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient animated blur blobs */
.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.65;
}
.blob.b1 { width: 50vw; height: 50vw; background: #b9d6f6; top: -15vw; left: -10vw; }
.blob.b2 { width: 45vw; height: 45vw; background: #fed7aa; top: 40vh; right: -12vw; opacity: 0.45; }
.blob.b3 { width: 40vw; height: 40vw; background: #ddd6fe; bottom: -10vw; left: 20vw; opacity: 0.4; }

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: var(--glass-b);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 15px rgba(0,0,0,0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark .u { color: #5b6573; }
.wordmark .k { color: var(--orange); letter-spacing: 0.16em; }

.brand-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--volt-light);
  border: 1px solid var(--volt-border);
  color: #1e40af;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-nav a {
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.top-nav a:hover {
  color: var(--orange);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: #065f46;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.live-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Page Wrap */
.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  padding: 5px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero-title .highlight {
  color: var(--orange);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 860px;
  margin: 0 auto 2.25rem;
  line-height: 1.5;
}

/* Architecture Flow Diagram */
.arch-diagram-sec {
  background: var(--glass-b);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 4rem;
}

.arch-header {
  margin-bottom: 2rem;
  text-align: center;
}
.arch-header h2 {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.arch-header p {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0.4rem auto 0;
}

.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}

.flow-step-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.flow-step-card:hover {
  transform: translateY(-3px);
  border-color: var(--orange-border);
  box-shadow: var(--shadow-hover);
}

.flow-step-card .step-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.flow-step-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.flow-step-card p {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.flow-step-card .code-snippet {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  word-break: break-all;
}

/* Layer Pillars Grid */
.layers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.layer-card {
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.layer-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.layer-badge.orange { background: var(--orange-light); border: 1px solid var(--orange-border); color: #9a3412; }
.layer-badge.volt { background: var(--volt-light); border: 1px solid var(--volt-border); color: #1e40af; }
.layer-badge.purple { background: var(--purple-light); border: 1px solid var(--purple-border); color: #5b21b6; }
.layer-badge.green { background: var(--ok-bg); border: 1px solid var(--ok-border); color: #065f46; }

.layer-card h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.layer-card p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.layer-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink);
}
.layer-card ul li::before {
  content: "✔ ";
  color: var(--ok);
  font-weight: 700;
}

/* Interactive Agent Simulator / Inspector */
.simulator-sec {
  background: #ffffff;
  border: 2px solid var(--orange-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 4rem;
}

.sim-header {
  margin-bottom: 1.75rem;
}
.sim-header h2 {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
}
.sim-header p {
  font-size: 0.92rem;
  color: var(--muted);
}

.sim-builder-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.input-box label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.input-box input, .input-box select {
  width: 100%;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 14px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}
.input-box input:focus, .input-box select:focus {
  border-color: var(--orange);
  outline: none;
}

.btn-simulate {
  background: var(--orange);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  height: 48px;
  transition: all 0.15s ease;
}
.btn-simulate:hover {
  background: #b84f13;
}

/* Simulation Inspection Results */
.sim-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.sim-result-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
}
.sim-result-card .lbl {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.sim-result-card .val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

/* Terminal / Code Inspector Box */
.terminal-card {
  background: #0e1621;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 12px;
  overflow-x: auto;
  line-height: 1.6;
}
.terminal-card .term-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 11px;
}
.terminal-card .code-highlight { color: #f97316; }
.terminal-card .code-green { color: #10b981; }
.terminal-card .code-blue { color: #60a5fa; }

/* Pure Technical Directory (No values) */
.specs-directory-sec {
  margin-bottom: 4rem;
}

.sec-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.sec-title-bar h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
}

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

table.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.specs-table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
table.specs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: #334155;
}
table.specs-table tr:hover td {
  background: #f8fafc;
}

.mono-tag {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
}

/* Footer */
.footer-wrap {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-title { font-size: 2.5rem; }
  .flow-steps-grid { grid-template-columns: 1fr 1fr; }
  .layers-grid { grid-template-columns: 1fr; }
  .sim-builder-row { grid-template-columns: 1fr; }
  .sim-results-grid { grid-template-columns: 1fr; }
}
