@import url('./reset.css');

* {
	box-sizing: border-box;
}

@view-transition {
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: .5s;
}

:root {
	--container-width: calc(1220px + (var(--container-gutter) * 2));
	--container-gutter: 1.5rem;
	
	/*@media(1080px <= width) {
		--container-gutter: 1.5rem;	
	}*/
	

	--font-family-headings: "Farro", sans-serif;
	--font-family-body: "Barlow", sans-serif;
	--font-family-button: var(--font-family-headings);

	--line-height-body-desktop: 1.5;
	
	--black: #000;
	--gold: #b3a369;
	--dark-red: #79271d;/* #7a0101;*/
		
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-height);
	
	:where(.is-layout-constrained) > * {
		margin-block: unset;
	}
}

::selection {
	background: var(--gold);
	color: var(--black);
}

body {
	background: var(--color-site-background);
	color: var(--color-site-text, var(--black));
	font: 300 1rem/var(--line-height-body-desktop) var(--font-family-body);
}

p {
	margin: 0 0 1rem;
	
	&:last-child {
		margin-bottom: 0;
	}
}

strong {
	font-weight: 700;
}

em {
	font-style: italic;
}

ul, ol {
	padding-left: 1rem;

	&.menu {
		list-style: none;
	}
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}


ol {
	li {
		padding-left: 0.25rem;

		&::marker {
			font-size: 1rem;
		}
	}
}

.has-medium-font-size {
  font-size: 1.125rem !important;
}

.has-large-font-size {
  font-size: 1.375rem !important;;
}

.eyebrow {
	font-family: var(--font-family-body);
  font-size: 1.25rem;
  font-weight: 700;
	margin-bottom: .85em;
  text-transform: uppercase;
  color: var(--color-eyebrow, var(--dark-red));
}

h1, h2, h3, h4, h5, h6 {
	color: var(--color-heading-text, var(--color-white));
	font-family: var(--font-family-headings);
	font-weight: 700;
	line-height: 1;
	margin: 0 0 .5em;
	
	&:last-child {
		margin-bottom: 0;
	}
	
	a {
		color: inherit;
		text-decoration: inherit;
	}
}

h1 {
	font-size: clamp(1.75rem, 2.78dvw, 2.5rem);
	letter-spacing: .025em;
	margin-bottom: .325em;
	text-wrap: balance;
	text-transform: uppercase;
}

h2 {
	font-size: clamp(1.4rem, 3.325dvw, 2.25rem);
	text-transform: uppercase;
}

h3 {
	font-size: clamp(1.1875rem, 2.8dvw, 1.53rem);
}

h4 {
	font-size: clamp(1rem, 2.35dvw, 1.285rem);
}

h5 {
	font-size: clamp(.85rem, 2dvw, 1.1rem);
}

h6 {
	font-size: clamp(.72rem, 1.666dvw, .925rem);
	
	em a {
		color: var(--color-page-link);
	}
}

img {
	height: auto;
	max-width: 100%;
	width: auto;
}

a {
	color: var(--color-page-link);
	cursor: pointer;
	text-decoration: none;
	transition: all .3s;
	word-wrap: break-word;

	&.arrow-right{ 
		&::after {
			background: url('../img/icons.svg#arrow-right') 50% 50% / contain no-repeat;
			content:"";
			height: 1.5rem;
			width: 1.3125rem;
			transition: all .3s;
		}

		&:hover::after {
			filter: hue-rotate(6deg) saturate(110%) brightness(180%);
    }	
	}

	&.arrow-left { 
		&::before {
			background: url('../img/icons.svg#arrow-right') 50% 50% / contain no-repeat;
			content:"";
			height: 1.5rem;
			transform: rotate(180deg);
			transition: all .3s;
			width: 1.3125rem;
		}

		&:hover::before {
			filter: hue-rotate(6deg) saturate(110%) brightness(180%);
    }	
	}
}

