/* ============================================================================
 * Salmista.com — sitewide stylesheet.
 *
 * Per §6.1 of CLAUDE.md, every page eventually loses its inline <style> block
 * in favor of (a) this shared file plus (b) page-specific overrides loaded
 * via cache-busted asset URLs from app/config/site.php's asset_version.
 *
 * Goal of this file:
 *   - Theme variables (the single source of truth for site colors/spacing).
 *   - Reset + base typography (matches the Inter font the site has used).
 *   - Common component primitives (.card, .btn, form inputs) that every page
 *     can rely on without duplicating CSS.
 *
 * Out of scope for this iteration:
 *   - Page-specific layouts (homepage hero, search results, studio timeline).
 *     Those stay inline in their own files for now.
 * ============================================================================ */

/* Inter — sitewide brand font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* -------------------------------------------------------------------------- */
/*  Theme variables                                                            */
/* -------------------------------------------------------------------------- */
:root {
    --primary:       #7c3aed;
    --primary-dark:  #6d28d9;
    --primary-soft:  #f5f3ff;
    --primary-border:#ddd6fe;

    --bg:            #f8fafc;
    --bg-elev:       #ffffff;

    --text:          #0f172a;
    --text-soft:     #475569;
    --muted:         #64748b;
    --border:        #e2e8f0;
    --border-soft:   #f1f5f9;

    --success:       #059669;
    --success-bg:    #d1fae5;
    --error:         #dc2626;
    --error-bg:      #fee2e2;
    --warn:          #d97706;
    --warn-bg:       #fef3c7;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-lift: 0 12px 32px rgba(0,0,0,0.10);
}

/* -------------------------------------------------------------------------- */
/*  Reset + base                                                              */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}
img, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/*  Card primitive                                                            */
/* -------------------------------------------------------------------------- */
.s-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

/* -------------------------------------------------------------------------- */
/*  Button primitives                                                         */
/* -------------------------------------------------------------------------- */
.s-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    color: var(--text);
    font: 600 14px/1 inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
    text-decoration: none;
}
.s-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
    text-decoration: none;
}
.s-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.s-btn--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.s-btn--primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.s-btn--success { background: var(--success); border-color: var(--success); color: white; }
.s-btn--danger  { background: var(--error);   border-color: var(--error);   color: white; }

/* -------------------------------------------------------------------------- */
/*  Form inputs                                                               */
/* -------------------------------------------------------------------------- */
.s-input,
.s-select,
.s-textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font: 400 14px/1.4 inherit;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.s-input:focus,
.s-select:focus,
.s-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.s-textarea { min-height: 120px; resize: vertical; }
.s-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* -------------------------------------------------------------------------- */
/*  Status pills / banners                                                    */
/* -------------------------------------------------------------------------- */
.s-status { padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.s-status--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.s-status--success { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.s-status--error   { background: var(--error-bg); color: #991b1b; border: 1px solid #fecaca; }
.s-status--warn    { background: var(--warn-bg); color: #92400e; border: 1px solid #fde68a; }

/* -------------------------------------------------------------------------- */
/*  Utilities                                                                 */
/* -------------------------------------------------------------------------- */
.s-muted   { color: var(--muted); }
.s-center  { text-align: center; }
.s-hidden  { display: none !important; }
.s-mt-1    { margin-top: 8px; }
.s-mt-2    { margin-top: 16px; }
.s-mt-3    { margin-top: 24px; }
.s-mt-4    { margin-top: 32px; }
.s-stack > * + * { margin-top: 12px; }
.s-stack-lg > * + * { margin-top: 24px; }

@keyframes s-spin { to { transform: rotate(360deg); } }
.s-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: s-spin 0.8s linear infinite;
    vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/*  Sitewide footer (rendered by app/includes/footer.php)                    */
/* -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 32px 24px;
    margin-top: 64px;
    color: var(--text-soft);
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}
.site-footer-brand strong { color: var(--text); font-weight: 700; font-size: 15px; }
.site-footer-brand p { margin: 4px 0 0; font-size: 13px; }
.site-footer-lang { display: inline-flex; align-items: center; gap: 8px; }
.site-footer-lang a {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.05em;
}
.site-footer-lang a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.site-footer-lang a.is-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.site-footer-copy { font-size: 12px; }
@media (max-width: 600px) {
    .site-footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
}
