/*
Theme Name: Oltre i Girasoli
Theme URI: https://oltreigirasoli.it/
Description: Tema editoriale per Oltre i Girasoli, rivista dedicata a Vincent van Gogh.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: oltre-i-girasoli
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --oig-white: #fff;
  --oig-ink: #19293e;
  --oig-text: #263445;
  --oig-muted: #526074;
  --oig-gold: #e4ad34;
  --oig-gold-deep: #7a5107;
  --oig-wash: #f9f4e7;
  --oig-rule: #dce1e6;
  --oig-title: "Instrument Serif", Georgia, serif;
  --oig-sans: "DM Sans", system-ui, sans-serif;
  --oig-width: 75rem;
  --oig-gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--oig-white); color: var(--oig-text); font: 1rem/1.6 var(--oig-sans); }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--oig-ink); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--oig-gold-deep);
  outline-offset: 4px;
}
h1, h2, h3 { margin: 0; color: var(--oig-ink); font-family: var(--oig-title); font-weight: 400; line-height: 1.04; }
h1, h2, h3, p { overflow-wrap: break-word; }
.shell { width: min(var(--oig-width), calc(100% - var(--oig-gutter) * 2)); margin-inline: auto; }
.narrow { width: min(45rem, calc(100% - var(--oig-gutter) * 2)); margin-inline: auto; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  width: 1px; height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  white-space: nowrap;
}
.skip-link:focus {
  background: var(--oig-white); clip: auto; clip-path: none; height: auto; left: 1rem;
  padding: .8rem 1rem; top: 1rem; width: auto; z-index: 20;
}

.site-header { border-top: 3px solid var(--oig-gold); border-bottom: 1px solid var(--oig-rule); }
.masthead { min-height: 4.75rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1.4rem; position: relative; }
.brand, .masthead > .custom-logo-link { justify-self: start; }
.brand { display: inline-flex; gap: .55rem; align-items: center; color: var(--oig-ink); text-decoration: none; }
.brand-mark { display: block; width: 2.45rem; height: 2.45rem; flex: 0 0 auto; }
.brand-name { font: 400 clamp(1.65rem, 2.45vw, 2.25rem)/1 var(--oig-title); }
.custom-logo { display: block; max-width: min(16rem, 100%); max-height: 3.5rem; width: auto; }
.main-nav ul, .footer-nav ul { display: flex; padding: 0; margin: 0; list-style: none; }
.main-nav > ul { align-items: center; justify-content: center; gap: clamp(1.2rem, 2.8vw, 2.6rem); }
.main-nav li { position: relative; }
.main-nav a, .footer-nav a { font-size: .94rem; font-weight: 600; text-decoration: none; }
.main-nav a { display: inline-block; padding-block: .6rem; }
.main-nav a:hover, .footer-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { text-decoration: underline; text-decoration-color: var(--oig-gold-deep); text-underline-offset: .32em; }
.main-nav .sub-menu {
  position: absolute; z-index: 3; left: -.85rem; top: 100%; display: grid; width: max-content; min-width: 11rem;
  max-width: 21rem; background: var(--oig-white); border: 1px solid var(--oig-rule); padding: .35rem .85rem;
  box-shadow: 0 7px 20px rgb(25 41 62 / 8%); visibility: hidden; opacity: 0;
}
.main-nav .menu-item-has-children:hover > .sub-menu, .main-nav .menu-item-has-children:focus-within > .sub-menu { visibility: visible; opacity: 1; }
.header-controls { display: flex; align-items: center; justify-self: end; gap: .4rem; }
.site-search > summary, .menu-toggle {
  display: grid; place-items: center; width: 2.65rem; height: 2.65rem;
  padding: 0; border: 1px solid var(--oig-rule); border-radius: 50%; color: var(--oig-ink); background: var(--oig-white);
}
.site-search > summary { cursor: pointer; list-style: none; }
.site-search > summary::-webkit-details-marker { display: none; }
.site-search > summary:hover, .site-search[open] > summary, .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--oig-wash); border-color: var(--oig-gold); }
.search-symbol { width: .84rem; height: .84rem; border: 1.6px solid currentColor; border-radius: 50%; position: relative; margin: -.12rem .13rem 0 0; }
.search-symbol::after { content: ""; position: absolute; width: .42rem; height: 1.6px; background: currentColor; top: .65rem; left: .57rem; transform: rotate(45deg); transform-origin: left center; }
.menu-symbol { display: block; width: 1rem; height: .72rem; border-block: 1.5px solid currentColor; position: relative; }
.menu-symbol::after { content: ""; display: block; height: 1.5px; background: currentColor; position: absolute; inset: calc(50% - .75px) 0 auto; }
.search-panel {
  position: absolute; right: 0; top: calc(100% + .6rem); z-index: 5; width: min(27rem, 100%);
  padding: 1rem; background: var(--oig-white); border: 1px solid var(--oig-rule);
  box-shadow: 0 8px 26px rgb(25 41 62 / 10%);
}
.search-form { display: flex; align-items: stretch; gap: .5rem; }
.search-form label { flex: 1; min-width: 0; }
.search-form input, .comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
  width: 100%; color: var(--oig-ink); background: var(--oig-white); border: 1px solid #aeb8c3; border-radius: 0;
  padding: .67rem .79rem;
}
.search-form input { height: 100%; }
.button, .search-submit, .comment-form input[type="submit"] {
  align-items: center; background: var(--oig-ink); border: 1px solid var(--oig-ink); color: var(--oig-white);
  display: inline-flex; justify-content: center; min-height: 3rem; padding: .75rem 1.2rem;
  font-size: .92rem; font-weight: 650; line-height: 1.3; text-decoration: none;
}
.button:hover, .search-submit:hover, .comment-form input[type="submit"]:hover { background: #2a4663; border-color: #2a4663; }
.text-link { width: fit-content; color: var(--oig-ink); font-weight: 650; font-size: .95rem; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-color: var(--oig-gold-deep); }
.eyebrow { color: var(--oig-gold-deep); font-size: .77rem; font-weight: 700; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; margin: 0; }

.hero { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-top: clamp(2.5rem, 4.5vw, 4.25rem); }
.hero-copy { padding-bottom: 1.85rem; }
.hero h1 { font-size: clamp(3.75rem, 6.8vw, 6.55rem); letter-spacing: -.025em; line-height: .96; margin: 1.15rem 0 1.4rem; }
.hero h1 em { display: block; font-weight: 400; }
.hero h1.hero-article-title { font-size: clamp(3.25rem, 5.2vw, 5.2rem); line-height: .99; }
.hero-deck { max-width: 27rem; font-size: clamp(1.075rem, 1.35vw, 1.23rem); line-height: 1.62; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.45rem; margin-top: 1.65rem; }
.hero-art .home-image { --frame-ratio: 1.23; }
.hero-art .sunflowers { object-position: 50% 40%; }
.hero-art figcaption, .article-art figcaption, .feature-credit { line-height: 1.48; margin-top: .52rem; color: var(--oig-muted); font-size: .78rem; }
.hero-art figcaption a, .article-art figcaption a, .feature-credit a { color: inherit; }
.hero-art figcaption em { color: var(--oig-ink); }

.home-section { margin-top: clamp(3.4rem, 6vw, 6.1rem); }
.section-head { display: flex; align-items: end; gap: 1rem; margin-bottom: 1.35rem; padding-top: 1.35rem; border-top: 1px solid var(--oig-rule); }
.section-head h2, .editorial-feature h2 { font-size: clamp(2.5rem, 4.2vw, 4rem); letter-spacing: -.012em; }
.path-grid, .post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.path-card, .post-card { min-width: 0; }
.path-card { scroll-margin-top: 2rem; }
.post-card img { display: block; width: 100%; aspect-ratio: 1.72; object-fit: cover; background: var(--oig-wash); }
.home-image { --frame-ratio: 1.72; position: relative; width: 100%; overflow: hidden; aspect-ratio: var(--frame-ratio); background: var(--oig-wash); }
.home-image img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
/* Fill the window from the bounds of the painting inside a matted photograph. */
.home-image[data-cropped] img {
	position: absolute; left: 50%; top: var(--focus-y, 50%); height: auto; max-width: none;
	aspect-ratio: var(--source-ratio, 16 / 9);
	width: max(var(--fill-x), calc(var(--fill-y) / var(--frame-ratio)));
	transform: translate(var(--anchor-x, -50%), var(--anchor-y, -50%));
}
.path-card, .home-section .post-card, .editorial-feature { position: relative; }
.path-card h3 a::after, .home-section .post-card h3 a::after, .editorial-feature .text-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.path-card h3 a:focus-visible::after, .home-section .post-card h3 a:focus-visible::after, .editorial-feature .text-link:focus-visible::after { outline: 2px solid var(--oig-gold-deep); outline-offset: 3px; }
.path-card .portrait { object-position: 50% 38%; }
.path-card .letter { object-position: 50% 44%; }
.path-label, .post-card .eyebrow { margin: .95rem 0 .3rem; }
.path-card h3, .post-card h2, .post-card h3 { font-size: clamp(1.8rem, 2.8vw, 2.55rem); }
.path-card h3 a, .post-card h2 a, .post-card h3 a { text-decoration: none; }
.path-card h3 a:hover, .post-card h2 a:hover, .post-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--oig-gold-deep); text-decoration-thickness: 1px; }
.path-card p:not(.eyebrow), .post-card p:not(.eyebrow) { margin: .55rem 0 0; }
.post-card { padding-bottom: 1.05rem; border-bottom: 1px solid var(--oig-rule); }
.post-thumb { display: block; }
.post-thumb + h2, .post-thumb + h3 { margin-top: .75rem; }
.post-card h2:first-child, .post-card h3:first-child { margin-top: .2rem; }
.editorial-feature { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); }
.feature-art { min-height: 22rem; position: relative; overflow: hidden; }
.feature-art img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 54%; }
.feature-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: var(--oig-wash); padding: clamp(1.65rem, 4.4vw, 4.3rem); }
.feature-copy h2 { margin: .5rem 0 .55rem; }
.feature-copy > p:not(.eyebrow) { margin: .4rem 0 .95rem; max-width: 29rem; }
.feature-credit { grid-column: 1/-1; }
.home-page-content { margin-block: 3.5rem; }

