/*
Theme Name: Study the Great Books
Author: Tony Scialdone of Straight Street Design
Author URI: https://straightstreetdesign.com/
Description: a custom theme created specifically for Study the Great Books
*/

/* CSS Reset */
* { position: relative; box-sizing: border-box;	background-clip: padding-box; max-width: 100%; line-height: calc(1em + 0.5rem); hyphens: none; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; overscroll-behavior: contain; }

/* Design Variables -------------------------------------------------------------------------------------------- */
:root {
	line-sizing: normal; 
	text-spacing: trim-start allow-end trim-adjacent ideograph-alpha ideograph-numeric;

	--dark:			#222;
	--blue:			#6479A7;
	--light:		hsl(0, 0%, 5%);
	--gold:			#DCC8A8;
	--inner-width:	min(800px, 100% - 2rem);
	--hover:		all .2s ease-in-out;
	--scale:		scale(1.25);
}

@font-face {
  font-family: 'Zilla Slab';
  src: url('/wp-content/themes/stgb/zillaslab-bold.woff2') format('woff2'),
       url('/wp-content/themes/stgb/zillaslab-bold.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}


html {
	-moz-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
	/* font adjust is now available */
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { min-height: 100px; background: #868E98; background-color: var(--blue); border-radius: 10px; }

body { 
	margin: unset;
	background-color: #fff;
	font: normal 1rem/1.56 'Open Sans', sans-serif;
	color: #222;
	hanging-punctuation: first last;
	text-rendering: optimizeSpeed;
	overflow-x: hidden;
	overflow-y: scroll;
	scroll-behavior: smooth;
}

.menu {
	list-style-type: none;
	display: flex;
	justify-content: center; 
	align-items: center; 
	flex-wrap: wrap;
	gap: 2rem;
	margin: 0;
	padding: .5rem;
	background-color: #000;
}

.menu li {
	margin: 0;
	padding: 0;
}

.menu a {
	color: #fff;
}

.menu a[href*="substack"] {
	display: inline-block;
	top: -2px;
	height: 25px;
	width: 25px;
	background-image: url(/wp-content/themes/stgb/images/ss.svg);
	background-repeat: no-repeat;
	font-size: 0;
	color: var(--dark);
}

li:has(a[href*="cart"]) { right: 14px; }

.menu a[href*="cart"] {
	display: inline-block;
	top: -5px;
	height: 25px;
	width: 25px;
	background-image: url(/wp-content/themes/stgb/images/cart.svg);
	background-repeat: no-repeat;
	font-size: 0;
	color: #fff;
}

.wp-block-woocommerce-cart li.wc-block-grid__product {
	display: flex; 
	flex-direction: column;
}

.wp-block-woocommerce-cart li.wc-block-grid__product .price {
	margin-bottom: 1rem;
	min-height: 1rem;
}

main { 
	padding: 0;
	width: 100%;
}

.hero {
	padding: 5% 2rem; 
	background-image: url(/wp-content/uploads/authors-right.png);
	background-repeat: no-repeat;
	background-position: calc(100% - 200px) top;
	text-wrap: balance;
	background-color: var(--dark);
	background-image: 
	  url(/wp-content/uploads/jupiter-1.png),
	  url(/wp-content/uploads/authors-right.png);
	background-repeat:
	  no-repeat,
	  repeat-y;
	background-size:
	  contain,
	  auto;
	animation: scrollBackground 120s linear infinite;
	box-shadow: 0 2px;
}

@keyframes scrollBackground {
  from {
    background-position: 
      left top,
      calc(100% - 2rem) 0;
  }
  to {
    background-position: 
      left top,
      calc(100% - 2rem) 100%;
  }
}

.hero figure {
	text-align: center; 
}

.hero figure img {
	display: block;
	margin: 0 auto; 
	width: 118px;
	height: auto;
}

.hero h1, .hero p {
	color: #fff; 
	text-align: center;
}

.gold {
	margin: 0; 
	background-color: var(--gold);
	font-size: 24px;
	border-top: 3px solid var(--dark);
}

h1, h1.has-large-font-size {
	font: normal 3rem/1.2 'Zilla Slab', serif;
	text-transform: uppercase;
}

h1::after, .hero-new h2::after {
	ontent: '';
	display: block;
	margin: 0 auto 9px;
	padding: 0;
	width: 150px;
	height: 1px;
	background-color: #fff; 
}

main.index h1 {
	text-align: center; display: none;
}

main h2, .woowrap h1 {
	margin: 0 0 1rem; 
	padding: 2rem 1rem;
	background-color: var(--dark);
	font: normal 2rem/1.2 'zilla slab', serif;
	color: #fff;
	text-align: center; 
	text-transform: uppercase;
	border-top: 7px solid var(--gold); 
	border-bottom: 7px solid var(--gold);
}

main h2:first-child, .woowrap h1 {
	margin-top: 0;
}

main h2:not(main.postid-197 h2) {
	padding: 1rem;
	background-color: var(--dark);
	color: var(--gold);
	border-top: 7px solid var(--gold);
	border-bottom: 7px solid var(--gold);
}

:where(#what, /* #curriculum, */ #commitments, .jacob, .susan) > div *:not(h2, #curriculum ul), .wp-block-video {
	margin-inline: auto;
	width: var(--inner-width);
}

.wp-block-separator {
	border-color: #aaa !important;
}

.inner {
	width: var(--inner-width);
}

.testimonial {
	margin: 3rem auto;
	width: var(--inner-width);
}

#hat h2 {
	margin: 0; 
	background: none; 
	color: var(--dark);
	border: 0;
}

main #video.wp-block-video.video,
main #video .wp-block-group__inner-container.is-layout-constrained.wp-block-group-is-layout-constrained {
	padding: 2rem 1rem 1rem !important;
	width: 100% !important;
	background-color: var(--dark) !important;
}

.fight, .fight p { 
	margin: 0 auto 1rem; 
	width: var(--inner-width);
	font-size: 1rem;
	font-family: 'zilla slab', serif;
	color: #fff;
	text-align: center; 
	text-transform: uppercase;
}

#curriculum h2 {
	margin-top: 0; 
}


#curriculum ul {
	display: flex; 
	flex-direction: column;
	margin-inline: auto; 
	width: fit-content;
}