#scroll-up-anchor {
  align-items: center;
	background: 0 0;
	border: 2px solid #e8e8e8;
	border-radius: 50%;
	bottom: 65px;
	color: #cdcdcd;
	cursor: pointer;
	display: flex;
  height: 52px;
  justify-content: center;
  line-height: 52px;
	margin: 0;
	position: fixed;
	right: 25px;
  text-decoration: none;
	transition: all .2s ease 0s;
	width: 52px;
	z-index: 100;

	&:hover {
		background-color: #e8e8e8;
	}

	html:not(.scrolled) & {
		opacity: 0;
		pointer-events: none;
	}
	

	svg {
		height: 60%;
	}
}

.container {
	margin-inline: auto;
	max-width: var(--container-width);
	padding-inline: var(--container-gutter);
}

.full-width,
.hero,
body.ffws-media-images-single article.type-post > header.entry-header {
	margin-left: calc(-1 * var(--container-gutter));
	width: 100dvw;

	@media(width > 1140px) {
		margin-left: calc((100dvw - 100%) / -2);		
	}
}

.hero,
body.ffws-media-images-single article.type-post > header.entry-header {
	margin-bottom: 3.5rem;

	h1 {
		font-size: clamp(2rem, 6dvw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 3px 1px 2px rgba(0, 0, 0, 0.3);
    color: #fff;
		letter-spacing: unset;
    line-height: 1.15;
	}
}

.hero .wp-block-cover,
#winery-hero {
	min-height: unset;
	padding-block: 100px;

	&:has(img,video) {

		@media(width > 1024px) {
			min-height: 60dvh;
		}

		@media(768px < width <=1024px) {
			min-height: 45dvh;
		}
	}

	@media(width > 1024px) {
		padding-block: 250px;
	}
}


@media(width > 1200px) {
	.hide-for-desktop {
		display: none;
	}
}
@media(width <= 1200px) {
	.show-for-desktop {
		display: none;
	}
}
@media(width <= 767px) {
	.hide-for-mobile {
		display: none;
	}
}
@media(width > 767px) {
	.show-for-mobile {
		display: none;
	}
}


.button,
.wp-block-button .wp-element-button,
#main .gform-footer .button,
form.searchandfilter input[type="submit"] {
	background-color: var(--dark-red);
  border: none;
  border-radius: .5rem;
  color: #fff;
	cursor: pointer;
	display: inline-block;
  font-family: var(--font-family-headings);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .054em;
  /*padding: 1.25rem 2.5rem;*/
	padding: .875rem 2.5rem .75rem;

	&:hover {
		background-color: var(--black);
	}

	&.has-small-font-size {
  	font-size: 1.25rem !important;
    padding: .75rem 1.6875rem;
	}

	&.mini {
		border-radius: .25rem;
		font-size: .875rem;
		padding: .5rem 1.25rem .375rem;
	}
}

.wp-block-button.is-style-outline .wp-element-button {
	background: transparent;
  color: var(--dark-red);
	outline: 2px solid var(--dark-red);
  outline-offset: -2px;

	&:hover {
		background-color: var(--dark-red);
		color: #fff;
	}
}

.cta-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 5rem;
  justify-content: center;

	@media(width > 1024px) {
		flex-wrap: nowrap;
	}
	
	@media(width <= 1024px) {	
    align-items: center;
    flex-direction: column;
    text-align: center;
	}
	
	& > div:not(.wp-block-buttons) {
    flex-grow: 1;
    flex-shrink: 1;
	}

	& > .wp-block-buttons {
    flex-shrink: 0;
	}
}

.zoetrope .zoetrope-dots {
  bottom: -3.75rem;
	
  button {
    background-color: #79271d;
		border: unset;
    border-radius: 50%;
    cursor: pointer;
		font-size: 0;
    height: .625rem;
    opacity: 0.5;
		padding: 0;
		width: .625rem;
		
		&.active {
			background-color: #79271d;
			opacity: 1;
		}
	}
}

body.error404 #main {
	padding-block: 4rem;
	text-align: center;
}