.collection { padding-top: clamp(2.75rem, 6vw, 5.25rem); }
.collection-head { max-width: 49rem; margin-bottom: 2rem; }
.collection-head h1, .entry-head h1 { font-size: clamp(3rem, 6.2vw, 5.65rem); letter-spacing: -.015em; }
.collection-head .eyebrow { margin-bottom: .6rem; }
.collection-head p:not(.eyebrow) { margin-block: .65rem 0; }
.collection-head .search-form, .empty-view .search-form { margin-top: 1rem; max-width: 30rem; }
.empty-view p { max-width: 40rem; }
.pagination { margin-top: 2rem; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.page-numbers { display: inline-block; text-decoration: none; border: 1px solid var(--oig-rule); padding: .35rem .73rem; }
.page-numbers.current { color: var(--oig-white); background: var(--oig-ink); border-color: var(--oig-ink); }
.page-numbers.dots { border-color: transparent; }
.entry-head { width: min(51rem, calc(100% - var(--oig-gutter) * 2)); margin: clamp(2.75rem, 6vw, 5rem) auto 1.85rem; }
.entry-head .eyebrow { margin-bottom: .72rem; }
.entry-head .eyebrow a { color: inherit; text-decoration: none; }
.entry-head .eyebrow a:hover { text-decoration: underline; }
.entry-deck { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: .9rem 0 0; }
.entry-date { color: var(--oig-muted); font-size: .86rem; margin: .8rem 0 0; }
.article-art { width: min(64rem, calc(100% - var(--oig-gutter) * 2)); margin: 0 auto 2.1rem; }
.article-art img { display: block; width: auto; max-width: 100%; max-height: 44rem; margin-inline: auto; object-fit: contain; }
.article-art figcaption { text-align: center; }
.prose { font-size: 1.105rem; line-height: 1.75; overflow-wrap: anywhere; }
.prose h2 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 1.6em 0 .4em; }
.prose h3 { font-size: 2rem; margin: 1.45em 0 .4em; }
.prose img, .prose video, .prose iframe { max-width: 100%; }
.prose iframe { display: block; }
.prose .alignwide, .prose .alignfull, .prose .wp-block-embed { clear: both; }
.prose .alignwide, .prose .alignfull { position: relative; width: min(64rem, calc(100vw - var(--oig-gutter) * 2 - 1rem)); max-width: none; left: 50%; transform: translateX(-50%); }
.prose .alignleft { float: left; margin: .3rem 1.25rem .8rem 0; }
.prose .alignright { float: right; margin: .3rem 0 .8rem 1.25rem; }
.prose .aligncenter { margin-inline: auto; text-align: center; }
.prose::after { content: ""; display: block; clear: both; }
.prose blockquote { margin-inline: 0; border-left: 3px solid var(--oig-gold); padding-inline: 1.2rem 0; color: var(--oig-ink); }
.prose figcaption, .prose .wp-caption-text { color: var(--oig-muted); font-size: .83rem; }
.prose .wp-caption { max-width: 100%; }
.post-taxonomy { margin-block: 2.1rem 0; border-top: 1px solid var(--oig-rule); padding-top: 1rem; font-size: .92rem; }
.post-taxonomy a { display: inline-block; margin: .2rem .2rem .2rem 0; padding: .14rem .55rem; border: 1px solid var(--oig-rule); text-decoration: none; }
.post-taxonomy a:hover { border-color: var(--oig-gold-deep); }
.post-navigation { margin-top: 2.4rem; padding-block: 1rem; border-block: 1px solid var(--oig-rule); }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-navigation .nav-next { grid-column: 2; text-align: right; }
.post-navigation .nav-label { display: block; font-size: .8rem; color: var(--oig-muted); }
.comments-area { margin-top: 3rem; }
.comments-area h2, .comment-reply-title { font-family: var(--oig-title); font-size: 2.4rem; }
.comment-list { padding-left: 1.15rem; }
.comment-list .children { padding-left: 1.25rem; }
.comment-list .comment-body { margin-block: .95rem; }
.comment-form label:not([for="wp-comment-cookies-consent"]) { display: block; }