#curriculum li {
	width: fit-content;
} 

.bio {
	margin-bottom: 2rem; 
}

.bio > div {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0;
	width: var(--inner-width);
}

.bio figure {
	margin: 0; 
	width: fit-content; max-width: 300px;
	text-align: right;
}

.bio img {
	display: block; 
	flex: 0 0 auto;
	margin: 0;
	width: 100%;
	height: auto;
}

.bio > div p {
	flex: 1 1 300px;
	margin: 0;
}



footer {
	background-color: var(--dark);
}

.copy {
		margin: 0;
		padding: 24px;
		font-size: 12px;
		color: #fff;
		text-align: center;
		text-transform: uppercase; 
}

.copy a {
	color: #fff !important;
	text-decoration: none;
}

#top {
	position: fixed; right: 40px; bottom: 120px; z-index: 999;
	display: none; 
	justify-content: center;
	align-items: center; 
	height: 40px; 
	width: 40px; 
	background-color: var(--blue);
	border-radius: 100%;
	transition: var(--hover);
	cursor: pointer;
}

#top:hover {
	transform: var(--scale);
}

#top.show { 
	display: flex; 
}

#top img {
	width: 22px;
}

/* END THEME LAYOUT STUFF -------------------------------------------------------------------------------------------- */

p, dl, ol, ul, address {
	margin: 0 0 24px;
	text-wrap: pretty;
	overflow-wrap: break-word;
}

article > * + * {
	margin-top: 2em;
}

dd, li { 
	margin: 0 0 8px 32px; 
}

/* Links without a class get default styling. */
a:not([class]) { 
	text-decoration: none; 
	cursor: pointer; 
}


caption, figcaption {
    text-wrap: balance;
}