.search-form {
	display: flex;
	justify-content: center;
	
	.button[type="submit"] {
		/*background: transparent url('../img/icons.svg#search') 50% 50% / cover no-repeat;*/
    border-radius: unset;
		font-size: 1rem !important;
    padding: .5rem 1.6875rem;
	}
}

form.searchandfilter { 
  & > ul {
    display: flex;
    padding: 0;
  }

  .searchandfilter ul li {
    padding: 0;
  }

  .sf-field-submit,
  .sf-field-post_type {
    display: flex;
    flex-direction: column;
  }

  .sf-field-post_type {
    padding-left: 2rem;

    label {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    select {
      flex-grow: 1;
      padding-inline: .25rem;
    }
  }

  input[type="submit"] {
    border-radius: unset;
    flex-grow: 1;
		font-size: 1rem !important;
    padding: .5rem 1.6875rem;
  }
}

#masthead {
	background: var(--black);
	padding: 2.125rem 0;
	position: relative;
	z-index: 3;

	& > .container {
    align-items: center;
		display: flex;
    justify-content: space-between;
		max-width: calc(var(--container-width) + 20px);
	}
	
	.site-branding {
		width: clamp(12.5rem, 29%, 18.75rem);

		img {
			display: block;
		}
	}


	nav { 
		@media(width <= 1000px) {
			display: none;
		}

		& > div > ul {
			align-items: center;
			display: flex;
			gap: 1rem;
			margin: 0 auto;
			padding: 0;

			@media(width > 1240px) {
				gap: 2rem;
			}
		}

		.menu-item-has-children {
			position: relative;

			.sub-menu {
				background: #000;
				left: -1rem;
				list-style: none;
				min-width: 200px;
				opacity: 0;
				padding: .5rem 1rem;
				pointer-events: none;
				position: absolute;
				transition: opacity .3s;

				a {
					color: #ddd;
					font-size: .9375rem;
					font-weight: 400;
          letter-spacing: 1px;
					padding-block: 0.4375rem;

					&:hover {
						color: #fff;
					}

					&:has(>.sub-menu-icon) {
    				padding-right: 1.5rem;
						white-space: nowrap;
					}
				}

				.sub-menu {
					left:100%;
					top: -0.4375rem;
				}

				.sub-menu-icon {
					background: url('../img/icons.svg#chevron-right') 50% 50% / cover no-repeat;
					cursor: pointer;
					height: 0.75rem;
					position: absolute;
					right: 0;
					top: 50%;
					translate: 0 -50%;
					transform-origin: center;
					transition: rotate .3s;
					width: .5rem;
				}
			}

			&:hover > .sub-menu {
				opacity: 1;
				pointer-events: all;
			}
		}

		a {
			color: var(--color-primary-nav-links);
			display: inline-block;
			font-family: var(--font-family-headings);
			font-size: .9375rem;
			font-weight: 700;
			letter-spacing: .0555em;
			text-transform: uppercase;

			@media(width > 1240px) {
				font-size: 1.125rem;
			}

			&:hover {
				color: var(--color-primary-nav-hover);
			}
		}

		.current-menu-item {
			a {
				color: #fff;
			}
		}
	}

	hamburger-button {
		--color: #474747;
    --height: 22;
    --scale: 1;
    --spacing: 2px;
    --width: 28;

		@media(width > 1000px) {
			display: none;
		}
	}
}


