/* ============================================
   HermesCentral.ai — The Hermes Agent Skill Marketplace
   Adapted from OpenClawCentral design system
   ============================================ */

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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2035;
  --bg-card-hover: #1f2847;
  --gold: #d4a844;
  --gold-light: #e8c96a;
  --gold-dim: #a07d30;
  --teal: #2dd4bf;
  --teal-light: #5eead4;
  --teal-dim: #14b8a6;
  --white: #f0f0f0;
  --white-dim: #b0b8c8;
  --text-body: #c8cdd8;
  --accent-blue: #4a9eff;
  --accent-green: #4ade80;
  --accent-red: #ff6b6b;
  --accent-purple: #a78bfa;
  --border: rgba(45, 212, 191, 0.12);
  --border-strong: rgba(45, 212, 191, 0.25);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(45, 212, 191, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--teal-light);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.gold { color: var(--gold); }
.teal { color: var(--teal); }
.dim { color: var(--white-dim); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}

.nav-logo .hermes-icon {
  font-size: 1.6rem;
  color: var(--teal);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--white-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}

.nav-cta {
  background: var(--teal);
  color: var(--bg-primary) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--teal-light);
  color: var(--bg-primary) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

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

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(45, 212, 191, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(212, 168, 68, 0.03) 0%, transparent 50%);
  animation: heroGlow 20s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-3%, -3%); }
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 { margin-bottom: 24px; letter-spacing: -0.02em; }

.hero h1 .highlight {
  color: var(--teal);
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--white-dim);
  max-width: 600px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--teal-light);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--bg-primary);
}
.btn-gold:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 68, 0.3);
}

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Page Header */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, 0.06) 0%, transparent 60%);
}

.page-header h1 { position: relative; }

.page-header .subtitle {
  position: relative;
  color: var(--white-dim);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  border-color: var(--teal-dim);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.product-card.featured {
  border-color: var(--teal-dim);
  box-shadow: var(--shadow-glow);
}

.product-card .product-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--teal);
  color: var(--bg-primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.product-card .product-badge.coming-soon {
  background: var(--accent-blue);
  color: var(--white);
}

.product-card .product-badge.popular {
  background: var(--gold);
  color: var(--bg-primary);
}

.product-card .product-badge.new {
  background: var(--accent-green);
  color: var(--bg-primary);
}

.product-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
}

.product-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.product-card h3 { margin-bottom: 8px; font-size: 1.2rem; }

.product-card .product-tagline {
  color: var(--teal-dim);
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.product-card .product-desc {
  color: var(--white-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--teal);
}

.product-price .price-period {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--white-dim);
}

.product-price .price-tbd {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white-dim);
}

/* Filter Pills */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}

.filter-pill {
  padding: 8px 20px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--white-dim);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill:hover,
.filter-pill.active {
  background: rgba(45, 212, 191, 0.1);
  border-color: var(--teal-dim);
  color: var(--teal);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.stat-item { text-align: center; }

.stat-item .stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--white-dim);
  margin-top: 8px;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--teal-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.category-card .cat-icon { font-size: 2.5rem; margin-bottom: 16px; }
.category-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.category-card p { color: var(--white-dim); font-size: 0.85rem; }

.category-card .cat-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Trust Bar */
.trust-bar {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white-dim);
  font-size: 0.9rem;
}

.trust-item .trust-icon { font-size: 1.3rem; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.08) 0%, rgba(212, 168, 68, 0.04) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  margin: 40px 0;
}

.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p { max-width: 560px; margin: 0 auto 28px; color: var(--white-dim); }

/* About */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.85;
}

.about-content blockquote {
  border-left: 3px solid var(--teal);
  padding: 16px 20px;
  margin: 28px 0;
  background: rgba(45, 212, 191, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1.8;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.team-card h3 { margin-bottom: 4px; }
.team-card .role { color: var(--teal); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.team-card p { color: var(--white-dim); font-size: 0.9rem; }

/* Feature List */
.feature-list {
  list-style: none;
  margin: 24px 0;
}

.feature-list li {
  padding: 8px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-list li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Contact Form */
.contact-form {
  max-width: 520px;
  margin: 32px auto 0;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--white-dim); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--teal); }
.footer-col p { color: var(--white-dim); font-size: 0.9rem; line-height: 1.6; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p { color: var(--white-dim); font-size: 0.8rem; }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

/* Skip to Content */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-to-content:focus { top: 0; outline: none; }

*:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Nav Scroll */
.nav.scrolled {
  background: rgba(10, 14, 26, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(45, 212, 191, 0.25);
}

.nav.scrolled .nav-inner { height: 56px; }

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-links {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 0 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open { max-height: 400px; opacity: 1; padding: 20px 24px; }
  .nav-links.open li { opacity: 1; transform: translateY(0); }
  .nav-links li { opacity: 0; transform: translateY(-8px); transition: opacity 0.25s ease, transform 0.25s ease; }
  .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.25s; }
  .nav-links a { display: block; padding: 10px 0; }
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--teal);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.back-to-top:hover {
  background: var(--teal);
  color: var(--bg-primary);
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45, 212, 191, 0.25);
}

/* Promise Grid */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.promise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.promise-card h3 { margin-bottom: 10px; }
.promise-card p { margin: 0; color: var(--white-dim); line-height: 1.7; }

/* Email Signup */
.signup-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  margin: 40px 0;
}

.signup-box h3 { margin-bottom: 8px; }
.signup-box p { color: var(--white-dim); margin-bottom: 20px; font-size: 0.95rem; }

.signup-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.signup-form input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
.signup-form input:focus { border-color: var(--teal); }
.signup-form input::placeholder { color: var(--white-dim); }

@media (max-width: 500px) {
  .signup-form { flex-direction: column; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* High Contrast */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(45, 212, 191, 0.35);
    --border-strong: rgba(45, 212, 191, 0.55);
    --white-dim: #d0d8e8;
    --text-body: #dce0ea;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero { min-height: auto; padding: 100px 0 60px; }
  .cta-banner { padding: 32px 20px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }
  .products-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}
