/*
Theme Name: CitationZen Theme
Theme URI: https://citationzen.com
Author: CitationZen
Author URI: https://citationzen.com
Description: Custom WordPress theme for CitationZen - AI Visibility Platform for SaaS brands
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: citationzen
*/

/* ══════════════════════════════════════════════════════════════
   CSS VARIABLES / DESIGN TOKENS
   ══════════════════════════════════════════════════════════════ */
:root {
    /* Colors */
    --black: #0a0a0a;
    --white: #FFFFFF;
    --bg: #F8F9FA;
    --bg-warm: #F9F8F6;
    --card: #FFFFFF;
    --border: #E8EAF0;
    --border-light: #F1F3F4;
    
    /* Text */
    --text-primary: #16171D;
    --text-secondary: #5F6368;
    --text-tertiary: #9CA3AF;
    
    /* Brand */
    --primary: #2513ec;
    --primary-hover: #1d0fc2;
    
    /* Engine Colors */
    --chatgpt: #10A37F;
    --gemini: #4285F4;
    --claude: #D4A574;
    --perplexity: #20B8CD;
    --ai-overviews: #EA4335;
    
    /* Category Colors */
    --cat-aeo: #F5A623;
    --cat-ai-engines: #10A37F;
    --cat-geo: #7C5CFC;
    --cat-strategy: #4285F4;
    --cat-company: #20B8CD;
    
    /* Status */
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 60px rgba(37,19,236,0.08);
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --speed-fast: 0.15s;
    --speed-normal: 0.25s;
    --speed-slow: 0.4s;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 100px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--white);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

::selection {
    background: rgba(37,19,236,0.12);
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
.cz-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.cz-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.cz-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth);
}
.cz-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.cz-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.cz-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.cz-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.cz-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.cz-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.cz-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.cz-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.cz-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS — Premium Polish
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    transition: all var(--speed-normal) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--black);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg);
}

/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -1.5px; }
h2 { font-size: clamp(24px, 4vw, 40px); letter-spacing: -0.5px; }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Gradient text utility */
.cz-text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════════════════════════════
   CARDS — Elevated
   ══════════════════════════════════════════════════════════════ */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--speed-normal) var(--ease-smooth);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL PAGE TRANSITIONS
   ══════════════════════════════════════════════════════════════ */
main {
    animation: pageIn 0.5s var(--ease-smooth) forwards;
}

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

/* ══════════════════════════════════════════════════════════════
   PREMIUM BACKGROUNDS
   ══════════════════════════════════════════════════════════════ */
/* Subtle dot grid behind heroes */
.cz-dot-bg {
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Gradient mesh */
.cz-gradient-bg {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37,19,236,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(16,163,127,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(66,133,244,0.03) 0%, transparent 50%),
        var(--white);
}

/* ══════════════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { display: none; }
html {
    scrollbar-width: none;
}

/* ══════════════════════════════════════════════════════════════
   FOCUS STYLES
   ══════════════════════════════════════════════════════════════ */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES
   ══════════════════════════════════════════════════════════════ */
/* ── Global mobile typography ── */
@media (max-width: 640px) {
    body { font-size: 15px; }
    h1 { font-size: clamp(28px, 7vw, 40px); }
    h2 { font-size: clamp(24px, 5.5vw, 34px); }
    h3 { font-size: clamp(18px, 4vw, 24px); }
    img { max-width: 100%; height: auto; }
}

/* ── Prevent horizontal overflow on mobile ── */
html, body { overflow-x: hidden; }

/* ── Tap target sizing ── */
@media (max-width: 1024px) {
    a, button { min-height: 44px; }
    input, select, textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
