:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-muted: #a0a0ad;
  --text-dim: #6e6e7a;
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-alt: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.1), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Layout containers */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-word {
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
}

/* Hero */
.hero {
  padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem);
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #c4b5fd;
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 12px #a78bfa;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.hero h1 .gradient {
  background: var(--gradient-alt);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shift 8s ease-in-out infinite;
}

.hero h1 .muted {
  display: block;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.55em;
  margin-top: 0.75rem;
  letter-spacing: -0.02em;
}

@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* Section */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-heading p {
  color: var(--text-muted);
  max-width: 380px;
  font-size: 0.95rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

/* App directory grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-3px);
  background: var(--bg-elevated);
  box-shadow: var(--shadow), var(--shadow-glow);
}

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

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background: var(--gradient);
  color: white;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.app-card[data-color="cyan"] .app-card-icon {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.25);
}

.app-card[data-color="pink"] .app-card-icon {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.25);
}

.app-card[data-color="amber"] .app-card-icon {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.app-card[data-color="emerald"] .app-card-icon {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.app-card[data-color="indigo"] .app-card-icon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.app-card[data-color="rose"] .app-card-icon {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.25);
}

.app-card[data-color="teal"] .app-card-icon {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.25);
}

.app-card[data-color="violet"] .app-card-icon {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.25);
}

.app-card[data-color="sunset"] .app-card-icon {
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

.app-card[data-color="sky"] .app-card-icon {
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.app-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.app-card-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.app-card-links {
  display: flex;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}

.app-card-links a {
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.app-card-links a:hover {
  color: var(--text);
}

.app-card-links a::after {
  content: '→';
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
  font-weight: 400;
}

.app-card-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.footer-meta {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-meta a {
  color: var(--text-muted);
}

.footer-meta a:hover {
  color: var(--text);
}

.footer-meta-row {
  margin-bottom: 0.4rem;
}

/* Legal page layout */
.legal {
  padding: clamp(2.5rem, 6vw, 5rem) 0 4rem;
}

.legal-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.legal-breadcrumb a:hover {
  color: var(--accent);
}

.legal h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.legal-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legal-meta strong {
  color: var(--text);
  font-weight: 500;
}

.legal-body h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2.75rem 0 1rem;
  color: var(--text);
}

.legal-body h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--gradient);
  border-radius: 2px;
  margin-right: 0.75rem;
  vertical-align: -2px;
}

.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.legal-body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.965rem;
  line-height: 1.7;
}

.legal-body ul {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.965rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.legal-body a {
  color: var(--accent);
  border-bottom: 1px dotted rgba(139, 92, 246, 0.4);
  transition: all 0.2s ease;
}

.legal-body a:hover {
  color: #c4b5fd;
  border-bottom-color: #c4b5fd;
}

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-footer-links {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Support / contact form */
.support-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.support-direct {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #c4b5fd;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.support-direct:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.5);
  color: #ddd6fe;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}

.field label .req {
  color: var(--accent-3);
  margin-left: 0.2rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.75rem 0.875rem;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a0a0ad' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
  background: var(--bg-elevated);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gradient);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
  justify-self: start;
}

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

.btn-primary:active {
  transform: translateY(0);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.legal-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.legal-footer-links a:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text);
}

/* About strip */
.about-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.about-stat .num {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.about-stat .lbl {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-links a:not(.nav-links-cta) {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-meta {
    text-align: left;
  }
}

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