/*
Theme Name: Kathy Hinde
Theme URI: kathyhinde.co.uk
Author: Ed Holroyd
Description: Bespoke theme
Version: 1.0.0
*/

/* Import Fonts & Normaize
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500&family=Fira+Sans:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400;1,500&display=swap');
@import url('normalize.css');

/* Global Styles & Custom Properties
   ========================================================================== */
   
html {
	min-height: 100%;
}
   
:root {
	font-family: "Fira Code";
	font-size: calc(30vw / 19.2);
		
	--minor-second: calc(16/15);
	--major-second: calc(9/8);
	--minor-third: calc(6/5);
	--major-third: calc(5/4);
	--fourth: calc(4/3);
	--aug-fourth-dim-fifth: 1.414; /* square root of two */
	--fifth: calc(3/2);
	--minor-sixth: calc(8/5);
	--major-sixth: calc(5/3);
	--minor-seventh: calc(16/9);
	--major-seventh: calc(15/8);
	
	--column-count: 9;
	--column-margin: calc(1rem * var(--fourth));
	--grid-width: calc((3 * 17rem) + (2 * var(--column-margin)));
	--single-column-width: calc((var(--grid-width) - (var(--column-count) - 1) * var(--column-margin))/var(--column-count));
	
	--list-column-count: 3;
	
	--centred-blank-columns: 2;
	--centred-start-column: calc(var(--centred-blank-columns)/2 + 1);
	--centred-padding: 1rem;
	
	--header-image-height: calc(var(--grid-width)/161 * 42);
	
	--default-colour: rgba(0, 0, 0, 0.8);
	--lighter-colour: rgba(0, 0, 0, 0.6);
	--lightest-colour: rgba(0, 0, 0, 0.1);
	--alternate-colour: rgba(255, 46, 5, 0.8);
	
	--wp--style--block-gap: var(--column-margin);
	--gallery-block--gutter-size: 1rem;
	
	color: var(--default-colour);
}

@media only screen and (min-width: 1880px) {
	:root {
		font-size: 30px;
	}
}

@media only screen and (max-width: 1440px) {
	:root {
		font-size: 20px;
	}
}

@media only screen and (max-width: 1090px) {
	:root {
		--column-count: 6;
		--grid-width: calc((2 * 17rem) + (2 * var(--column-margin)));
		--centred-blank-columns: 0;
		--centred-padding: 0;
		--list-column-count: 2;
	}
}

@media only screen and (max-width: 768px) {
	:root {
		--grid-width: 90vw;
	}
}

@media only screen and (max-width: 600px) {
	:root {
		--list-column-count: 1;
	}
}

body {
	line-height: 1rem;
	background-color: rgb(255, 255, 255);
	min-height: 100%;
	background-repeat: no-repeat;
}

h1, h2, h3, h4, h5, h6, header li, footer li, footer p {
	font-family: "Fira Sans";
}

p, dl, h1, h2, h3, h4, h5, h6, ol, ul, pre, figure, date {
	margin: 0 0 1rem;
	font-size: calc(1rem / var(--fifth));
	line-height: 1rem;
}

q {
  quotes: "\201C""\201D""\2018""\2019";
}

blockquote {
	margin: 0 0 1rem;
	padding: 1rem 3rem;
	quotes: "\201C""\201D""\2018""\2019";
	font-style: italic;
	font-family: "Fira Sans";
	font-size: calc(1rem / var(--fifth));
	font-weight: 400;
}

blockquote p {
	margin: 0;
	font-style: italic;
	position: relative;
}

blockquote p::before,
blockquote p::after {
	content: open-quote;
	font-size: 4rem;
	line-height: 4rem;
	position: absolute;
	font-weight: 300;
	color: rgba(0, 0, 0, 0.2);
}

blockquote p::before {
	top: -0.7rem;
	left: -3rem;
}

blockquote p::after {
	content: close-quote;
	bottom: -3rem;
	right: -1.7rem;
}

blockquote cite {
	display: block;
	text-align: right;
	padding: 1rem 4rem 0;
	font-style: normal;
}

blockquote cite::before {
	content: '\2014';
}

figcaption {
	font-style: italic;
	text-align: center;
	font-weight: 300;
	font-family: "Fira Sans";
}

a {
	text-decoration: none;
	color: var(--alternate-colour);
}

a:hover {
	color: var(--default-colour);
}

header a,
footer a,
a h1,
h1 a,
a h2,
a h3,
a p {
	color: var(--default-colour);
}

header a:hover,
footer a:hover,
a:hover h1,
h1 a:hover,
a:hover h2,
a:hover h3,
a:hover p {
	color: var(--alternate-colour);
}

