/*
 * cosmic.css — Shared cosmic theme for all Conversaio pages
 * Includes: base dark theme, canvas/orb backgrounds, glass sections,
 * scroll animations, header, footer, highlights, forms, and responsive.
 */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #05050e;
    color: #eeeeff;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, #6633ff, #ff3399, #33ccff);
    z-index: 9999;
    transition: width 0.05s linear;
    box-shadow: 0 0 12px rgba(102,51,255,0.6);
}

/* ===== CANVAS ===== */
#bgCanvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

/* ===== FLOATING ORBS ===== */
.orb {
    position: fixed; border-radius: 50%;
    filter: blur(120px); pointer-events: none;
    z-index: 0; will-change: transform;
}
.orb-a { width: 700px; height: 700px; background: rgba(102,51,255,0.25); top: -15%; left: -10%; }
.orb-b { width: 550px; height: 550px; background: rgba(255,51,153,0.2); top: 35%; right: -15%; }
.orb-c { width: 500px; height: 500px; background: rgba(51,204,255,0.18); bottom: -10%; left: 25%; }

/* ===== LAYOUT ===== */
.page-wrap {
    position: relative; z-index: 1;
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
    height: 1px; border: none; margin: 0;
    background: linear-gradient(90deg, transparent, rgba(102,51,255,0.4), rgba(255,51,153,0.4), transparent);
    opacity: 0; transition: opacity 1s ease;
}
.section-divider.visible { opacity: 1; }

/* ===== SCROLL ANIMATION SYSTEM ===== */
.sa {
    opacity: 0;
    will-change: transform, opacity, filter;
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.sa[data-sa="fade-up"]     { transform: translateY(80px); }
.sa[data-sa="fade-left"]   { transform: translateX(-80px); }
.sa[data-sa="fade-right"]  { transform: translateX(80px); }
.sa[data-sa="scale-in"]    { transform: scale(0.8); }
.sa[data-sa="flip-up"]     { transform: perspective(800px) rotateX(25deg) translateY(60px); transform-origin: bottom; }
.sa[data-sa="rotate-in"]   { transform: rotate(-8deg) translateY(40px) scale(0.95); }
.sa[data-sa="blur-in"]     { transform: translateY(40px); filter: blur(12px); }
.sa[data-sa="slide-skew"]  { transform: translateX(-60px) skewX(-6deg); }

.sa.in-view {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

/* ===== PAGE HEADER (sub-pages) ===== */
.page-header {
    text-align: center;
    padding: 100px 0 20px;
}
.page-header-inner {
    display: flex; align-items: center; justify-content: center;
    gap: 24px; margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #6633ff, #ff3399);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 36px rgba(102,51,255,0.35);
    transition: all 0.4s cubic-bezier(.22,1,.36,1);
    text-decoration: none;
    flex-shrink: 0;
}
.page-logo:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 14px 48px rgba(102,51,255,0.5); }
.page-logo::after { display: none; }
.page-logo img { width: 44px; height: 44px; border-radius: 12px; }

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #d0c0ff 50%, #ffaacc 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
    line-height: 1.2; padding-bottom: 4px;
}
@keyframes gradientShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

.page-subtitle {
    color: rgba(200,200,255,0.6);
    font-size: 1.05rem; text-align: center;
    margin-bottom: 48px; line-height: 1.6;
}

