/*
Theme Name: DevPotent Revamp
Theme URI: https://new.devpotent.com
Author: DevPotent Studio
Description: Dark, sophisticated studio site for DevPotent — Local-First Software.
Version: 1.0.0
License: GPL v2 or later
Text Domain: devpotent-revamp
*/

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

:root {
  /* Dark palette */
  --bg:         #0a0a0c;
  --bg-card:    #111116;
  --bg-raised:  #18181f;
  --border:     #232332;
  --border-dim: #1a1a24;

  /* Accent — electric indigo */
  --accent:     #6c63ff;
  --accent-dim: #4b44bb;
  --accent-glow:rgba(108,99,255,0.18);

  /* Text */
  --text:       #e8e8f0;
  --text-muted: #888899;
  --text-dim:   #555566;

  /* Type scale */
  --font-sans:  'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Spacing */
  --gap:   clamp(1.5rem, 4vw, 3rem);
  --gap-s: clamp(0.75rem, 2vw, 1.25rem);
  --max:   1200px;
  --max-text: 720px;

  /* Motion */
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --t150:  150ms var(--ease);
  --t300:  300ms var(--ease);
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t150); }
a:hover { color: #fff; }

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

/* ── Utility ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
}

.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section--tight { padding: clamp(2rem, 6vw, 4rem) 0; }

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(108,99,255,0.28);
  border-radius: 4px;
  padding: 0.2em 0.65em;
  margin-bottom: 1rem;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── Site Header ──────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dim);
  transition: background var(--t300), border-color var(--t300);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-logo__mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }

.site-nav a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: color var(--t150), background var(--t150);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 6px;
  font-weight: 600;
  transition: background var(--t150), transform var(--t150) !important;
}

.nav-cta:hover {
  background: var(--accent-dim) !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(108,99,255,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(167,139,250,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 100px;
  padding: 0.35em 1em;
  margin-bottom: 1.75rem;
  background: rgba(108,99,255,0.07);
}

.hero__kicker::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--t150);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 30px rgba(108,99,255,0.3);
}

.btn--primary:hover {
  background: #7c74ff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(108,99,255,0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
  background: var(--bg-raised);
}

/* ── Divider ──────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  margin: 0;
}

/* ── Stats bar ────────────────────────────────────────────────────── */
.stats {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

.stats__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  list-style: none;
}

.stats__item {
  text-align: center;
}

.stats__number {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stats__number span {
  color: var(--accent);
}

.stats__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Section headers ──────────────────────────────────────────────── */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header--center { text-align: center; }

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0;
}

.section-header--center p { margin: 0 auto; }

/* ── Products Grid ────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color var(--t300), transform var(--t300), box-shadow var(--t300);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.product-card:hover {
  border-color: rgba(108,99,255,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(108,99,255,0.15);
}

.product-card__icon {
  width: 44px; height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
  transition: background var(--t300), border-color var(--t300);
}

.product-card:hover .product-card__icon {
  background: rgba(108,99,255,0.12);
  border-color: rgba(108,99,255,0.4);
}

.product-card__platform {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.platform-pill {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 0.15em 0.6em;
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.product-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.product-card__footer {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card__status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #34d399;
}

.product-card__status::before {
  content: '● ';
  font-size: 0.6rem;
}

.product-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.product-card__link:hover { color: #fff; }

/* ── Manifesto / About ────────────────────────────────────────────── */
.manifesto {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(2.5rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.manifesto::after {
  content: '';
  position: absolute;
  top: -50px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.manifesto__body {
  max-width: var(--max-text);
}

.manifesto__lead {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.manifesto__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1em;
}

.manifesto__principles {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.manifesto__principles li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.manifesto__principles li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ── Changelog / Releases ─────────────────────────────────────────── */
.changelog-section {
  background: var(--bg);
}

.changelog-intro {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.changelog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.4em 1em;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t150);
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(108,99,255,0.12);
  border-color: rgba(108,99,255,0.4);
  color: var(--accent);
}

#changelog-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cl-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  transition: border-color var(--t300), box-shadow var(--t300);
  animation: fadeSlide 0.4s var(--ease) both;
}

.cl-item:hover {
  border-color: rgba(108,99,255,0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cl-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.cl-item__app {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.cl-item__version {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 4px;
  padding: 0.2em 0.6em;
}

.cl-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.cl-item__platforms {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cl-item__notes {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-line;
}

.cl-item__download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.cl-item__download:hover { color: #fff; }

.cl-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.cl-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
}

.cl-loading::after {
  content: '';
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Contact ──────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.contact-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.contact-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.contact-links {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-links li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-links li strong { color: var(--text); font-weight: 500; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  margin-top: 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

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

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

.footer-copy span {
  color: var(--accent);
  font-weight: 600;
}

/* ── Scroll-to-top ────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: all var(--t300);
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1; pointer-events: auto;
}

.scroll-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; flex-direction: column; width: 100%; }
  .site-nav.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10,10,12,0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1.25rem;
    gap: 0.1rem;
  }
  .site-nav.open a { padding: 0.6rem 0.5rem; font-size: 0.95rem; }
  .nav-toggle { display: block; }
  .site-header__inner { flex-wrap: wrap; position: relative; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-copy { text-align: left; }

  .hero__actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
}

@media (max-width: 480px) {
  .stats__list { gap: 1.5rem; }
  .manifesto__principles { grid-template-columns: 1fr; }
}

/* ── WP Admin Bar ─────────────────────────────────────────────────── */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
