/* Nova-3D Website — Shared Styles */

:root {
  --bg:          #08080e;
  --bg-surface:  #10101a;
  --bg-raised:   #17172a;
  --bg-card:     #1c1c30;
  --border:      #2a2a44;
  --border-l:    #3a3a58;
  --primary:     #7c6bff;
  --primary-d:   #5a4bdd;
  --primary-l:   #a090ff;
  --accent:      #4ec9c0;
  --accent-d:    #37a09a;
  --warn:        #f0a030;
  --text:        #ddddf0;
  --text-muted:  #8888b0;
  --text-faint:  #55557a;
  --code-bg:     #0e0e1c;
  --radius:      8px;
  --radius-l:    14px;
  --nav-h:       62px;
  --max-w:       1120px;
  --transition:  0.18s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  line-height: 1.25;
  font-weight: 700;
  color: #f0f0ff;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; color: var(--text); }
p:last-child { margin-bottom: 0; }
a  { color: var(--primary-l); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
strong { color: #f0f0ff; font-weight: 600; }
em { color: var(--text-muted); font-style: italic; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; }
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--bg-surface); }

.page-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  margin-bottom: 3rem;
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 680px; margin-bottom: 0; }
.page-header .badge {
  display: inline-block;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* ── NAVIGATION ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(8,8,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0f0ff;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--primary-l); }
.nav-brand svg { flex-shrink: 0; }
.nav-brand .brand-dot { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg-raised);
}
.nav-links .nav-cta a {
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 1rem;
}
.nav-links .nav-cta a:hover { background: var(--primary-d); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FOOTER ── */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.75rem; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: var(--text-faint); font-size: 0.82rem; margin: 0; }
.footer-bottom .footer-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(124,107,255,0.4); }
.btn-secondary { background: var(--bg-raised); color: var(--text); border: 1px solid var(--border-l); }
.btn-secondary:hover { background: var(--bg-card); color: var(--text); border-color: var(--primary); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary-l); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-raised); color: var(--primary-l); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ── HERO ── */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,107,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  letter-spacing: 0.04em;
}
.hero-eyebrow .eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f0f0ff 40%, var(--primary-l) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-cta { margin-bottom: 4rem; }