#mobile-menu {
	background: #fff;
	box-shadow: 0 0 5px rgba(0, 0, 0, .25);
  left: 0;
	overflow: clip;
  position: absolute;
  right: 0;
	translate: 0 -100%;
	transition: translate .3s;
  z-index: 2;

	@media(width > 1000px) {
		display: none;
	}

	&.active {
		translate: 0 0;
	}

	#mobile-menu-bottom {
		display: none;
	}

	& > .wrapper {
		padding: 0 2rem;

		& > div > ul {
			padding: 0;

			& > li:not(:last-child) {
				border-bottom: 1px solid #eaeaea;
			}


			a {
				color: #03141f;
				display: block;
				font-family: var(--font-family-headings);
				font-family: var(--font-family-body);
        font-size: 1rem;
        font-style: normal;
        font-weight: 500;
        letter-spacing: .0666em;
				padding-block: .6875rem;
        text-transform: uppercase;

				&:hover {
					color: #960000;
					color: var(--dark-red);
				}
			}

			li.current_page_item > a {
				color: #960000;
			}
		}
	}

	.menu-item-has-children {
		& > a {
			position: relative;
		}
	}

	.sub-menu {
		height: 0;
		list-style: none;
		overflow: clip;
	}

	li.open > .sub-menu {
		height: auto;
	}

	.sub-menu-icon {
		background: url('../img/icons.svg#down-arrow') 50% 50% / cover no-repeat;
		cursor: pointer;
    height: 0.75rem;
    position: absolute;
    right: 1rem;
    top: 50%;
		rotate: -90deg;
    translate: 0 -50%;
    transform-origin: center;
    transition: rotate .3s;
    width: .75rem;
        

		li.open > a > & {
			rotate: 0deg;
		}
	}
}



#colophon {
	background: var(--black);
	color: var(--color-footer-main-text);
	font-size: .9375rem;
	font-weight: 400;

	a {
		color: var(--color-footer-main-links);
	}

	strong {
		color: #fff;
	}

	.container {
		max-width: calc(var(--container-width) + 20px);
	}

	.has-medium-font-size {
		font-size: 1.0625rem !important;
	}

	#footer-sections-widgets {
	  padding: 3rem 0;

		h2 {
			color: var(--gold);
			font-size: 22px;
    	margin-bottom: .5rem;
    	text-transform: uppercase;
		}
	}

	.footer-bottom {
    border-top: 1px solid #474747;
		font-size: .875rem;
		padding-block: 0.9375rem;

		.container {
			align-items: center;
			column-gap: 3rem;
		  display: flex;	
			justify-content: space-between;
		}

		nav { 
			flex-shrink: 0;
			
			ul {
				align-items: center;
				display: flex;
				font-size: .9375rem;
				gap: .125rem 2.75rem;
				padding: 0;
				text-transform: capitalize;

				@media(width < 768px) {
					align-items: flex-end;
					flex-direction: column;
					font-size: .75rem;
				}
			}
		}

		a {
			letter-spacing: .0666em;
		}
	}

}


/* social links */
.menu-social-links-container > .menu {
	display: flex;
	gap: 1rem;
	padding: 0;

	a {
		display: block;
		font-size: 0;
		height: 2rem;
		width: 2rem;
	
		&[href*="facebook"] {
			background: url('../img/icons.svg#facebook') 50% 50% / contain no-repeat;
		}

		&[href*="instagram"] {
			background: url('../img/icons.svg#instagram') 50% 50% / contain no-repeat;
		}

		&[href*="youtube"] {
			background: url('../img/icons.svg#youtube') 50% 50% / contain no-repeat;
		}

		&[href*="twitter"] {
			background: url('../img/icons.svg#twitter-x-alt') 50% 50% / contain no-repeat;
		}

		&[href*="pinterest"] {
			background: url('../img/icons.svg#pinterest') 50% 50% / contain no-repeat;
		}

		&[href*="yelp"] {
			background: url('../img/icons.svg#yelp') 50% 50% / contain no-repeat;
		}
	}
}


/* Team Members */
.single-team-member { 
	#main > .container {
		--container-width: 1140px;
	}

	article.type-team-member {
		font-size: 1.0625rem;
		padding-bottom: 3rem;
	}
}



.gold-hero,
.hero:not(:has(img,video)),
body.ffws-media-images-single article.type-post > header.entry-header {
	background: var(--gold);
	margin-bottom: 4rem;
  padding-block: 5.625rem;
	text-align: center;

	&::selection {
		background: none;
		color: var(--black);
	}

	h1 {
		color: #fff;
		font-size: clamp(2rem, 6dvw, 3rem);
		font-weight: 700;
		line-height: 1.277;
    text-shadow: 0px 2px 3px #594E32;
    text-transform: uppercase;
	}
}

