/* ============================================================
   GLOSPEC.ORG — Global Stylesheet
   Platonic GLO v0.3.0-rc6
   ============================================================ */

/* ---- Reset & tokens ---- */
:root {
  --bg:         #0a0e14;
  --bg-raised:  #0f1319;
  --surface:    #11151c;
  --surface-2:  #161b24;
  --border:     #1e2630;
  --border-light:#2a3444;
  --text:       #e6e6e6;
  --text-dim:   #8a919a;
  --text-muted: #5a6270;
  --accent:     #3b82f6;
  --accent-dim: #2563eb;
  --allow:      #22c55e;
  --attenuate:  #eab308;
  --stepup:     #f97316;
  --deny:       #ef4444;
  --lockdown:   #dc2626;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:  "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
  --max-w:      1120px;
  --nav-h:      64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 8px;
}

.nav-links a.external {
  color: var(--text-muted);
  font-size: 13px;
}

.nav-links a.external::after {
  content: " ↗";
  font-size: 11px;
}

.nav-links a.external:hover {
  color: var(--text-dim);
}

/* mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-divider { display: none; }
  .nav-links a { padding: 10px 12px; }
}

/* ---- Layout ---- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 72px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ---- Hero ---- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 .accent { color: var(--accent); }

.hero .lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-dim);
  max-width: 600px;
  margin: 20px auto 0;
  line-height: 1.6;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* ---- Section headings ---- */
.sh {
  text-align: center;
  margin-bottom: 48px;
}

.sh h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sh p {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 16px;
}

/* left-aligned section heading */
.sh-left { text-align: left; }

/* ---- Card grid ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.card-icon--blue  { background: rgba(59,130,246,0.12); color: var(--accent); }
.card-icon--green { background: rgba(34,197,94,0.12);  color: var(--allow); }
.card-icon--red   { background: rgba(239,68,68,0.12);  color: var(--deny); }
.card-icon--amber { background: rgba(234,179,8,0.12);  color: var(--attenuate); }

/* Adobe-style letter marks */
.card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-sans);
  color: #fff;
  letter-spacing: -0.5px;
}

/* ---- Decision flow diagram ---- */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 32px 0;
}

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  min-width: 120px;
}

.flow-step small {
  display: block;
  font-weight: 400;
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 20px;
  padding: 0 6px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .flow { flex-direction: column; gap: 0; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* ---- Stats row ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ---- Tables ---- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  font-weight: 600;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-table td { color: var(--text); }

.spec-table tr:last-child td { border-bottom: none; }

.spec-table code {
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.table-wrap .spec-table th:first-child,
.table-wrap .spec-table td:first-child { padding-left: 20px; }

.table-wrap .spec-table th:last-child,
.table-wrap .spec-table td:last-child { padding-right: 20px; }

/* ---- Decision tags ---- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.tag-allow     { background: rgba(34,197,94,0.15);  color: var(--allow); }
.tag-attenuate { background: rgba(234,179,8,0.15);  color: var(--attenuate); }
.tag-stepup    { background: rgba(249,115,22,0.15); color: var(--stepup); }
.tag-deny      { background: rgba(239,68,68,0.15);  color: var(--deny); }
.tag-lockdown  { background: rgba(220,38,38,0.15);  color: var(--lockdown); }

/* ---- Version badge ---- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.2);
}

/* ---- Demo page ---- */
.demo-hero {
  text-align: center;
  padding: 80px 0 60px;
}

.demo-hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.demo-hero p {
  color: var(--text-dim);
  font-size: 17px;
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.demo-launch {
  margin-top: 40px;
}

.demo-callout {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 24px;
}

.demo-callout strong { color: var(--text); }

/* hub placeholder */
.hub-placeholder {
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.hub-placeholder h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hub-placeholder p {
  color: var(--text-dim);
  font-size: 15px;
}

.hub-placeholder .coming {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(234,179,8,0.1);
  color: var(--attenuate);
  border: 1px solid rgba(234,179,8,0.2);
}

/* ---- Downloads ---- */
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}

.dl-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dl-card p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.dl-card .dl-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}

.dl-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---- Content blocks ---- */
.content-block {
  max-width: 800px;
}

.content-block h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 40px;
}

.content-block h3:first-child { margin-top: 0; }

.content-block p {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.content-block ul {
  color: var(--text-dim);
  padding-left: 20px;
  margin-bottom: 16px;
}

.content-block li {
  margin-bottom: 6px;
}

.content-block li strong {
  color: var(--text);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.mono { font-family: var(--font-mono); }

/* Alpha marks — site identity system */
.alpha-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff !important;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.alpha-mark-gs { background: #1a6ef5; }
.alpha-mark-hs { background: #1a8a4a; }
.alpha-mark-amk { background: #b02020; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
