/* ==========================================
   PSI PHI INDIA — Global Styles & Design System
   ========================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary Colors */
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #0f2440;
    --primary-rgb: 26, 58, 92;

    /* Accent Colors */
    --accent: #e8a838;
    --accent-light: #f0c060;
    --accent-dark: #c48820;
    --accent-rgb: 232, 168, 56;

    /* Dark Palette */
    --dark: #0d1b2a;
    --dark-surface: #1b2d44;
    --dark-card: #1f3350;
    --dark-rgb: 13, 27, 42;

    /* Light Palette */
    --light: #f8f9fa;
    --light-surface: #ffffff;
    --light-muted: #e9ecef;

    /* Text */
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    --text-muted: #9ca3af;

    /* Status */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(232, 168, 56, 0.3);
    --shadow-glow-primary: 0 0 20px rgba(26, 58, 92, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-max: 1200px;
    --nav-height: 80px;
}

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: var(--font-body);
}

input, textarea, select {
    font-family: var(--font-body);
    outline: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ---------- Utility Classes ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title h2 {
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}

.section-title p {
    max-width: 600px;
    margin: var(--space-lg) auto 0;
    font-size: 1.1rem;
}

.text-accent {
    color: var(--accent);
}

.text-primary {
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(13, 27, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    height: 70px;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 1001;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: all var(--transition-base);
}

.navbar.scrolled .nav-logo-img {
    height: 38px;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-light);
    letter-spacing: 1px;
    line-height: 1.2;
}

.nav-tagline {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.5px;
    font-style: italic;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-link {
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 24px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 1px;
    transition: all var(--transition-base);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Page Transitions ---------- */
.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.page.active {
    display: block;
}

.page.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Page Hero ---------- */
.page-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-xl) var(--space-3xl);
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9), rgba(26, 58, 92, 0.85));
    z-index: 1;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.page-hero-content h1 {
    color: var(--text-light);
    margin-bottom: var(--space-lg);
}

.page-hero-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--dark);
    color: var(--text-light);
    padding-top: var(--space-4xl);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.footer-brand h3 {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-top: var(--space-md);
}

.footer-logo {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    color: var(--accent) !important;
    font-style: italic;
    font-size: 0.85rem !important;
    margin-bottom: var(--space-md);
}

.footer-desc {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.6 !important;
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-links h4::after,
.footer-services h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.footer-links li,
.footer-services li {
    margin-bottom: var(--space-sm);
}

.footer-links a,
.footer-services li {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-contact-item svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-contact-item a:hover {
    color: var(--accent);
}

.footer-contact-icon {
    flex-shrink: 0;
    display: inline-flex;
    line-height: 0;
}

.footer-contact-icon:hover svg {
    color: var(--accent-light);
}

.footer-bottom {
    padding: var(--space-xl) 0;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin-bottom: var(--space-xl);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom-content p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-bottom-content strong {
    color: var(--accent);
}

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    /* CSS safety fallback: if JS never adds .revealed, show content after 3s */
    animation: revealFallback 0.6s ease 3s forwards;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

@keyframes revealFallback {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }
.scroll-reveal.delay-5 { transition-delay: 0.5s; }
.scroll-reveal.delay-6 { transition-delay: 0.6s; }

/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -40px) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-20px, -80px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(40px, -40px) scale(1.1);
        opacity: 0.5;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-sm);
        transition: right var(--transition-base);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 14px 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .container {
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .page-hero {
        min-height: 35vh;
    }
}
