/* ==========================================================================
   MARK CHITTENDEN
   Portfolio
   ========================================================================== */


/* ==========================================================================
   VARIABLES
   ========================================================================== */

:root {
	--color-white: #ffffff;
	--color-bg: #f4f1eb;
	--color-text: #101820;
	--color-accent: #ff5a1f;
	--color-disrupt: #246bfe;
	--color-muted: #727272;

	--page-padding: clamp(24px, 4vw, 72px);

	--font-primary: "Geist", Helvetica, Arial, sans-serif;
	--font-condensed: "Oswald", sans-serif;
	--font-pixel: "Pixelify Sans", sans-serif;
	--font-serif: serif;

	--menu-number-width: 34px;
	--menu-name-width: 68px;
	--menu-line-width: 34px;

	--menu-column-gap: 16px;
	--menu-row-gap: clamp(32px, 5vh, 72px);
}


/* ==========================================================================
   RESET / BASE
   ========================================================================== */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
/*
	background: var(--color-bg);
	color: var(--color-text);
*/
	
	font-size: 16px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-family: var(--font-primary);
	background-color: var(--color-bg);
}

img {
	display: block;
	max-width: 100%;
}

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

button {
	font: inherit;
	color: inherit;
}


/* ==========================================================================
   SHARED ELEMENTS
   ========================================================================== */

.connection {
	width: 1px;
	height: 80px;

	margin: 8px 4px;
}

.light {
	background-color: var(--color-bg);
}

.dark {
	background-color: var(--color-text);
}


.hero-intro {
	margin: 0;
}

.hero-intro p {
	max-width: 300px;

	margin: 0;

	font-family: var(--font-primary);
	font-size: clamp(14px, 1.1vw, 18px);
	font-weight: 500;

	line-height: 1.45;
}


/* ==========================================================================
   SITE PINNED STAGE
   ========================================================================== */

.stage {
	position: sticky;
	top: 0;

	height: 100svh;
	min-height: 100svh;

	display: grid;

	grid-template-columns:
		minmax(60px, 0.4fr)
		minmax(0, 4fr)
		minmax(160px, 0.6fr);

	grid-template-rows: 1fr;

	column-gap: clamp(24px, 4vw, 80px);

	padding:
		clamp(120px, 15vh, 180px)
		var(--page-padding)
		clamp(50px, 6vh, 80px);

	overflow: hidden;
}


/* ==========================================================================
   CHAPTER MARKERS
   ========================================================================== */

.stage .chapter-marker {
	grid-column: 1;
	grid-row: 1;

	align-self: center;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
	position: fixed;
	z-index: 1100;

	top: 0;
	left: 0;

	display: flex;
	align-items: center;
	justify-content: space-between;

	width: 100%;

	padding:
		28px
		var(--page-padding);

	color: #fff;
    mix-blend-mode: difference;
}

/* ==========================================================================
   TOP BLUR
   ========================================================================== */

.top-blur {
	position: fixed;
	z-index: 900;

	top: 0;
	left: 0;

	width: 100%;
	height: 80px;

	pointer-events: none;

	-webkit-backdrop-filter: blur(15px);
	backdrop-filter: blur(15px);

	-webkit-mask-image: linear-gradient(
		to bottom,
		#000 0%,
		#000 70%,
		transparent 100%
	);

	mask-image: linear-gradient(
		to bottom,
		#000 0%,
		#000 70%,
		transparent 100%
	);
}

/* --------------------------------------------------------------------------
   BRAND
   -------------------------------------------------------------------------- */

