/* Gnomon official site */

:root {
  --bg: #06040b;
  --bg-elev: #110a1d;
  --bg-elev-2: rgba(17, 10, 29, 0.84);
  --panel: rgba(17, 11, 28, 0.76);
  --panel-strong: rgba(12, 8, 22, 0.94);
  --line: rgba(173, 122, 255, 0.18);
  --line-strong: rgba(173, 122, 255, 0.34);
  --text: #f5f1ff;
  --text-dim: #b8accf;
  --text-soft: #87789f;
  --accent: #ad7aff;
  --accent-2: #7d5cff;
  --accent-3: #ff8ed8;
  --accent-4: #d8bbff;
  --danger: #ff7e9c;
  --gradient: linear-gradient(135deg, #ad7aff 0%, #7d5cff 40%, #d05bff 72%, #ff8ed8 100%);
  --hero-glow:
    radial-gradient(circle at 20% 20%, rgba(173, 122, 255, 0.26), transparent 26%),
    radial-gradient(circle at 76% 18%, rgba(125, 92, 255, 0.2), transparent 24%),
    radial-gradient(circle at 52% 70%, rgba(255, 142, 216, 0.14), transparent 30%);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --font: "Space Grotesk", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --nav-height: 78px;
  --max-width: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(66, 32, 108, 0.5), transparent 32%),
    linear-gradient(180deg, #05030a 0%, #090512 44%, #06040b 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.8) 0 1px, transparent 1.4px),
    radial-gradient(circle at 82% 12%, rgba(255,255,255,0.55) 0 1px, transparent 1.4px),
    radial-gradient(circle at 65% 72%, rgba(255,255,255,0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 78%, rgba(255,255,255,0.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 50% 40%, rgba(173,122,255,0.14) 0 2px, transparent 3px);
  background-size: 420px 420px, 520px 520px, 480px 480px, 560px 560px, 100% 100%;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 4, 13, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav.scrolled {
  border-color: var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  background: rgba(9, 5, 17, 0.86);
}

.nav-inner {
  width: min(var(--max-width), calc(100% - 48px));
  min-height: var(--nav-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(173,122,255,0.2), rgba(255,142,216,0.12));
  border: 1px solid rgba(173, 122, 255, 0.24);
  box-shadow: 0 0 24px rgba(173, 122, 255, 0.18);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-copy span {
  font-size: 10px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text) !important;
  background: linear-gradient(135deg, rgba(173,122,255,0.16), rgba(255,142,216,0.14));
  border: 1px solid rgba(173, 122, 255, 0.34);
  font-size: 12px;
  font-weight: 700;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 52px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lang-switch:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: 0.2s ease;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 66px;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 56px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.88fr);
  gap: 52px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 122, 255, 0.12);
  border: 1px solid rgba(173, 122, 255, 0.22);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero h1,
.page-hero h1 {
  margin: 22px 0 22px;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

.accent-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(173,122,255,0.22), rgba(255,142,216,0.18));
  border-color: rgba(173,122,255,0.36);
  color: var(--text);
  box-shadow: 0 0 28px rgba(173, 122, 255, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.stat-card,
.card,
.table-card,
.code-card,
.callout,
.playground-banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.stat-card {
  padding: 18px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

.galaxy-shell {
  position: relative;
  min-height: 640px;
}

.galaxy-panel {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 620px);
  margin: 0 auto;
  border-radius: 50%;
}

.galaxy-core,
.galaxy-node {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.galaxy-core {
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.92), rgba(173,122,255,0.5) 24%, rgba(12,19,32,0.2) 56%, rgba(12,19,32,0) 76%);
  box-shadow: 0 0 90px rgba(173, 122, 255, 0.26);
}

.galaxy-core::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(173, 122, 255, 0.24);
  box-shadow: 0 0 40px rgba(255, 142, 216, 0.12);
}

.core-label {
  position: relative;
  text-align: center;
  max-width: 126px;
}

.core-label strong {
  display: block;
  font-size: 22px;
}

.core-label span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.galaxy-ring {
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(173, 122, 255, 0.14);
}

.ring-1 {
  width: 330px;
  height: 330px;
  animation: spin 18s linear infinite;
}

.ring-2 {
  width: 500px;
  height: 500px;
  animation: spin-reverse 28s linear infinite;
}

.ring-3 {
  width: 620px;
  height: 620px;
  animation: spin 40s linear infinite;
}

.galaxy-node {
  width: 124px;
  height: 124px;
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid rgba(173, 122, 255, 0.2);
  text-align: center;
}

.galaxy-node strong {
  display: block;
  font-size: 18px;
}

.galaxy-node span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.node-prime {
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
}

.node-polaris {
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
}

.node-developers {
  bottom: 7%;
  left: 54%;
  transform: translateX(-50%);
}

.node-system {
  top: 49%;
  left: 4%;
  transform: translateY(-50%);
}

.node-partners {
  bottom: 16%;
  left: 10%;
}

.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f6ebff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.dot-a { top: 14%; left: 62%; }
.dot-b { top: 30%; left: 16%; }
.dot-c { top: 68%; left: 78%; }
.dot-d { top: 78%; left: 28%; }

.section {
  padding: 92px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(15, 10, 25, 0.88), rgba(8, 6, 15, 0.96));
}

.section-head {
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 122, 255, 0.08);
  border: 1px solid rgba(173, 122, 255, 0.16);
  color: var(--accent-4);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-head h2 {
  margin: 18px 0 16px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.section-head p {
  max-width: 760px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.78;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

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

.card {
  padding: 24px;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.card p,
.card li {
  font-size: 13px;
  color: var(--text-dim);
}

.card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.card-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.card-list li {
  position: relative;
  padding-left: 18px;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 12px rgba(255, 142, 216, 0.35);
}

.callout {
  padding: 20px 22px;
}

.callout strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.callout span,
.callout p {
  color: var(--text-dim);
  font-size: 14px;
}

.table-card {
  overflow: hidden;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

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

.table-card th {
  background: rgba(173, 122, 255, 0.08);
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.open {
  color: #cfb3ff;
  background: rgba(173, 122, 255, 0.16);
}

.status-pill.active {
  color: #ffb5e5;
  background: rgba(255, 142, 216, 0.16);
}

.code-card {
  overflow: hidden;
  background: rgba(10, 8, 18, 0.96);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.code-dot.red { background: #ef7a66; }
.code-dot.yellow { background: #e3b34d; }
.code-dot.green { background: #57b784; }

.code-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #afbacd;
}

.code-card pre {
  margin: 0;
  padding: 22px 24px 24px;
  overflow-x: auto;
}

.code-card code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.72;
  color: #dce6f3;
}

.kw { color: #c6a7ff; }
.fn { color: #ffc97b; }
.str { color: #8ed4ff; }
.num { color: #ffa56c; }
.cm, .attr { color: #84779d; }

.install-line {
  margin-top: 16px;
  text-align: center;
}

.install-line code {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(173, 122, 255, 0.1);
  border: 1px solid rgba(173, 122, 255, 0.18);
  color: #d4bcff;
  font-family: var(--font-mono);
  font-size: 12px;
}

.sdk-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.sdk-tab {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.sdk-tab.active {
  background: rgba(173, 122, 255, 0.16);
  border-color: rgba(173, 122, 255, 0.24);
  color: var(--text);
}

.sdk-panel { display: none; }
.sdk-panel.active { display: block; }

.playground-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
}

.playground-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.playground-banner p {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.page-footer {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
}

.page-footer p {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.site-footer {
  padding: 58px 0 34px;
  border-top: 1px solid var(--line);
  background: rgba(5, 4, 10, 0.9);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.site-footer .brand {
  align-items: flex-start;
}

.site-footer p {
  margin: 14px 0 0;
  max-width: 360px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
}

.footer-group {
  display: grid;
  align-content: start;
  gap: 2px;
}

.footer-group h4 {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-group a {
  display: block;
  padding: 3px 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.65;
}

.footer-group .footer-text {
  display: block;
  padding: 3px 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.footer-group .footer-link-disabled {
  cursor: default;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(173, 122, 255, 0.12);
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

@media (max-width: 1100px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .site-footer-grid {
    grid-template-columns: 1fr;
  }

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

  .galaxy-shell {
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .container,
  .nav-inner {
    width: min(var(--max-width), calc(100% - 28px));
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    position: absolute;
    top: var(--nav-height);
    left: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(7, 11, 18, 0.98);
    border: 1px solid var(--line);
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .lang-switch {
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .playground-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .galaxy-panel {
    aspect-ratio: auto;
    min-height: 620px;
  }
}

@media (max-width: 600px) {
  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .section-head p {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .btn,
  .nav-btn {
    width: 100%;
  }

  .table-card table,
  .table-card thead,
  .table-card tbody,
  .table-card tr,
  .table-card th,
  .table-card td {
    display: block;
    width: 100%;
  }

  .table-card thead {
    display: none;
  }

  .table-card tr {
    border-bottom: 1px solid var(--line);
  }

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

  .table-card td {
    border: none;
    padding: 6px 14px;
  }
}
