/*
==================
GLOBAL VARIABLE DEFINITIONS & THEME COLORS
==================
*/

:root { 
    --drop-shadow: drop-shadow(0 5px 5px rgba(0,0,0,0.65));
    --image-scale-anim: all 0.2s ease;
    --content-width: clamp(40rem, 50vmax, 100rem);
}

:root[data-theme="default"] {
    --bg: #f4b844;
	--light: #e84b17;
	--med: #bf2413;
	--dark: #801c1c;
    --copy: var(--dark); 
    --over: var(--med);
    --under: var(--bg);
    --lightbox: rgba(244, 185, 68, 0.8);
}

:root[data-theme="latenight"] {
    --bg: #374068;
	--med: #84c77f;
	--dark: #c2e285;
	--light: #4caa86;
    --copy: #e6d689;
    --over: var(--bg);
    --under: var(--dark);
    --lightbox: rgba(55, 64, 104, 0.8);
}

:root[data-theme="inverted"] {
    --bg: #483857;
	--light: #c53b52;
	--med: #e85845;
	--dark: #df9859;
    --copy: var(--dark);
    --over: var(--bg);
    --under: var(--dark);
    --lightbox: rgba(72, 56, 87, 0.8);
}

/*
==================
THEME SELECTOR COLORS

These values have to be hardcoded to be persistent across all themes
==================
*/

.theme-btn[data-theme="default"] {
    background-color: #bf2413;
}

.theme-btn[data-theme="latenight"] {
    background-color: #4caa86;
}

.theme-btn[data-theme="inverted"] {
    background-color: #c53b52;
}

/*
==================
FONT LOADING
==================
*/

/* --- Extra Light (100) --- */
@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 100;
    font-style: normal;
    src: url("./fonts/ITCAvantGardePro-XLt.otf") format("opentype");
}

@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 100;
    font-style: italic;
    src: url("./fonts/ITCAvantGardePro-XLtOblique.otf") format("opentype");
}

/* --- Book (400 - Standard/Regular) --- */
@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 400;
    font-style: normal;
    src: url("./fonts/ITCAvantGardePro-Book.otf") format("opentype");
}

@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 400;
    font-style: italic;
    src: url("./fonts/ITCAvantGardePro-BookOblique.otf") format("opentype");
}

/* --- Medium (500) --- */
@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 500;
    font-style: normal;
    src: url("./fonts/ITCAvantGardePro-Medium.otf") format("opentype");
}

@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 500;
    font-style: italic;
    src: url("./fonts/ITCAvantGardePro-MediumOblique.otf") format("opentype");
}

/* --- Demi (600 - Semi Bold) --- */
@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 600;
    font-style: normal;
    src: url("./fonts/ITCAvantGardePro-Demi.otf") format("opentype");
}

@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 600;
    font-style: italic;
    src: url("./fonts/ITCAvantGardePro-DemiOblique.otf") format("opentype");
}

/* --- Bold (700) --- */
@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 700;
    font-style: normal;
    src: url("./fonts/ITCAvantGardePro-Bold.otf") format("opentype");
}

@font-face {
    font-family: "ITC Avant Garde Gothic Pro";
    font-weight: 700;
    font-style: italic;
    src: url("./fonts/ITCAvantGardePro-BoldOblique.otf") format("opentype");
}

@font-face {
    font-family: "Gastromond";
    font-weight: 700;
    font-style: italic;
    src: url("./fonts/GastromondItalic.otf") format("opentype");
}


/* Global Attributes */
body, html {
	margin: 0;
	padding: 0;
	background-color: var(--bg);
	height: 100%;
	font-family: 'ITC Avant Garde Gothic Pro';
	font-size: 1.12em;
	overflow-x: hidden;
	color: var(--copy);
}

h1 {
    font-family: Gastromond;
	font-style: italic;
	font-size: clamp(1.75rem, 2.25vmax, 4rem);
	font-weight: 700;
    transform-origin: left;
    transform: scale(1,1.25);
    letter-spacing: -5%;
    margin: 0 0 2.25vh 0;
    line-height: 95%;
}

h4 {
	font-size: clamp(1.75rem, 4vh, 5rem);
	font-weight: 400;
    text-transform: uppercase;
	margin: 0;
	letter-spacing: -.155rem;
    line-height:3.5vmax;
}

