/* ============================================
   DESIGN-R.AI — Design Refresh Enhancements v2
   Layered on top of style.css for visual polish
   ============================================ */

/* ── Root variable additions ──────────────────── */
:root {
    --accent-soft: rgba(248, 25, 141, 0.08);
    --accent-mid: rgba(248, 25, 141, 0.15);
    --accent-bright: #ff3da8;
    --glow-sm: 0 0 20px rgba(248, 25, 141, 0.15);
    --glow-md: 0 0 40px rgba(248, 25, 141, 0.2);
    --glow-lg: 0 0 60px rgba(248, 25, 141, 0.25);
    --glass-bg: rgba(17, 17, 17, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --gradient-accent: linear-gradient(135deg, #F8198D 0%, #ff5e9c 50%, #F8198D 100%);
    --gradient-text: linear-gradient(135deg, #F8198D 0%, #ff7eb6 100%);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(248, 25, 141, 0.1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Scroll progress bar ──────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--gradient-accent);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(248, 25, 141, 0.4);
}

/* ── Nav enhancements ─────────────────────────── */
.nav {
    transition: all 0.4s var(--ease-out);
}
.nav--scrolled {
    background: rgba(10, 10, 10, 0.92);
    box-shadow: 0 1px 0 rgba(248, 25, 141, 0.08), 0 4px 20px rgba(0, 0, 0, 0.3);
}
.nav--scrolled .nav__inner {
    height: 56px;
}
.nav__logo {
    transition: font-size 0.3s var(--ease-out);
}
.nav--scrolled .nav__logo {
    font-size: 2rem;
}
.nav__links a {
    position: relative;
    transition: color 0.3s var(--ease-out);
}
.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s var(--ease-out);
    border-radius: 1px;
}
.nav__links a:hover::after,
.nav__links a.active::after {
    width: 100%;
}
.nav__links a:hover {
    opacity: 1;
}

/* ── Hero enhancements ────────────────────────── */
.hero__bg {
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, var(--accent-mid) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(248, 25, 141, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 80%, rgba(248, 25, 141, 0.04) 0%, transparent 50%);
    animation: heroBgShift 20s ease-in-out infinite alternate;
}
@keyframes heroBgShift {
    0% { transform: scale(1) translateX(0); }
    100% { transform: scale(1.05) translateX(-2%); }
}

.hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--accent-soft);
    border: 1px solid rgba(248, 25, 141, 0.15);
    animation: fadeInDown 0.8s var(--ease-out) both;
}
.hero__label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
    animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
}
.hero__sub {
    animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}
.hero__cta {
    animation: fadeInUp 0.8s var(--ease-out) 0.45s both;
}

/* ── Button enhancements ──────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}
.btn--primary {
    background: var(--gradient-accent);
    background-size: 200% 100%;
    background-position: 0% 0%;
    box-shadow: 0 4px 16px rgba(248, 25, 141, 0.2);
}
.btn--primary:hover {
    background-position: 100% 0%;
    box-shadow: var(--glow-md);
    transform: translateY(-2px);
    opacity: 1;
}
.btn--ghost,
.btn--outline {
    transition: all 0.3s var(--ease-out);
}
.btn--ghost:hover,
.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--glow-sm);
    transform: translateY(-2px);
    opacity: 1;
}
/* Shine effect on primary buttons */
.btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s var(--ease-out);
}
.btn--primary:hover::before {
    left: 120%;
}

/* ── Card enhancements ────────────────────────── */
.split__card,
.process__step,
.service-card,
.tool,
.tryus__card {
    transition: all 0.4s var(--ease-out);
    box-shadow: var(--shadow-card);
}
.split__card:hover,
.process__step:hover,
.tool:hover,
.tryus__card:hover {
    border-color: rgba(248, 25, 141, 0.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.service-card:hover {
    border-color: rgba(248, 25, 141, 0.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}
.service-card--featured {
    box-shadow: 0 0 40px rgba(248, 25, 141, 0.12), var(--shadow-card);
    animation: featuredGlow 4s ease-in-out infinite alternate;
}
@keyframes featuredGlow {
    0% { box-shadow: 0 0 30px rgba(248, 25, 141, 0.1), var(--shadow-card); }
    100% { box-shadow: 0 0 50px rgba(248, 25, 141, 0.2), var(--shadow-card); }
}

/* ── Process step number glow ─────────────────── */
.process__num {
    text-shadow: 0 0 20px rgba(248, 25, 141, 0.3);
}

/* ── Section title gradient ───────────────────── */
.section__title {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Stats enhancements ───────────────────────── */
.stat__num,
.stat__num2 {
    text-shadow: 0 0 30px rgba(248, 25, 141, 0.2);
}

/* ── Scroll reveal animations ─────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal--stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal--stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}
.reveal--stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal--stagger.revealed > *:nth-child(2) { transition-delay: 0.12s; }
.reveal--stagger.revealed > *:nth-child(3) { transition-delay: 0.19s; }
.reveal--stagger.revealed > *:nth-child(4) { transition-delay: 0.26s; }
.reveal--stagger.revealed > *:nth-child(5) { transition-delay: 0.33s; }
.reveal--stagger.revealed > *:nth-child(6) { transition-delay: 0.40s; }

/* ── Chat callout enhancement ─────────────────── */
.chat-callout {
    backdrop-filter: blur(16px);
    background: rgba(17, 17, 17, 0.7);
    border: 1px solid var(--glass-border);
}

/* ── Footer enhancement ───────────────────────── */
.footer {
    background: linear-gradient(180deg, transparent, rgba(248, 25, 141, 0.02));
}

/* ── Selection styling ────────────────────────── */
::selection {
    background: rgba(248, 25, 141, 0.3);
    color: #fff;
}

/* ── Scrollbar styling ────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(248, 25, 141, 0.3);
}

/* ── Animation keyframes ──────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .reveal--stagger > * {
        opacity: 1;
        transform: none;
    }
}


/* ── Article component enhancements ───────────── */
.stat-card,
.pipeline-stage,
.related-card,
.article-nav__link {
    transition: all 0.3s var(--ease-out);
    box-shadow: var(--shadow-card);
}
.stat-card:hover,
.pipeline-stage:hover {
    border-color: rgba(248, 25, 141, 0.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}
.stat-card__number {
    text-shadow: 0 0 20px rgba(248, 25, 141, 0.3);
}
.related-card:hover,
.article-nav__link:hover {
    border-color: rgba(248, 25, 141, 0.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.framework-badge {
    box-shadow: 0 0 12px rgba(248, 25, 141, 0.15);
    transition: all 0.3s var(--ease-out);
}
.article__content .callout--key,
.article__content .callout--convergence {
    box-shadow: 0 0 30px rgba(248, 25, 141, 0.08);
}
.article__lede {
    border-left-width: 3px;
    border-left-color: var(--accent);
    position: relative;
}
.article__lede::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 2px;
}
.radar-wrap {
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s var(--ease-out);
}
.radar-wrap:hover {
    border-color: rgba(248, 25, 141, 0.2);
}

/* ── Mobile refinements ───────────────────────── */
@media (max-width: 768px) {
    .hero__bg {
        animation: none;
    }
    .split__card:hover,
    .process__step:hover,
    .service-card:hover,
    .tool:hover,
    .tryus__card:hover {
        transform: translateY(-2px);
    }
}
