/*
Theme Name: Sofía Colodrón - Photo
Theme URI: https://photo.sofiacolodron.com
Author: Ícaro Chaparro P.
Author URI: https://www.icarochaparrop.com
Description: Theme básico a medida para Sofía Colodrón Photo.
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: sofiacolodron-photo
*/

@font-face {
	font-family: "Suisse Intl";
	src: url("fonts/SuisseIntl-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: light;

	--color-white: #fff;
	--color-black: #111;
	--color-gray: #999;

	--font-family-base: "Suisse Intl", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	--font-size-caps: 14px;
	--font-size-base: 16px;
	--line-height-base: 1.5;

	--space-2xs: 4px;
	--space-xs: 6px;
	--space-s: 16px;
	--space-m: 24px;
	--space-l: 32px;
	--space-xl: 48px;
	--space-page: var( --space-m );

	--slide-duration: 0.6s;
	--filter-duration: 0.4s;
}

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

:focus,
:focus-visible {
	outline: none;
}

::selection {
	background: var( --color-gray );
	color: var( --color-white );
}

html {
	-webkit-text-size-adjust: 100%;
	background-color: var( --color-white );
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	padding: var( --space-page );
	font-family: var( --font-family-base );
	font-weight: 400;
	font-size: var( --font-size-base );
	line-height: var( --line-height-base );
	color: var( --color-black );
	background-color: var( --color-white );
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.site-header {
	display: flex;
	align-items: baseline;
	gap: var( --space-xl );
}

.site-header a:hover {
	text-decoration: none;
}

.main-navigation ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
}

.main-navigation li:not( :last-child )::after {
	content: ",\00a0";
}

.site-contact {
	margin-left: auto;
}

.site-contact::after {
	content: "\2197";
	margin-left: 2px;
	font-size: 0.6em;
	vertical-align: super;
}

.site-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding-top: var( --space-l );
}

.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var( --space-m );
	padding-top: var( --space-l );
}

.site-credit {
	color: var( --color-gray );
}

.site-credit a:hover {
	text-decoration: none;
	color: var( --color-black );
}

body.home,
body.single {
	height: 100vh;
	height: 100svh;
	overflow: hidden;
}

body.home {
	padding-bottom: 0;
}

.home .site-main {
	min-height: 0;
	padding-top: calc( var( --space-page ) * 2 );
	padding-bottom: calc( var( --space-page ) * 2 );
}

.single .site-main {
	min-height: 0;
	padding-top: var( --space-page );
}

.slider {
	position: relative;
	flex: 1;
	min-height: 0;
	cursor: pointer;
	user-select: none;
}

.slide {
	position: absolute;
	top: 0;
	left: 50%;
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	object-position: center center;
	transform: translateX( -50% );
	opacity: 0;
	pointer-events: none;
	-webkit-user-drag: none;
	transition: opacity var( --slide-duration ) ease;
}

.slide.is-active {
	opacity: 1;
}

.home .slide:nth-child( 4n + 2 ) {
	left: 0;
	transform: none;
	object-position: left center;
}

.home .slide:nth-child( 4n + 3 ) {
	left: auto;
	right: 0;
	transform: none;
	object-position: right center;
}

.project-meta {
	position: absolute;
	top: var( --space-page );
	left: 50%;
	display: flex;
	align-items: baseline;
	gap: var( --space-xs );
	transform: translateX( -50% );
	white-space: nowrap;
}

.project-title {
	font-size: inherit;
	font-weight: 400;
	line-height: inherit;
}

.project-category,
.project-counter {
	color: var( --color-gray );
}

.index {
	--index-indent: 40px;
	--index-line-height: 1.25;
	margin-left: calc( 50vw - var( --space-page ) );
	margin-top: calc( -1 * ( var( --space-l ) + var( --font-size-base ) * var( --line-height-base ) ) + var( --font-size-base ) * ( var( --line-height-base ) - var( --index-line-height ) ) / 2 );
	line-height: var( --index-line-height );
}

.index-filters,
.index-list {
	list-style: none;
}

.index-filters {
	margin-bottom: var( --space-s );
}

.index-filter {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	line-height: inherit;
	color: var( --color-gray );
	cursor: pointer;
}

.index-filter:hover,
.index-filter.is-active {
	color: var( --color-black );
}