h5 {
    position: relative;
    font-size: clamp(1rem, 2.25vh, 5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -.075rem;
    margin: 0 1vh 2vh 0;
}


p {
    font-weight: 500;
    font-size: clamp(.75rem, .75vmax, 2rem);
    line-height: clamp(1.1rem, 1vw, 2.1rem);
    letter-spacing: -.01rem;
    margin: 0;
}

.tooltip {
    text-align: center;
    font-weight: 600;
    margin: 1vw 0;
}

a {
    text-decoration: none;
}

strong {
    font-weight: 800;
    font-style: italic;
}

.cls-1 {
    fill: var(--dark);
}

.divider {
    background: var(--dark);
    height:100%;
    width:3px;
}

/* ==================
STICKY NAVBAR
=====================*/

.navbar a {
	font-weight: 800;
    font-size: clamp(1rem, 1vw, 2rem);
	color: var(--copy);
    line-height: 0;

}

.navbar a:hover {
	color: var(--med);
}   

.navbar {
    display: flex;
    align-items: center;
    position: sticky;
    overflow: visible;
    top:0;
    z-index: 9;
    align-self: center;
    width: var(--content-width);
    padding: 1.5vh 100%;
    background-color: var(--bg);
}

.theme-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.theme-btn {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background-color: transparent;
}

	.footer-links {
		display: grid;
		position: relative;
		grid-area: nav;
		grid-template-columns: auto auto;
		text-align: right;
		justify-content: end;
		gap: 2rem;
	}

		.footer-links.email-hover a {
			opacity: 0;
			pointer-events: none;
		}

		.footer-email-reveal {
			position: absolute;
		
			/* Align to match where the links sit — adjust if your footer-links
			uses a different alignment (right-aligned by default in project.css) */
			top: 0;
			right: 0;
		
			color: var(--med);       /* accent color so it reads as interactive */
			font-weight: 600;
			font-size: clamp(.75rem, 1.75vh, 2rem);  /* matches .footer-links a */
			white-space: nowrap;
		
			opacity: 0;
			pointer-events: none;
			cursor: pointer;
		
			transition: opacity 0.25s ease, color 0.15s ease;
		}

		/* Fade the email in */
		.footer-links.email-hover .footer-email-reveal {
			opacity: 1;
			pointer-events: auto;
		}
		
		/* Hover state on the address itself — nudges to --dark as a subtle confirm */
		.footer-email-reveal:hover {
			color: var(--dark);
		}
		
		/* "Copied!" flash — briefly shifts to the lightest theme color */
		.footer-email-reveal:active {
			color: var(--light);
		}


	    .footer-links a {
			display:block;
            color: var(--dark);
            font-weight: 600;
            font-size: clamp(.75rem, 1.75vh, 2rem);
            letter-spacing: -5%;
			text-transform: uppercase;
			transition: opacity 0.25s ease, color 0.2s ease;
        }

        .footer-links a:hover {
            color: var(--med);
        }

/* 
======================
3D model viewer logic
======================
*/

/*
=====================
LAZY MODEL VIEWER 
=====================
*/



	/* .model-viewer canvas {
		display: block;
	} */

/* The frame itself is the positioning root */
.model-viewer {
    position: relative;
    aspect-ratio: 1;
    /* overflow: hidden; */
    cursor: pointer;
	border-radius: .35rem;
}

/* ── Preview layer ── */
.mv-preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 400ms ease;
    z-index: 2;
    /* Prevent the global img:hover scale from leaking out of the frame */
    /* overflow: hidden; */
}

/* The thumbnail image */
.mv-preview img {
    width: auto;
    height: 100%;
    /* object-fit: contain; */
    display: block;
    /* Suppress the global img:hover rule for this specific image */
    transition: transform 0.25s ease;
    pointer-events: none; /* let the parent .mv-preview handle the click */
    user-select: none;
}

/* Scale on hover */
.model-viewer:not(.mv-active) .mv-preview:hover img {
    transform: scale(1.04);
}

/* Fade the preview out when viewer is active */
.mv-preview.mv-hidden {
    opacity: 0;
    pointer-events: none;
}

.model-viewer:not(.mv-active):hover .mv-play-hint {
    opacity: 1;
}

/* ── Canvas wrap ── */
.mv-canvas-wrap {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 1;
    pointer-events: none;
}

.mv-canvas-wrap.mv-visible {
    opacity: 1;
    pointer-events: all;
}

.mv-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
	border-radius: .5rem;

}

/* ── Close button ── */
.mv-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.model-viewer.mv-active .mv-close {
    opacity: 0.7;
    pointer-events: all;
}

.mv-close:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.7);
}

/* ── Loading shimmer on the preview while scene builds ── */
.model-viewer.mv-loading .mv-preview img {
    filter: brightness(0.5);
}

/* ── One edge case: suppress global img:hover inside active viewer ── */
.model-viewer.mv-active img {
    transform: none !important;
}


/* SVG Logo Attributes */
.st0 {
	fill: var(--light);
}

.st1 {
	fill: none;
}

.st2 {
	fill: var(--dark);
}

.st3 {
	fill: var(--med);
}

/* SVG Stripe Attributes */
.str1 {
	fill: var(--light);
}

.str2 {
	fill: var(--dark);
}

.str3 {
	fill: var(--med);
}

#img-overlay {
    display:none;
}


@media only screen and (max-width:725px) {

    /* .hover-container:hover img {
        transform:scale(var(--hover-scale-mobile));
    } */

    :root {
    --content-width: 90%;
        }

    /* .navbar {
        width: var(--content-width-mobile)
    } */
    
}