/* ==========================================================================
   PETCIX ACADEMY — PUBLIC BASE DESIGN SYSTEM & STYLES
   ==========================================================================
   Located at: static/css/base.css
   Used by: templates/base.html
   Table of Contents:
     1. Design Tokens (CSS Custom Properties)
     2. Reset & Base
     3. Typography
     4. Utility Classes
     5. Buttons (GenZ Premium Effect)
     6. Navbar
     7. Footer
     8. Animations & Keyframes
     9. Responsive Breakpoints (Shell & Navbar)
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
    /* --- Backgrounds --- */
    --bg-canvas: #FAE9F9;
    --bg-card: #FFFFFF;

    /* --- Brand Colors --- */
    --color-soft-pink: #F8D8EC;
    --color-primary-magenta: #CE4EDE;
    --color-purple: #6D3DD2;
    --color-sky-blue: #2DC5F4;
    --color-royal-blue: #4B6CFF;
    --color-lavender: #A58FC8;

    /* --- Text --- */
    --color-text-main: #311B17;
    --color-text-muted: #6E5E5B;

    /* --- Extra --- */
    --color-teal: #14B8A6;
    --color-green: #22C55E;
    --color-warning: #F59E0B;

    /* --- Font --- */
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* --- Spacing --- */
    --section-py: 5rem;
    --container-max: 1240px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-sm: 0 2px 8px rgba(49, 27, 23, 0.06);
    --shadow-md: 0 4px 20px rgba(49, 27, 23, 0.08);
    --shadow-lg: 0 8px 40px rgba(49, 27, 23, 0.12);
    --shadow-glow-magenta: 0 4px 14px 0 rgba(206, 78, 222, 0.35);
    --shadow-glow-purple: 0 4px 14px 0 rgba(109, 61, 210, 0.35);
    --shadow-glow-teal: 0 4px 14px 0 rgba(20, 184, 166, 0.35);

    /* --- Transitions --- */
    --ease-premium: cubic-bezier(0.4, 0, 0.2, 1);
}


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

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s var(--ease-premium);
}

ul {
    list-style: none;
}


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

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

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

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-primary-magenta);
    background: rgba(206, 78, 222, 0.1);
    border: 1px solid rgba(206, 78, 222, 0.2);
    border-radius: var(--radius-full);
}

.section-heading {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-subtext {
    max-width: 620px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}


/* ==========================================================================
   4. UTILITY CLASSES
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-py) 0;
}

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }


/* ==========================================================================
   5. BUTTONS (GenZ Premium Effect)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s var(--ease-premium);
    z-index: 1;
}

/* Shimmer Overlay */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 70%
    );
    transition: left 0.5s var(--ease-premium);
    z-index: -1;
}

.btn:hover::after {
    left: 100%;
}

.btn:hover {
    transform: scale(1.03) translateY(-2px);
}

.btn:active {
    transform: scale(0.97);
}

/* Primary Magenta */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-magenta), #a83bd0);
    color: #fff;
    box-shadow: var(--shadow-glow-magenta);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(206, 78, 222, 0.5);
}

/* Secondary Outline */
.btn-outline {
    background: transparent;
    color: var(--color-purple);
    border: 2px solid var(--color-purple);
}

.btn-outline:hover {
    background: var(--color-purple);
    color: #fff;
    box-shadow: var(--shadow-glow-purple);
}

/* Purple */
.btn-purple {
    background: linear-gradient(135deg, var(--color-purple), #5530a8);
    color: #fff;
    box-shadow: var(--shadow-glow-purple);
}

.btn-purple:hover {
    box-shadow: 0 6px 24px rgba(109, 61, 210, 0.5);
}

/* Teal */
.btn-teal {
    background: linear-gradient(135deg, var(--color-teal), #0d9488);
    color: #fff;
    box-shadow: var(--shadow-glow-teal);
}

.btn-teal:hover {
    box-shadow: 0 6px 24px rgba(20, 184, 166, 0.5);
}

/* Small */
.btn-sm {
    padding: 10px 22px;
    font-size: 0.85rem;
}

/* White */
.btn-white {
    background: #fff;
    color: var(--color-primary-magenta);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    box-shadow: var(--shadow-md);
}


/* ==========================================================================
   6. NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.75rem 0;
    background: rgba(250, 233, 249, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(206, 78, 222, 0.08);
    transition: all 0.3s var(--ease-premium);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand img {
    height: 42px;
    width: auto;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
}

.nav-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1.2;
}

.nav-brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary-magenta);
    border-radius: 2px;
    transition: width 0.3s var(--ease-premium);
}

.nav-links a:hover {
    color: var(--color-primary-magenta);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-search {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s var(--ease-premium);
}

.nav-search:hover {
    color: var(--color-primary-magenta);
    background: rgba(206, 78, 222, 0.08);
}

.nav-login {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-purple);
}

.nav-login:hover {
    color: var(--color-primary-magenta);
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--color-text-main);
    border-radius: 2px;
    transition: all 0.3s var(--ease-premium);
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}


/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
    background: #1C110F;
    color: rgba(255, 255, 255, 0.7);
    padding: 2.75rem 0 1.25rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.15fr 1fr 1.9fr;
    gap: clamp(1.25rem, 2vw, 2.25rem);
    align-items: start;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand img {
    height: 34px;
    width: auto;
    object-fit: contain;
    margin: 0 0 0.85rem 0;
    display: block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0;
    max-width: 280px;
}

/* Link Columns (Academy, Courses, Support) */
.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-col h4,
.footer-links h4,
.footer-newsletter h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.95rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.footer-col ul,
.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li,
.footer-links ul li {
    margin-bottom: 0.55rem;
    line-height: 1.4;
}

.footer-col ul li:last-child,
.footer-links ul li:last-child {
    margin-bottom: 0;
}

.footer-col ul a,
.footer-links ul a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-col ul a:hover,
.footer-links ul a:hover {
    color: #ffffff;
}

/* Newsletter Column */
.footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0 0 0.95rem 0;
    max-width: 320px;
}

.newsletter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 340px;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 16px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.newsletter-form input:focus {
    border-color: #CE4EDE;
    background: rgba(255, 255, 255, 0.11);
}

.newsletter-form button,
.newsletter-form .btn {
    flex-shrink: 0;
    height: 38px;
    padding: 0 20px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #a825e6 0%, #CE4EDE 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(186, 38, 230, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.newsletter-form button:hover,
.newsletter-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(186, 38, 230, 0.7);
    filter: brightness(1.08);
}

/* Footer Bottom / Copyright */
.footer-bottom {
    padding: 1.25rem 0 0.25rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.42);
    letter-spacing: 0.01em;
}