.index-item {
	display: grid;
	grid-template-rows: 1fr;
	transition:
		grid-template-rows var( --filter-duration ) ease,
		opacity calc( var( --filter-duration ) * 1.5 ) ease calc( var( --filter-duration ) * 0.5 );
}

.index-list.is-instant .index-item {
	transition: none;
}

.index-item.is-hidden {
	grid-template-rows: 0fr;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity var( --filter-duration ) ease,
		grid-template-rows var( --filter-duration ) ease var( --filter-duration );
}

.index-link {
	justify-self: start;
	min-height: 0;
	transition: padding-left 0.2s ease;
}

.index-link:hover {
	text-decoration: none;
}

.index-image {
	position: fixed;
	top: 50%;
	left: var( --space-page );
	width: auto;
	height: 65vh;
	max-width: calc( 50vw - var( --space-page ) * 2 );
	object-fit: contain;
	object-position: left center;
	transform: translateY( -50% );
	opacity: 0;
	pointer-events: none;
	transition: opacity var( --slide-duration ) ease;
}

@media ( hover: hover ) {
	.index-item:hover .index-link {
		padding-left: var( --index-indent );
	}

	.index-item:hover .index-image {
		opacity: 1;
	}
}

.information {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var( --space-m );
}

.information-about {
	max-width: 680px;
	line-height: 1.3;
	text-wrap: pretty;
}

.information-about p + p {
	margin-top: 1.3em;
}

.information-label {
	color: var( --color-gray );
}

.information a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.information a:hover {
	color: var( --color-gray );
}

.information-image {
	margin-top: auto;
	width: 132px;
	padding: var( --space-2xs );
	border: 1px solid #ccc;
}

.information-image img {
	width: 100%;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	clip: auto;
}

@media ( max-width: 1119px ) {
	.single .site-main {
		padding-top: 0;
	}

	.single .slider {
		order: 1;
	}

	.single .site-footer {
		display: none;
	}

	.project-meta {
		order: 2;
		position: static;
		flex-wrap: wrap;
		padding-top: var( --space-page );
		transform: none;
		white-space: normal;
	}

	.project-counter {
		margin-left: auto;
	}
}

@media ( max-width: 800px ){
	:root {
		--space-page: 12px;
	}

	.category .site-footer {
		display: none;
	}

	.index {
		display: flex;
		flex-direction: column;
		flex: 1;
		margin-left: 0;
		margin-top: 0;
		line-height: var( --line-height-base );
	}

	.index-list {
		display: grid;
		grid-template-columns: repeat( 2, 1fr );
		column-gap: var( --space-page );
		row-gap: var( --space-l );
		align-items: start;
	}

	.index-item,
	.index-item.is-hidden,
	.index-list.is-instant .index-item {
		display: block;
		opacity: 1;
		transition: none;
	}

	.index-list .index-item.is-hidden {
		display: none;
	}

	.index-link,
	.index-item:hover .index-link {
		display: flex;
		flex-direction: column;
		gap: var( --space-xs );
		padding-left: 0;
		transition: none;
	}

	.index-item.is-wide {
		grid-column: 1 / -1;
	}

	.index-item.is-wide .index-image {
		width: 82%;
	}

	.index-image {
		order: -1;
		position: static;
		width: 100%;
		height: auto;
		max-width: none;
		transform: none;
		opacity: 1;
		pointer-events: auto;
		transition: none;
	}

	.index-filters {
		order: 2;
		position: sticky;
		bottom: 0;
		display: flex;
		flex-wrap: wrap;
		margin: auto calc( -1 * var( --space-page ) ) calc( -1 * var( --space-page ) );
		padding: var( --space-xl ) var( --space-page ) var( --space-page );
		background: linear-gradient( to top, var( --color-white ), transparent );
	}

	.index-filters li:not( :last-child )::after {
		content: ",\00a0";
		color: var( --color-gray );
	}

	.site-header {
		flex-wrap: wrap;
		gap: 0;
	}

	.site-title {
		flex-basis: 100%;
	}

	.main-navigation .menu-item-mobile-hidden {
		display: none;
	}

	.site-contact {
		margin-left: 0;
	}

	.main-navigation + .site-contact::before {
		content: ",\00a0";
	}

	.home .slide:nth-child( n ) {
		left: 50%;
		right: auto;
		transform: translateX( -50% );
		object-position: center center;
	}
}
