:root {
    color-scheme: light;
    --paper: #fcfcfc;
    --paper-alt: #fffdfa;
    --ink: #1a1a21;
    --sketch: #0f1c40;
    --primary: #ff7d7d;
    --primary-dark: #d44645;
    --accent-1: #ffd86a;
    --accent-2: #79d4ff;
    --accent-3: #91f3c2;
    --muted: #606070;
    --border: #d7d9e2;
    --shadow: 0 35px 60px rgba(14, 26, 66, .12);
    font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.65;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.045) 0, rgba(0,0,0,.045) 1px, transparent 1px, transparent 28px);
    opacity: .35;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background: linear-gradient(135deg, rgba(255,216,106,.25), rgba(121,212,255,.25));
    opacity: .4;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.sketch-frame {
    border: 2px solid var(--ink);
    border-radius: 28px;
    background: var(--paper-alt);
    box-shadow: var(--shadow);
    position: relative;
}

.sketch-frame::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(0,0,0,.15);
    border-radius: inherit;
    pointer-events: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 2px solid var(--ink);
    background: var(--paper-alt);
    display: grid;
    place-items: center;
    font-size: 1.65rem;
}

.logo strong {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.logo span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.main-nav {
    display: flex;
    gap: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.main-nav a:hover {
    border-color: var(--ink);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 12px 22px rgba(0,0,0,.15);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.ghost {
    background: var(--paper);
    color: var(--ink);
}

.btn.outline {
    background: transparent;
    color: var(--ink);
}

.btn.full {
    width: 100%;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    background: var(--paper-alt);
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.nav-toggle span {
    height: 2px;
    width: 22px;
    background: var(--ink);
}

.hero {
    padding: 5rem 0 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 2rem;
    border: 3px dashed rgba(0,0,0,.12);
    border-radius: 40px;
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    gap: 3rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 4vw, 3.9rem);
    margin-bottom: 0.8rem;
}

.hero-content .lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-note {
    border-left: 4px solid var(--ink);
    padding-left: 1rem;
    margin: 1.4rem 0;
    color: var(--muted);
}

.hero-links {
    display: flex;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--sketch);
}

.hero-media .mockup {
    border: 2px solid var(--ink);
    border-radius: 36px;
    padding: 2rem;
    background: linear-gradient(135deg, #fff8ef, #fff);
    box-shadow: var(--shadow);
    position: relative;
}

.mockup-card {
    border: 2px solid var(--ink);
    border-radius: 26px;
    padding: 1.4rem;
    margin-bottom: 1.4rem;
    background: var(--paper);
    box-shadow: 0 15px 30px rgba(0,0,0,.08);
}

.mockup-card span {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.mockup-card strong {
    display: block;
    font-size: 1.4rem;
    margin: 0.4rem 0;
}

.mockup-badge {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    background: var(--accent-3);
    border: 2px solid var(--ink);
    padding: 0.7rem 1.1rem;
    border-radius: 14px;
    font-weight: 700;
}

.color-palette {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.6rem;
}

.color-palette li {
    flex: 1;
    min-width: 60px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    text-align: center;
    font-weight: 700;
    padding: 0.6rem 0.3rem;
}

.color-palette li:nth-child(1) { background: var(--primary); color: #fff; }
.color-palette li:nth-child(2) { background: var(--accent-1); }
.color-palette li:nth-child(3) { background: var(--accent-2); }
.color-palette li:nth-child(4) { background: var(--accent-3); }

.intro {
    padding: 4rem 0;
}

.intro .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0;
    margin: 1.5rem 0 0;
}

.pill-list li {
    border: 2px dashed var(--ink);
    border-radius: 30px;
    padding: 0.45rem 1.2rem;
    background: rgba(255,255,255,.8);
    font-weight: 700;
}

.intro-highlights article {
    border-radius: 24px;
    border: 2px solid var(--ink);
    padding: 1.8rem;
    background: var(--paper-alt);
    box-shadow: var(--shadow);
}

.books {
    padding: 4rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.books-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.book-card {
    border: 2px solid var(--ink);
    border-radius: 28px;
    padding: 1.6rem;
    background: var(--paper-alt);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-card::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 1px dashed rgba(0,0,0,.1);
    border-radius: 32px;
    pointer-events: none;
}

.book-card {
    position: relative;
}

.book-cover {
    border-radius: 24px;
    border: 2px solid var(--ink);
    overflow: hidden;
    min-height: 220px;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0, rgba(0,0,0,.08) 6px, transparent 6px, transparent 22px);
    display: grid;
    place-items: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-tag {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--accent-1);
    padding: 0.3rem 0.9rem;
    font-weight: 700;
}

.book-body ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.book-body ul li {
    border: 2px solid var(--ink);
    border-radius: 14px;
    padding: 0.35rem 0.9rem;
    background: #fff;
    font-size: 0.85rem;
}

.link {
    font-weight: 700;
    color: var(--sketch);
}

.empty-state {
    border: 2px dashed var(--ink);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    background: rgba(255,255,255,.9);
}

.process {
    padding: 4rem 0;
    background: var(--paper-alt);
}

.process .steps {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.process article {
    border: 2px solid var(--ink);
    border-radius: 24px;
    padding: 1.5rem;
    background: #fff;
}

.process article span {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--muted);
}

.request {
    padding: 4rem 0 5rem;
}

.request .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.form-card {
    border: 2px solid var(--ink);
    border-radius: 28px;
    padding: 2rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-form label {
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.request-form input,
.request-form textarea {
    border: 2px solid var(--ink);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    background: var(--paper);
    font-size: 1rem;
    font-family: inherit;
}

.contact-links {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-weight: 700;
}

.alert {
    border-radius: 16px;
    padding: 0.8rem 1rem;
    font-weight: 700;
}

.alert.success { background: rgba(145, 243, 194, 0.3); border: 2px solid var(--accent-3); }
.alert.error { background: rgba(255, 125, 125, 0.25); border: 2px solid var(--primary); }

.site-footer {
    padding: 2.5rem 0 1.5rem;
    background: var(--sketch);
    color: #fff;
    border-top: 3px solid var(--ink);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    font-weight: 700;
}

.footnote {
    text-align: center;
    color: rgba(255,255,255,.7);
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .main-nav {
        position: fixed;
        inset: 0;
        background: rgba(255,255,255,.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        transform: translateY(-100%);
        transition: transform .3s ease;
        font-size: 1.2rem;
    }

    body.show-nav .main-nav {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    body.show-nav {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .site-header .container {
        flex-wrap: wrap;
    }

    .hero::before {
        inset: 1rem;
    }

    .hero {
        padding-top: 3.5rem;
    }

    .request .container,
    .intro .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100%, 95vw);
        padding: 0 1rem;
    }

    .site-header .container {
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }

    .logo {
        gap: 0.5rem;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .logo strong {
        font-size: 0.95rem;
    }

    .logo span {
        font-size: 0.75rem;
    }

    .header-cta {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content .lead {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-note {
        font-size: 0.9rem;
    }

    .hero-links {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }

    .mockup {
        padding: 1.5rem;
    }

    .mockup-card {
        padding: 1rem;
    }

    .mockup-card strong {
        font-size: 1.1rem;
    }

    .color-palette {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .color-palette li {
        min-width: 50px;
        font-size: 0.75rem;
        padding: 0.4rem 0.2rem;
    }

    .intro {
        padding: 2.5rem 0;
    }

    .intro-text h2 {
        font-size: 1.8rem;
    }

    .pill-list {
        gap: 0.5rem;
    }

    .pill-list li {
        font-size: 0.85rem;
        padding: 0.35rem 0.9rem;
    }

    .books {
        padding: 2.5rem 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-head h2 {
        font-size: 1.8rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .book-card {
        padding: 1.2rem;
    }

    .book-cover {
        min-height: 180px;
    }

    .process {
        padding: 2.5rem 0;
    }

    .process h2 {
        font-size: 1.8rem;
    }

    .process .steps {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .request {
        padding: 2.5rem 0 3rem;
    }

    .request h2 {
        font-size: 1.8rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .request-form input,
    .request-form textarea {
        font-size: 16px;
        padding: 0.75rem 0.9rem;
    }

    .site-footer {
        padding: 2rem 0 1rem;
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .site-header .container {
        padding: 0.6rem 0.75rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content .lead {
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }

    .main-nav {
        font-size: 1.1rem;
    }

    .intro-text h2,
    .section-head h2,
    .process h2,
    .request h2 {
        font-size: 1.5rem;
    }

    .book-card {
        padding: 1rem;
    }

    .form-card {
        padding: 1.2rem;
    }

    .mockup {
        padding: 1rem;
    }

    .mockup-badge {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 1rem;
        display: inline-block;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn,
    .main-nav a,
    .nav-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .request-form input,
    .request-form textarea {
        font-size: 16px;
    }
}