h1 {
	font-size: calc(1rem / var(--major-third));
	line-height: 1rem;
	text-transform: uppercase;
	font-weight: 500;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Header
   ========================================================================== */
   
header[role="banner"] {
	width: var(--grid-width);
	margin: .5rem auto;
	padding: 1rem 0 1rem;
	overflow: auto;
}

header[role="banner"] > div {
	display: grid;
	grid-template-columns: repeat(var(--column-count), 1fr);
	grid-gap: 1rem var(--column-margin);
}

header[role="banner"] h1 {
	float: left;
	margin: 0;
	font-size: calc(1rem / var(--major-third));
	line-height: 1.5rem;
	font-size: calc(1.5rem);
	grid-column: span 2;
	font-family: "Fira Code";
	font-weight: normal;
	text-indent: -2px;
}

header[role="banner"] h1 + span {
	display: none;
}

header[role="banner"] nav {
	grid-column: span calc(var(--column-count) - 2);
}

header[role="banner"] nav ul {
	margin: 0;
	padding: 0;
	text-align: right;
}

header[role="banner"] nav ul li {
	display: inline-block;
	margin: .25rem 0 .25rem var(--column-margin);
	font-size: calc(1rem / var(--fifth));
	font-weight: normal;
}

@media only screen and (max-width: 1090px) {
	header[role="banner"] {
		margin: 0 auto;
		padding: 1rem 0;
	}
	
	header[role="banner"] h1 {
		grid-column: span calc(var(--column-count) - 1);
	}
	
	header[role="banner"] nav {
		grid-column: span var(--column-count);
	}
	
	header[role="banner"] nav ul {
		text-align: left;
	}
	
	header[role="banner"] nav ul li {
		margin: 0 1rem .5rem 0;
	}
}

@media only screen and (max-width: 768px) {
	header[role="banner"] h1 + span {
		display: block;
		grid-column: span 1;
		text-align: right;
		padding: .25rem 0;
	}
	
	header[role="banner"] h1 + span a svg {
		width: 1rem;
		height: 1rem;
	}
	
	header[role="banner"] nav {
		display: none;
	}
	
	header[role="banner"] nav.active {
		display: block;
		margin-bottom: .5rem;
	}
	
	header[role="banner"] nav ul li,
	header[role="banner"] nav ul li a {
		display: block;
		text-align: center;
		margin: 0;
	}
	
	header[role="banner"] nav ul li a {
		padding: calc(.25rem - 1px) 0 .25rem;
		border-top: 1px solid var(--default-colour);
	}
	
	header[role="banner"] nav ul li:last-child a {
		padding: calc(.25rem - 1px) 0 calc(.25rem - 1px);
		border-bottom: 1px solid var(--default-colour);
	}
}

header[role="banner"] nav ul li.current-menu-item a,
header[role="banner"] nav ul li.current-menu-parent a,
header[role="banner"] nav ul li.current_page_item a,
header[role="banner"] nav ul li.current-post-parent a,
.single-post header[role="banner"] nav ul li.current_page_parent a,
header[role="banner"] nav ul li.current-post-ancestor a,
.single-kh_work header[role="banner"] nav ul li.menu-item-object-kh_work a,
.single-kh_event header[role="banner"] nav ul li.menu-item-object-kh_event a {
	color: var(--alternate-colour);
}


/* Main
   ========================================================================== */
   
main {
	margin: 0 auto 1rem;
	width: var(--grid-width);
}

section {
	display: grid;
	grid-template-columns: repeat(var(--column-count), 1fr);
	grid-gap: 1rem var(--column-margin);
}	
  
article {
	grid-column: span calc(var(--column-count)/var(--list-column-count));
}

.home article a {
	display: block;
}

.home article p a {
	display: inline;
}

article h3 {
	font-weight: 500;
	text-align: center;
	padding: .5rem 0 0;
	line-height: 1rem;
	margin: 0 0 .5rem;
	text-transform: uppercase;
	font-size: calc(1rem * 2/3);
}

article.kh_event h3 {
	margin-bottom: 1rem;
}

article a + p {
	font-size: calc(1rem / var(--major-sixth));
	margin-bottom: .5rem;
}

article.post a + date + p {
	font-size: calc(1rem / var(--major-sixth));
	margin-bottom: 1rem;
}

section>h1 {
	grid-column: 1 / span var(--column-count);
	text-align: center;
	font-size: 1.5rem;
	line-height: 1.5rem;
	text-transform: none;
	font-weight: 500;
}

section>h1.in-menu {
	display: none;
}

@media only screen and (max-width: 768px) {
	section>h1 {
		font-size: 1rem;
		line-height: 1rem;
		margin-bottom: .5rem;
	}
	
	section>h1.in-menu {
		display: none;
	}
}

section nav {
	grid-column: 1 / span var(--column-count);
	text-align: center;
	margin: 2rem 0 0;
}

section nav ul {
	margin: 0;
	padding: 0;
}

section nav li a,
section nav li a:hover,
section nav li.active a,
section nav li.disabled {
    color: var(--default-colour);
	text-decoration:none;
}
 
section nav li {
    display: inline;
	margin: 0 1px;
}
 
section nav li a,
section nav li a:hover,
section nav li.active a,
section nav li.disabled {
    background-color: var(--lightest-colour);
    cursor: pointer;
    padding: .5rem;
	line-height: 1rem;
}
 
section nav li a:hover,
section nav li.active a {
    background-color: var(--default-colour);
	color: #fff;
}

.blog .post date,
.archive .post date {
	display: block;
	text-align: center;
	font-size: calc(1rem / var(--major-sixth));
	margin: 0 0 .5rem;
}

aside {
	grid-column: 1 / span var(--column-count);
	margin-top: 2rem;
	text-align: center;
}

/* Single & Page
   ========================================================================== */

.single section>article:first-child,
.page section>article:first-child {
	grid-column: 1 / span var(--column-count);
	display: grid;
	grid-template-columns: repeat(var(--column-count), 1fr);
	grid-gap: 0 var(--column-margin);
}

.single section>article:first-child > figure:first-child,
.single section>article:first-child > picture:first-child,
.page section>article:first-child > figure:first-child,
.page section>article:first-child > picture:first-child {
	overflow: hidden;
	grid-column: 1 / span var(--column-count);
	height: var(--header-image-height);
	margin-bottom: 1rem;
}

@media only screen and (max-width: 600px) {
	.single section>article:first-child > figure:first-child,
	.single section>article:first-child > picture:first-child,
	.page section>article:first-child > figure:first-child,
	.page section>article:first-child > picture:first-child {
		height: auto;
	}
}

.single section>article:first-child figure:first-child img,
.page section>article:first-child figure:first-child img,
.single section>article:first-child picture:first-child img,
.page section>article:first-child picture:first-child img {
	width: 100%;
	position: relative;
}

.single section>article:first-child figure:first-child.middle img,
.page section>article:first-child figure:first-child.middle img,
.single section>article:first-child picture:first-child.middle img,
.page section>article:first-child picture:first-child.middle img {
	top: 50%;
	-ms-transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
	-o-transform: translateY(-50%);
	transform: translateY(-50%);
}

.single section>article:first-child figure:first-child.bottom img,
.page section>article:first-child figure:first-child.bottom img,
.single section>article:first-child picture:first-child.bottom img,
.page section>article:first-child picture:first-child.bottom img {
	top: 100%;
	-ms-transform: translateY(-100%);
	-webkit-transform: translateY(-100%);
	-moz-transform: translateY(-100%);
	-o-transform: translateY(-100%);
	transform: translateY(-100%);
}

.single section>article:first-child>h1,
.single section>article:first-child>date,
.page section>article:first-child>h1 {
	text-align: left;
	margin-bottom: 1rem;
	text-transform: none;
	background: rgba(255, 255, 255, 1);
	padding: 0 var(--centred-padding);
	grid-column: var(--centred-start-column) / span calc(var(--column-count) - var(--centred-blank-columns));
}

.page section>article:first-child>h1.in-menu {
	display: none;
}

@media only screen and (max-width: 768px) {
	.page section>article:first-child>h1.in-menu {
		display: none;
	}
}

.single section>article:first-child>h1,
.page section>article:first-child>h1 {
	grid-column: var(--centred-start-column) / span calc(var(--column-count) - var(--centred-blank-columns));
	font-size: calc(2rem / var(--fourth));
	line-height: 2rem;
}

.single section>article:first-child>div,
.page section>article:first-child>div,
p.no-results {
	text-align: left;
	font-size: calc(1rem / var(--fifth));
	line-height: 1rem;
	margin-bottom: 1rem;
	padding: 0 var(--centred-padding);
	grid-column: var(--centred-start-column) / span calc(var(--column-count) - var(--centred-blank-columns));
}

p.no-results {
	text-align: center;
	grid-column: 3 / span calc(var(--column-count) - 4);
}

/* Block Overrides
   ========================================================================== */

article .wp-block-columns {
	margin-bottom: 0;
}

article .wp-block-image {
	margin-bottom: 1rem;
}

article .wp-block-image .alignleft {
	margin: 1rem 1rem 1rem 0
}

article .wp-block-image .alignright {
	margin: 1rem 0 1rem 1rem;
}

article .wp-block-embed {
	margin-bottom: 1rem;
}

article .wp-block-embed iframe {
	width: 100%;
}

/* Footer
   ========================================================================== */
   
footer {
	clear: both;
	width: var(--grid-width);
	margin: 0 auto;
	padding: 0 0 1rem;
	padding: 3rem 0 1rem;
}

footer p {
	float: right;
	text-align: right;
	font-size: calc(1rem / var(--fifth));
}

footer nav ul {
	float: left;
	margin: 0;
	padding: 0;
}

footer nav ul li {
	display: inline-block;
	margin: 0 var(--column-margin) 0 0;
	font-size: calc(1rem / var(--fifth));
}

@media only screen and (max-width: 1090px) {
	footer nav ul li {
		margin: 0 1rem 0 0;
	}
}