/*
Theme Name: Nexus
Theme URI: https://yoursite.com/nexus-theme
Author: Your Name
Author URI: https://yoursite.com
Description: A futuristic app showcase WordPress theme with dark/light modes, glassmorphism, scroll animations, and custom app post type. Built with native PHP, no page builders.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexus
Tags: dark-mode, light-mode, custom-post-types, animation, glassmorphism, responsive, full-site-editing, blog
*/

/* =========================================================
   NEXUS THEME — MASTER STYLESHEET
   Organized: Variables → Reset → Typography → Layout →
              Components → Dark/Light Modes → Utilities
   ========================================================= */

/* ---------------------------------------------------------
   1. DESIGN TOKENS / CSS VARIABLES
   --------------------------------------------------------- */
:root {
  /* --- Color Palette (Light Mode defaults) --- */
  --clr-bg:          #f0f0f5;
  --clr-bg-alt:      #e8e8f0;
  --clr-surface:     rgba(255, 255, 255, 0.65);
  --clr-surface-alt: rgba(255, 255, 255, 0.85);
  --clr-border:      rgba(0, 0, 0, 0.08);
  --clr-text:        #0d0d1a;
  --clr-text-muted:  #5a5a7a;
  --clr-text-inv:    #f0f0f5;

  /* --- Accent Gradient --- */
  --clr-accent-a:    #6c63ff;
  --clr-accent-b:    #00d4ff;
  --clr-accent-c:    #ff6b9d;
  --gradient-main:   linear-gradient(135deg, var(--clr-accent-a) 0%, var(--clr-accent-b) 100%);
  --gradient-warm:   linear-gradient(135deg, var(--clr-accent-a) 0%, var(--clr-accent-c) 100%);
  --gradient-mesh:   radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
                     radial-gradient(ellipse at 60% 80%, rgba(255, 107, 157, 0.10) 0%, transparent 50%);

  /* --- Typography --- */
  --font-display:   'Syne', 'Space Grotesk', sans-serif;
  --font-body:      'DM Sans', 'Outfit', sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', monospace;

  /* --- Spacing Scale --- */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2.5rem;
  --sp-2xl: 4rem;
  --sp-3xl: 6rem;
  --sp-4xl: 9rem;

  /* --- Radius --- */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   32px;
  --r-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.25);

  /* --- Motion --- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   150ms;
  --dur-normal: 300ms;
  --dur-slow:   600ms;
  --dur-xslow:  1000ms;

  /* --- Layout --- */
  --container-max:  1280px;
  --container-wide: 1440px;
  --header-height:  72px;
  --grid-gap:       clamp(1rem, 2.5vw, 2rem);
}

/* Dark Mode Variables */
[data-theme="dark"],
.dark-mode {
  --clr-bg:          #080810;
  --clr-bg-alt:      #0f0f1e;
  --clr-surface:     rgba(255, 255, 255, 0.05);
  --clr-surface-alt: rgba(255, 255, 255, 0.09);
  --clr-border:      rgba(255, 255, 255, 0.08);
  --clr-text:        #eeeef8;
  --clr-text-muted:  #8080a0;
  --clr-text-inv:    #0d0d1a;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 60px rgba(108, 99, 255, 0.35);
}

/* ---------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--dur-slow) var(--ease-in-out),
              color var(--dur-slow) var(--ease-in-out);
}

/* Background mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--clr-accent-a);
  text-decoration: none;
  transition: color var(--dur-fast);
}
a:hover { color: var(--clr-accent-b); }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------------------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--clr-text);
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--sp-md); }
p:last-child { margin-bottom: 0; }

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-warm {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-accent-a);
  display: block;
  margin-bottom: var(--sp-sm);
}

/* ---------------------------------------------------------
   4. LAYOUT & CONTAINERS
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: 720px;
}

section {
  padding-block: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--sp-2xl);
}

.section-header h2 { margin-bottom: var(--sp-md); }
.section-header p {
  font-size: 1.125rem;
  color: var(--clr-text-muted);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------
   5. HEADER & NAVIGATION
   --------------------------------------------------------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all var(--dur-normal) var(--ease-in-out);
}

#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

/* Glassmorphism header on scroll */
#site-header.scrolled {
  background: var(--clr-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}