.hero:not(:has(img,video)) .wp-block-cover {
	min-height: unset;
	padding-block: unset;
}



article.type-team-member {
	.team-member-title,
	.team-member-job-role,
	.team-member-duration {
		letter-spacing: 0;
		text-transform: none;

		@media(width < 768px) {
      text-align: center;
		}
	}

	.team-member-title {
		font-size: 2.625rem;
		font-weight: 600;
		line-height: 1.1;
		margin-bottom: .25em;

		@media(width < 768px) {
			display: none;
		}
	}

	.team-member-job-role,
	.team-member-duration {
		color: #960000;
	}

	.team-member-job-role {
		font-size: 1.625rem;
		line-height: 1.155;
		font-weight: 600;
		margin-bottom: .35em; 
	}

	.team-member-duration {
		font-size: 1.1875rem;
		line-height: 1.3;
		font-weight: 500;
	}

	.team-member-image {
		@media(width > 767px) {
			float:right;
			margin: 0 0 1rem 1.5rem;
		}

		@media(width < 768px) {
			display: block;
			margin: 0 auto 2rem;
		}
	}
}


/* Post Pages */
.single-post {

	article.type-post {
		padding-bottom: 3rem;
	}

	.post-title {
		color: #960000;
    font-size: clamp(1.5rem, 4dvw, 2.5rem);
		line-height: 1.3;
		margin-bottom: .75em;
		text-transform: unset;
	}

	.post-image {
		display: block;
    margin:0 auto 1.5rem;
		max-height: 70dvh;
    object-fit: contain;
    object-position: center;
    width: 100%;
	}
}


/* Winery Pages */
.single-winery {

	article.type-winery > .container {
		--container-width: 1400px;
	}

	#winery-hero {
		margin-bottom: 4rem;
		position: relative;

		img {
			height: 100%;
			inset: 0 0 0 0;
			object-fit: cover;
			object-position: center;
			position: absolute;
			width: 100%;
		}
	}

	.winery-content {
		display: grid;
		grid-template-columns: 33% 1fr;
		gap: 2rem;

		@media(width < 768px) {
		  grid-template-columns: auto;
    	text-align: center;
		}
	}

	.winery-media {
		text-align: center;
	}

	.winery-info {
		color: #161616;
    font-size: 1.0625rem;
    font-weight: 300;
	}

	.winery-location {
		font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2em;
    letter-spacing: 0px;
    color: #8a7442;
		text-transform: uppercase;
	}

	.winery-founded {
		font-family: "Barlow", Sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark-red);
	}

	.winery-tagline {
		font-size: clamp(1.75rem, 4dvw, 2.25rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1em;
    color: #000;
		margin-bottom: .5em;
	}	
}


#winery-cta-banner {
	background-color: var(--gold);
	margin-top: 3rem;
	padding: 3.125rem 0;
}


#winery-cta-banner > .container,
.cta-panel .wp-block-group {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 2rem 5rem;
  justify-content: center;

	h2 {
   	color: #fff;
		font-size: 2rem;
   	font-weight: 700;
		margin: 0;
		text-align: center;
		text-shadow: 0px 2px 3px #594E32;
		text-transform: uppercase;
	}

	.button,
	.wp-block-buttons {
		flex-shrink: 0;
		flex-grow: 0;
	}
}

.cta-panel .wp-block-group {
	margin-inline: auto;
	max-width: var(--container-width);
	padding-inline: var(--container-gutter);
}



/* Forms */

.gform_wrapper form {
	.gform-field-label {
		color: #474747;
		font-family: var(--font-family-headings);
		font-size: 1.125rem;
		font-weight: 700;
		margin: 0;
    padding: 0 0 0.75rem;
		text-transform: uppercase;
	}
}


/* contact page form */
input:is([type="text"], [type="email"], [type="file"], [type="search"]), textarea {
	block-size: unset;
  border: 1px solid #333;
  box-shadow: unset;
	color: #818181;
  font-family: var(--font-family-body);
  font-size: 18px;
  letter-spacing: normal;
  line-height: 1;
	outline: none;	
  padding: 5px 4px;

	#gform_wrapper_1 & {
		border: none;
	}
}



