/* ═══════════════════════════════════════════════════════════════
   PRAXIS — Dark Theme Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg: #080c14;
  --bg-alt: #0c1220;
  --bg-card: #0f1826;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(139, 92, 246, 0.4);

  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --violet-glow: rgba(139, 92, 246, 0.18);
  --teal: #2dd4bf;
  --teal-glow: rgba(45, 212, 191, 0.15);
  --amber: #f59e0b;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --green: #22c55e;

  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Canvas ─────────────────────────────────────────────────── */
#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ── Navbar ──────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--violet-light);
}

.nav-logo-img {
  /* scala in proporzione al font-size del .nav-logo (1.25rem) */
  height: 1.6em;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  filter: brightness(1.05);
  transition: filter var(--transition), transform var(--transition);
}

.nav-logo:hover .nav-logo-img {
  filter: brightness(1.25) drop-shadow(0 0 5px var(--violet));
  transform: scale(1.06);
}

/* ── Hero logo ───────────────────────────────────────────────── */
.hero-logo {
  /* ~20% del titolo hero per non sovrastare il testo */
  width: clamp(56px, 7vw, 88px);
  height: auto;
  object-fit: contain;
  margin-bottom: 0;
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.4));
  animation: fadeDown 0.6s ease both, logo-float 5s ease-in-out 0.6s infinite;
}

@keyframes logo-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ── Footer logo ─────────────────────────────────────────────── */
.footer-logo {
  height: 2rem;
  /* allineato al testo del footer-brand */
  width: auto;
  object-fit: contain;
  margin-bottom: 0.6rem;
  display: block;
  filter: brightness(0.85) drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
}

.logo-bracket {
  color: var(--violet);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

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

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), #6d28d9);
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(139, 92, 246, 0.55);
}

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

.btn-outline:hover {
  border-color: var(--violet);
  background: var(--violet-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  margin-left: auto;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Hero ──────────────────────────────────────────────────────  */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 10%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 820px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--violet-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: fadeDown 0.6s ease both;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  animation: fadeUp 0.7s 0.1s ease both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--violet-light) 0%, var(--teal) 60%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.7;
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero-subtitle strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s 0.3s ease both;
}

/* ── Terminal ─────────────────────────────────────────────────── */
.terminal {
  background: #060a10;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(139, 92, 246, 0.08);
  width: 100%;
  max-width: 640px;
  text-align: left;
  animation: fadeUp 0.7s 0.4s ease both;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #ffbd2e;
}

.terminal-dot.green {
  background: #28ca42;
}

.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.term-prompt {
  color: var(--teal);
  font-weight: 700;
  user-select: none;
}

.term-cmd {
  color: #e2e8f0;
}

.term-comment {
  color: var(--text-muted);
  font-style: italic;
}

.term-out {
  color: var(--text-muted);
  padding-left: 1.2em;
}

.term-highlight {
  color: var(--violet-light);
  font-weight: 600;
}

.term-cursor {
  animation: blink 1.1s step-end infinite;
  color: var(--teal);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Section commons ─────────────────────────────────────────── */
.section {
  padding: 7rem 2rem;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 3.5rem;
}

/* ── Core Concepts ────────────────────────────────────────────── */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.concept-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.concept-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--teal));
  opacity: 0;
  transition: opacity var(--transition);
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px var(--violet-glow);
}

.concept-card:hover::before {
  opacity: 1;
}

.concept-icon {
  width: 52px;
  height: 52px;
  background: var(--violet-glow);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--violet-light);
  margin-bottom: 1.25rem;
}

.concept-number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
}

.concept-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.concept-card p {
  color: var(--text-dim);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.concept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--violet-light);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  letter-spacing: 0.03em;
}

/* ── Features ─────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card-wide {
  grid-column: 1 / -1;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.feature-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.icon-violet {
  background: rgba(139, 92, 246, .15);
  color: var(--violet-light);
  border: 1px solid rgba(139, 92, 246, .25);
}

.icon-teal {
  background: rgba(45, 212, 191, .12);
  color: var(--teal);
  border: 1px solid rgba(45, 212, 191, .25);
}

.icon-amber {
  background: rgba(245, 158, 11, .12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, .25);
}

.icon-pink {
  background: rgba(236, 72, 153, .12);
  color: var(--pink);
  border: 1px solid rgba(236, 72, 153, .25);
}

.icon-cyan {
  background: rgba(6, 182, 212, .12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, .25);
}

.icon-green {
  background: rgba(34, 197, 94, .12);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, .25);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feature-code {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.feature-code code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  display: block;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.philosophy-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.philosophy-item strong {
  color: var(--text);
}

.phi-mark {
  color: var(--violet);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ── Workflow ─────────────────────────────────────────────────── */
.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.workflow-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.workflow-step:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #6d28d9);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.step-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step-content p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.step-cmd code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 4px;
  padding: 0.2rem 0.65rem;
}

.workflow-connector {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.connector-line {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, var(--violet), var(--teal));
  opacity: 0.3;
}

/* ── Install ──────────────────────────────────────────────────── */
.install-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .install-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.install-text p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  margin-top: 0.75rem;
}

.install-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.install-checklist li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.93rem;
  color: var(--text-dim);
}

.install-checklist svg {
  color: var(--green);
  flex-shrink: 0;
}

.install-terminal .terminal {
  max-width: 100%;
  animation: none;
}

/* ── Footer ───────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 1;
  background: #050810;
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  padding-bottom: 2.5rem;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand .nav-logo {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--violet-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--violet-light);
  font-weight: 500;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

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

/* Intersection-observer driven animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .workflow-step {
    flex-direction: column;
  }
}