/* Logo */
.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--clr-text) !important;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.site-logo .logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.site-logo .logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
}

/* Main Navigation */
#primary-navigation ul {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

#primary-navigation a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  letter-spacing: 0.01em;
  transition: color var(--dur-fast);
  position: relative;
}

#primary-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: var(--r-full);
  transition: width var(--dur-normal) var(--ease-out-expo);
}

#primary-navigation a:hover,
#primary-navigation a.current-menu-item {
  color: var(--clr-text);
}

#primary-navigation a:hover::after,
#primary-navigation a.current-menu-item::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 24px;
  background: var(--clr-surface-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-normal);
  outline: none;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--gradient-main);
  border-radius: var(--r-full);
  transition: transform var(--dur-normal) var(--ease-out-expo);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(20px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--sp-sm);
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: var(--r-full);
  transition: all var(--dur-normal) var(--ease-out-expo);
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  #primary-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--clr-surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-border);
    padding: var(--sp-lg);
  }
  #primary-navigation.is-open { display: block; }
  #primary-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-lg);
  }
}

/* ---------------------------------------------------------
   6. BUTTONS
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.75em 1.75em;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: all var(--dur-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.55);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  border-color: var(--clr-accent-a);
  color: var(--clr-accent-a);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: var(--clr-surface);
  color: var(--clr-text);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--clr-surface-alt);
  transform: translateY(-1px);
  color: var(--clr-text);
}

.btn-sm {
  padding: 0.5em 1.2em;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 1em 2.25em;
  font-size: 1rem;
}

/* ---------------------------------------------------------
   7. GLASS CARDS (Glassmorphism)
   --------------------------------------------------------- */
.glass-card {
  background: var(--clr-surface);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-out-expo),
              box-shadow var(--dur-normal) var(--ease-out-expo),
              border-color var(--dur-normal);
}

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

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(108, 99, 255, 0.3);
}

/* ---------------------------------------------------------
   8. HERO SECTION
   --------------------------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--sp-4xl) var(--sp-3xl);
  position: relative;
}

/* Animated grid background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* Floating orbs */
.hero-orb {
  position: absolute;
  border-radius: var(--r-full);
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(108, 99, 255, 0.25);
  top: -100px;
  right: -150px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(0, 212, 255, 0.18);
  bottom: -80px;
  left: -100px;
  animation-delay: -4s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(255, 107, 157, 0.15);
  top: 40%;
  left: 55%;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.96); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--clr-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: 0.4em 1.2em;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xl);
  color: var(--clr-text-muted);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--clr-accent-b);
  border-radius: var(--r-full);
  box-shadow: 0 0 8px var(--clr-accent-b);
  animation: pulse 2s ease-in-out infinite;
}

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

#hero h1 {
  margin-bottom: var(--sp-lg);
  font-size: clamp(2.8rem, 7vw, 6rem);
}

#hero .hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--clr-text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--sp-2xl);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: var(--sp-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--clr-text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollCueFade 2s ease-in-out infinite;
}

.scroll-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--clr-accent-a));
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollCueFade {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------------------------------------------------------
   9. APP CARDS
   --------------------------------------------------------- */
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-out-expo),
              box-shadow var(--dur-normal) var(--ease-out-expo),
              border-color var(--dur-normal);
  position: relative;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.app-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(108, 99, 255, 0.35);
}

.app-card-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--clr-bg-alt);
}

.app-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.app-card:hover .app-card-media img {
  transform: scale(1.06);
}

.app-card-category {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  background: var(--clr-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: 0.3em 0.9em;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-accent-a);
  z-index: 2;
}

.app-card-body {
  padding: var(--sp-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  position: relative;
  z-index: 2;
}

.app-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
  flex-shrink: 0;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.app-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-text);
  transition: color var(--dur-fast);
}

.app-card:hover .app-card-title { color: var(--clr-accent-a); }

