/* ============================================
   MMbook Landing — 素纸 · 墨石 风格
   ============================================ */

:root {
    --paper: #f6f1e7;
    --paper-soft: #faf6ee;
    --paper-dark: #ece5d3;
    --paper-line: #e0d8c4;

    --ink: #1c1a17;
    --ink-soft: #2c2a26;
    --ink-faded: #6e685c;
    --ink-light: #9b9486;

    --accent: #8b3a2f;
    --accent-soft: #c14a3a;
    --gold: #b88746;

    --code-bg: #2c2a26;
    --code-text: #e8e0d0;

    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(28, 26, 23, 0.06);
    --shadow-md: 0 6px 24px rgba(28, 26, 23, 0.08);
    --shadow-lg: 0 16px 60px rgba(28, 26, 23, 0.12);

    --font-sans: 'Inter', 'Noto Serif SC', system-ui, sans-serif;
    --font-serif: 'Noto Serif SC', 'Georgia', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

.paper-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(184, 135, 70, 0.04) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139, 58, 47, 0.03) 0, transparent 40%);
    mix-blend-mode: multiply;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ============ Navbar ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(246, 241, 231, 0.7);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    background: rgba(246, 241, 231, 0.92);
    border-bottom-color: var(--paper-line);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-serif);
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
}

.logo-text {
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--accent);
}

/* ============ Buttons ============ */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--ink-soft);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink-faded);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.btn-small {
    padding: 8px 18px;
    font-size: 14px;
}

.btn-large {
    padding: 14px 26px;
    font-size: 15px;
}

.icon {
    width: 18px;
    height: 18px;
}

/* ============ Hero ============ */
.hero {
    padding: 80px 0 100px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--paper-dark);
    color: var(--ink-soft);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 5.5vw, 64px);
    font-weight: 700;
    line-height: 1.18;
    color: var(--ink);
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.ink-stroke {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.ink-stroke::after {
    content: '';
    position: absolute;
    left: -4%;
    bottom: 6%;
    width: 108%;
    height: 28%;
    background: var(--gold);
    opacity: 0.28;
    border-radius: 4px;
    z-index: -1;
    transform: skew(-2deg);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--ink-faded);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-meta {
    font-size: 13px;
    color: var(--ink-light);
    letter-spacing: 0.02em;
}

/* ============ Hero Mockup (Book) ============ */
.book-mockup {
    background: var(--paper-soft);
    border: 1px solid var(--paper-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotate(0.6deg);
    transition: transform 0.4s ease;
}

.book-mockup:hover {
    transform: rotate(0deg) translateY(-4px);
}

.book-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--paper-dark);
    border-bottom: 1px solid var(--paper-line);
}

.book-toolbar .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ink-light);
    opacity: 0.5;
}

.book-filename {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-faded);
}

.book-page {
    padding: 36px 36px 32px;
    font-family: var(--font-serif);
}

.mock-h {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--ink);
}

.mock-p {
    font-size: 15px;
    line-height: 1.85;
    margin-bottom: 18px;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.mock-p.faded {
    opacity: 0.18;
    filter: blur(0.4px);
}

.mock-p.spotlight {
    opacity: 1;
    color: var(--ink);
    background: linear-gradient(180deg, transparent 60%, rgba(184, 135, 70, 0.16) 60%);
    padding: 2px 4px;
    border-radius: 3px;
}

.mock-p.spotlight strong {
    color: var(--accent);
}

.mock-code {
    margin-top: 22px;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 14px 18px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    overflow-x: auto;
}

.code-kw {
    color: #ff7b72;
}

.code-var {
    color: #79c0ff;
}

.code-fn {
    color: #d2a8ff;
}

/* ============ Sections ============ */
.section {
    padding: 100px 0;
}

.bg-paper-dark {
    background: var(--paper-dark);
    border-block: 1px solid var(--paper-line);
}

.section-header {
    margin-bottom: 60px;
}

.text-center {
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 16px;
    color: var(--ink-faded);
    max-width: 560px;
    margin: 0 auto;
}

/* ============ Features ============ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--paper-soft);
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink);
}

.feature-card p {
    font-size: 14.5px;
    color: var(--ink-faded);
    line-height: 1.7;
}

/* ============ Themes Showcase ============ */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.theme-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.theme-preview {
    padding: 50px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
    font-family: var(--font-serif);
}

.theme-h {
    font-size: 26px;
    font-weight: 700;
}

.theme-p {
    font-size: 14px;
    opacity: 0.65;
}

.theme-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--paper-soft);
    font-size: 13px;
    border-top: 1px solid var(--paper-line);
}

.theme-name {
    font-weight: 600;
    color: var(--ink);
}

.theme-tag {
    padding: 3px 10px;
    background: var(--paper-dark);
    color: var(--ink-faded);
    border-radius: 100px;
    font-size: 12px;
}

.theme-suzhi .theme-preview {
    background: #f6f1e7;
    color: #1c1a17;
}

.theme-moshi .theme-preview {
    background: #1c1a17;
    color: #ece5d3;
}

.theme-muguang .theme-preview {
    background: linear-gradient(135deg, #f3d7a4 0%, #e8a87c 100%);
    color: #3b2418;
}

/* ============ Shortcuts ============ */
.shortcuts-table {
    background: var(--paper-soft);
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 820px;
    margin: 0 auto;
}

.sc-row {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.4fr;
    padding: 16px 24px;
    font-size: 14.5px;
    border-top: 1px solid var(--paper-line);
    align-items: center;
}

.sc-row:first-child {
    border-top: none;
}

.sc-head {
    background: var(--paper-dark);
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sc-row span:first-child {
    font-weight: 600;
    color: var(--ink);
}

kbd {
    display: inline-block;
    padding: 3px 9px;
    background: var(--paper);
    border: 1px solid var(--paper-line);
    border-bottom-width: 2px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-soft);
    margin: 0 2px;
}

/* ============ CTA ============ */
.cta-card {
    background: var(--paper-soft);
    border: 1px solid var(--paper-line);
    border-radius: var(--radius-lg);
    padding: 64px 40px;
    box-shadow: var(--shadow-md);
    max-width: 760px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--ink);
}

.cta-desc {
    font-size: 16px;
    color: var(--ink-faded);
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ Footer ============ */
.footer {
    background: var(--ink);
    color: var(--paper-dark);
    padding: 56px 0 36px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
}

.footer-brand .logo-mark {
    display: inline-flex;
    margin-right: 4px;
    background: var(--paper);
    color: var(--ink);
}

.footer-tagline {
    font-size: 13px;
    color: var(--ink-light);
    font-weight: 400;
    margin-top: 6px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.footer-links a {
    color: var(--paper-dark);
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-copyright {
    grid-column: 1 / -1;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(236, 229, 211, 0.1);
    font-size: 12.5px;
    color: var(--ink-light);
    text-align: center;
}

/* ============ Reveal Animation ============ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 880px) {
    .hero {
        padding: 50px 0 70px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-links {
        gap: 16px;
        font-size: 14px;
    }

    .nav-links a:not(.btn-primary) {
        display: none;
    }

    .section {
        padding: 70px 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .sc-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .sc-head {
        display: none;
    }

    .cta-card {
        padding: 44px 24px;
    }
}
