/* ==========================================================================
   Pukhar Design System — Premium UI/UX Layer
   ========================================================================== */

:root {
    --pk-radius-sm: 10px;
    --pk-radius-md: 16px;
    --pk-radius-lg: 24px;
    --pk-radius-xl: 32px;
    --pk-radius-full: 9999px;

    --pk-shadow-sm: 0 2px 8px rgba(57, 2, 133, 0.06);
    --pk-shadow-md: 0 8px 24px rgba(57, 2, 133, 0.08);
    --pk-shadow-lg: 0 16px 48px rgba(57, 2, 133, 0.12);
    --pk-shadow-glow: 0 0 60px rgba(139, 236, 232, 0.35);
    --pk-shadow-card: 0 4px 20px rgba(17, 24, 39, 0.06);

    --pk-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --pk-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --pk-header-height: 72px;
    --pk-container: 1140px;
}

/* Arabic typography */
[dir="rtl"] body,
html[lang="ar"] body {
    font-family: "Cairo", "Inter", sans-serif;
}

[dir="rtl"] .font-playfair,
html[lang="ar"] .font-playfair {
    font-family: "Cairo", serif;
    font-style: normal;
}

/* ---- Header ---- */
.pk-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(139, 236, 232, 0.2);
    transition: box-shadow var(--pk-transition), background var(--pk-transition);
}

.pk-header.is-scrolled {
    box-shadow: var(--pk-shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

.pk-header__inner {
    max-width: var(--pk-container);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 1280px) {
    .pk-header__inner { padding: 0.875rem 0; }
}

.pk-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .pk-nav { display: flex; }
}

.pk-nav__link {
    position: relative;
    color: var(--color-neutral-700);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--pk-transition);
    padding: 0.25rem 0;
}

.pk-nav__link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-turquoise), var(--brand-purple));
    border-radius: 2px;
    transition: width var(--pk-transition);
}

.pk-nav__link:hover,
.pk-nav__link.is-active {
    color: var(--brand-purple);
}

.pk-nav__link:hover::after,
.pk-nav__link.is-active::after {
    width: 100%;
}

/* Language switcher */
.pk-lang {
    display: flex;
    align-items: center;
    background: var(--color-neutral-100);
    border-radius: var(--pk-radius-full);
    padding: 3px;
    gap: 2px;
}

.pk-lang__btn {
    padding: 6px 14px;
    border-radius: var(--pk-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-neutral-500);
    transition: all var(--pk-transition);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.pk-lang__btn.is-active {
    background: white;
    color: var(--brand-purple);
    box-shadow: var(--pk-shadow-sm);
}

.pk-lang__btn:hover:not(.is-active) {
    color: var(--color-neutral-700);
}

/* App download pill in header */
.pk-app-pill {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--pk-radius-full);
    background: linear-gradient(135deg, var(--brand-purple) 0%, #5A16B8 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform var(--pk-transition), box-shadow var(--pk-transition);
    text-decoration: none;
    white-space: nowrap;
}

.pk-app-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(57, 2, 133, 0.3);
    color: white;
}

@media (min-width: 1280px) {
    .pk-app-pill { display: inline-flex; }
}

/* Icon buttons */
.pk-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-mint-200);
    background: white;
    transition: all var(--pk-transition);
    position: relative;
}

.pk-icon-btn:hover {
    background: var(--brand-purple);
    border-color: var(--brand-purple);
}

.pk-icon-btn:hover img {
    filter: brightness(0) invert(1);
}

.pk-icon-btn__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-purple);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Buttons enhanced ---- */
.btn_solid {
    background: linear-gradient(135deg, var(--brand-purple) 0%, #5A16B8 100%);
    border-radius: var(--pk-radius-md);
    box-shadow: 0 4px 14px rgba(57, 2, 133, 0.25);
}

.btn_solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(57, 2, 133, 0.35);
}

.btn_outline {
    border-color: var(--brand-turquoise);
    border-radius: var(--pk-radius-md);
}

.btn_outline:hover {
    background: var(--color-mint-50);
}

.btn_solid_white_lg {
    border-radius: var(--pk-radius-md);
    box-shadow: var(--pk-shadow-md);
}

.btn_solid_white_lg:hover {
    transform: translateY(-2px);
}

[dir="rtl"] .btn_solid:hover img,
[dir="rtl"] .btn_outline:hover img,
[dir="rtl"] .btn_solid_white_lg:hover img {
    transform: translateX(-5px);
}

/* ---- Hero ---- */
.pk-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
    background: linear-gradient(160deg, #F1FEFD 0%, #ffffff 40%, #F6F0FF 100%);
}

.pk-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: pk-glow-drift 8s ease-in-out infinite alternate;
}

.pk-hero__glow--1 {
    width: 360px;
    height: 360px;
    background: rgba(139, 236, 232, 0.28);
    top: -100px;
    inset-inline-end: -80px;
}