.site-brand {
	display: flex;
	align-items: center;
	gap: 10px;

	font-size: 12px;
	font-weight: 700;

	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* ==========================================================================
   MENU UI
   ========================================================================== */

.menu-button {
	position: relative;
	z-index: 1101;

	margin-right: 20px;
}

.menu-label {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.22rem;
}

/* ==========================================================================
   MOBILE TOGGLE
   ========================================================================== */

.menu-toggle {
	display: none;

	width: 32px;
	height: 24px;

	padding: 0;

	background: none;
	border: 0;

	cursor: pointer;
}

.menu-toggle span {
	display: block;

	width: 100%;
	height: 2px;

	background: currentColor;

	transform-origin: center;

	transition:
		transform 250ms ease,
		opacity 250ms ease;
}

.menu-toggle span + span {
	margin-top: 6px;
}

body.menu-open .menu-toggle span:nth-child(1) {
	transform:
		translateY(8px)
		rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
	opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
	transform:
		translateY(-8px)
		rotate(-45deg);
}

/* ==========================================================================
   SIDE MENU — SHARED GEOMETRY
   ========================================================================== */

.menu-ui,
.menu-meta {
	position: fixed;

	top: 22vh;
	right: var(--page-padding);

	width: 168px;

	font-family: var(--font-condensed);
	font-size: 14px;
	line-height: 1.4;

	letter-spacing: 0.08em;
	text-transform: uppercase;
}


/* ==========================================================================
   BLENDED MENU NAMES
   ========================================================================== */

.menu-ui {
	z-index: 1002;

	display: flex;
	flex-direction: column;

	gap: clamp(32px, 5vh, 72px);

	color: #fff;
	mix-blend-mode: difference;
}

.menu-ui a {
	width: 68px;
	margin-left: 50px;

	color: inherit;
	text-decoration: none;
}


/* ==========================================================================
   FIXED MENU NUMBERS AND LINES
   ========================================================================== */

.menu-meta {
	z-index: 1001;

	display: flex;
	flex-direction: column;

	gap: clamp(32px, 5vh, 72px);

	pointer-events: none;
}

.menu-meta-item {
	display: grid;

	grid-template-columns:
		34px
		68px
		34px;

	align-items: center;

	column-gap: 16px;
}


/* --------------------------------------------------------------------------
   NUMBER
   -------------------------------------------------------------------------- */

.menu-number {
	grid-column: 1;

	color: var(--color-muted);
}


/* --------------------------------------------------------------------------
   LINE
   -------------------------------------------------------------------------- */

.menu-line {
	grid-column: 3;

	width: 34px;
	height: 2px;

	background: transparent;
}

.menu-meta-item.is-active .menu-number {
	color: var(--color-accent);
}

.menu-meta-item.is-active .menu-line {
	background: var(--color-accent);
}

/* ==========================================================================
   PAGE — COPY ELEMENTS
   ========================================================================== */

.page-copy {
	grid-column: 1;
	align-self: start;
	font-family: var(--font-primary);
	margin: 0;
}

.page-copy h1 {
	margin: 0;
	font-size: clamp(48px, 7vw, 110px);
	font-weight: 500;
	line-height: 0.95;
	letter-spacing: -0.05em;
}

.page-copy p {
	margin: 0;
    font-size: 15.25px;
    line-height: 1.25;
}

/* ==========================================================================
   MENU SCRIM
   ========================================================================== */

body::after {
	content: "";

	position: fixed;
	z-index: 1000;

	inset: 0;

	background: rgb(16 24 32 / 0.35);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transition:
		opacity 300ms ease,
		visibility 300ms ease;
}


/* ==========================================================================
   SCROLL INDICATOR
   ========================================================================== */

.scroll-indicator {
	position: fixed;
	z-index: 1200;

	right: var(--page-padding);
	bottom: 48px;

	display: flex;
	flex-direction: column;
	align-items: center;

	gap: 18px;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transition:
		opacity 250ms ease,
		visibility 250ms ease;
}

body.chapter-can-scroll .scroll-indicator {
	opacity: 1;
	visibility: visible;
}


/* --------------------------------------------------------------------------
   SCROLL INDICATOR LINE
   -------------------------------------------------------------------------- */

.scroll-indicator-line {
	display: block;

	width: 1px;
	height: 80px;

	background: currentColor;
}


/* --------------------------------------------------------------------------
   SCROLL INDICATOR LABEL
   -------------------------------------------------------------------------- */

.scroll-indicator-label {
	font-family: var(--font-condensed);
	font-size: 13px;
	font-weight: 500;

	letter-spacing: 0.14em;
	text-transform: uppercase;

	writing-mode: vertical-rl;

	transform: rotate(180deg);
}


/* --------------------------------------------------------------------------
   SCROLL INDICATOR ARROW
   -------------------------------------------------------------------------- */

.scroll-indicator-arrow {
	font-family: var(--font-primary);
	font-size: 24px;
	font-weight: 300;

	line-height: 1;
}


/* --------------------------------------------------------------------------
   HIDE SCROLL INDICATOR WHILE MENU IS OPEN
   -------------------------------------------------------------------------- */

body.menu-open .scroll-indicator {
	opacity: 0;
	visibility: hidden;
}

/* --------------------------------------------------------------------------
   SPACERS
   -------------------------------------------------------------------------- */

.spacer {
	display: none;
    width: 100px;
    height: 4px;
    background-color: var(--color-accent);
    margin-bottom: 33px;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 900px) {

	/* ----------------------------------------------------------------------
	   HEADER
	   ---------------------------------------------------------------------- */

	.site-header {
		padding-top: 22px;
	}


	/* ----------------------------------------------------------------------
	   MENU BUTTON
	   ---------------------------------------------------------------------- */

	.menu-label {
		display: none;
	}

	.menu-toggle {
		position: fixed;
		z-index: 1004;

		top: 24px;
		right: var(--page-padding);

		display: block;
	}


	/* ----------------------------------------------------------------------
   MOBILE MENU DRAWER — SHARED LAYERS
   ---------------------------------------------------------------------- */

.site-menu,
.menu-meta {
	position: fixed;

	top: 0;
	right: 0;
	bottom: 0;

	width: min(82vw, 380px);

	padding:
		140px
		var(--page-padding)
		80px;

	display: flex;
	flex-direction: column;
	justify-content: flex-start;

	gap: 0;

	transform: translateX(100%);

	transition:
		transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}


/* ----------------------------------------------------------------------
   MOBILE MENU — NAMES
   ---------------------------------------------------------------------- */

.site-menu {
	z-index: 1002;

	color: var(--color-text);
	background: transparent;

	mix-blend-mode: normal;

	pointer-events: none;
}

.site-menu a {
	width: 100%;
	margin: 0;

	padding:
		22px
		0
		22px
		58px;

	color: inherit;

	font-size: 18px;
	line-height: 1.4;
}


/* ----------------------------------------------------------------------
   MOBILE MENU — NUMBERS, LINES AND DRAWER BACKGROUND
   ---------------------------------------------------------------------- */

.menu-meta {
	z-index: 1001;

	background: var(--color-bg);

	pointer-events: none;
}

.menu-meta-item {
	width: 100%;

	display: grid;
	grid-template-columns:
		42px
		1fr
		42px;

	align-items: center;

	column-gap: 16px;

	padding: 22px 0;

	font-size: 18px;
	line-height: 1.4;
}

.menu-meta-item .menu-line {
	justify-self: end;
}


/* ----------------------------------------------------------------------
   OPEN BOTH MENU LAYERS
   ---------------------------------------------------------------------- */

body.menu-open .site-menu,
body.menu-open .menu-meta {
	transform: translateX(0);
}

body.menu-open .site-menu {
	pointer-events: auto;
}


	/* ----------------------------------------------------------------------
	   MENU OPEN
	   ---------------------------------------------------------------------- */

	body.menu-open {
		overflow: hidden;
	}

	body.menu-open .scroll-indicator {
		opacity: 0;
		visibility: hidden;
	}

	body.menu-open::after {
		opacity: 1;
		visibility: visible;
	}



	/* ----------------------------------------------------------------------
	   STAGE
	   ---------------------------------------------------------------------- */
	
	.stage {
		display: block;

		width: 100%;
		height: 100svh;

		padding:
			90px
			var(--page-padding)
			50px;
	}

	.stage .chapter-marker {
		display: none;
	}

	/* ----------------------------------------------------------------------
	   CONNECTION
	   ---------------------------------------------------------------------- */

	.connection {
		height: 64px;
	}

	.page-copy {
		grid-column: 1;
	}

}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 600px) {

	/* ----------------------------------------------------------------------
	   HEADER
	   ---------------------------------------------------------------------- */

	.site-brand span:nth-child(2),
	.site-brand span:nth-child(3) {
		display: none;
	}


	/* ----------------------------------------------------------------------
	   STAGE
	   ---------------------------------------------------------------------- */

	.stage {
		display: block;

		width: 100%;
		height: 100svh;

		padding:
			90px
			var(--page-padding)
			50px;
	}


	/* ----------------------------------------------------------------------
	   CHAPTER MARKER
	   ---------------------------------------------------------------------- */

	.stage .chapter-marker {
		display: none;
	}


	/* ----------------------------------------------------------------------
	   SCROLL INDICATOR
	   ---------------------------------------------------------------------- */

	.scroll-indicator {
		display: none;
	}


	/* ----------------------------------------------------------------------
	   CONNECTION
	   ---------------------------------------------------------------------- */

	.connection {
		height: 32px;
	}

	.page-copy {
		grid-column: 1;
	}

}