/*
Theme Name: Oxigen
Theme URI: https://stillwaterit.ca/oxigen
Author: Ersion Meculi
Author URI: https://stillwaterit.ca
Description: A classic broadsheet newspaper look for digital media sites. Black ink on white paper, a Didone masthead, ruled columns, a full-width lead photograph and serif body text. Built as a block theme so every part can be rearranged in the Site Editor.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oxigen
Update URI: https://stillwaterit.ca/oxigen
Tags: news, blog, three-columns, one-column, wide-blocks, block-patterns, block-styles, editor-style, full-site-editing, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
:root {
	--oxigen-rule: 1px solid var(--wp--preset--color--rule, #1a1a1a);
	--oxigen-rule-double: 3px double var(--wp--preset--color--rule, #1a1a1a);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-feature-settings: "kern", "liga";
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}

.oxigen-caps,
.oxigen-dateline,
.oxigen-kicker,
.oxigen-byline,
.oxigen-hero-caption {
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

/* Separators: always full width, one hairline. */
.wp-block-separator {
	border: 0;
	border-bottom: var(--oxigen-rule);
	opacity: 1;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}
.wp-block-separator.is-style-oxigen-double {
	border-bottom: var(--oxigen-rule-double);
}
.wp-block-separator.is-style-dots {
	border: 0;
	text-align: center;
}

/* ------------------------------------------------------------------
   Masthead
   ------------------------------------------------------------------ */
.oxigen-masthead {
	padding-top: var(--wp--preset--spacing--30);
}
.oxigen-dateline {
	border-top: var(--oxigen-rule);
	border-bottom: var(--oxigen-rule);
	padding: 0.45rem 0;
}
.oxigen-dateline p {
	margin: 0;
}
.oxigen-masthead .wp-block-site-title {
	margin: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--20);
	line-height: 0.95;
}
.oxigen-masthead .wp-block-site-title a {
	text-decoration: none;
}
.oxigen-masthead .wp-block-site-title a:hover {
	text-decoration: none;
	color: var(--wp--preset--color--ink-soft);
}
.oxigen-masthead .wp-block-site-tagline {
	margin: 0 0 var(--wp--preset--spacing--30);
}
.oxigen-nav {
	border-top: var(--oxigen-rule);
	border-bottom: var(--oxigen-rule-double);
	padding: 0.6rem 0;
}
.oxigen-nav .wp-block-navigation-item__content {
	text-decoration: none;
}
.oxigen-nav .wp-block-navigation-item__content:hover,
.oxigen-nav .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* ------------------------------------------------------------------
   Section headings and column rules
   ------------------------------------------------------------------ */
.oxigen-section-title,
.is-style-oxigen-section {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-bottom: var(--oxigen-rule);
	padding-bottom: 0.35em;
	margin-bottom: 0.7em;
}
.oxigen-section-title a,
.wp-block-post-title a {
	text-decoration: none;
}
.oxigen-section-title a:hover,
.wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Query grids: three ruled columns on desktop, two on tablet, one on phone. */
.oxigen-grid .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}
.oxigen-grid .wp-block-post > * + * {
	margin-top: 0.6rem;
}
@media (min-width: 64rem) {
	.oxigen-grid .wp-block-post-template.is-layout-grid > .wp-block-post {
		border-left: var(--oxigen-rule);
		padding-left: var(--wp--preset--spacing--40);
	}
	.oxigen-grid .wp-block-post-template.is-layout-grid > .wp-block-post:nth-child(3n + 1) {
		border-left: 0;
		padding-left: 0;
	}
}
@media (max-width: 63.99rem) {
	.oxigen-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 40rem) {
	.oxigen-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.oxigen-grid .wp-block-post-template.is-layout-grid > .wp-block-post + .wp-block-post {
		border-top: var(--oxigen-rule);
		padding-top: var(--wp--preset--spacing--30);
	}
}

/* Ruled columns (block style on core/columns). */
.wp-block-columns.is-style-oxigen-ruled > .wp-block-column + .wp-block-column {
	border-left: var(--oxigen-rule);
	padding-left: var(--wp--preset--spacing--40);
}
@media (max-width: 781px) {
	.wp-block-columns.is-style-oxigen-ruled:not(.is-not-stacked-on-mobile) > .wp-block-column + .wp-block-column {
		border-left: 0;
		padding-left: 0;
		border-top: var(--oxigen-rule);
		padding-top: var(--wp--preset--spacing--30);
	}
}

/* Boxed group. */
.wp-block-group.is-style-oxigen-boxed {
	border: var(--oxigen-rule);
	padding: var(--wp--preset--spacing--40);
}

/* ------------------------------------------------------------------
   Excerpts, meta, images
   ------------------------------------------------------------------ */
.wp-block-post-excerpt__excerpt {
	hyphens: auto;
	-webkit-hyphens: auto;
}
.wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: 0.4em;
	font-size: 0.72em;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}
.wp-block-post-date,
.wp-block-post-terms,
.wp-block-post-author-name,
.wp-block-post-author__name {
	text-transform: uppercase;
	letter-spacing: 0.12em;
}
.wp-block-post-terms a,
.wp-block-post-date a,
.wp-block-post-author-name a {
	text-decoration: none;
}
.wp-block-post-featured-image img {
	display: block;
	filter: grayscale(100%) contrast(1.05);
}
.wp-block-post-featured-image:hover img {
	filter: grayscale(0%);
}
.oxigen-hero .wp-block-post-featured-image {
	margin-bottom: 0.5rem;
}
.oxigen-hero-caption {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border-bottom: var(--oxigen-rule);
	padding-bottom: 0.5rem;
}
.oxigen-hero-caption .wp-block-post-title {
	letter-spacing: 0.12em;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	margin: 0;
}
.oxigen-lower .wp-block-post-featured-image {
	margin: 0.9rem 0;
}
.oxigen-lower .wp-block-post > * + * {
	margin-top: 0.6rem;
}
.oxigen-lead-text {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
}