.app-card-excerpt {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--clr-border);
  margin-top: auto;
}

.app-card-stats {
  display: flex;
  gap: var(--sp-lg);
}

.app-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
}

.app-stat svg { opacity: 0.7; }

/* App Card Link overlay */
.app-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ---------------------------------------------------------
   10. FEATURED APP (Hero card)
   --------------------------------------------------------- */
.featured-app {
  background: var(--clr-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 480px;
  position: relative;
}

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

.featured-app-content {
  padding: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-lg);
  position: relative;
  z-index: 1;
}

.featured-app-media {
  position: relative;
  overflow: hidden;
  background: var(--clr-bg-alt);
}

.featured-app-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .featured-app {
    grid-template-columns: 1fr;
  }
  .featured-app-media {
    aspect-ratio: 16/9;
  }
}

/* ---------------------------------------------------------
   11. FEATURES SECTION
   --------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--grid-gap);
}

.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-out-expo),
              box-shadow var(--dur-normal),
              border-color var(--dur-normal);
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out-expo);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 99, 255, 0.2);
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-lg);
  position: relative;
  transition: transform var(--dur-normal) var(--ease-out-expo);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
}

.feature-icon-purple { background: rgba(108, 99, 255, 0.15); color: var(--clr-accent-a); }
.feature-icon-blue   { background: rgba(0, 212, 255, 0.12);  color: var(--clr-accent-b); }
.feature-icon-pink   { background: rgba(255, 107, 157, 0.12); color: var(--clr-accent-c); }
.feature-icon-green  { background: rgba(0, 230, 118, 0.12);  color: #00e676; }

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--sp-sm);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   12. STATS BAR
   --------------------------------------------------------- */
.stats-bar {
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl) var(--sp-2xl);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   13. TESTIMONIALS
   --------------------------------------------------------- */
.testimonials-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--grid-gap);
}

.testimonial-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  position: relative;
  transition: transform var(--dur-normal) var(--ease-out-expo), box-shadow var(--dur-normal);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-quote {
  font-size: 2.5rem;
  line-height: 1;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-md);
  display: block;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--gradient-main);
  flex-shrink: 0;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: var(--sp-md);
}

/* ---------------------------------------------------------
   14. BLOG / POSTS
   --------------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--grid-gap);
}

.blog-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-normal) var(--ease-out-expo), box-shadow var(--dur-normal);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.blog-card-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--clr-bg-alt);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.blog-card:hover .blog-card-media img { transform: scale(1.07); }

.blog-card-body {
  padding: var(--sp-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
}

.blog-card-meta .category-pill {
  background: rgba(108, 99, 255, 0.12);
  color: var(--clr-accent-a);
  border-radius: var(--r-full);
  padding: 0.2em 0.8em;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-text);
  transition: color var(--dur-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card:hover .blog-card-title { color: var(--clr-accent-a); }

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-md);
  border-top: 1px solid var(--clr-border);
}

.blog-author-mini {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.82rem;
  color: var(--clr-text-muted);
}

.blog-author-mini img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  object-fit: cover;
}

.read-more-arrow {
  font-size: 0.8rem;
  color: var(--clr-accent-a);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--dur-fast);
}
.blog-card:hover .read-more-arrow { gap: 8px; }

/* ---------------------------------------------------------
   15. SINGLE APP PAGE
   --------------------------------------------------------- */
.app-hero {
  padding-top: calc(var(--header-height) + var(--sp-2xl));
  padding-bottom: var(--sp-3xl);
}

.app-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-3xl);
  align-items: center;
}

@media (max-width: 900px) {
  .app-hero-inner { grid-template-columns: 1fr; }
}

.app-meta-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
}

.app-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
  font-size: 0.875rem;
}
.app-meta-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.app-meta-label {
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-meta-value {
  font-weight: 600;
  color: var(--clr-text);
}

/* Screenshots gallery */
.screenshots-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-md);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.screenshots-gallery .screenshot-main {
  grid-row: span 2;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.screenshots-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow);
}

.screenshots-gallery img:hover { transform: scale(1.04); }

