@font-face {
  font-family: 'tiempos-headline-regular';
  src:  url('fonts/ActionCondensedBold-Grade3-Web.woff2') format('woff2'),
		url('fonts/ActionCondensedBold-Grade3-Web.woff2') format('woff');
}



/* Variables
-------------------------------------------------------------- */
:root {
	--background: #ffffff;
	--color-base: #4A4A4A;
	--color-highlight: #1A1A1A;
	--color-faint: #A4A4A4;
	--color-accent: #be005e;
	--color-green: #1c9000;
	
	
	--sans: 'Roboto', Helvetica;
	--serif: 'tiempos-headline-regular', serif;
	
	--font-size: 1.2rem;
	--font-size-s: .8rem;
	--font-size-m: calc(1.1 * var(--font-size));
	--font-size-mm: calc(2.5 * var(--font-size));	
	--font-size-l: calc(3 * var(--font-size));	
	--font-size-xl: calc(4 * var(--font-size));	
	--font-size-xxl: calc(5 * var(--font-size));	
	
	--line-height-base: 1.8rem;
	--line-height-s: calc(0.9 * var(--line-height-base));
	--line-height-m: calc(1.2 * var(--line-height-base));
	--line-height-l: calc(1.8 * var(--line-height-base));
	--line-height-xl: calc(2.5 * var(--line-height-base));
	--line-height-xxl: calc(3 * var(--line-height-base));	
	
	--spacing: 1.1em;
	--spacing-xs: calc(0.4 * var(--spacing));
	--spacing-s: calc(0.8 * var(--spacing));
	--spacing-sm: calc(1 * var(--spacing));
	--spacing-m: calc(1.1 * var(--spacing));
	--spacing-l: calc(1.4 * var(--spacing));
	--spacing-xl: calc(1.8 * var(--spacing));
	--spacing-xxl: calc(4 * var(--spacing));
	
	--max-width: 576px;
	--max-width-l: 1200px;
}

/* Typography
-------------------------------------------------------------- */
h1 {
	color: var(--color-highlight);
	font-family: var(--serif);
	font-size: var(--font-size-xxl);
	line-height: var(--line-height-xxl);
	margin: 0 auto;
	padding: 0 0 var(--spacing-xs) 0;
	transition: background-color 0.5s, color 0.5s;
}

h2 {
	color: var(--color-highlight);
	font-family: var(--serif);
	font-size: var(--font-size-l);
	line-height: var(--line-height-l);
	padding: 0 0 var(--spacing-xs) 0;
	margin: 0 auto;
	transition: background-color 0.5s, color 0.5s;
}

.grid-three-l h2 {
	color: var(--color-highlight);
	font-family: var(--sans);
	font-size: var(--font-size-m);
	font-weight: var(--font-bold);
	line-height: var(--line-height-s);
	padding: 0 0 8px 0;
	margin: 0 auto;
	font-weight: 700;
}

h3 {
	color: var(--color-highlight);
	font-family: var(--sans);
	font-size: var(--font-size-m);
	font-weight: var(--font-bold);
	line-height: var(--line-height-s);
	padding: 0 0 8px 0;
	margin: 0 auto;
	font-weight: 700;
	transition: background-color 0.5s, color 0.5s;
}

p {
	color: var(--color-base);
	font-family: var(--sans);
	line-height: var(--line-height-base);
	margin: 0 0 var(--spacing-s) 0;
	padding: auto 0;
	transition: background-color 0.5s, color 0.5s;
}

.card p {
	font-size: var(--font-size-sm);
	line-height: var(--line-height-s);
}

.last {
	margin-bottom: 0;
	padding-bottom: 0; 
}

a {	
	color: var(--color-highlight); 
	font-weight: 700;
	transition: background-color 0.5s, color 0.5s;
}

a:hover {
	color: var(--color-accent); 
}

.strong {
	font-weight: 700;
	transition: background-color 0.5s, color 0.5s;
}

.strike {
	text-decoration: line-through;
	transition: background-color 0.5s, color 0.5s;
}

.metatext {
	color: var(--color-faint);
	font-family: var(--sans);
	font-size: var(--font-size-s);
	transition: background-color 0.5s, color 0.5s;
}

.red {
	color: var(--color-accent);
}

.green {
	color: var(--color-green);
}

.icon {
	color: var(--color-accent);
	font-size: 24px;
	cursor: pointer;
	transition: color 0.5s;
}

.icon:hover {
	color: var(--color-accent);
}


/* Layout
-------------------------------------------------------------- */
body {
	font-family: var(--sans);
	font-size: var(--font-size);
	line-height: var(--line-height-base);
	color: var(--color-base);
	background: var(--background);
	margin: 0 auto;
	font-weight: 400;
	transition: background-color 0.5s, color 0.5s;
}

header {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: var(--spacing-l) 0 var(--spacing-s) 0;
}

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

section {
	margin: 0 auto;
	padding: 0 0 var(--spacing-xxl) 0;
	max-width: var(--max-width);
	width: 100%;
}

section.grid-max-width {
	max-width: var(--max-width-l);
	padding-bottom: var(--spacing-s);
}