iframe[src*="youtube"],
iframe[src*="vimeo"] {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

pre { white-space: pre-wrap; }
hr { border: .5px solid; }
blockquote:before, blockquote:after { content: none; }

blockquote, .wp-block-quote { 
	quotes: none; 
	margin-bottom: 2rem;
	padding: 1rem;
	border: 3px solid var(--gold);
	border-radius: 7px;
}

blockquote p:last-child, .wp-block-quote p:last-child {
	margin-bottom: 0;
}






/* Layout -------------------------------------------------------------------------------------------- */

.flex { 				display: flex; gap: 24px; }
.flex-row, .fr { 		flex-direction: row; }
.flex-column, .fc { 	flex-direction: column; }
.justify-center, .jc { 	justify-content: center; }
.justify-around, .ja { 	justify-content: space-around; }
.justify-between, .jb { justify-content: space-between; }
.justify-end, .je { 	justify-content: flex-end; }
.align-center, .ac { 	align-items: center; }
.align-start, .as { 	align-items: flex-start; }
.flex-wrap, .fw { 		flex-wrap: wrap; }



/* Tables -------------------------------------------------------------------------------------------- */

table {
	border-collapse: collapse;
	border-spacing: 0; }

		
:focus-visible {
	outline: 2px solid red;
  	outline-offset: 2px; 
}

:focus:not(:focus-visible) {
  outline: none;
}


/* Forms -------------------------------------------------------------------------------------------- */

label:has(required)::after {
	content: "(Required)";
	color: #ccc;
}

label:has(>textarea) { display:block; }

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

input,
textarea,
button {
  border: 1px solid gray;
}

textarea {
	min-height: 100px;
}

button {
	-webkit-appearance: none;
	padding: 0;
	min-width: 100px;	
	background: none;
	border: none;
	border-radius: 0;
	text-align: inherit;
	box-shadow: none;
	cursor: pointer;
}

.btn-wrap a, .btn-wrap button {
	padding: .5rem 1rem;
	background-color: var(--blue);
	font-weight: bold;
	font-size: .9rem;
	color: #fff;
	border-radius: 5px;
}

.frm_forms {
	margin: 0 auto;
	padding: 0 2rem;
	width: 600px; max-width: 100%; 
}

.form-field, .with_frm_style.frm_submit.frm_flex:has(button) {
	margin: 0 !important;
}

.frm_style_formidable-style.with_frm_style .frm_compact .frm_dropzone.dz-clickable .dz-message, .frm_style_formidable-style.with_frm_style input[type=submit], .frm_style_formidable-style.with_frm_style .frm_submit input[type=button], .frm_style_formidable-style.with_frm_style .frm_submit button, .frm_form_submit_style, .frm_style_formidable-style.with_frm_style .frm-edit-page-btn { 
	background-color: var(--blue) !important; 
	border: 0 !important;
}

/* Content Layout Shift */
{
  content-visibility: auto; /* doesn't render stuff you can't see */
  contain-intrinsic-size: 1000px; 
}

/* Utility Classes -------------------------------------------------------------------------------------------- */

.red { color: #f00; }
.alignleft { float: left; margin: 0 24px 24px 0; }
.alignright { float: right; margin: 0 0 24px 24px; }
b, strong { font-weight: bold; }
i, em { font-style: italic; }
.center { text-align: center !important; }

[hidden], 
[type="hidden"], 
.visually-hidden,
[ria-hidden="true"] {
	border: 0;
	clip: rect(0 0 0 0); 
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap; 
	width: 1px;
}




@media (max-width: 750px) {
	.hero { background-image: none; }
	.hero h1 { font-size: 24px; }
	}
}

@media (max-width: 500px) {
	.menu { margin-top: 0; gap: 1rem !important; }
	.frm_forms { padding: 0 1rem; }
	:where(#what, #curriculum, #commitments, #about) > div * { padding: 0 1rem; width: 100%; }
	#curriculum ul { margin: 0 1rem; width: fit-content; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


@media (prefers-reduced-motion: no-preference) {
	:has(:target) {
		scroll-behavior: smooth;
		scroll-padding-top: 3rem;
	}
}

 @media (prefers-reduced-transparency: reduce) {
    * { opacity: 1; }
  }



/* WOOCOMMERCE -------------------------------------------------------------------------------------------- */

.woocommerce #content div.product div.summary, .woocommerce div.product div.summary, .woocommerce-page #content div.product div.summary, .woocommerce-page div.product div.summary {
	all: unset;
}

/* main page */

.woowrap main {
	display: flex; 
	flex-direction: column;
	align-items: center; 
	padding: 0 1rem 1rem 1rem;
	background-color: #f7f7f7;
}

.woowrap h1 {
	min-width: 100vw;
	position: relative; left: 50%; right: 50%;
	margin-left: -50vw; margin-right: -50vw;
	background-color: var(--dark);
	color: var(--gold);
	text-align: center;
}

.search-cats {
	display: flex; 
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

.shop-categories {
	list-style-type: none;
	display: flex; 
	gap: 1rem;
	margin: 1rem 0 2rem;
}

.shop-categories li {
	margin: 0;
	text-align: center; 
}

.shop-categories a {
	padding: .5rem 1rem;
	background-color: #fff;
	color: var(--blue);
	white-space: nowrap;
	border: 2px solid var(--blue);
	border-radius: 5px;
	transition: var(--hover);
}

.shop-categories a:hover {
	background-color: var(--blue);
	color: #fff;
}

.shop-categories li:has([href*="uncategorized"]),
.shop-categories li:has([href*="featured"]) {
	display: none;
}

.woowrap .search-form {
	display: flex; 
	justify-content: center; 
	gap: 1rem;
}

.woowrap  .search-form input {
	padding: .5rem;
	border-color: #666;
	border-radius: 3px;
	cursor: pointer;
}

.woowrap  input[type="submit"] {
	padding: .5rem 1rem; 
	background-color: var(--blue);
	color: #fff;
}

.search-field::placeholder { color: transparent; }
.search-field::-webkit-input-placeholder { color: transparent; }
.search-field:-moz-placeholder { color: transparent; }
.search-field::-moz-placeholder { color: transparent; }
.search-field:-ms-input-placeholder { color: transparent; }


.woowrap ul.products {
	margin: 2rem 0 5rem;
}

.woowrap .product {
	display: flex; 
	flex-direction: column;
	align-items: center;
	margin: 0; 
	max-width: 300px;
	text-align: center;
}

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
	display: flex; 
	flex-direction: column;
}

.product-image-wrapper {
	margin-bottom: 1rem; 
	overflow: hidden;
	box-shadow: 0 0 5px 4px rgba(0,0,0, .05)
}

.woocommerce ul.products li.product a img {
	margin-bottom: 0;
}

[data-cat="Study Guides"]::after {
	content: 'Study Guide';
	display: block;
	position: absolute; right: -67px; bottom: 44px; z-index: 7;
	padding: 0 24px;
	width: 100%;
	background: var(--dark);
	color: #fff;
	text-align: center;
	border-top: 2px solid var(--gold);
	border-bottom: 2px solid var(--gold);
	transform: rotate(-45deg);
}

[data-cat="Books"]::after {
	content: 'Book';
	display: block;
	position: absolute; right: -67px; bottom: 44px; z-index: 7;
	padding: 0 24px;
	width: 100%;
	background: var(--dark);
	color: #fff;
	text-align: center;
	border-top: 2px solid var(--gold);
	border-bottom: 2px solid var(--gold);
	transform: rotate(-45deg);
}

.woocommerce div.product .product_title {
	padding: .25rem 1rem;
}

.woocommerce ul.products li.product .price {
	display: flex; 
	justify-content: center; 
	align-items: center;
	margin: 1.5rem 0;
	font: bold 1rem/1 'open sans', sans-serif;
	color: var(--blue);
}

.woocommerce ul.products li.product .price::before,
.woocommerce ul.products li.product .price::after {
	font-size: 3em;
	color: #eee;
}

.woocommerce ul.products li.product .price::before {
	content: '[';
}

.woocommerce ul.products li.product .price::after {
	content: ']';
}

.woocommerce-Price-amount.amount { top: 5px; }

.woocommerce ul.products li.product .button {
	display: block;
	margin-top: auto;
}

.woocommerce div.product .variations_form.cart {
	margin-bottom: 0; 
}

.variations tr {
	display: flex; 
	flex-direction: column;
}

select#binding { padding: .5rem; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
}

.woocommerce div.product form.cart div.quantity {
	margin-bottom: 1rem;
}

.woocommerce div.product form.cart .button {
	display: flex; 
	justify-content: center; 
	align-items: center;
	padding: 8px 1rem !important;
	max-height: 36px;
}

/* Category Pages -------------------------------------------------------------------------------------------- */

.woowrap .shop-category {
	width: 900px; max-width: 100%; 
}

.woowrap li {
	width: 100%; 
}

.woocommerce div.product .product_title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: flex; 
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin: .5rem 0 1rem;
	padding: .5rem;
	min-height: 101px;
	font-size: 16px;
}