/* App content */
.app-content {
  max-width: 800px;
  margin-inline: auto;
}

.app-content h2, .app-content h3 { margin-bottom: var(--sp-md); margin-top: var(--sp-xl); }
.app-content p { color: var(--clr-text-muted); margin-bottom: var(--sp-md); }
.app-content ul, .app-content ol {
  list-style: initial;
  padding-left: var(--sp-lg);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-md);
}

/* ---------------------------------------------------------
   16. CONTACT PAGE
   --------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--sp-2xl);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(108, 99, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-form {
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
}

.form-group {
  margin-bottom: var(--sp-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
  color: var(--clr-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.85em 1.2em;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  color: var(--clr-text);
  font-size: 0.9rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--clr-accent-a);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

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

/* ---------------------------------------------------------
   17. FOOTER
   --------------------------------------------------------- */
#site-footer {
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
  padding-top: var(--sp-3xl);
  padding-bottom: var(--sp-xl);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-2xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin-top: var(--sp-md);
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-lg);
  color: var(--clr-text);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  transition: color var(--dur-fast);
}

.footer-nav a:hover {
  color: var(--clr-text);
}

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

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: var(--sp-sm);
}

.social-link {
  width: 36px;
  height: 36px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  transition: all var(--dur-fast);
}

.social-link:hover {
  background: var(--gradient-main);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   18. SCROLL ANIMATIONS
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

.stagger-children.is-visible > *:nth-child(1)  { transition-delay: 0ms; opacity: 1; transform: none; }
.stagger-children.is-visible > *:nth-child(2)  { transition-delay: 80ms; opacity: 1; transform: none; }
.stagger-children.is-visible > *:nth-child(3)  { transition-delay: 160ms; opacity: 1; transform: none; }
.stagger-children.is-visible > *:nth-child(4)  { transition-delay: 240ms; opacity: 1; transform: none; }
.stagger-children.is-visible > *:nth-child(5)  { transition-delay: 320ms; opacity: 1; transform: none; }
.stagger-children.is-visible > *:nth-child(6)  { transition-delay: 400ms; opacity: 1; transform: none; }

/* ---------------------------------------------------------
   19. PAGE LOAD ANIMATION
   --------------------------------------------------------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

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

/* ---------------------------------------------------------
   20. PAGINATION
   --------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-2xl);
}

.pagination a,
.pagination span {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text-muted);
  transition: all var(--dur-fast);
}

.pagination a:hover,
.pagination .current {
  background: var(--gradient-main);
  border-color: transparent;
  color: white;
}

/* ---------------------------------------------------------
   21. MISC / UTILITIES
   --------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.page-wrapper {
  padding-top: var(--header-height);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.wp-block-image { margin: var(--sp-xl) 0; }
.wp-block-image img { border-radius: var(--r-lg); }

.tag-chip {
  display: inline-block;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: 0.25em 0.9em;
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  transition: all var(--dur-fast);
}
.tag-chip:hover {
  background: rgba(108, 99, 255, 0.12);
  color: var(--clr-accent-a);
  border-color: rgba(108, 99, 255, 0.25);
}

/* Divider */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-main);
  border-radius: var(--r-full);
  margin: var(--sp-lg) auto;
}

/* CTA Banner */
.cta-banner {
  background: var(--gradient-main);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.cta-banner h2 {
  color: white;
  margin-bottom: var(--sp-md);
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: var(--sp-xl);
}

.btn-white {
  background: white;
  color: var(--clr-accent-a);
  font-weight: 700;
}

.btn-white:hover {
  background: rgba(255,255,255,0.9);
  color: var(--clr-accent-a);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* WP Alignment */
.alignfull  { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide  { width: calc(100% + 4rem); margin-left: -2rem; }

/* Admin bar offset */
.admin-bar #site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar #site-header { top: 46px; }
}

/* Selection */
::selection {
  background: rgba(108, 99, 255, 0.25);
  color: var(--clr-text);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--clr-accent-a);
  outline-offset: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb {
  background: var(--clr-accent-a);
  border-radius: var(--r-full);
}