section.pre-rules {
	padding-bottom: 0;
}

footer {
	max-width: var(--max-width);
	width: 100%;
	margin: 0 auto;
	padding: 0 0  var(--spacing-xl) 0;
}

.grid-three-l {
	max-width: var(--max-width-l);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 16px; /* horizontal space between items */
	row-gap: 32px;    /* vertical space between rows */	
	margin: 0 auto;
	padding: 0;
}

.grid-three {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 16px; /* horizontal space between items */
	row-gap: 16px;    /* vertical space between rows */
}

.grid-right {
	display: grid;
	grid-template-columns: auto 56px;
	grid-gap: 16px;
	align-items: center;
	padding-bottom: var(--spacing-s);
}

.grid-left {
	display: grid;
	grid-template-columns: 24px auto;
	grid-gap: 16px;
	row-gap: 0;
	align-items: flex-start;
}

.grid-half {
	max-width: var(--max-width-l);
	display: flex;
	align-items: center;
	justify-content: space-between
}

.main-nav {
	display: flex;
	margin-top: auto;
	margin-bottom: auto;
	align-items: stretch;
	gap: 16px;
	white-space: nowrap;
	font-size: var(--font-size-s);
	color: var(--color-base);
}

.masthead-home {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;           /* FORCE children to fill row height */
	max-width: var(--max-width-l);
	padding: 0 0 var(--spacing-xxl) 0;
	margin: 0 auto;	
}

/* allow children to shrink to the row’s height instead of overflowing */
.masthead-home > * {
	min-height: 0;
}

.masthead-home a {
	text-decoration: none;
}

.masthead-home h1 {
	color: white;
	font-size: var(--font-size-xl);
	line-height: var(--line-height-xl);
	padding-bottom: 16px;
}

.masthead-home p {
	color: white;
	font-weight: 300;
}

.masthead-home-image {
	min-height: 500px;
	overflow: hidden;
	border-top-left-radius: 2px;
	border-bottom-left-radius: 2px;
}

.masthead-home-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.masthead-home-content {
	background: #5B6B21;
	padding: var(--spacing-xxl);
	/* height is implicit—grid stretch makes it fill the same as .masthead-image */
	border-top-right-radius: 2px;
	border-bottom-right-radius: 2px;
}

.masthead-recipe {
	max-width: var(--max-width-l);
	padding: 0 0 var(--spacing-s) 0;
}

.masthead-recipe img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.macro-spacing {
	padding-bottom: var(--spacing-xl);
}

.right {
	text-align: right;
}


/* Elements
-------------------------------------------------------------- */

img {
	max-width: 100%;
	padding-bottom: var(--spacing-m);
	border-radius: 2px;
}

hr {
	border-top: 1px solid var(--color-faint);
	margin-bottom: var(--spacing-xxl)
}

.step-number {
	background-color: var(--color-base);
	text-align: center;
}

.step-number span  {
	color: white;
	font-size: var(--font-size-s);
}

.step-number p  {
	font-family: var(--serif);
	color: white;
	font-size: var(--font-size-l);
	padding-bottom: 0;
}

.numberCircle {
	display: inline-flex;          /* make it a flex container */
	align-items: center;           /* center vertically */
	justify-content: center;       /* center horizontally */
	
	box-sizing: border-box;        /* include border & padding in width/height */
	
	width: 24px;                    /* total diameter */
	height: 24px;                   /* total diameter */
	padding: 0;                     /* no extra padding required */
	
	border-radius: 2px;
	background: white;
	border: 1.5px solid var(--color-base);
	color: var(--color-base);
	font-weight: 700;
	
	font-size: var(--font-size-s);
	font-family: var(--sans);
	position: relative;
	top: 1px
}

.numberCircle::after {
	content: "";
	position: absolute;
	bottom: -3px;   /* same as your desired shadow y-offset */
	right:  -3px;   /* same as your desired shadow x-offset */
	width: 100%;
	height: 100%;
	background: var(--color-base);
	border-radius: 2px;
	z-index: -1;
}

.marcoCount {
	/* center everything in the actual box */
	display: grid;
	place-items: center;
	
	/* sizing + look */
	width: 100%;
	/* padding instead of fixed height so the card grows if text wraps */
	margin: 0 auto;
	padding: var(--spacing-s) 0;
	background: #fff;
	border: 2px solid var(--color-base);
	border-radius: 2px;
	
	/* shadow outside the box won’t affect centering */
	position: relative;
}

.marcoCount::after {
	content: "";
	position: absolute;
	bottom: -6px;   /* same as your desired shadow y-offset */
	right:  -6px;   /* same as your desired shadow x-offset */
	width: 100%;
	height: 100%;
	background: var(--color-base);
	border-radius: 2px;
	z-index: -1;
}

.macroCardValue,
.macroCardLabel {
	margin: 0;      /* kill default margins */
	text-align: center;
}

.macroCardValue {
	font-size: var(--font-size-xl);
	line-height: 1;
	color: var(--color-highlight);
	font-family: var(--serif)
}
.macroCardLabel {
	margin-top: .25em;  /* small gap */
	font-size: 1rem;
	color: var(--color-highlight);
	
}