.site-footer { margin-top: clamp(3.5rem, 7vw, 6.5rem); border-top: 1px solid var(--oig-rule); }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.6rem 3rem; padding-block: 2.1rem; }
.footer-top p { margin: .65rem 0 0; color: var(--oig-muted); font-size: .92rem; max-width: 24rem; }
.footer-nav ul { flex-wrap: wrap; gap: .6rem 1.35rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 1.5rem; padding: 1.1rem 0 1.4rem; border-top: 1px solid var(--oig-rule); font-size: .86rem; color: var(--oig-muted); }
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.15rem; }
.art-credits { padding-top: 1.35rem; padding-bottom: .9rem; border-top: 1px solid var(--oig-rule); scroll-margin-top: 2rem; }
.art-credits summary { cursor: pointer; width: fit-content; color: var(--oig-ink); font-weight: 650; }
.art-credits:target { background: var(--oig-wash); }
.art-credits ul { margin-block: .7rem .45rem; padding-left: 1.2rem; }
.art-credits li { color: var(--oig-muted); font-size: .85rem; margin: .25rem 0; }
.art-credits a { white-space: normal; }

@media (max-width: 64rem) {
  .masthead { gap: .95rem; }
  .main-nav > ul { gap: 1.25rem; }
  .hero { gap: 2.3rem; }
}
@media (max-width: 49rem) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; min-height: 4.25rem; }
  .header-controls { grid-column: 2; grid-row: 1; }
  .masthead.is-enhanced .menu-toggle:not([hidden]) { display: grid; }
  .masthead.is-enhanced .main-nav[data-collapsed="true"] { display: none; }
  .brand, .masthead > .custom-logo-link { margin-block: .7rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
  .main-nav { grid-column: 1/-1; border-top: 1px solid var(--oig-rule); }
  .main-nav > ul { flex-wrap: wrap; justify-content: flex-start; gap: .08rem 1.2rem; padding-block: .3rem; }
  .main-nav .sub-menu { position: static; visibility: visible; opacity: 1; min-width: 0; max-width: 100%; padding: 0 0 .25rem .7rem; box-shadow: none; border: 0; }
  .main-nav .sub-menu a { font-size: .85rem; padding-block: .25rem; }
  .search-panel { top: 100%; }
  .hero { grid-template-columns: 1fr; gap: 1.65rem; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { margin-block: .65rem .82rem; font-size: clamp(3.7rem, 10.5vw, 5.6rem); }
  .hero-actions { margin-top: 1.2rem; }
  .hero-art .home-image { --frame-ratio: 1.33; }
  .path-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-feature { grid-template-columns: 1fr; }
  .feature-art { min-height: 0; aspect-ratio: 1.62; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 34rem) {
  .path-grid, .post-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .path-card { padding-bottom: .9rem; border-bottom: 1px solid var(--oig-rule); }
  .section-head { margin-bottom: 1rem; }
  .brand-name { font-size: 1.7rem; }
  .custom-logo { max-width: min(12rem, 100%); }
  .hero-art .home-image { --frame-ratio: 1.16; }
  .prose .alignleft, .prose .alignright { max-width: 100%; float: none; margin-inline: auto; }
}
@media (max-width: 23rem) {
  .site-search > summary, .menu-toggle { width: 2.4rem; height: 2.4rem; }
  .masthead { column-gap: .5rem; }
  .brand-name { font-size: 1.5rem; }
  .brand-mark { width: 1.8rem; height: 1.8rem; }
  .hero h1 { font-size: 3.45rem; }
}
