:root {
  --accent: #474A64;
  --accent-light: #7B80B0;
  --accent-bright: #A8AEE0;
  --accent-dark: #2D3040;
  --bg: #0B0D14;
  --surface: #12141E;
  --surface2: #1A1D2A;
  --text: #E0E2EC;
  --text2: #888B9E;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
  overflow-x: hidden;
}

/* === Top bar with auth widget === */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11,13,20,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--accent-dark);
}
.top-bar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
}
.auth-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.auth-loading { color: var(--text2); font-size: 0.8rem; }
.auth-greeting { color: var(--text2); font-size: 0.8rem; }
.auth-greeting strong { color: var(--text); }
.auth-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text2);
  border: 1px solid var(--accent-dark);
  transition: all 0.2s;
}
.auth-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.auth-btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}
.auth-btn--primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--bg); }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(71,74,100,0.15), transparent),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(71,74,100,0.08), transparent);
  pointer-events: none;
}

header, main, footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  padding: 0 1.5rem;
}

header {
  padding-top: 4rem;
  padding-bottom: 3rem;
  text-align: center;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text2);
  font-size: 1.05rem;
}

/* === General (uncategorized) services === */

.services { margin-bottom: 0.5rem; }

.services .card {
  background: var(--surface);
  border: 1px solid var(--accent-dark);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.services .card + .card {
  margin-top: 0.75rem;
}

.services .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(71,74,100,0.1), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.services .card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(71,74,100,0.15);
}

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

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  color: var(--accent-light);
}

.card-icon svg { width: 100%; height: 100%; }

.card-body { flex: 1; position: relative; z-index: 1; }

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.card-body p {
  font-size: 0.85rem;
  color: var(--text2);
}

.card-arrow {
  color: var(--accent);
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

.card:hover .card-arrow { transform: translateX(4px); }

/* === Category sections === */

.category-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text2);
  margin-bottom: 1rem;
  padding-top: 0.5rem;
}

/* Generic category card styling — works for any .services--<id> via --section-accent */
.services[class*="services--"] {
  margin-bottom: 2rem;
}

.services[class*="services--"] .card {
  border-color: color-mix(in srgb, var(--section-accent) 30%, transparent);
}

.services[class*="services--"] .card:hover {
  border-color: var(--section-accent);
  box-shadow: 0 8px 30px color-mix(in srgb, var(--section-accent) 20%, transparent);
}

.services[class*="services--"] .card::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 12%, transparent), transparent);
}

.services[class*="services--"] .card-icon {
  color: var(--section-accent);
}

.services[class*="services--"] .card-arrow {
  color: var(--section-accent);
}

/* === Links === */

.links { margin-top: 2rem; }

.link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text2);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.link-item:hover {
  background: var(--surface);
  color: var(--accent-light);
}

.link-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.link-icon svg { width: 100%; height: 100%; }

.link-arrow { margin-left: auto; }

footer {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  color: var(--text2);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  header { padding-top: 2.5rem; }
  h1 { font-size: 2rem; }
}
