/*
Theme Name: Janne Mononen
Theme URI: https://www.jannemononen.fi/
Author: Janne Mononen
Description: Kevyt kirjailijasivuston teema, rakennettu nykyisen jannemononen.fi-sivuston estetiikan pohjalta.
Version: 1.0.1
Text Domain: janne-mononen
*/

/* WordPressin pienet yhteensopivuuslisät */
img { max-width: 100%; height: auto; }
.wp-site-blocks { padding: 0; }


/* 0.2.0 – WordPress-blogi */
.jm-blog-placeholder { min-height: 260px; background: #eee9df; }
.single-blog-card .image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.jm-no-posts { padding: 35px 15px 60px; }
.jm-blog-more { display: inline-block; color: inherit; text-decoration: underline; text-underline-offset: 5px; }
.jm-entry { max-width: 820px; margin: 0 auto; }
.jm-entry-title { margin-bottom: .5rem; }
.jm-entry-meta { opacity: .65; margin-bottom: 2rem; }
.jm-entry-content { font-size: 1.08rem; line-height: 1.85; }
.jm-entry-content > * + * { margin-top: 1.2em; }
.jm-entry-back { display: inline-block; margin-bottom: 2rem; color: inherit; }


/* 0.3.0 — Jutut */
.jm-journal { max-width: 1080px; margin:0 auto; padding:80px 20px 100px; }
.jm-journal-intro { max-width:720px; margin:0 auto 55px; text-align:center; }
.jm-journal-intro h1 { margin-bottom:14px; }
.jm-journal-grid { row-gap:36px; }
.jm-journal .single-blog-card { height:100%; }
.jm-journal-pagination { margin-top:55px; text-align:center; }
.jm-journal-pagination .page-numbers { display:inline-block; margin:0 5px; color:inherit; }
.jm-article { max-width:820px; margin:0 auto; padding:70px 20px 100px; }
.jm-article-back { margin-bottom:34px; }
.jm-article-back a { color:inherit; text-decoration:none; }
.jm-article h1 { margin-bottom:12px; }
.jm-article-meta { opacity:.7; margin-bottom:32px; }
.jm-article-featured { margin:12px 0 38px; }
.jm-article .entry-content { font-size:1.08rem; line-height:1.85; }
.jm-article .entry-content p { margin-bottom:1.4em; }
.jm-article-footer { margin-top:55px; padding-top:25px; border-top:1px solid rgba(0,0,0,.09); }

/* 0.4.0 — Kirjat */
.jm-book-description p { margin-bottom: 1rem; }


/* 0.5.0 — Kirjojen koonti ja yksittäiset kirjasivut */
.jm-books { max-width: 1120px; margin: 0 auto; padding: 80px 20px 110px; }
.jm-books-intro { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.jm-books-intro h1 { margin-bottom: 14px; }
.jm-books-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:60px 48px; align-items:start; }
.jm-book-card { text-align:center; }
.jm-book-cover-link { display:block; max-width:280px; margin:0 auto 26px; text-decoration:none; }
.jm-book-cover { width:100%; aspect-ratio:2 / 3; display:flex; align-items:center; justify-content:center; background:#f4f1eb; overflow:hidden; }
.jm-book-cover img { display:block; width:100%; height:100%; object-fit:contain; }
.jm-book-cover-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; padding:28px; border:1px solid rgba(0,0,0,.08); color:inherit; font-family:Georgia,serif; font-weight:700; font-size:1.35rem; }
.jm-book-card h2 { font-size:1.45rem; margin:0 0 14px; }
.jm-book-card h2 a { color:inherit; text-decoration:none; }
.jm-book-card-excerpt { max-width:320px; margin:0 auto 18px; line-height:1.65; }
.jm-book-card-more { color:inherit; text-decoration:underline; text-underline-offset:5px; }
.jm-book-single { max-width:1040px; margin:0 auto; padding:75px 20px 110px; }
.jm-book-single-back { margin-bottom:36px; }
.jm-book-single-back a { color:inherit; text-decoration:none; }
.jm-book-hero { display:grid; grid-template-columns:minmax(240px,360px) minmax(0,1fr); gap:70px; align-items:start; }
.jm-book-single-cover { width:100%; aspect-ratio:2 / 3; display:flex; align-items:center; justify-content:center; background:#f4f1eb; }
.jm-book-single-cover img { width:100%; height:100%; object-fit:contain; display:block; }
.jm-book-single h1 { margin:0 0 24px; }
.jm-book-single-content { font-size:1.08rem; line-height:1.8; }
.jm-book-single-content p { margin-bottom:1.35em; }
.jm-book-links { list-style:none; padding:0; margin:30px 0 0; border-top:1px solid rgba(0,0,0,.1); }
.jm-book-links li { border-bottom:1px solid rgba(0,0,0,.1); }
.jm-book-links a { display:flex; justify-content:space-between; gap:20px; padding:14px 0; color:inherit; text-decoration:none; }
@media (max-width: 900px) { .jm-books-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .jm-book-hero { gap:42px; } }
@media (max-width: 620px) { .jm-books { padding-top:50px; } .jm-books-grid { grid-template-columns:1fr; gap:50px; } .jm-book-cover-link { max-width:250px; } .jm-book-hero { grid-template-columns:1fr; } .jm-book-single-cover { max-width:280px; margin:0 auto; } }


/* 0.5.1 — Etusivun uusi Kirjat-osio */
.jm-home-books-section { padding: 100px 0; background:#fff; }
.jm-home-books-title { margin-bottom:58px !important; }
.jm-home-books-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:52px; align-items:start; }
.jm-home-book-card { text-align:center; }
.jm-home-book-cover-link { display:block; max-width:270px; margin:0 auto 24px; text-decoration:none; }
.jm-home-book-cover { width:100%; aspect-ratio:2 / 3; display:flex; align-items:center; justify-content:center; background:#f4f1eb; overflow:hidden; }
.jm-home-book-cover img { width:100%; height:100%; display:block; object-fit:contain; }
.jm-home-book-card h3 { margin:0 0 12px; font-size:1.45rem; }
.jm-home-book-card h3 a { color:inherit; text-decoration:none; }
.jm-home-book-excerpt { max-width:310px; margin:0 auto 17px; line-height:1.65; }
.jm-home-book-more,.jm-home-books-all a { color:inherit; text-decoration:underline; text-underline-offset:5px; }
.jm-home-books-all { margin-top:48px; text-align:center; }
@media (max-width:900px) { .jm-home-books-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .jm-home-books-section { padding:65px 0; } .jm-home-books-grid { grid-template-columns:1fr; gap:48px; } .jm-home-book-cover-link { max-width:250px; } .jm-home-books-title { margin-bottom:42px !important; } }

/* 0.6.0 — Kirjailija */
.jm-author-page { max-width:1080px; margin:0 auto; padding:80px 20px 110px; }
.jm-author-intro { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); gap:70px; align-items:center; margin-bottom:70px; }
.jm-author-kicker { margin:0 0 10px; font-size:.9rem; text-transform:uppercase; letter-spacing:.12em; opacity:.6; }
.jm-author-copy h1 { margin:0 0 18px; }
.jm-author-lead { max-width:560px; font-size:1.25rem; line-height:1.65; }
.jm-author-image { text-align:right; }
.jm-author-image img { display:block; width:100%; max-width:430px; margin-left:auto; }
.jm-author-content { max-width:760px; font-size:1.08rem; line-height:1.85; }
.jm-author-content p { margin-bottom:1.4em; }
.jm-author-content h2 { margin-top:1.7em; margin-bottom:.45em; }
@media (max-width:767px) { .jm-author-page { padding-top:50px; } .jm-author-intro { grid-template-columns:1fr; gap:35px; margin-bottom:50px; } .jm-author-image { text-align:left; } .jm-author-image img { max-width:360px; margin:0; } }


/* 0.7.0 – Kyöpelinvuoren maailma */
.jm-world-section{background:#f5f5f5;padding:92px 0 86px;}
.jm-world-heading{max-width:850px;margin:0 auto 46px;text-align:center;}
.jm-world-kicker{display:block;margin-bottom:10px;font-size:14px;letter-spacing:.08em;text-transform:uppercase;}
.jm-world-heading h2{font-size:42px;line-height:1.3;margin-bottom:18px;}
@media(max-width:991px){.jm-world-heading h2{font-size:32px;}}
@media(max-width:575px){.jm-world-heading h2{font-size:26px;}}
.jm-world-heading p{max-width:780px;margin:0 auto;line-height:1.8;}
.jm-world-quotes{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:42px;}
.jm-world-quote{background:#fff;padding:28px 30px;}
.jm-world-quote h3{font-size:18px;margin-bottom:12px;}
.jm-world-quote p{margin:0;line-height:1.7;}
.jm-world-landscape{margin:0 0 48px;}
.jm-world-landscape img{display:block;width:100%;height:auto;}
.jm-world-story{display:grid;grid-template-columns:1fr 1fr;gap:64px;max-width:1000px;margin:0 auto 58px;}
.jm-world-story h3{margin-bottom:14px;}
.jm-world-story p{line-height:1.8;margin:0;}
.jm-world-characters-heading{text-align:center;margin-bottom:26px;}
.jm-world-characters{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.jm-world-character{background:#fff;padding:24px;display:flex;gap:16px;align-items:flex-start;}
.jm-world-character img{width:54px;height:54px;border-radius:50%;object-fit:cover;flex:0 0 54px;}
.jm-world-character h4{font-size:17px;margin:0 0 2px;}
.jm-world-character span{display:block;font-size:13px;margin-bottom:10px;opacity:.72;}
.jm-world-character p{font-size:14px;line-height:1.65;margin:0;}
@media(max-width:991px){.jm-world-quotes,.jm-world-characters{grid-template-columns:1fr;}.jm-world-story{grid-template-columns:1fr;gap:28px;}.jm-world-section{padding:70px 0;}}
@media(max-width:575px){.jm-world-section{padding:55px 0;}.jm-world-heading{margin-bottom:32px}.jm-world-quote,.jm-world-character{padding:22px;}}


/* 0.8.0 — Kirjanäytteet */
.jm-book-samples{max-width:820px;margin:95px auto 0;padding-top:70px;border-top:1px solid rgba(0,0,0,.1)}
.jm-book-samples-heading{text-align:center;max-width:620px;margin:0 auto 42px}
.jm-book-samples-kicker{display:block;margin-bottom:8px;font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;opacity:.6}
.jm-book-samples-heading h2{margin:0 0 12px}
.jm-book-samples-heading p{margin:0;line-height:1.7;opacity:.78}
.jm-book-samples-list{border-top:1px solid rgba(0,0,0,.12)}
.jm-book-sample{border-bottom:1px solid rgba(0,0,0,.12)}
.jm-book-sample summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 4px;cursor:pointer;list-style:none;font-family:Georgia,serif;font-weight:700;font-size:1.22rem;color:#08264d}
.jm-book-sample summary::-webkit-details-marker{display:none}
.jm-book-sample-mark{font-family:Arial,sans-serif;font-weight:400;font-size:1.5rem;line-height:1;transition:transform .2s ease}
.jm-book-sample[open] .jm-book-sample-mark{transform:rotate(45deg)}
.jm-book-sample-text{max-width:680px;margin:0 auto;padding:10px 0 46px;font-family:Georgia,'Times New Roman',serif;font-size:1.16rem;line-height:1.95;color:#242424}
.jm-book-sample-text p{margin:0 0 1.45em}
.jm-book-sample-text p:first-child::first-letter{float:left;font-size:4.2rem;line-height:.78;padding:.12em .10em 0 0;font-weight:700;color:#08264d}
.jm-book-single-footer{max-width:820px;margin:70px auto 0;padding-top:26px;border-top:1px solid rgba(0,0,0,.1)}
.jm-book-single-footer a{color:inherit;text-decoration:underline;text-underline-offset:5px}
@media(max-width:620px){.jm-book-samples{margin-top:65px;padding-top:50px}.jm-book-sample summary{padding:19px 2px;font-size:1.1rem}.jm-book-sample-text{font-size:1.08rem;line-height:1.85;padding-bottom:36px}.jm-book-sample-text p:first-child::first-letter{font-size:3.5rem}}

/* 0.9.0 — yhteinen sivustokehys */
.jm-global-nav .nav-link.active{position:relative;}
.jm-global-nav .nav-link.active:after{content:"";position:absolute;left:var(--bs-navbar-nav-link-padding-x,.5rem);right:var(--bs-navbar-nav-link-padding-x,.5rem);bottom:4px;height:1px;background:currentColor;opacity:.7;}
.jm-site-topbar .pages-link a{white-space:nowrap;}
@media (max-width:991.98px){.jm-global-nav .nav-link.active:after{display:none;}}


/* 0.9.1 — mobiilinavigaatio ja viimeistely */
@media (max-width: 991.98px) {
  .responsive-navbar {
    --bs-offcanvas-width: 100vw;
    width: 100vw !important;
    max-width: 100vw;
    background: #08264d !important;
    color: #fff;
  }
  .responsive-navbar .offcanvas-header {
    min-height: 74px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.14);
  }
  .responsive-navbar .offcanvas-header .logo img { max-width: 150px; height: auto; }
  .responsive-navbar .offcanvas-header .close-btn {
    color: #fff !important;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 32px; line-height: 1;
  }
  .responsive-navbar .offcanvas-body { padding: 18px 24px 32px; }
  .responsive-navbar .offcanvas-body ul.responsive-menu { margin: 0; padding: 0; overflow: visible; }
  .responsive-navbar .offcanvas-body ul.responsive-menu > li.nav-item {
    display: block; width: 100%; margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .responsive-navbar .offcanvas-body ul.responsive-menu > li.nav-item > a.nav-link {
    display: block !important; width: 100%;
    padding: 15px 2px !important; margin: 0 !important;
    color: #fff !important; opacity: 1 !important;
    font-size: 16px; font-weight: 500; line-height: 1.35;
    text-decoration: none !important;
  }
  .responsive-navbar .offcanvas-body ul.responsive-menu > li.nav-item > a.nav-link:hover,
  .responsive-navbar .offcanvas-body ul.responsive-menu > li.nav-item > a.nav-link:focus-visible {
    color: #ffc43d !important;
  }
  .responsive-navbar .offcanvas-body ul.responsive-menu > li.nav-item:last-child > a.nav-link {
    color: #ffc43d !important;
  }
}
/* Selkeä näppäimistöfokus koko sivustolle */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #0b5cab;
  outline-offset: 3px;
}
/* Hieman väljempi näytteen lukupalsta työpöydällä */
@media (min-width: 621px) { .jm-book-sample-text { max-width: 720px; } }

/* 0.9.2 — tilauslomakkeen palaute */
.jm-order-status { margin-top: 18px; padding: 0; font-weight: 600; }
.jm-order-status.is-success, .jm-order-status.is-error { padding: 14px 16px; border-radius: 8px; }
.jm-order-status.is-success { background: #eef8f0; border: 1px solid #a8d5af; }
.jm-order-status.is-error { background: #fff1f1; border: 1px solid #e0aaaa; }
#jm-order-submit:disabled { opacity: .65; cursor: wait; }