.hero-code {
  display: inline-block;
  text-align: left;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.5rem 2rem;
  font-family: 'SFMono-Regular', 'Cascadia Code', 'Fira Code', Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 640px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.hero-code::before {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
  margin-bottom: 1.2rem;
}
.code-kw  { color: #c792ea; }
.code-cls { color: #82aaff; }
.code-fn  { color: #82d9d0; }
.code-str { color: #c3e88d; }
.code-cm  { color: var(--text-faint); }
.code-op  { color: var(--text-muted); }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--border-l); transform: translateY(-2px); }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.25rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ── BADGES / TAGS ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag-planned  { background: rgba(124,107,255,0.15); color: var(--primary-l); border: 1px solid rgba(124,107,255,0.3); }
.tag-wip      { background: rgba(240,160,48,0.15);  color: var(--warn);      border: 1px solid rgba(240,160,48,0.3); }
.tag-done     { background: rgba(46,204,113,0.12);  color: #5ee87e;          border: 1px solid rgba(46,204,113,0.3); }
.tag-future   { background: rgba(136,136,176,0.12); color: var(--text-faint);border: 1px solid rgba(136,136,176,0.2); }

/* ── CODE ── */
pre, code {
  font-family: 'SFMono-Regular', 'Cascadia Code', 'Fira Code', Consolas, monospace;
}
code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  font-size: 0.87em;
  color: var(--accent);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 1.25rem 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

/* ── SECTION HEADER ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0.75rem auto 0; }
.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.6rem;
  display: block;
}

/* ── ARCHITECTURE DIAGRAM ── */
.arch-diagram {
  max-width: 560px;
  margin: 2.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.arch-layer {
  border-radius: var(--radius);
  padding: 0.8rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid;
  position: relative;
  transition: filter var(--transition);
}
.arch-layer:hover { filter: brightness(1.15); }
.arch-arrow {
  text-align: center;
  color: var(--text-faint);
  font-size: 1.2rem;
  line-height: 1;
}
.arch-layer.l-game   { background: rgba(78,201,192,0.12); border-color: rgba(78,201,192,0.4); color: var(--accent); }
.arch-layer.l-api    { background: rgba(124,107,255,0.2);  border-color: rgba(124,107,255,0.5); color: var(--primary-l); }
.arch-layer.l-engine { background: rgba(124,107,255,0.1);  border-color: rgba(124,107,255,0.3); color: #a090ff; }
.arch-layer.l-cna    { background: rgba(240,160,48,0.1);   border-color: rgba(240,160,48,0.3);  color: var(--warn); }
.arch-layer.l-sharp  { background: rgba(240,160,48,0.07);  border-color: rgba(240,160,48,0.2);  color: #c08020; }
.arch-layer.l-backend{ background: rgba(136,136,176,0.1);  border-color: rgba(136,136,176,0.25);color: var(--text-muted); }
.arch-layer .arch-note { font-size: 0.72rem; font-weight: 400; opacity: 0.7; display: block; margin-top: 0.15rem; }
.arch-layer .arch-internal {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
}

/* ── DOCS LAYOUT ── */
.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.25rem;
}
.docs-sidebar h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.docs-sidebar ul { list-style: none; padding: 0; }
.docs-sidebar ul li { margin-bottom: 0.15rem; }
.docs-sidebar ul a {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.docs-sidebar ul a:hover, .docs-sidebar ul a.active {
  color: var(--text);
  background: var(--bg-raised);
}
.docs-sidebar ul a.active { color: var(--primary-l); }
.docs-content h2 { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.docs-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-content ul li { margin-bottom: 0.5rem; }

/* ── NOTICE BOXES ── */
.notice {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 3px solid;
  font-size: 0.93rem;
}
.notice-info    { background: rgba(124,107,255,0.08); border-color: var(--primary); }
.notice-warn    { background: rgba(240,160,48,0.08);  border-color: var(--warn); }
.notice-tip     { background: rgba(46,204,113,0.08);  border-color: #2ecc71; }
.notice strong  { display: block; margin-bottom: 0.3rem; }

/* ── ROADMAP ── */
.roadmap-phase {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.roadmap-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.roadmap-phase-header h3 { margin: 0; font-size: 1.05rem; }
.roadmap-items { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.roadmap-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.roadmap-item .ri-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
.ri-done  { color: #5ee87e; }
.ri-wip   { color: var(--warn); }
.ri-plan  { color: var(--text-faint); }

/* ── PLACEHOLDER / TODO CARDS ── */
.placeholder-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-l);
  border-radius: var(--radius-l);
  padding: 2.5rem;
  text-align: center;
  color: var(--text-faint);
}
.placeholder-card .ph-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.placeholder-card h3 { color: var(--text-muted); margin-bottom: 0.5rem; }
.placeholder-card p  { font-size: 0.88rem; margin: 0; }
.todo-label {
  display: inline-block;
  background: rgba(240,160,48,0.12);
  border: 1px solid rgba(240,160,48,0.3);
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

/* ── VIDEO EMBED ── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.video-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.video-play-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(124,107,255,0.25);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-l);
}
.video-info { padding: 1rem 1.25rem; }
.video-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.video-info p  { font-size: 0.85rem; color: var(--text-faint); margin: 0; }

/* ── SHOWCASE ── */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.showcase-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.showcase-info { padding: 1rem 1.25rem; }
.showcase-info h3 { font-size: 0.97rem; margin-bottom: 0.25rem; }
.showcase-info p  { font-size: 0.83rem; color: var(--text-faint); margin: 0; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color var(--transition);
}
.contact-card:hover { border-color: var(--primary); }
.contact-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.contact-card p  { font-size: 0.87rem; color: var(--text-muted); margin: 0; }

/* ── FEATURE TABLE ── */
.feature-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.feature-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.feature-table td {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.feature-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
}
@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .hero-code { font-size: 0.78rem; padding: 1.25rem 1.25rem; }
  .btn-group { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}
