/* ============================================================
   FocusVault Parent Portal — Warm Family-Friendly Styles
   Palette: Navy / Cream / Leaf / Sun / Berry
   ============================================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

::selection {
    background: rgba(74, 124, 89, 0.2);
    color: #1B2A4A;
}

/* ---------- Floating Animation ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ---------- Nav Shadow on Scroll ---------- */
#parent-nav.scrolled {
    box-shadow: 0 1px 0 rgba(27, 42, 74, 0.06), 0 4px 24px rgba(27, 42, 74, 0.06);
}

/* ---------- Stat Card ---------- */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C8553D, #F4A261);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.stat-card:hover::after {
    transform: scaleX(1);
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    right: 1.25rem;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 4rem;
    line-height: 1;
    color: rgba(27, 42, 74, 0.05);
    pointer-events: none;
}

/* ---------- FAQ Accordion ---------- */
.faq-toggle i {
    transition: transform 0.3s ease;
}
.faq-toggle.active i {
    transform: rotate(45deg);
}
.faq-answer {
    animation: faqSlide 0.3s ease;
}
@keyframes faqSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 42, 74, 0.6);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-dialog {
    position: relative;
    background: #FEFBF6;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(27, 42, 74, 0.25);
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FEFBF6;
    z-index: 9999;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 340px;
    backdrop-filter: blur(12px);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success {
    background: rgba(74, 124, 89, 0.92);
    border: 1px solid rgba(107, 158, 117, 0.5);
}
.toast.error {
    background: rgba(200, 85, 61, 0.92);
    border: 1px solid rgba(212, 112, 91, 0.5);
}

/* ---------- Spinner ---------- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Form Focus ---------- */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15), 0 0 0 1px #4A7C59;
}

/* ---------- Purchase Button Pulse ---------- */
.purchase-btn {
    position: relative;
    overflow: hidden;
}
.purchase-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.purchase-btn:hover::after {
    opacity: 1;
}

/* ---------- Print ---------- */
@media print {
    nav, footer, .toast, #purchase-modal-overlay { display: none !important; }
    body { background: white; color: #1B2A4A; }
}
