/* Spalding Publishing — bespoke theme
 * Literary publisher palette: deep purple primary, sky blue accent.
 * Pairs Playfair Display for headings (book covers / serif gravitas) with
 * Inter for body. Lifted dimensional choices from legacy Neve install
 * but rebuilt against Mendol section primitives.
 */

:root {
    --sp-primary:   #7a00df;
    --sp-primary-d: #5e00ad;
    --sp-accent:    #007cba;
    --sp-text:      #1f2733;
    --sp-muted:     #5b6573;
    --sp-bg:        #fdfcff;
    --sp-panel:     #ffffff;
    --sp-subtle:    #f5f1fb;
    --sp-border:    #e6e0f0;
}

* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sp-text);
    background: var(--sp-bg);
    line-height: 1.6;
    margin: 0;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--sp-text);
    line-height: 1.2;
    margin: 0 0 .6em;
}

h1 { font-size: 2.8rem; font-weight: 800; }
h2 { font-size: 2.1rem; font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }

a { color: var(--sp-accent); text-decoration: none; }
a:hover { color: var(--sp-primary); text-decoration: underline; }

.sp-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sp-section { padding: 72px 0; }
.sp-section--alt { background: var(--sp-subtle); }

/* ── Header ─────────────────────────────────────────────────── */
.sp-header {
    background: var(--sp-panel);
    border-bottom: 1px solid var(--sp-border);
    box-shadow: 0 1px 4px rgba(122, 0, 223, .04);
    position: sticky; top: 0; z-index: 50;
}
.sp-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; max-width: 1180px; margin: 0 auto;
}
.sp-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem; font-weight: 800;
    color: var(--sp-primary);
    text-decoration: none; letter-spacing: -0.5px;
}
.sp-brand:hover { color: var(--sp-primary-d); text-decoration: none; }
.sp-nav { display: flex; gap: 28px; align-items: center; }
.sp-nav a {
    color: var(--sp-text); font-weight: 500; font-size: .95rem;
    padding: 6px 0; border-bottom: 2px solid transparent;
}
.sp-nav a:hover { color: var(--sp-primary); border-color: var(--sp-primary); text-decoration: none; }
.sp-cart-link { display: flex; align-items: center; gap: 6px; }
.sp-cart-badge {
    background: var(--sp-primary); color: #fff;
    border-radius: 999px; min-width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; padding: 0 6px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.sp-btn {
    display: inline-block; padding: 12px 24px;
    font-weight: 600; font-size: .95rem;
    border-radius: 999px; border: 0; cursor: pointer;
    text-decoration: none; transition: all .15s ease;
    line-height: 1;
}
.sp-btn-primary { background: var(--sp-primary); color: #fff; }
.sp-btn-primary:hover { background: var(--sp-primary-d); color: #fff; text-decoration: none; }
.sp-btn-outline {
    background: transparent; color: var(--sp-primary);
    border: 2px solid var(--sp-primary); padding: 10px 22px;
}
.sp-btn-outline:hover { background: var(--sp-primary); color: #fff; text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────────── */
.sp-hero {
    background: linear-gradient(135deg, var(--sp-primary) 0%, #4d0080 100%);
    color: #fff;
    padding: 96px 24px;
    text-align: center;
}
.sp-hero h1 { color: #fff; max-width: 800px; margin: 0 auto .25em; }
.sp-hero-subtitle {
    color: rgba(255,255,255,.92); font-size: 1.2rem; max-width: 660px;
    margin: 0 auto 32px; line-height: 1.55;
}
.sp-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.sp-hero .sp-btn-primary { background: #fff; color: var(--sp-primary); }
.sp-hero .sp-btn-primary:hover { background: var(--sp-subtle); color: var(--sp-primary-d); }
.sp-hero .sp-btn-outline { color: #fff; border-color: rgba(255,255,255,.7); }
.sp-hero .sp-btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }

/* ── Intro / about ──────────────────────────────────────────── */
.sp-intro {
    display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start;
}
.sp-intro h2 { color: var(--sp-primary); font-size: 2.4rem; }
.sp-intro p { color: var(--sp-muted); font-size: 1.05rem; }
.sp-intro p + p { margin-top: 1em; }

/* ── Featured books / catalog ───────────────────────────────── */
.sp-section-header { text-align: center; margin-bottom: 40px; }
.sp-section-header h2 { color: var(--sp-primary); }
.sp-section-header p { color: var(--sp-muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

.sp-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}
.sp-book-card {
    background: var(--sp-panel);
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex; flex-direction: column;
}
.sp-book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(122, 0, 223, .15);
}
.sp-book-cover {
    aspect-ratio: 2/3;
    background: var(--sp-subtle);
    overflow: hidden;
}
.sp-book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-book-meta { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.sp-book-meta h3 { font-size: 1.1rem; margin: 0 0 6px; min-height: 2.4em; }
.sp-book-meta h3 a { color: var(--sp-text); }
.sp-book-meta h3 a:hover { color: var(--sp-primary); text-decoration: none; }
.sp-book-price { color: var(--sp-primary); font-weight: 700; font-size: 1.1rem; margin: 0 0 12px; }
.sp-book-card .sp-btn { margin-top: auto; align-self: flex-start; }

.sp-book-format {
    display: inline-block;
    background: var(--sp-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Footer ─────────────────────────────────────────────────── */
.sp-footer {
    background: #1a1326; color: #cbb8e8;
    padding: 48px 24px 24px; margin-top: 80px;
}
.sp-footer-inner {
    max-width: 1180px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.sp-footer h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: .92rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.sp-footer a { color: #cbb8e8; }
.sp-footer a:hover { color: #fff; }
.sp-footer-bottom {
    text-align: center; max-width: 1180px; margin: 32px auto 0;
    padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
    font-size: .85rem; color: rgba(255,255,255,.5);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.7rem; }
    .sp-section { padding: 48px 0; }
    .sp-hero { padding: 64px 20px; }
    .sp-hero-subtitle { font-size: 1.05rem; }
    .sp-intro { grid-template-columns: 1fr; gap: 16px; }
    .sp-header-inner { flex-direction: column; gap: 12px; padding: 14px 20px; }
    .sp-nav { flex-wrap: wrap; gap: 18px; justify-content: center; }
    .sp-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
