/*
Theme Name: Italo Morales
Theme URI: https://www.italomorales.com/
Description: Minimalist, responsive photography theme. Black frame, condensed type, grayscale photos that turn to color on hover. Rebuilt from the 2012 "Overnight Generation" theme for phones, tablets and desktops.
Author: Italo Morales
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: italomorales
*/

@font-face {
	font-family: 'Becker Cond';
	src: url('fonts/snv_becker_reg_cond-webfont.woff') format('woff'),
	     url('fonts/snv_becker_reg_cond-webfont.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--cond: 'Becker Cond', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #000;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 18px;
	letter-spacing: 1px;
	word-spacing: -1px;
}

/* Links: white on black, inverted on hover */
a {
	color: #fff;
	background: #000;
	text-decoration: none;
}
a:hover { background: #fff; color: #000; }
a:focus-visible { outline: 2px solid #888; outline-offset: 2px; }
a:has(> img), .thumb, .site-title a, .main-nav a, .card-title a, .buy-sticker, .site-footer a, .skip-link {
	background: transparent;
}
.site-title a:hover, .main-nav a:hover, .card-title a:hover, .site-footer a:hover { background: #fff; color: #000; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 10px; left: 10px; z-index: 100;
	background: #fff; color: #000; padding: 8px 12px;
}

/* Frame, header, menu */
.frame {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	border: 10px solid #000;
	border-bottom: 0;
}
.site-header {
	position: relative;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0 24px;
	min-height: 40px;
	padding: 0 10px;
	background: #000;
}
.site-title {
	margin: 0;
	font: normal 24px/40px var(--cond);
	text-transform: uppercase;
}
.site-title a { color: #fff; }

.main-nav {
	display: flex;
	align-items: center;
	font-family: var(--cond);
	font-size: 24px;
	text-transform: uppercase;
}
.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.main-nav li { margin: 0; }
.main-nav a {
	display: block;
	padding: 0 5px 0 10px;
	line-height: 40px;
	color: #fff;
}
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a { box-shadow: inset 0 -3px 0 #fff; }
.main-nav .sub-menu { display: none; }

.searchform { margin: 0 0 0 10px; }
.searchform input[type="search"] {
	width: 120px;
	height: 24px;
	margin: 0;
	padding: 0 6px;
	border: 0;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
	color: #000;
	font: normal 18px/24px var(--cond);
	letter-spacing: 1px;
	text-transform: uppercase;
}
.searchform input[type="search"]::placeholder { color: #555; opacity: 1; }

.menu-toggle {
	display: none;
	width: 52px;
	height: 52px;
	margin: 0 -10px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.menu-toggle:focus-visible { outline: 2px solid #888; outline-offset: -4px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1200px) {
	.site-header { min-height: 52px; }
	.site-title { line-height: 52px; }
	.menu-toggle { display: flex; }
	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		padding: 8px 20px 28px;
		background: #000;
	}
	.main-nav.is-open { display: flex; }
	.main-nav ul { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
	.main-nav a {
		display: flex;
		align-items: center;
		min-height: 56px;
		padding: 0;
		border-bottom: 1px solid #333;
		font-size: 32px;
		line-height: 1.1;
	}
	.main-nav .current-menu-item > a { box-shadow: none; text-decoration: underline; }
	.searchform { margin: 20px 0 0; }
	.searchform input[type="search"] { width: 100%; max-width: 320px; height: 44px; font-size: 22px; }
	body.menu-open .buy-sticker { display: none; }
}

/* Content area */
.content {
	flex: 1 0 auto;
	width: 100%;
	padding: 30px 10px;
}
.content--single, .content--page, .content--404 { max-width: 940px; }

.page-title, .entry-title {
	margin: 0 0 10px;
	border-bottom: 1px solid #000;
	font: normal 24px/1.2 var(--cond);
	text-transform: uppercase;
}
.page-title span, .entry-title span {
	display: inline-block;
	padding: 2px 10px;
	background: #000;
	color: #fff;
}
.page-title { margin-bottom: 30px; }
.meta { margin-top: 6px; }

/* Post cards (home, archives, search): masonry columns */
.cards { column-count: 4; column-gap: 30px; }
@media (max-width: 1280px) { .cards { column-count: 3; } }
@media (max-width: 899px)  { .cards { column-count: 2; } }
@media (max-width: 599px)  { .cards { column-count: 1; } }

.card {
	display: inline-block;
	width: 100%;
	margin: 0 0 30px;
	vertical-align: top;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
}
.card-title { padding: 2px 6px; background: #000; }
.card-title h2 {
	margin: 0;
	font: normal 24px/28px var(--cond);
	text-align: center;
	text-transform: uppercase;
}
.card-title a { color: #fff; }
.card .entry { margin-top: 10px; }
.card .thumb { display: block; }
.card img {
	display: block;
	width: 100%;
	height: auto;
	filter: grayscale(1);
	transition: filter 0.2s;
}
.card .thumb:hover img, .card .thumb:focus-visible img { filter: none; }
/* Touch screens have no hover, so show color */
@media (hover: none) { .card img { filter: none; } }
@media (prefers-reduced-motion: reduce) { .card img { transition: none; } }

/* Post and page content */
.entry > * + * { margin-top: 10px; }
.entry p { margin: 0; }
.entry p + p { margin-top: 10px; }
.entry img, .entry video, .entry iframe, .entry embed { max-width: 100%; }
.entry img { height: auto; }
.entry figure { margin: 0; }
.entry figcaption, .wp-caption-text { margin-top: 4px; font-size: 12px; line-height: 16px; }
.entry ul, .entry ol { margin: 0; padding-left: 1.4em; }
.wp-caption { max-width: 100%; }
.alignleft  { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 599px) {
	.alignleft, .alignright { float: none; margin: 0 0 10px; }
}
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}
.gallery-item { margin: 0; }
.gallery-icon img { display: block; width: 100%; height: auto; }
.postmetadata { margin-top: 20px; }

/* Comments */
.comments-area { margin-top: 40px; }
.comments-area ol { padding-left: 0; list-style: none; }
.comments-area li { margin-bottom: 20px; }
.comments-area input[type="text"], .comments-area input[type="email"], .comments-area input[type="url"], .comments-area textarea {
	width: 100%; max-width: 600px; border: 1px solid #000; border-radius: 0; padding: 6px; font: inherit;
}
.comments-area input[type="submit"] {
	border: 0; border-radius: 0; padding: 8px 14px;
	background: #000; color: #fff; font: inherit; text-transform: uppercase; cursor: pointer;
}
.comments-area input[type="submit"]:hover { background: #fff; color: #000; outline: 1px solid #000; }

/* Footer bar and sticker */
.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 45px;
	padding: 0 20px;
	background: #000;
	color: #fff;
	font: normal 24px/1 var(--cond);
	text-transform: uppercase;
}
.site-footer a { color: #fff; padding: 4px 0; }

.buy-sticker {
	position: fixed;
	right: 20px;
	bottom: 65px;
	z-index: 20;
	display: block;
	width: 110px;
}
.buy-sticker:hover { background: transparent; }
.buy-sticker img { display: block; width: 100%; height: auto; }
@media (max-width: 599px) {
	.buy-sticker { width: 76px; right: 12px; bottom: 57px; }
}