.pk-hero__glow--2 {
    width: 260px;
    height: 260px;
    background: rgba(57, 2, 133, 0.12);
    bottom: -40px;
    inset-inline-start: -40px;
    animation-delay: -4s;
}

@keyframes pk-glow-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -20px) scale(1.05); }
}

.pk-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--color-mint-200);
    border-radius: var(--pk-radius-full);
    backdrop-filter: blur(8px);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-mint-900);
}

.pk-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-neutral-900);
    letter-spacing: -0.02em;
}

.pk-hero__title :is(span, em, strong) {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-turquoise));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[dir="rtl"] .pk-hero__title :is(span, em, strong) {
    font-family: "Cairo", sans-serif;
    font-style: normal;
}

.pk-hero__desc {
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    color: var(--color-neutral-500);
    line-height: 1.6;
    max-width: 540px;
}

.pk-hero__cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.pk-hero__visual {
    position: relative;
}

.pk-hero__visual img {
    max-width: 100%;
    height: auto;
    animation: pk-float 6s ease-in-out infinite;
}

@keyframes pk-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.pk-hero__stat-card {
    position: absolute;
    bottom: 10%;
    inset-inline-start: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-radius: var(--pk-radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--pk-shadow-lg);
    border: 1px solid rgba(139, 236, 232, 0.3);
    animation: pk-float 6s ease-in-out infinite;
    animation-delay: -3s;
}

/* Why Pukhar grid */
.pk-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.pk-why-card {
    padding: 1.75rem;
    border-radius: var(--pk-radius-lg);
    background: white;
    border: 1px solid var(--color-neutral-100);
    box-shadow: var(--pk-shadow-card);
    transition: all var(--pk-transition);
    position: relative;
    overflow: hidden;
}

.pk-why-card::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--brand-turquoise), var(--brand-purple));
    opacity: 0;
    transition: opacity var(--pk-transition);
}

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

.pk-why-card:hover::before {
    opacity: 1;
}

.pk-why-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--pk-radius-md);
    background: linear-gradient(135deg, var(--color-mint-50), var(--color-aqua-50));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.pk-why-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: 0.5rem;
}

.pk-why-card__desc {
    font-size: 0.9375rem;
    color: var(--color-neutral-500);
    line-height: 1.5;
}

/* App download CTA band */
.pk-app-cta {
    position: relative;
    overflow: hidden;
    border-radius: var(--pk-radius-xl);
    background: linear-gradient(135deg, var(--brand-purple) 0%, #2E026C 50%, var(--brand-purple) 100%);
    padding: clamp(2rem, 5vw, 3.5rem);
    color: white;
}

.pk-app-cta__glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(139, 236, 232, 0.2);
    filter: blur(60px);
    top: -50%;
    inset-inline-end: -10%;
    pointer-events: none;
}

.pk-app-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pk-app-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: white;
    color: var(--brand-purple);
    border-radius: var(--pk-radius-md);
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all var(--pk-transition);
    text-decoration: none;
}

.pk-app-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--brand-purple);
}

.pk-app-cta__btn--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.pk-app-cta__btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Page hero (inner pages) */
.pk-page-hero {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-purple) 0%, #1A7058 100%);
    overflow: hidden;
}

.pk-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../assets/images/header/breadcrumb.png') center/cover;
    opacity: 0.15;
}

.pk-page-hero__glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(139, 236, 232, 0.2);
    border-radius: 50%;
    filter: blur(100px);
    top: -50%;
    inset-inline-start: 20%;
}

.pk-page-hero__content {
    position: relative;
    z-index: 1;
    padding: 3rem 1rem;
}

.pk-page-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.pk-page-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
}

.pk-page-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--pk-transition);
}

.pk-page-hero__breadcrumb a:hover {
    color: white;
}

/* Cards enhanced */
.pk-card {
    background: white;
    border-radius: var(--pk-radius-lg);
    border: 1px solid var(--color-neutral-100);
    box-shadow: var(--pk-shadow-card);
    transition: all var(--pk-transition);
    overflow: hidden;
}

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

/* Section headings */
.pk-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.pk-section-header__label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-purple);
    margin-bottom: 0.75rem;
}

.pk-section-header__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-neutral-900);
    line-height: 1.2;
}

.pk-section-header__subtitle {
    font-size: 1.0625rem;
    color: var(--color-neutral-500);
    margin-top: 0.75rem;
    line-height: 1.6;
}

/* Scroll reveal animations */
.pk-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.pk-reveal-delay-1 { transition-delay: 0.1s; }
.pk-reveal-delay-2 { transition-delay: 0.2s; }
.pk-reveal-delay-3 { transition-delay: 0.3s; }
.pk-reveal-delay-4 { transition-delay: 0.4s; }

/* Footer enhanced */
.pk-footer {
    position: relative;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
    overflow: hidden;
}