.wp-singular .summary h1.product_title.entry-title {
	font-size: 24px;
}

.woocommerce div.product .product_title {
	background-color: var(--gold);
}

.woocommerce div.product .product_title span, 
.woocommerce-loop-product__title span {
	display: block;
	top: -7px;
	font-size: 12px;
}

a.wc-block-grid__product-link {
	text-decoration: none;
}

.wc-block-grid__product-title span {
	display: block; 
}

/* individual products -------------------------------------------------------------------------------------------- */

.mixam-link {
	display: flex; 
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin: 1rem 0 2rem;
	padding: 2rem;
	background-color: var(--gold);
}

.mixam-link p {
	margin: 0; 
	font-weight: bold; 
}

.woocommerce-breadcrumb { 
	display: none; 
}
body[class*="postid"] .product {
	margin: 5rem auto 0;
	max-width: 800px;
	text-align: left;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
	z-index: 999;
}

.woowrap .summary.entry-summary {
	width: 100% !important;
}

.c-cat h1 {
	padding: 0; 
	background-color: transparent;
	color: var(--dark);
}

.product_meta {
	display: flex; 
	flex-direction: column;
	gap: .5rem;
	margin: 0 0 2rem;
}

.woowrap .intro {
	width: 700px; max-width: 100%;
	text-align: center; 
}