ul {
	margin: 0 0 var(--spacing-l) 0;
	padding-left: var(--spacing-l) ;
	line-height: var(--line-height-base);
}

li {
	line-height: var(--line-height-base);
}

ul p {
	margin: 0 auto;
}

.logo-svg {
	padding: 0;
	text-indent: -999em;
	display: block;
	width: 108px;
	height: 93px;
	position: relative;
	transition: background-color 1s, color 1s;
	fill: var(--night-background);
}

.toggle-button {
  cursor: pointer;
}


/* Newsletter stuff
-------------------------------------------------------------- */
.newsletter-container {
  max-width: 576px; /* Set the maximum width of the container */
  margin: 0 auto; /* Center the container */
}

.input-container {
  display: flex; /* Use flexbox layout */
  align-items: center; /* Align items vertically */
  padding-top: var(--spacing-s);
}

#email-input {
	color: var(--background); 
	background-color: var(--color-highlight); 
	border-color: var(--color-faint);
  flex: 1; /* Take up all available space */
  padding: 6px;
  margin-right: 10px; /* Add margin between the input and button */
  height: 36px; /* Set the height of the input field */
  /* Adjust the input field's border, background color, and font color */
  border: 1px solid; /* <-- Change the border style here */
  box-sizing: border-box; /* Include padding and border in the total height */
  transition: background-color 0.5s ease, opacity 0.5s ease; /* Add transition */
  border-radius: 4px;
}

#email-input:focus {
	color: var(--background); 
	background-color: var(--color-highlight); 
	border-color: var(--color-highlight); 
	outline: none;
}


#submit-button {
	color: var(--background); 
	background-color: var(--color-highlight);
  border: none;
  cursor: default;
  opacity: 0.2;
  transition: background-color 0.3s ease, opacity 0.3s ease; /* Add transition */
  min-width: 70px; /* Set a minimum width based on the width of the text "Submit" */
  text-align: center; /* Center the text and spinner */
  white-space: nowrap; /* Prevent text wrapping to the next line */
  height: 36px; /* Set the height of the button to match the input field */
  line-height: 24px; /* Vertically center the text and spinner within the button */
  box-sizing: border-box; /* Include padding and border in the total height */
  padding: 6px 12px; /* Add padding to the button */
  border-radius: 4px;
}

#submit-button.active {
  cursor: pointer;
  opacity: 1;
}

#submit-button.active:hover {
	color: var(--background); 
	background-color: var(--color-highlight); 
	border-color: var(--color-highlight);
}


.fade-in-animation {
  opacity: 0;
  animation-name: fadeIn;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  /* Keep the animation paused initially */
  animation-play-state: paused;
}

@keyframes fadeIn {
  to {
	opacity: 1;
  }
}


/* Media queries
-------------------------------------------------------------- */

@media screen and (max-width: 1216px)  {
	
	header {
		width: 90%;
		padding-bottom: 8px;
	}
	
	section {
		width: 90%;
	}
	
	footer	 {
		width: 90%;
	}
	
	.grid-three-l {
		grid-template-columns: repeat(2, 1fr);
	}
	.masthead-home-content {
		padding: var(--spacing-xl);
	}
	
	.masthead-home h1 {
		font-size: var(--font-size-l);
		line-height: var(--line-height-l)
	}	
	
	.masthead-home {
		padding: 0 0 var(--spacing-xl) 0;
	}

}


@media screen and (max-width: 800px)  {
	h1 {
		font-size: var(--font-size-xl);
		line-height: var(--line-height-xl)
	}
	
	.grid-three {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.masthead-home {
		grid-template-columns: 1fr;
		width: 100%;
		padding-bottom: var(--spacing-xl)
	}
	.masthead-home-content {
		padding: var(--spacing-l);
	}
	
	.masthead-home-image {
		min-height: 500px;
		height: 100%;          /* stretch to whatever the grid row height is */
		overflow: hidden;
		border-top-left-radius: 2px;
		border-bottom-left-radius: 2px;
		
	}
	
	.masthead-img {
		/* fill the wrapper completely */
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}
		
}

@media screen and (max-width: 650px)  {
	h1 {
		font-size: var(--font-size-l);
		line-height: var(--line-height-l)
	}
	
	h2 {
		font-size: var(--font-size-mm);
		line-height: var(--line-height-l)
	}
	
	header {
		padding: 16px 0 16px 0;
	}
	
	.grid-three-l {
		grid-template-columns: repeat(1, 1fr);
		row-gap: 40px;
	}
	
	.masthead-home-image {
		min-height: 400px;
		border-top-left-radius: 0;
		border-bottom-left-radius: 0;
	}
	
	.logo-svg {
		width: 78px;
		height: 66px;
	}
	
	.masthead-recipe {
		width: 100%;
		height: 400px;
		padding: 0 0 var(--spacing-l) 0;
	}	
	
	img {
		padding-bottom: var(--spacing-s);
	}
	
}