/*
Theme Name:   RTOMB 2025
Theme URI:    https://rtomb.com
Description:  Child theme of Twenty Twenty-Five carrying the palette and feel of the original Rtomb theme — warm browns, rust headings, a parchment reading column on a dark ground. Most of the styling lives in theme.json; this file holds the few things theme.json cannot express.
Author:       Craig Bauer
Template:     twentytwentyfive
Version:      1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  rtomb-2025
*/

/* ---------------------------------------------------------------
   1. The dark ground and the parchment column

   The original put a cream page on a dark brown textured body.
   This recreates that without an image file — the texture is a
   pair of very low-contrast gradients.

   Don't want the framed look? Delete this block and the site
   falls back to an edge-to-edge parchment background.
   --------------------------------------------------------------- */

body {
	background-color: var(--wp--preset--color--accent-6, #4a340d);
	background-image:
		repeating-linear-gradient(45deg,  rgba(255,255,255,.014) 0 2px, transparent 2px 4px),
		repeating-linear-gradient(-45deg, rgba(0,0,0,.05)        0 2px, transparent 2px 4px);
	background-attachment: fixed;
}

.wp-site-blocks {
	max-width: 74rem;
	margin-inline: auto;
	background-color: var(--wp--preset--color--base, #f4eddf);
	box-shadow: 0 0 28px rgba(0, 0, 0, .35);
}

/* Keep the gutter honest on phones — the frame collapses away. */
@media (max-width: 800px) {
	.wp-site-blocks { max-width: none; box-shadow: none; }
	body { background-image: none; }
}

/* ---------------------------------------------------------------
   2. The date chip

   The original hung a rust calendar tile beside every post title.
   This turns the Post Date block into that chip wherever it
   appears, with no template editing required.
   --------------------------------------------------------------- */

.wp-block-post-date a,
.wp-block-post-date time {
	display: inline-block;
	padding: .25em .7em;
	border-radius: 4px;
	background-color: var(--wp--preset--color--accent-1, #983918);
	color: #fff7ec;
	font-family: var(--wp--preset--font-family--rtomb-heading);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.4;
}

.wp-block-post-date a:hover {
	background-color: var(--wp--preset--color--accent-2, #67280a);
	color: #fff7ec;
	text-decoration: none;
}

/* ---------------------------------------------------------------
   3. Links — coloured by theme.json, underlined on hover only,
      the way the original behaved.
   --------------------------------------------------------------- */

.wp-block-post-content a,
.wp-block-post-excerpt a,
.wp-block-comment-content a {
	text-decoration: none;
	border-bottom: 1px solid rgba(152, 57, 24, .35);
}

.wp-block-post-content a:hover,
.wp-block-post-excerpt a:hover,
.wp-block-comment-content a:hover {
	text-decoration: none;
	border-bottom-color: var(--wp--preset--color--accent-2, #67280a);
}

/* ---------------------------------------------------------------
   4. Photographs

   This is a photo blog — twenty years of them. A warm mat and a
   soft shadow, echoing the original's #b8a785 post borders.
   --------------------------------------------------------------- */

.wp-block-post-content img,
.wp-block-image img,
.wp-block-gallery img {
	border-radius: 3px;
	box-shadow: 0 1px 4px rgba(74, 52, 13, .28);
}

.wp-block-gallery {
	--wp--style--unstable-gallery-gap: .75rem;
	gap: .75rem;
}

/* ---------------------------------------------------------------
   5. Navigation — the rounded tan bar with a filled active pill
   --------------------------------------------------------------- */

.wp-block-navigation {
	font-family: var(--wp--preset--font-family--rtomb-heading);
	font-weight: 600;
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: .4em .95em;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--accent-4, #e7dcc5);
	color: var(--wp--preset--color--accent-2, #67280a);
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--accent-1, #983918);
	color: #fff7ec;
}

/* ---------------------------------------------------------------
   6. Quotes and separators
   --------------------------------------------------------------- */

.wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--accent-5, #c9ab6e);
	padding-left: 1.2em;
	font-style: normal;
}

.wp-block-separator {
	border: 0;
	height: 1px;
	background-color: var(--wp--preset--color--accent-3, #b8a785);
	opacity: .6;
}

/* ---------------------------------------------------------------
   7. Comments — the original tinted comment threads (#E1D8C1)
   --------------------------------------------------------------- */

.wp-block-comment-template li {
	background-color: var(--wp--preset--color--accent-4, #e7dcc5);
	border-radius: 5px;
	padding: 1.1rem 1.3rem;
	margin-block-end: .9rem;
}

.wp-block-comment-template li li {
	background-color: rgba(255, 255, 255, .45);
}

/* ---------------------------------------------------------------
   8. Forms
   --------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	background-color: #fffdf8;
	border: 1px solid var(--wp--preset--color--accent-3, #b8a785);
	border-radius: 4px;
	padding: .55em .7em;
	color: var(--wp--preset--color--contrast, #2e2723);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent-1, #983918);
	outline-offset: 1px;
	border-color: transparent;
}

/* 9. Classic [gallery] shortcode — block themes drop WordPress's
      built-in gallery CSS, so lay the grid out here. */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-block: 1.75rem; }
.gallery-columns-1 { grid-template-columns: repeat(1, 1fr); }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery .gallery-item { margin: 0 !important; width: auto !important; max-width: none; float: none; }
.gallery .gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 0 !important; border-radius: 3px; box-shadow: 0 1px 4px rgba(74,52,13,.28); transition: transform .15s ease; }
.gallery .gallery-item a:hover img { transform: scale(1.02); }
.gallery .gallery-caption { font-size: .78rem; line-height: 1.4; color: #6a5c4a; margin-top: .3rem; }
@media (max-width: 600px) { .gallery[class*="gallery-columns-"] { grid-template-columns: repeat(2, 1fr); } }

/* 10. Sidebar — the original pinned widgets to a corkboard; this keeps
      the grouping without the imagery. */
.rtomb-sidebar { background-color: var(--wp--preset--color--accent-4,#e7dcc5); border-radius: 6px; padding: 1.35rem 1.4rem; font-size: .92rem; align-self: flex-start; }
.rtomb-sidebar > * + * { margin-top: 1.5rem; }
.rtomb-sidebar h2 { font-size: 1.05rem !important; margin-bottom: .55rem; }
.rtomb-sidebar ul { list-style: none; padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.rtomb-sidebar li { line-height: 1.35; }
.rtomb-sidebar a { text-decoration: none; }
.rtomb-sidebar a:hover { text-decoration: underline; }
.rtomb-sidebar .wp-block-latest-posts__post-date { display: block; font-size: .74rem; color: #7a6a52; margin-top: .1rem; }
.rtomb-sidebar select { width: 100%; padding: .45em .6em; border: 1px solid var(--wp--preset--color--accent-3,#b8a785); border-radius: 4px; background-color: #fffdf8; color: var(--wp--preset--color--contrast,#2e2723); }
.rtomb-sidebar .wp-block-search__inside-wrapper { border: 0; gap: .4rem; }
.rtomb-sidebar .wp-block-search__input { flex-grow: 1; }
.wp-block-post-terms, .wp-block-post-terms a { color: #7a6a52; }

/* 11. Date tile — supersedes the single-line chip in section 2. */
.rtomb-datetile { flex: 0 0 auto; width: 64px; padding: .5rem 0 .55rem; border-radius: 10px; background-color: var(--wp--preset--color--accent-1,#983918); text-align: center; line-height: 1; gap: .2rem; box-shadow: 0 1px 3px rgba(74,52,13,.3); }
.rtomb-datetile .wp-block-post-date { margin: 0; }
.rtomb-datetile .wp-block-post-date time, .rtomb-datetile .wp-block-post-date a { display: block; background: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; color: #fff7ec; text-decoration: none; font-family: var(--wp--preset--font-family--rtomb-heading); letter-spacing: normal; text-transform: none; }
.rtomb-datetile__m time { font-size: .8rem !important; font-weight: 600; letter-spacing: .09em !important; text-transform: uppercase !important; }
.rtomb-datetile__d time { font-size: 1.7rem !important; font-weight: 700; line-height: 1.05; }
.wp-block-post-excerpt__more-text { margin-top: .5rem; }
.wp-block-post-excerpt__more-link { font-family: var(--wp--preset--font-family--rtomb-heading); font-weight: 600; font-size: .88rem; text-decoration: none; border-bottom: 1px solid rgba(152,57,24,.35); }