.footer-bottom a {
    color: var(--color-primary-magenta);
    text-decoration: none;
}

/* --- Footer Responsive Breakpoints --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem 1.5rem;
        padding-bottom: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: 520px;
    }

    .footer-col {
        grid-column: span 1;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
    }

    .footer-newsletter p {
        max-width: 480px;
    }

    .newsletter-form {
        max-width: 360px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 2.25rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1.25rem;
        padding-bottom: 1.75rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-col {
        grid-column: span 1;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
    }

    .footer-newsletter p {
        max-width: 100%;
    }

    .newsletter-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .footer-brand img {
        height: 30px;
        margin-bottom: 0.65rem;
    }

    .footer-brand p {
        font-size: 0.8rem;
        line-height: 1.5;
        max-width: 100%;
    }

    .footer-col h4,
    .footer-newsletter h4 {
        font-size: 0.9rem;
        margin-bottom: 0.65rem;
    }

    .footer-col ul li {
        margin-bottom: 0.45rem;
    }

    .footer-col ul a {
        font-size: 0.8rem;
    }

    .footer-newsletter p {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        max-width: 100%;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .newsletter-form input {
        width: 100%;
        height: 38px;
        font-size: 0.8rem;
    }

    .newsletter-form button,
    .newsletter-form .btn {
        width: 100%;
        height: 38px;
        font-size: 0.8rem;
    }

    .footer-bottom {
        padding-top: 1rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
        line-height: 1.45;
    }
}


/* ==========================================================================
   8. ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

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

@keyframes shimmerSlide {
    from { left: -100%; }
    to   { left: 100%; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(206, 78, 222, 0.25); }
    50%      { box-shadow: 0 0 0 12px rgba(206, 78, 222, 0); }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s var(--ease-premium);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS (SHELL & NAVBAR)
   ========================================================================== */
.mobile-only {
    display: none !important;
}

@media (max-width: 1024px) {
    .mobile-only { display: block; }
    li.mobile-only { display: flex; }
    .desktop-only { display: none !important; }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-links .mobile-action {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }

    .nav-links .mobile-action .btn {
        width: 200px;
    }

    .nav-hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {
    :root {
        --section-py: 3.5rem;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 1rem;
    }
    .nav-brand {
        gap: 6px;
    }
    .nav-brand img {
        height: 34px;
    }
    .nav-brand-name {
        font-size: 0.95rem;
    }
    .nav-brand-tagline {
        font-size: 0.6rem;
    }
    .nav-actions {
        gap: 0.6rem;
    }
    .nav-login {
        font-size: 0.85rem;
    }
    .nav-actions .btn-sm {
        padding: 8px 14px;
        font-size: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }
}

@media (max-width: 375px) {
    .navbar .container {
        padding: 0 0.5rem;
    }
    .nav-brand img {
        height: 28px;
    }
    .nav-brand {
        gap: 4px;
    }
    .nav-brand-name {
        font-size: 0.85rem;
    }
    .nav-brand-tagline {
        font-size: 0.5rem;
        letter-spacing: 0;
    }
    .nav-actions {
        gap: 0.35rem;
    }
    .nav-login {
        font-size: 0.75rem;
    }
    .nav-actions .btn-sm {
        padding: 6px 10px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }
    .nav-hamburger {
        padding: 2px;
    }
    .nav-hamburger span {
        width: 20px;
    }
}
