/* Custom styles for Silver ROI Calculator */
body {
    font-family: 'Source Sans 3', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    text-rendering: geometricPrecision;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

img, svg, canvas {
    max-width: 100%;
}

h1, h2 {
    font-family: 'Fraunces', ui-serif, Georgia, serif;
    letter-spacing: -0.02em;
}

.silver-title {
    background: linear-gradient(180deg, #0f172a 0%, #334155 55%, #0f172a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details[open] {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.silver-bg {
    background: #f5f7fb;
}

.silver-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.20'/%3E%3C/svg%3E");
    opacity: 0.14;
    mix-blend-mode: soft-light;
}

.hero-band {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff;
}

.hero-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.hero-band::after {
    content: '';
    position: absolute;
    inset: -2px;
    pointer-events: none;
    background: radial-gradient(900px 220px at 50% 0%, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.00) 65%);
    opacity: 1;
}

.cta-band {
    position: relative;
    overflow: hidden;
    margin-top: 2.5rem;
    border-top: 0;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 35%, #1e40af 100%);
}

.cta-band::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 380px at 20% 50%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.00) 60%),
        radial-gradient(700px 360px at 85% 25%, rgba(56, 189, 248, 0.28) 0%, rgba(56, 189, 248, 0.00) 55%);
}

.legal-band {
    background: #eef2f7;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.input-focus {
    transition: all 0.3s ease;
}

.input-focus:focus {
    transform: scale(1.02);
}

.result-card {
    animation: slideIn 0.5s ease-out;
}

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

.chart-container {
    position: relative;
    height: 300px;
}

.insight-card {
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(15, 23, 42, 0.15);
    border-radius: 50%;
    border-top-color: rgba(15, 23, 42, 0.65);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.18);
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.65);
}