.pk-footer__glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(139, 236, 232, 0.08);
    filter: blur(120px);
    pointer-events: none;
}

.pk-footer__link {
    color: var(--color-neutral-400);
    font-size: 0.9375rem;
    transition: color var(--pk-transition);
    text-decoration: none;
}

.pk-footer__link:hover {
    color: var(--brand-turquoise);
}

/* Sidebar mobile */
.pk-sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .pk-sidebar {
    transform: translateX(100%);
}

.pk-sidebar.open {
    transform: translateX(0);
}

.pk-sidebar__nav-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    padding: 0.75rem 0;
    display: block;
    transition: opacity var(--pk-transition);
}

.pk-sidebar__nav-link:hover {
    opacity: 0.8;
}

/* Auth pages */
.pk-auth-page {
    min-height: 100vh;
    background: linear-gradient(160deg, #F1FEFD 0%, #ffffff 50%, #F6F0FF 100%);
}

.pk-auth-card {
    border-radius: var(--pk-radius-xl);
    box-shadow: var(--pk-shadow-lg);
    border: 1px solid var(--color-neutral-100);
    overflow: hidden;
}

.pk-auth-panel {
    background: linear-gradient(160deg, var(--brand-purple) 0%, #5A16B8 100%);
    position: relative;
    overflow: hidden;
}

.pk-auth-panel__glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(139, 236, 232, 0.2);
    border-radius: 50%;
    filter: blur(40px);
    top: -20%;
    inset-inline-end: -10%;
}

/* Form inputs */
.pk-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    padding-inline-start: 2.75rem;
    border: 1.5px solid var(--color-neutral-200);
    border-radius: var(--pk-radius-md);
    font-size: 0.9375rem;
    transition: border-color var(--pk-transition), box-shadow var(--pk-transition);
    background: white;
}

.pk-input:focus {
    outline: none;
    border-color: var(--brand-turquoise);
    box-shadow: 0 0 0 3px rgba(139, 236, 232, 0.25);
}

/* Dashboard widgets */
.pk-widget {
    padding: 1.25rem;
    border-radius: var(--pk-radius-lg);
    background: white;
    border: 1px solid var(--color-neutral-100);
    box-shadow: var(--pk-shadow-card);
    transition: all var(--pk-transition);
}

.pk-widget:hover {
    box-shadow: var(--pk-shadow-md);
}

/* Main background */
.pk-main {
    background: var(--color-neutral-50);
    overflow-x: clip;
}

html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
}

/* Hero entrance (first viewport — no scroll dependency) */
.pk-hero-enter {
    animation: pk-hero-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pk-hero-enter--delay {
    animation-delay: 0.12s;
}

@keyframes pk-hero-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus visibility */
.btn_solid:focus-visible,
.btn_outline:focus-visible,
.btn_solid_white_lg:focus-visible,
.btn_outline_white_lg:focus-visible,
.pk-nav__link:focus-visible,
.pk-app-pill:focus-visible,
.pk-app-cta__btn:focus-visible,
.pk-lang__btn:focus-visible,
.pk-icon-btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand-turquoise);
    outline-offset: 3px;
}

.pk-why-card__icon svg {
    color: var(--brand-purple);
}

/* Mobile lang switcher density */
@media (max-width: 480px) {
    .pk-lang__btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .pk-hero {
        padding: 2.5rem 0 3.5rem;
    }

    .pk-hero__stat-card {
        inset-inline-start: 0.5rem;
        bottom: 4%;
        padding: 0.75rem 1rem;
        max-width: calc(100% - 1rem);
    }

    .pk-hero__title {
        font-size: clamp(1.75rem, 7vw, 2.25rem);
    }
}

/* Soften oversized glows on small screens */
@media (max-width: 768px) {
    .pk-hero__glow--1,
    .pk-hero__glow--2 {
        width: 220px;
        height: 220px;
        filter: blur(60px);
        opacity: 0.7;
    }

    .pk-footer__glow {
        width: 280px;
        height: 280px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pk-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .pk-hero-enter,
    .pk-hero-enter--delay {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .pk-hero__visual img,
    .pk-hero__stat-card,
    .pk-hero__glow {
        animation: none;
    }

    .btn_solid:hover,
    .pk-card:hover,
    .pk-why-card:hover {
        transform: none;
    }
}

/* RTL utilities */
[dir="rtl"] .menu_link,
[dir="rtl"] .pk-nav__link {
    text-transform: none;
}

[dir="rtl"] .btn_solid img,
[dir="rtl"] .btn_outline img {
    transform: scaleX(-1);
}

[dir="rtl"] .btn_solid:hover img {
    transform: scaleX(-1) translateX(-5px);
}

[dir="rtl"] .pk-hero__title-accent {
    font-family: "Cairo", sans-serif;
    font-style: normal;
}