/* ===== GLASS SECTIONS ===== */
.glass-section {
    background: rgba(10,10,25,0.5);
    border: 1px solid rgba(102,51,255,0.12);
    border-radius: 32px;
    padding: 56px 48px;
    margin-bottom: 40px;
    backdrop-filter: blur(28px);
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    position: relative; overflow: hidden;
}
.glass-section::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent 5%, rgba(102,51,255,0.5) 30%, rgba(255,51,153,0.5) 70%, transparent 95%);
}
.glass-section::after {
    content: ''; position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(102,51,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: cornerPulse 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cornerPulse { 0%,100%{transform:scale(1);opacity:0.5} 50%{transform:scale(1.4);opacity:1} }

.glass-section h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800; margin-bottom: 20px;
    color: #fff;
    display: flex; align-items: center; gap: 14px;
    border-bottom: 1px solid rgba(102,51,255,0.2);
    padding-bottom: 16px;
}
.glass-section h2::before {
    content: ''; width: 5px; height: 26px;
    background: linear-gradient(180deg, #6633ff, #ff3399);
    border-radius: 3px; flex-shrink: 0;
}
.glass-section h3 {
    color: rgba(220,210,255,0.9);
    font-size: 1.3rem; font-weight: 700;
    margin: 32px 0 14px;
}
.glass-section p {
    color: rgba(200,200,255,0.65);
    font-size: 1rem; line-height: 1.8;
    margin-bottom: 16px;
}
.glass-section ul {
    color: rgba(200,200,255,0.65);
    line-height: 1.8; padding-left: 24px;
    margin-bottom: 16px;
}
.glass-section li {
    margin-bottom: 8px;
}
.glass-section li::marker { color: #6633ff; }
.glass-section strong { color: #fff; }
.glass-section a { color: #a388ff; }
.glass-section a:hover { color: #ff88bb; }
.glass-section a::after { display: none; }

/* ===== HIGHLIGHT BOXES ===== */
.highlight {
    background: rgba(102,51,255,0.08);
    border: 1px solid rgba(102,51,255,0.25);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}
.highlight::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, #6633ff, #ff3399);
    border-radius: 2px;
}
.highlight strong { color: #fff; }
.highlight p { color: rgba(200,200,255,0.7); }

/* ===== CONTACT FORM ===== */
.form-wrap {
    background: rgba(16,14,35,0.5);
    border: 1px solid rgba(102,51,255,0.2);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(12px);
}
.contact-form {
    display: flex; flex-direction: column; gap: 20px;
}
.form-field {
    display: flex; align-items: center;
    background: rgba(10,10,25,0.7);
    border: 1px solid rgba(102,51,255,0.2);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.form-field:focus-within {
    border-color: rgba(102,51,255,0.6);
    box-shadow: 0 0 20px rgba(102,51,255,0.15);
}
.field-icon {
    padding: 16px 20px;
    color: #a388ff;
    font-size: 1rem; font-weight: 600;
    background: rgba(102,51,255,0.08);
    border-right: 1px solid rgba(102,51,255,0.15);
    flex-shrink: 0;
}
.form-field input,
.form-field textarea {
    flex: 1; padding: 16px 20px;
    border: none; outline: none;
    background: transparent;
    color: #eeeeff;
    font-size: 1rem; font-family: inherit;
    resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(200,200,255,0.35); }

.submit-btn {
    background: linear-gradient(135deg, #6633ff, #ff3399);
    color: #fff; border: none;
    padding: 16px 36px; border-radius: 14px;
    font-size: 1.1rem; font-weight: 700;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 6px 28px rgba(102,51,255,0.35);
    position: relative; overflow: hidden;
}
.submit-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform 0.5s;
}
.submit-btn:hover::before { transform: translateX(120%); }
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(102,51,255,0.5); }

.message-status {
    padding: 18px 24px; border-radius: 14px;
    margin-bottom: 20px; font-weight: 600; text-align: center;
}
.message-status.success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }
.message-status.error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }

/* ===== DOWNLOAD SECTION ===== */
.download-cta {
    position: relative;
    background: linear-gradient(135deg, rgba(102,51,255,0.18), rgba(255,51,153,0.15));
    border: 2px solid rgba(102,51,255,0.3);
    border-radius: 32px;
    padding: 72px 48px;
    text-align: center;
    margin-bottom: 48px;
    backdrop-filter: blur(24px);
    overflow: hidden;
}
.download-cta::before {
    content: ''; position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,51,153,0.15), transparent 70%);
    top: -150px; right: -120px; border-radius: 50%;
    animation: dlOrb 12s ease-in-out infinite alternate;
}
@keyframes dlOrb { to { transform: translate(-50px, 50px) scale(1.3); } }
.download-cta h2 {
    color: #fff; font-size: 2.2rem; margin-bottom: 20px; font-weight: 800;
}
.download-cta h2::before { display: none; }
.download-cta p { color: rgba(200,200,255,0.8); font-size: 1.1rem; margin-bottom: 40px; }
.download-cta strong { color: #fff; }

.app-store-badge,
.download-button {
    background: linear-gradient(135deg, #6633ff, #ff3399);
    color: #fff !important; padding: 18px 48px; border-radius: 18px;
    font-size: 1.1rem; font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 12px;
    transition: all 0.4s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 8px 36px rgba(102,51,255,0.4);
    position: relative; overflow: hidden; z-index: 1;
}
.app-store-badge::before,
.download-button::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform 0.6s;
}
.app-store-badge::after,
.download-button::after { display: none; }
.app-store-badge:hover::before,
.download-button:hover::before { transform: translateX(120%); }
.app-store-badge:hover,
.download-button:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 16px 56px rgba(102,51,255,0.55);
}

/* ===== FOOTER ===== */
.site-footer {
    background: rgba(5,5,14,0.94);
    border-top: 1px solid rgba(102,51,255,0.15);
    backdrop-filter: blur(20px);
    padding: 56px 40px 36px;
    margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-bottom: 14px;
}
.footer-brand img {
    width: 44px; height: 44px; border-radius: 12px;
    filter: drop-shadow(0 0 10px rgba(102,51,255,0.4));
}
.footer-brand span { color: #fff; font-size: 1.35rem; font-weight: 700; }
.footer-tagline { color: rgba(200,200,255,0.5); text-align: center; margin-bottom: 24px; font-size: 0.95rem; }
.footer-nav {
    display: flex; justify-content: center; gap: 24px;
    flex-wrap: wrap; margin-bottom: 24px;
}
.footer-nav a {
    color: rgba(200,200,255,0.5); text-decoration: none;
    font-weight: 500; font-size: 0.95rem;
    padding: 8px 16px; border-radius: 10px;
    transition: all 0.3s;
}
.footer-nav a::after { display: none; }
.footer-nav a:hover { color: #fff; background: rgba(102,51,255,0.12); }
.footer-copy { text-align: center; color: rgba(136,136,170,0.45); font-size: 0.85rem; }
.footer-copy p { margin-bottom: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .glass-section { padding: 36px 24px; }
    .download-cta { padding: 48px 24px; }
    .page-header { padding: 60px 0 16px; }
    .page-header-inner { flex-direction: column; gap: 16px; }
    .page-logo { width: 56px; height: 56px; }
    .page-logo img { width: 34px; height: 34px; }
    .orb-a, .orb-b, .orb-c { opacity: 0.15; }
    .form-wrap { padding: 28px 20px; }
}
@media (max-width: 480px) {
    .glass-section { padding: 28px 18px; }
    .orb-a, .orb-b, .orb-c { display: none; }
    .footer-nav { flex-direction: column; align-items: center; gap: 12px; }
}