.woocommerce-tabs {
	margin: 2rem 0;
}

.tabs.wc-tabs {
	display: none;
}

.price {
	text-align: center; 
}

.cart {
	display: flex;
	justify-content: center; 
}

.look-inside {
	display: block;
	margin: 0 auto;
}

.woocommerce .quantity .qty {
	height: 35.75px;
}

.woowrap .product .images {
	margin-bottom: 0;
}

.woocommerce div.product div.images {
	margin-bottom: 0;
}

.woocommerce-product-gallery__wrapper {
	display: flex; 
	justify-content: center;
}

.woocommerce-product-gallery__image { /* book container */
	width: 200px;
	height: 300px;
	margin: 0px;
	display: flex;
	align-items: center;
	justify-content: center;
	perspective: 400px;
	transform: scale(1.1);
}

.woocommerce-product-gallery__image a { /* book */
	transform: rotateY(-30deg);
	position: relative;
	transform-style: preserve-3d;
	width: 200px;
	height: 300px;
	transition: transform 1s ease;
	animation: 1s ease 0s 1 initAnimation;
}

.woocommerce-product-gallery__image a:hover {
  transform: rotate(0deg);
}

@keyframes initAnimation {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(-30deg);
  }
}

.woocommerce-product-gallery__image a > :first-child {
  position: absolute;
  background: #0d47a1aa;
  width: 200px;
  height: 300px;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  box-shadow: 5px 5px 20px #777;
}

.woocommerce-product-gallery__image a img { /* image */
	
}

.woocommerce-product-gallery__image a::before {
  content: ' ';
  background: #fff;
  height: calc(256px - 2 * 3px);
  width: 50px;
  top: 3px;
  position: absolute;
  transform: translateX(calc(200px - 50px / 2 - 3px)) rotateY(90deg) translateX(calc(50px / 2))
}

.woocommerce-product-gallery__image a::after {
  content: ' ';
  position: absolute;
  left: 0;
  width: 200px;
  height: 257px;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  background: #01060f;
  transform: translateZ(-50px);
  box-shadow: -10px 0 50px 10px #777;
}

/* CART -------------------------------------------------------------------------------------------- */

.woocommerce-cart .post,
.woocommerce-checkout .post {
	margin: 2rem auto;
	width: 600px;
}

.wc-block-checkout__actions_row button {
	background-color: var(--blue);
	color: white;
}


/* Flexbox for WooCommerce product grid */
ul.products {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
	width: 900px; max-width: 100%;
  list-style: none;
}

ul.products li.product {
  width: 250px;
  max-width: 100%;
  flex: 0 1 250px;
  box-sizing: border-box;
  margin: 0 !important; 
  float: none !important;
}

/* Optional: Remove WooCommerce's default floats and margins */
ul.products::after,
ul.products::before {
  display: none !important;
}

@media (max-width: 800px) {
	main p, main ul, main ol, .StripeElement { padding: 0 1rem; }
	.look-inside img { display: block; margin: 0 auto; }	
} 

