/* ============================================
   ISLEPATH · Shared Design System
   AI-Era Aesthetic · Dark + Glass + Gradient
   ============================================ */

:root {
  /* Color tokens */
  --bg: #0a0a0f;
  --bg-soft: #11111a;
  --bg-card: #16161f;
  --bg-elev: #1d1d28;
  --line: #2a2a38;
  --line-soft: #1f1f2c;
  --ink: #f5f5f7;
  --ink-soft: #b4b4c0;
  --ink-mute: #6b6b7a;

  /* Brand */
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  --gradient-text: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #67e8f9 100%);

  /* Status */
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.12);
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);

  /* Spacing */
  --r: 6px;
  --r-lg: 12px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle animated background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.08), transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: bgDrift 30s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-20px, -10px); }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand); }
strong { color: var(--ink); font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-elev); padding: 2px 6px; border-radius: 4px; }

/* ============================================
   Layout
   ============================================ */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 28px; }
section { padding: 80px 0; }
@media (max-width: 768px) { section { padding: 56px 0; } }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 28px;
  max-width: 1400px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.brand-name { color: var(--ink); }
.brand-name span { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--ink); background: var(--bg-soft); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--gradient);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5); color: white; }

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

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 14px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--brand); }
.footer-brand p { font-size: 14px; color: var(--ink-soft); margin-top: 12px; max-width: 320px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-mute);
}
@media (max-width: 640px) { .footer-bottom { flex-direction: column; gap: 12px; } }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
  color: white;
}
.btn-ghost {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-elev); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* ============================================
   Common components
   ============================================ */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--green-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 16px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--line); }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-brand { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-green { background: var(--green-soft); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-gold { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(245, 158, 11, 0.3); }

/* ============================================
   Utilities
   ============================================ */
.text-gradient { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.text-mute { color: var(--ink-mute); }
.text-soft { color: var(--ink-soft); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

/* ============================================
   Page transition
   ============================================ */
.page-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Selection */
::selection { background: rgba(99, 102, 241, 0.4); color: white; }