/* job listings */
#lever-jobs-container {
	.lever-job-title {
		color: #990b09 !important;
		text-decoration: none !important;
	}
	
	li.lever-job { 
		justify-content: space-between;
	}
	
	a {
		font-weight: 300;
	}
	
	.lever-job-tag {
		flex: unset !important;
	}
}




/* wineries/spirits listings */
.wineries-by-region {


	.winery-region-group:not(:last-child) {
		padding-bottom: 5.5rem;
	}

	.region-heading {

	}

	.items {
		--columns: 1;
		display: grid;
    gap: 3rem 1.25rem;
    grid-template-columns: repeat(var(--columns), 1fr);
		padding-top: 1.5rem;

		@media(width > 900px) {
			--columns: 3;
		}

		@media(600px < width <= 900px) {
			--columns: 2;
		}
	}

	.item {

		a:has(img) {
			display: block;
			border-radius: .5rem;
			overflow: clip;
		}

		img {
			aspect-ratio: 1;
			display: block;
			object-fit: cover;
			object-position: 50%;
			width: 100%;
		}

		h3 {
			color: var(--dark-red);
			/*font-size: 1.75rem;*/
			font-size: clamp(1.089rem, 2.5861111112dvw, 1.75rem);
    	font-weight: 700;
			line-height: 1;
			padding-top: 1.5rem;
    	text-transform: uppercase;
		}
	}
}


/* Search results */

.search-filter-results {
	.items > article {
		display: grid;
		gap: 2rem;
		grid-template-columns: clamp(120px, 30%, 300px) auto;

		&:not(:last-child) {
			border-bottom: 1px solid #ccc;
			margin-bottom: 2rem;
			padding-bottom: 2rem;
		}
		&:not(:has(.image img)) {
			grid-template-columns: 1fr;
		}

		.heading {
			font-size: clamp(1.25rem, 2.25dvw, 1.75rem);
		}

		.image {
			img {
				max-height: 200px;
				object-fit: contain;
				object-position: 50% 50%;
				width: 100%;
			}

			&:not(:has(img)) {
				display: none;
			}
		}
	}

	.sf-navigation {
		padding-block: 5rem 2rem;

		.wp-pagenavi {
			display: flex;
			gap: .75rem;
			
			a, span {
				border: none;
				margin: 0;
				padding: 0;
			}
		}

		span.pages:first-child {
			padding-right: 1rem;
		}

		span.current {
    	font-weight: 500;
		}
	}
}







/* Media (Images) Page */

.media-images { 
	display: grid;
  row-gap: 4rem;

	section { 
		margin-block: 2rem;

		.title { 
			color: #960000;
			font-size: 44px; 
		}
    
		.grid {
			--cols: 1;
			list-style: none; 
			margin: 0; 
			padding: 0;
			display: grid; 
			grid-template-columns: repeat(var(--cols), 1fr); 
			gap: 2rem;

			@media(width > 1300px) {
				--cols: 4;
			}

			@media(1024px < width <= 1300px) {
				--cols: 3;
			}

			@media(600px < width <= 1024px) {
				--cols: 2;
			}

			.item { 
				border-radius: .5rem;
				overflow: clip;
				position:relative;

				& > img { 
					width: 100%; 
					height: auto; 
					display: block; 
					aspect-ratio: 1;
					object-fit: cover;
				}
			}

			.admin-edit {
				position: absolute;
				top: 0;
				left: 0;
				z-index: 1;
			}

			.media-info {
				position: absolute;
				bottom: 0;
				left: 0;
				right: 0;
				padding: 1.25rem;
				background: linear-gradient(179deg, transparent, #000);

				.caption { 
					color: #fff;
					font-size: 1.0625rem;
					font-weight: 600;
					padding-bottom: 1.25rem;
				}

				.button:not(:hover) {
					background-color: #960000;
				}
			}
		}
	}
}