/*
Theme Name: Rintala
Theme URI: https://rintala.com
Description: Kevyt, kirjallinen Kadence-lapsiteema rintala.com-sivustolle.
Author: Rintala
Template: kadence
Version: 1.2.5
Text Domain: rintala
*/

/* Foundation */
:root {
  --rt-paper: #fff; --rt-ink: #171715; --rt-muted: #716f67; --rt-line: #d9d5cc;
  --rt-accent: #87644d; --rt-hero-background: #e9e4da;
  --rt-width: 1160px; --rt-reading: 720px; --rt-gutter: clamp(20px, 5vw, 48px);
  --rt-title-size: clamp(36px, 5vw, 60px); --rt-section-space: clamp(40px, 6vw, 72px);
  --rt-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --rt-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--rt-paper); color: var(--rt-ink); font-family: var(--rt-serif); font-size: 19px; line-height: 1.72; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--rt-accent); text-underline-offset: .18em; }
a:hover { color: var(--rt-accent); }
img { display: block; max-width: 100%; height: auto; }
.rt-shell { width: min(calc(100% - 2 * var(--rt-gutter)), var(--rt-width)); margin-inline: auto; }
.rt-main { min-height: 68vh; }
.rt-article { padding: 0; overflow-wrap: anywhere; }
.rt-main, .rt-feature, .rt-post-list, .rt-content-area, .rt-entry { background: #fff; color: var(--rt-ink); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 12px; left: 12px; width: auto; height: auto; padding: 8px 12px; clip: auto; clip-path: none; background: var(--rt-ink); color: #fff; }
.rt-header { background: #fff; padding: 30px 0 24px; border-bottom: 1px solid var(--rt-line); font-family: var(--rt-sans); }
.rt-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.rt-brand { text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: .18em; }
.rt-nav ul { display: flex; gap: 30px; list-style: none; padding: 0; margin: 0; }
.rt-nav a { text-decoration: none; font-size: 14px; color: var(--rt-muted); }
.rt-nav a:hover, .rt-nav .current-menu-item > a, .rt-nav .current_page_item > a { color: var(--rt-ink); }
.rt-meta { font-family: var(--rt-sans); color: var(--rt-muted); font-size: 13px; line-height: 1.65; letter-spacing: .055em; text-transform: uppercase; }
.rt-footer { background: #fff; border-top: 1px solid var(--rt-line); padding: 38px 0 46px; font-family: var(--rt-sans); color: var(--rt-muted); font-size: 13px; }
.rt-footer__inner { display: flex; justify-content: space-between; gap: 30px; }
.rt-footer p { margin: 0; }

/* Shared title band */
.rt-title-band.rt-title-band {
  background: var(--rt-hero-background);
  color: var(--rt-ink);
  padding: clamp(48px, 6vw, 80px) 0;
  min-height: clamp(360px, 34vw, 440px);
  margin: 0;
  text-align: left;
}
.rt-title-band .rt-title-band__inner { max-width: var(--rt-reading); }
.rt-title-band.rt-title-band h1 {
  color: var(--rt-ink);
  font-family: var(--rt-serif);
  font-size: var(--rt-title-size);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.035em;
  max-width: none;
  margin: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.rt-title-band.rt-title-band p,
.rt-title-band.rt-title-band .rt-hero__lead {
  font-family: var(--rt-serif);
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.5;
  color: #514e47;
  max-width: none;
  margin: 24px 0 0;
}
.rt-title-band.rt-title-band .rt-meta {
  font-family: var(--rt-sans);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: .055em;
}
.rt-title-band.rt-title-band .rt-hero__lead p { margin: 0; }
/* Automatic article feeds */
.rt-feature, .rt-post-list { padding-block: var(--rt-section-space) clamp(64px, 9vw, 110px); }
.rt-feature > .rt-shell, .rt-post-list > .rt-shell { max-width: var(--rt-reading); }
.rt-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 0 0 18px; border-bottom: 1px solid var(--rt-line); font-family: var(--rt-sans); }
.rt-section-head h2 { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.rt-section-head a { font-size: 13px; color: var(--rt-muted); }
.rt-featured-post { padding: clamp(40px, 7vw, 78px) 0 0; }
.rt-post-row { display: flex; flex-direction: column; gap: 12px; padding-block: 32px; border-top: 1px solid var(--rt-line); }
.rt-post-row:first-child { border-top: 0; padding-top: 0; }
.rt-featured-post h2, .rt-post-row h2 { font-family: var(--rt-serif); font-size: clamp(28px, 3.8vw, 38px); line-height: 1.2; font-weight: 400; letter-spacing: -.025em; margin: 0 0 16px; }
.rt-featured-post h2 a, .rt-post-row h2 a { text-decoration: none; }
.rt-post-row p { margin: 0; }
.rt-excerpt { max-width: 720px; margin: 0 0 22px; color: var(--rt-ink); font-size: clamp(18px, 1.8vw, 20px); line-height: 1.75; }
.rt-excerpt > p { margin-block: 0 1em; }
.rt-post-row > .rt-meta { font-size: 13px; }
.rt-read-more { font-family: var(--rt-sans); font-size: 14px; font-weight: 600; text-decoration: none; }
.rt-pagination { padding-top: 35px; font-family: var(--rt-sans); font-size: 14px; }
.nav-links { display: flex; gap: 14px; }
.page-numbers { padding: 5px; }
/* Reading content */
.rt-content-area { padding: var(--rt-section-space) var(--rt-gutter) clamp(64px, 9vw, 110px); }
.rt-entry > * { margin-inline: auto; }
.rt-article--post .rt-article__image {
  width: 100%;
  max-width: 980px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.rt-article--post .rt-article__image img { margin-inline: auto; }
.rt-article--post .rt-entry {
  max-width: var(--rt-width);
  margin-inline: auto;
  font-size: clamp(18px, 1.8vw, 20px);
  line-height: 1.75;
}
.rt-article--post .rt-entry > * {
  min-width: 0;
  max-width: min(100%, var(--rt-reading));
}
.rt-article--post .rt-entry > .alignwide {
  width: 100%;
  max-width: 980px;
}
.rt-article--post .rt-entry > .alignfull {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}
.rt-article--post .rt-entry :where(p, ul, ol, dl, figure, blockquote, pre, table, .wp-block-table, .wp-block-embed) {
  margin-block: 0 1.4em;
}
.rt-article--post .rt-entry :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--rt-serif);
  font-weight: 400;
  line-height: 1.25;
  margin-block: 1.8em .65em;
}
.rt-article--post .rt-entry h1 { font-size: clamp(32px, 4.5vw, 48px); }
.rt-article--post .rt-entry h2 { font-size: clamp(28px, 3.8vw, 38px); }
.rt-article--post .rt-entry h3 { font-size: clamp(24px, 3vw, 30px); }
.rt-article--post .rt-entry h4 { font-size: 1.15em; }
.rt-article--post .rt-entry :where(h5, h6) { font-size: 1em; }
.rt-article--post .rt-entry > :first-child { margin-top: 0; }
.rt-article--post .rt-entry :where(ul, ol) { padding-inline-start: 1.5em; }
.rt-article--post .rt-entry li + li { margin-top: .4em; }
.rt-article--post .rt-entry li > :where(ul, ol) { margin-block: .5em 0; }
.rt-article--post .rt-entry blockquote {
  padding: .2em 0 .2em clamp(18px, 3vw, 28px);
  border-inline-start: 2px solid var(--rt-accent);
  font-size: clamp(21px, 2.6vw, 25px);
  line-height: 1.55;
  color: var(--rt-muted);
}
.rt-article--post .rt-entry blockquote > :last-child { margin-bottom: 0; }
.rt-article--post .rt-entry :where(cite, figcaption) {
  font-family: var(--rt-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--rt-muted);
}
.rt-article--post .rt-entry figcaption { margin-top: .75em; }
.rt-article--post .rt-entry :where(img, video, iframe) { max-width: 100%; }
.rt-article--post .rt-entry :where(pre, .wp-block-table) { overflow-x: auto; }
.rt-article--post .rt-entry pre { white-space: pre; overflow-wrap: normal; }
.rt-article--post .rt-entry .wp-block-table table { margin-bottom: 0; }
.rt-article--post .rt-entry > .alignleft { margin: 0 1.5em 1em 0; }
.rt-article--post .rt-entry > .alignright { margin: 0 0 1em 1.5em; }
.rt-article--post .rt-entry::after { content: ''; display: table; clear: both; }
@media (max-width: 680px) {
  .rt-article--post .rt-entry > :is(.alignleft, .alignright) {
    float: none;
    margin: 0 auto 1.4em;
    max-width: 100%;
  }
}


@media (max-width: 680px) {
  body { font-size: 18px; }
  .rt-header { padding: 22px 0 18px; }
  .rt-header__inner { align-items: flex-start; }
  .rt-nav ul { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .rt-nav a { font-size: 12px; }
  .rt-footer__inner { display: block; }
  .rt-footer p + p { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.rt-title-band.rt-title-band .rt-hero__lead p + p { margin-top: .75em; }

/* Feeds inside the common content area already receive the page gutters. */
.rt-feed-content > .rt-feature, .rt-feed-content > .rt-post-list { width: 100%; max-width: none; padding: 0; }
.rt-feed-content > .rt-feature > .rt-shell, .rt-feed-content > .rt-post-list > .rt-shell { width: 100%; }

/* Scoped finishing adjustments. */
.rt-feed-content .rt-section-head h2 { margin: 0; }
.rt-article--post > .rt-title-band .rt-meta { margin: 0 0 8px; text-align: left; }
.rt-social { display: flex; align-items: center; gap: 4px; }
.rt-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--rt-muted); border-radius: 3px; }
.rt-social a:hover { color: var(--rt-accent); }
.rt-social a:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }
.rt-social svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 680px) { .rt-social { margin-top: 12px; } }

/* Feed metadata belongs to the card title, not to the article-body rhythm.
   Reset only the margins between those two elements; keep title bottom
   margins, excerpts, hero and card padding unchanged. These shared selectors
   apply to every current and future post rendered by the feed template. */
.rt-post-row > .rt-meta { margin-bottom: 0; }
.rt-featured-post > .rt-meta { margin-bottom: 8px; }
.rt-post-row { row-gap: 8px; }
.rt-post-row > .rt-meta + div > h2,
.rt-featured-post > .rt-meta + div > h2 { margin-top: 0; }

/* Shared feed navigation: wrap when both links no longer fit. */
.rt-post-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; }
.rt-post-actions > a { white-space: nowrap; }
.rt-post-actions > .rt-all-posts { margin-left: auto; }

/* The content area supplies the same hero-to-content gap as other pages. */
.rt-feed-content > .rt-feature > .rt-shell > .rt-featured-post:first-child { padding-top: 0; }
