/* Hues.js Website — Styles
   Built with Hues.js by Death Legion
   ========================================================================== */

:root {
  --green: #42b883;
  --green-dark: #369870;
  --dark: #35495e;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --radius: 0.625rem;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--green); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--green-dark); }

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

/* Loading screen */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1rem;
  color: var(--text-muted);
}
.loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}
.brand__logo {
  width: 32px;
  height: 32px;
}
.brand__name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand__name span { color: var(--green); }
.brand__tag {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  line-height: 1;
  margin-top: 2px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__link {
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link--active { color: var(--green); background: rgba(66, 184, 131, 0.1); }
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid rgba(66, 184, 131, 0.3);
  background: rgba(66, 184, 131, 0.1);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  text-decoration: none;
}
.btn:hover { background: #3f4d65; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); border-color: #475569; }
.btn--sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(66, 184, 131, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 184, 131, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -10rem;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(66, 184, 131, 0.12), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 800px; margin: 0 auto; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(66, 184, 131, 0.3);
  background: rgba(66, 184, 131, 0.1);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 1.5rem;
  animation: glow 2.5s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(66, 184, 131, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(66, 184, 131, 0); }
}
.hero__pulse {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  position: relative;
}
.hero__pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  border-radius: 50%;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2.5); opacity: 0; }
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero__title .gradient {
  background: linear-gradient(90deg, var(--green), var(--dark), var(--green));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero__subtitle strong { color: var(--text); font-weight: 600; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.hero__stat strong { color: var(--green); font-family: ui-monospace, monospace; font-weight: 700; }

/* Section */
.section {
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}
.section--alt { background: rgba(30, 41, 59, 0.4); }
.section__header {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}
.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section__desc {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Features grid */
.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.feature {
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}
.feature:hover {
  border-color: rgba(66, 184, 131, 0.5);
  background: var(--surface);
  transform: translateY(-2px);
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: rgba(66, 184, 131, 0.1);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.feature__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}
.feature__api {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.feature__api code {
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 0.125rem 0.375rem;
  background: var(--bg);
  border-radius: 0.25rem;
  color: var(--green);
}

/* Code block */
.code-block {
  background: #282c34;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}
.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border);
}
.code-block__dots { display: flex; gap: 0.375rem; }
.code-block__dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.code-block__dots span:nth-child(1) { background: #ff5f56; }
.code-block__dots span:nth-child(2) { background: #ffbd2e; }
.code-block__dots span:nth-child(3) { background: #27c93f; }
.code-block__filename {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.code-block__copy {
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.6875rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.code-block__copy:hover { color: var(--green); border-color: var(--green); }
.code-block pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #abb2bf;
}
.code-block pre::-webkit-scrollbar { height: 6px; }
.code-block pre::-webkit-scrollbar-track { background: transparent; }
.code-block pre::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* Demo cards */
.demo-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.demo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}
.demo-card__header {
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid var(--border);
}
.demo-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.demo-card__subtitle {
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--green);
}
.demo-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.demo-card__body { padding: 1.25rem; }

/* Counter demo */
.counter { text-align: center; }
.counter__value { margin-bottom: 0.75rem; }
.counter__number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
}
.counter__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.counter__doubled {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.counter__buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Todo demo */
.todo { display: flex; flex-direction: column; gap: 0.75rem; }
.todo__header { display: flex; gap: 0.5rem; }
.todo__input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}
.todo__input:focus { border-color: var(--green); }
.todo__filters { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.chip {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  transition: all 0.15s ease;
}
.chip--active { background: var(--green); color: #fff; border-color: var(--green); }
.todo__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.todo__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.todo__item--done .todo__text { text-decoration: line-through; opacity: 0.5; }
.todo__row { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; flex: 1; }
.todo__row input[type=checkbox] { accent-color: var(--green); width: 16px; height: 16px; }
.todo__text { color: var(--text); font-size: 0.875rem; }
.todo__remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.25rem;
  opacity: 0.5;
  font-family: inherit;
}
.todo__remove:hover { opacity: 1; }
.todo__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 3rem 1.5rem 2rem;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.footer__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.6;
}
.footer__col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 0.5rem; }
.footer__col a { font-size: 0.875rem; color: var(--text-muted); }
.footer__col a:hover { color: var(--green); }
.footer__bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Install page */
.install-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}
.install-step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.install-step__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}
.install-step__body { flex: 1; }
.install-step__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.install-step__desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.875rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1.5rem 2rem; }
  .section { padding: 3rem 1.5rem; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease-out both; }
