/* ===== Tema HFL (dark) ===== */
:root {
  --color-bg: #0b0f14;
  --color-surface: #111827;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-primary: #08b0ff;
  --color-accent: #00e0ff;
  --color-border: #1f2937;
}
html, body {
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans';
}

/* ===== Layout ===== */
main { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
h1 { color: var(--color-primary); margin: 0; }

/* ===== Cards ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.project-card {
  position: relative;          /* 👈 necessário p/ clipping correto */
  isolation: isolate;          /* novo stacking context (evita bleed) */
  overflow: hidden;            /* 👈 impede sombras saírem do raio */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,.45); }
.project-card h3 { font-size: 1.25rem; color: var(--color-primary); margin: 0 0 .5rem; }
.project-card p  { color: var(--color-text-muted); margin: 0 0 .5rem; flex: 1; }

/* ===== Badges ===== */
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.badge { border-radius: 9999px; padding: .125rem .5rem; font-size: .75rem;
         border: 1px solid var(--color-border); color: var(--color-text-muted); }
.badge--type { font-weight: 600; color: #0b0f14; border: none; }
.badge--type-paid        { background: #08b0ff; }
.badge--type-open-source { background: #10b981; }
.badge--type-free-run    { background: #facc15; }
.badge--type-subscription{ background: #08b0ff; }

/* ===== CTA (alinhado + animações elegantes) ===== */
.links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .6rem;
  margin-top: .75rem;
  margin-bottom: 0;         /* 👈 não empurrar para fora do raio */
  padding-bottom: .25rem;   /* 👈 pequena folga interna inferior */
}
.btn {
  box-sizing: border-box;   /* 👈 inclui borda/padding no width */
  width: 100%;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: .6rem;
  padding: .55rem .9rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--color-text);
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    filter .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease;
}
.btn--primary {
  background: var(--color-primary);
  color: #0b0f14;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(8,176,255,.18);
}
.btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(8,176,255,.28);
}
.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;         /* 👈 evita halo a sair do cartão */
}
.btn--ghost:hover {
  background: rgba(8,176,255,.08);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0,224,255,.15);
}
.btn:active { transform: translateY(0); filter: none; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none !important; }
}

/* Botão primário (Subscribe Now) – destaque principal */
.btn--primary.subscribe-now {
  background: linear-gradient(135deg, #08b0ff 0%, #a855f7 100%);
  color: #0b0f14;
  border: none;
  box-shadow: 0 6px 18px rgba(168,85,247,.35);
}
.btn--primary.subscribe-now:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(168,85,247,.45);
}

/* Botão secundário (Learn More) – discreto */
.btn--ghost.learn-more {
  background: rgba(8,176,255,.08);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn--ghost.learn-more:hover {
  background: rgba(8,176,255,.15);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* ===== Header / Navbar (HFL) ===== */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 15, 20, 0.95);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: .2px;
}

.logo-img {
  height: 36px;
  width: auto;
  border-radius: 6px;
  transition: transform .2s ease;
}
.logo:hover .logo-img { transform: scale(1.04); }

.logo-text { white-space: nowrap; }

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

/* usa os teus botões já existentes, só reforçamos estado ativo */
.nav-links .btn { padding: .45rem .9rem; }

.nav-links .btn.active {
  background: var(--color-primary);
  color: #0b0f14;
  border-color: transparent;
}

/* responsivo: esconder texto grande em ecrãs pequenos, se quiseres
@media (max-width: 640px) {
  .logo-text { display: none; }
} */