/* ------------------------------------------------------------------
   Article
   ------------------------------------------------------------------ */
.oxigen-article-head {
	text-align: center;
	margin-bottom: var(--wp--preset--spacing--40);
}
.oxigen-article-head .wp-block-post-title {
	margin: 0.4em 0 0.3em;
	line-height: 1.08;
}
.oxigen-byline {
	display: flex;
	justify-content: center;
	gap: 0.5rem 1.25rem;
	flex-wrap: wrap;
	border-top: var(--oxigen-rule);
	border-bottom: var(--oxigen-rule);
	padding: 0.55rem 0;
	margin-top: var(--wp--preset--spacing--30);
}
.oxigen-byline > * {
	margin: 0;
}
.oxigen-article-body > p:first-of-type::first-letter {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: 4.4em;
	float: left;
	line-height: 0.78;
	padding: 0.1em 0.12em 0 0;
}
.wp-block-post-content.is-style-oxigen-two-columns {
	column-count: 2;
	column-gap: var(--wp--preset--spacing--50);
	column-rule: var(--oxigen-rule);
}
.wp-block-post-content.is-style-oxigen-two-columns > * {
	break-inside: avoid;
}
@media (max-width: 44rem) {
	.wp-block-post-content.is-style-oxigen-two-columns {
		column-count: 1;
	}
}
.wp-block-post-content > p {
	hyphens: auto;
	-webkit-hyphens: auto;
}
.wp-block-pullquote {
	border-top: var(--oxigen-rule);
	border-bottom: var(--oxigen-rule);
	padding: var(--wp--preset--spacing--30) 0;
	margin: var(--wp--preset--spacing--40) 0;
}
.wp-block-pullquote blockquote p {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
	margin: 0;
}
.wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--rule);
	padding-left: var(--wp--preset--spacing--30);
	font-style: italic;
}
.oxigen-post-nav {
	border-top: var(--oxigen-rule);
	border-bottom: var(--oxigen-rule);
	padding: var(--wp--preset--spacing--30) 0;
}
.oxigen-post-nav .wp-block-post-navigation-link a {
	text-decoration: none;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}
.oxigen-post-nav .post-navigation-link__label {
	display: block;
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 0.2em;
}
.oxigen-post-nav .wp-block-post-navigation-link a:hover {
	text-decoration: underline;
}

/* Comments */
.wp-block-comments .wp-block-comment-author-name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}
.wp-block-comments .wp-block-comment-date,
.wp-block-comments .wp-block-comment-edit-link,
.wp-block-comments .wp-block-comment-reply-link {
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea,
.wp-block-search__input {
	border: var(--oxigen-rule);
	border-radius: 0;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	padding: 0.5rem 0.7rem;
}
.wp-block-post-comments-form input[type="submit"],
.wp-block-search__button,
.wp-element-button,
.wp-block-button__link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	padding: 0.7rem 1.1rem;
	cursor: pointer;
}
.wp-block-post-comments-form input[type="submit"]:hover,
.wp-block-search__button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* Pagination */
.wp-block-query-pagination {
	border-top: var(--oxigen-rule);
	padding-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.wp-block-query-pagination a {
	text-decoration: none;
}
.wp-block-query-pagination a:hover {
	text-decoration: underline;
}
.wp-block-query-pagination-numbers .current {
	font-weight: 700;
	border-bottom: 2px solid currentColor;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.oxigen-footer {
	border-top: var(--oxigen-rule-double);
	margin-top: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--50);
}
.oxigen-footer .wp-block-site-title {
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: 0.1em;
	margin: 0;
}
.oxigen-footer .wp-block-site-title a {
	text-decoration: none;
}
.oxigen-footer p {
	margin: 0;
}
.oxigen-footer .wp-block-navigation-item__content {
	text-decoration: none;
}
.oxigen-footer .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

/* Print: drop the chrome, keep the paper. */
@media print {
	.oxigen-nav,
	.wp-block-post-comments-form,
	.wp-block-query-pagination {
		display: none;
	}
}

/* Category kicker: the uppercase ruled label above a headline. */
.wp-block-post-terms.oxigen-kicker {
	display: block;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	border-bottom: var(--oxigen-rule);
	padding-bottom: 0.4em;
	margin-bottom: 0.9em;
}
.wp-block-post-terms.oxigen-kicker a {
	text-decoration: none;
}
.oxigen-lead-row .wp-block-post-title {
	line-height: 1.1;
	margin-bottom: 0.5em;
}

/* Footer tagline sits in the small-caps line. */
.oxigen-footer .wp-block-site-tagline {
	font-size: var(--wp--preset--font-size--x-small);
	margin: 0;
}

/* A pinned (sticky) story is prepended to the lead row and the hero query;
   keep those sections at three items and one item respectively. */
.oxigen-lead-row .wp-block-post-template > .wp-block-post:nth-child(n + 4),
.oxigen-hero .wp-block-post-template > .wp-block-post:nth-child(n + 2) {
	display: none;
}

/* Footer social links (icons render only once a URL is set in the Site Editor). */
.oxigen-footer .oxigen-social {
	gap: 0.6rem;
	margin: 0 0 0 1.5rem;
}
.oxigen-footer .oxigen-social:empty {
	display: none;
}

/* Masthead: balanced lines if the name has to wrap (no-JS fallback; masthead.js keeps it on one line). */
.oxigen-masthead .wp-block-site-title {
	text-wrap: balance;
	overflow-wrap: normal;
}
