/*
Theme Name: Nonno Bob
Theme URI: https://robertbenvin.com/
Author: The Benvin Family
Description: A warm memorial theme for Robert Angelo Benvin (1937–2016). Adriatic navy, clay-court terracotta and sand, with a portrait hero, passions grid, timeline and photo gallery. Designed to pair with the Robert Benvin Legacy plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nonno-bob
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
	--rb-navy: #14324a;
	--rb-navy-2: #0d2234;
	--rb-sea: #2f6f8a;
	--rb-clay: #b5532c;
	--rb-clay-2: #9a4423;
	--rb-gold: #c9a45c;
	--rb-sand: #f7f2ea;
	--rb-sand-2: #efe7da;
	--rb-ink: #1f2a33;
	--rb-muted: #6b6459;
	--rb-line: #ddd2c1;
	--rb-white: #fffdf9;
	--rb-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--rb-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
	--rb-wide: 1180px;
	--rb-text: 720px;
	--rb-radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--rb-sand);
	color: var(--rb-ink);
	font-family: var(--rb-sans);
	font-size: 18px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--rb-clay); text-underline-offset: 3px; }
a:hover { color: var(--rb-clay-2); }
h1, h2, h3, h4 { font-family: var(--rb-serif); color: var(--rb-navy); line-height: 1.15; font-weight: 600; margin: 2.2rem 0 .8rem; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.2rem; }
blockquote, .wp-block-quote {
	margin: 2.2rem 0; padding: .4rem 0 .4rem 1.5rem; border-left: 3px solid var(--rb-clay);
	font-family: var(--rb-serif); font-size: 1.45rem; line-height: 1.45; color: var(--rb-navy); font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; clip: auto; width: auto; height: auto; background: #fff; padding: .6rem 1rem; }
:focus-visible { outline: 2px solid var(--rb-clay); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--rb-wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.narrow { max-width: var(--rb-text); margin-left: auto; margin-right: auto; }

/* Header */
.site-header { background: var(--rb-navy-2); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.site-brand { display: flex; align-items: baseline; gap: .7rem; color: #fff; text-decoration: none; }
.site-brand strong { font-family: var(--rb-serif); font-size: 1.6rem; font-weight: 600; letter-spacing: .01em; }
.site-brand span { color: var(--rb-gold); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
.site-brand:hover { color: #fff; }
.menu-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 6px; padding: .45rem .8rem; font: inherit; font-size: .95rem; cursor: pointer; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; color: #e9e3d8; text-decoration: none; font-size: .98rem; padding: .55rem .8rem; border-radius: 6px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,.08); }
.primary-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--rb-navy); padding: .5rem; border-radius: 0 0 8px 8px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); flex-direction: column; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: flex; }
@media (max-width: 900px) {
	.menu-toggle { display: inline-block; }
	.primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--rb-navy-2); padding: .5rem 16px 1rem; border-top: 1px solid rgba(255,255,255,.08); }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; }
	.primary-nav .sub-menu { display: flex; position: static; box-shadow: none; padding: 0 0 0 1rem; background: transparent; }
}

