/* ==========================================================
   RetroCloud — Custom Stylesheet
   Extends Tailwind CSS with custom utilities & animations
   ========================================================== */

/* --- Smooth scroll & base --- */
html { scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* --- Selection color --- */
::selection { background-color: #3B82F6; color: #fff; }

/* --- Custom scrollbar (WebKit) --- */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: #f1f5f9; }
::-webkit-scrollbar-thumb        { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #3B82F6; }

/* --- Hero gradient --- */
.hero-gradient {
    background: linear-gradient(135deg, #07101f 0%, #0F172A 40%, #1e3a5f 70%, #0F172A 100%);
}

/* --- Section alternating bg --- */
.section-alt { background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%); }

/* --- Gradient text --- */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3B82F6 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Glow card hover --- */
.card-glow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-glow:hover {
    box-shadow: 0 8px 40px -6px rgba(59, 130, 246, 0.22), 0 2px 12px -2px rgba(15, 23, 42, 0.10);
    transform: translateY(-4px);
}

/* --- Scroll reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible          { opacity: 1; transform: none; }
.reveal-delay-1          { transition-delay: 0.08s; }
.reveal-delay-2          { transition-delay: 0.16s; }
.reveal-delay-3          { transition-delay: 0.24s; }
.reveal-delay-4          { transition-delay: 0.32s; }
.reveal-delay-5          { transition-delay: 0.40s; }
.reveal-delay-6          { transition-delay: 0.48s; }

/* --- FAQ accordion --- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer.open { max-height: 600px; }
.faq-icon        { transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* --- Tech chips (dark bg) --- */
.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tech-chip:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.38);
    color: #93c5fd;
}

/* --- Blog card image area --- */
.blog-img {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: hidden;
}

/* --- Focus rings --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Form inputs --- */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #0F172A;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.form-input::placeholder { color: #94a3b8; }
.form-input.error        { border-color: #ef4444; }

/* --- Stat counter font --- */
.stat-num { font-variant-numeric: tabular-nums; }

/* --- Noise overlay (premium subtle texture) --- */
.noise-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
}

/* --- Prose legal pages --- */
.prose-legal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.prose-legal h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.prose-legal p  { color: #475569; line-height: 1.75; margin-bottom: 1rem; font-size: 0.9375rem; }
.prose-legal ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: #475569; }
.prose-legal li { margin-bottom: 0.375rem; font-size: 0.9375rem; line-height: 1.7; }
.prose-legal a  { color: #2563EB; text-decoration: underline; text-underline-offset: 2px; }
.prose-legal a:hover { color: #1D4ED8; }
