/* arifOS Sovereign Design System v2026.04-KANON */
/* DITEMPA BUKAN DIBERI — Intelligence is forged, not given. */

:root {
  --void: #050508;
  --abyss: #0a0a0f;
  --depth: #111118;
  --surface: #1a1a24;
  --raised: #222230;
  --border: #2a2a3a;
  --border-subtle: #1e1e2c;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #606078;
  --accent-gold: #c9a84c;
  --accent-gold-dim: #8a7030;
  --accent-crimson: #a03030;
  --accent-emerald: #30a060;
  --accent-azure: #3080c0;
  --accent-platinum: #b0b0c8;
  --glow-gold: rgba(201, 168, 76, 0.3);
  --glow-crimson: rgba(160, 48, 48, 0.3);
  --glow-emerald: rgba(48, 160, 96, 0.3);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
  --font-serif: 'Crimson Pro', 'Playfair Display', Georgia, serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--void);
  overflow-x: hidden;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--abyss);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold-dim);
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent-gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 0.8rem;
  transition: all 0.3s var(--ease-out-expo);
}

.nav-logo:hover .nav-logo-icon {
  background: var(--accent-gold);
  color: var(--void);
  box-shadow: 0 0 20px var(--glow-gold);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s var(--ease-out-expo);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--header-height) + 4rem) 2rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 168, 76, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(48, 160, 96, 0.05), transparent);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-bottom: 2rem;
  background: rgba(201, 168, 76, 0.05);
}

.hero-seal-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--glow-emerald);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-platinum) 50%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--void);
}

.btn-primary:hover {
  background: #d4b85c;
  box-shadow: 0 4px 24px var(--glow-gold);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  background: rgba(201, 168, 76, 0.05);
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  border-color: var(--accent-gold-dim);
  box-shadow: 0 0 16px var(--glow-gold);
}

.card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ─── Status Badges ─── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.status-ok {
  background: rgba(48, 160, 96, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(48, 160, 96, 0.2);
}

.status-warn {
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.status-err {
  background: rgba(160, 48, 48, 0.1);
  color: var(--accent-crimson);
  border: 1px solid rgba(160, 48, 48, 0.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-ok .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--glow-emerald);
}

.status-warn .status-dot {
  background: var(--accent-gold);
}

.status-err .status-dot {
  background: var(--accent-crimson);
}

/* ─── Section Layouts ─── */
.section {
  padding: 6rem 3vw;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ─── Federation Grid (domain cards) ─── */
.fed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.fed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fed-card:hover {
  border-color: var(--accent-gold-dim);
  background: var(--raised);
  transform: translateY(-2px);
}

.fed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fed-card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fed-card h4 {
  font-size: 1rem;
  font-weight: 600;
}

.fed-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.fed-card-meta {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* ─── Terminal / Code Block ─── */
.terminal {
  background: var(--abyss);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}

.terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}

.terminal-dots {
  position: absolute;
  top: 10px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

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

.terminal-dot-red { background: var(--accent-crimson); }
.terminal-dot-yel { background: var(--accent-gold); }
.terminal-dot-grn { background: var(--accent-emerald); }

.terminal pre {
  margin-top: 24px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal .prompt { color: var(--accent-gold); }
.terminal .cmd { color: var(--text-primary); }
.terminal .output { color: var(--text-muted); }
.terminal .highlight { color: var(--accent-emerald); }

/* ─── Table ─── */
.data-table {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  font-weight: 500;
  background: var(--surface);
}

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

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 3vw;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-seal {
  font-family: var(--font-mono);
  color: var(--accent-gold-dim);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 4rem auto;
  max-width: 200px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-height) + 2rem);
  }

  .section {
    padding: 4rem 1.5rem;
  }

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

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