/* Hero */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 600px at 75% 20%, #2a5d77 0%, transparent 60%), linear-gradient(160deg, var(--rb-navy) 0%, var(--rb-navy-2) 70%); overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: var(--rb-sand); clip-path: polygon(0 60%, 12% 45%, 25% 58%, 40% 40%, 55% 55%, 70% 38%, 85% 52%, 100% 36%, 100% 100%, 0 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding-top: 4.5rem; padding-bottom: 6.5rem; position: relative; z-index: 1; }
.hero-kicker { color: var(--rb-gold); letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; margin: 0 0 1rem; }
.hero h1 { color: #fff; margin: 0 0 .6rem; font-size: clamp(2.6rem, 6vw, 4.4rem); }
.hero-dates { font-family: var(--rb-serif); font-size: 1.5rem; color: #e8dfd0; margin: 0 0 1.4rem; }
.hero-roles { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.hero-roles li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .25rem .8rem; font-size: .9rem; color: #f2ece2; }
.hero-portrait { justify-self: center; position: relative; }
.hero-portrait img { display: block; width: min(380px, 80vw); aspect-ratio: 4/5; object-fit: cover; object-position: top; border-radius: 200px 200px 10px 10px; border: 6px solid rgba(255,255,255,.92); box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); filter: sepia(.12); }
.hero-portrait figcaption { text-align: center; margin-top: .8rem; color: #cfc4b3; font-size: .9rem; font-style: italic; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 3rem; gap: 2rem; } .hero-roles { justify-content: center; } .hero-portrait { order: -1; } .hero .buttons { justify-content: center; } }

.buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-block; text-decoration: none; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 2px solid transparent; transition: all .15s; }
.btn-primary { background: var(--rb-clay); color: #fff; }
.btn-primary:hover { background: var(--rb-clay-2); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { border-color: var(--rb-navy); color: var(--rb-navy); }
.btn-outline:hover { background: var(--rb-navy); color: #fff; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section-head h2 { margin-top: 0; }
.eyebrow { color: var(--rb-clay); letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; font-weight: 600; margin: 0 0 .6rem; }
.lead { font-size: 1.2rem; color: var(--rb-muted); }
.band { background: var(--rb-white); border-top: 1px solid var(--rb-line); border-bottom: 1px solid var(--rb-line); }
.quote-band { text-align: center; }
.quote-band blockquote { border: 0; padding: 0; margin: 0 auto; max-width: 820px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.quote-band cite { display: block; margin-top: 1rem; font-family: var(--rb-sans); font-style: normal; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rb-muted); }

/* Passions */
.passions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .passions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .passions { grid-template-columns: 1fr; } }
.passion { position: relative; display: block; border-radius: var(--rb-radius); overflow: hidden; aspect-ratio: 4/3; color: #fff; text-decoration: none; background: var(--rb-navy); }
.passion img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.passion::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(10,22,32,.85)); }
.passion-text { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1rem; z-index: 1; }
.passion-text h3 { color: #fff; margin: 0 0 .2rem; font-size: 1.6rem; }
.passion-text p { margin: 0; font-size: .95rem; color: #e6ddcf; line-height: 1.4; }
.passion:hover img { transform: scale(1.05); }
.passion:hover { color: #fff; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; text-align: center; }
.fact { padding: 1.4rem 1rem; border-radius: var(--rb-radius); background: var(--rb-sand); border: 1px solid var(--rb-line); }
.fact strong { display: block; font-family: var(--rb-serif); font-size: 2.4rem; color: var(--rb-navy); line-height: 1; margin-bottom: .45rem; }
.fact span { font-size: .95rem; color: var(--rb-muted); line-height: 1.4; display: block; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.card { background: var(--rb-white); border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(20,40,60,.5); }
.card-image { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--rb-sand-2); }
.card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.card-cat a { color: var(--rb-clay); text-decoration: none; }
.card h3 { margin: .45rem 0 .55rem; font-size: 1.5rem; }
.card h3 a { color: var(--rb-navy); text-decoration: none; }
.card h3 a:hover { color: var(--rb-clay); }
.card p { color: var(--rb-muted); font-size: 1rem; line-height: 1.55; margin-bottom: 1rem; }
.card-meta { margin-top: auto; font-size: .85rem; color: var(--rb-muted); }

/* Page and post */
.page-hero { background: linear-gradient(160deg, var(--rb-navy) 0%, var(--rb-navy-2) 80%); color: #fff; padding: 3.5rem 0 3rem; text-align: center; }
.page-hero h1 { color: #fff; margin: .3rem auto .6rem; max-width: 900px; }
.page-hero .eyebrow { color: var(--rb-gold); }
.page-hero .eyebrow a { color: var(--rb-gold); text-decoration: none; }
.page-hero p { color: #d9cfbf; margin: 0 auto; max-width: 680px; }
.entry-feature { max-width: 980px; margin: -1.5rem auto 0; padding: 0 16px; position: relative; }
.entry-feature img { display: block; width: 100%; max-height: 560px; object-fit: cover; object-position: center 30%; border-radius: var(--rb-radius); box-shadow: 0 30px 60px -30px rgba(20,40,60,.6); }
.entry-content { padding: 3rem 16px 2rem; }
.entry-content > * { max-width: var(--rb-text); margin-left: auto; margin-right: auto; }
.entry-content .rb-gallery-wrap { max-width: var(--rb-wide); }
.entry-content > p:first-child em { display: block; background: var(--rb-white); border: 1px solid var(--rb-line); border-left: 3px solid var(--rb-gold); padding: .8rem 1.1rem; border-radius: 4px; font-size: .95rem; color: var(--rb-muted); }
.entry-content ul { padding-left: 1.2rem; }
.entry-tags { max-width: var(--rb-text); margin: 0 auto 2rem; padding: 0 16px; display: flex; flex-wrap: wrap; gap: .45rem; }
.entry-tags a { font-size: .85rem; text-decoration: none; background: var(--rb-sand-2); color: var(--rb-ink); padding: .25rem .75rem; border-radius: 999px; }
.entry-tags a:hover { background: var(--rb-clay); color: #fff; }
.author-box { max-width: var(--rb-text); margin: 0 auto 3rem; padding: 1.4rem 1.5rem; background: var(--rb-white); border: 1px solid var(--rb-line); border-radius: var(--rb-radius); display: flex; gap: 1rem; align-items: center; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; flex: 0 0 auto; }
.author-box p { margin: 0; font-size: .98rem; color: var(--rb-muted); line-height: 1.5; }
.author-box strong { color: var(--rb-navy); font-family: var(--rb-serif); font-size: 1.2rem; display: block; }
.post-nav { max-width: var(--rb-text); margin: 0 auto 3rem; padding: 0 16px; display: flex; justify-content: space-between; gap: 1rem; font-size: .98rem; }
.post-nav a { text-decoration: none; }

/* Comments */
.comments-area { max-width: var(--rb-text); margin: 0 auto 4rem; padding: 0 16px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { background: var(--rb-white); border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-meta { font-size: .9rem; color: var(--rb-muted); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: .5rem; }
.comment-form label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea, .search-form input[type="search"] { width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--rb-line); border-radius: 6px; background: #fff; }
.comment-form .submit, .search-form button { background: var(--rb-clay); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.5rem; font: inherit; font-weight: 600; cursor: pointer; }
.comment-form .submit:hover { background: var(--rb-clay-2); }
.search-form { display: flex; gap: .5rem; max-width: 520px; margin: 0 auto; }

/* Pagination */
.pagination { text-align: center; margin: 3rem 0 0; }
.pagination .page-numbers { display: inline-block; padding: .4rem .8rem; margin: 0 .15rem; border-radius: 6px; text-decoration: none; color: var(--rb-navy); }
.pagination .current { background: var(--rb-navy); color: #fff; }

/* Footer */
.site-footer { background: var(--rb-navy-2); color: #cfc6b8; padding: 3.5rem 0 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .8rem; }
.site-footer a { color: #e9e3d8; text-decoration: none; }
.site-footer a:hover { color: var(--rb-gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.4rem; text-align: center; font-size: .88rem; color: #9fa8b0; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }

.cta { text-align: center; background: linear-gradient(160deg, var(--rb-clay) 0%, var(--rb-clay-2) 100%); color: #fff; border-radius: 14px; padding: 3rem 1.5rem; }
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #fbe9df; max-width: 560px; margin: 0 auto 1.5rem; }
.cta .btn { background: #fff; color: var(--rb-clay-2); }
.cta .btn:hover { background: var(--rb-sand); }
.center { text-align: center; }
.alignwide { max-width: var(--rb-wide) !important; }
.alignfull { max-width: none !important; }
.wp-caption-text, .wp-element-caption { font-size: .9rem; color: var(--rb-muted); text-align: center; }
.sticky, .bypostauthor, .gallery-caption { }
