/* MB Solutions — apple-style shared base
 * Used by secondary pages (success, cancel, privacy, terms).
 * The flagship index.html and book.html have their own inline styles.
 */

:root {
    --bg: #0a0a0b;
    --bg-elevated: #131316;
    --bg-subtle: #0f0f11;
    --bg-card: #131316;
    --bg-card-hover: #18181c;
    --border: #1f1f22;
    --border-strong: #2a2a2d;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;
    --accent: #ffffff;
    --accent-fg: #0a0a0b;
    --link: #2997ff;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
    --container: 980px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.01em;
    min-height: 100vh;
}
::selection { background: var(--text); color: var(--bg); }
a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav (shared, slim apple style) ---------- */
.nav {
    padding: 24px 0 32px;
}
.nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px;
}
.logo {
    display: inline-flex; align-items: baseline;
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.logo .dot { color: var(--text-secondary); margin-left: 1px; font-weight: 500; }
.nav-back {
    font-size: 14px;
    color: var(--text-secondary);
}
.nav-back:hover { color: var(--text); opacity: 1; }

/* ---------- Page headers ---------- */
.page-header {
    text-align: center;
    padding: 32px 24px 56px;
    max-width: 760px;
    margin: 0 auto;
}
.page-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.page-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 16px;
}
.page-sub {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
    color: var(--text);
}
.btn:hover { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
}
.btn-primary:hover { background: #e8e8ea; }
.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.32); }

/* ---------- Legal page sections ---------- */
.legal-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 96px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}
.legal-content .effective-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-align: center;
}
.legal-content .intro {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    line-height: 1.6;
}
.legal-content .intro strong { color: var(--text); }
.legal-content section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}
.legal-content section:last-child { border-bottom: none; }
.legal-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.015em;
    line-height: 1.25;
}
.legal-content p { margin-bottom: 14px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content ul {
    list-style: none;
    padding: 0;
    margin: 14px 0;
}
.legal-content ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}
.legal-content ul li::before {
    content: ''; position: absolute;
    left: 0; top: 11px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ---------- Centered card layout (for success / cancel) ---------- */
.center-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 56px 40px;
    text-align: center;
}
.icon-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(68, 216, 132, 0.12);
    color: #44d884;
}
.icon-circle.error { background: rgba(255, 59, 48, 0.12); color: #ff3b30; }
.icon-circle.muted { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }
.icon-circle svg { width: 28px; height: 28px; }
.center-card h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 14px;
}
.center-card .lede {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 32px;
    line-height: 1.5;
}
.center-card .info-box {
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 28px;
}
.center-card .info-box h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.005em;
}
.center-card .info-box ol, .center-card .info-box ul {
    list-style: none; padding: 0; margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    counter-reset: step;
}
.center-card .info-box ol li {
    counter-increment: step;
    padding-left: 28px;
    position: relative;
    margin-bottom: 6px;
}
.center-card .info-box ol li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.center-card .small {
    font-size: 14px;
    color: var(--text-muted);
    margin: 16px 0 24px;
}
.center-card .btn-row {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}

/* ---------- Loading spinner ---------- */
.loading {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 32px;
    color: var(--text-secondary);
    font-size: 15px;
}
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
footer {
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}
footer .footer-links {
    display: flex; gap: 24px; justify-content: center;
    margin-bottom: 12px;
}
footer .footer-links a { font-size: 14px; color: var(--text-muted); }
footer .footer-links a:hover { color: var(--text); }
footer .footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .center-card { padding: 40px 24px; }
    .nav-inner { padding: 0 18px; }
    .legal-content { padding: 0 20px 64px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
