@font-face {
    font-family: 'Helvetica Now Var';
    src: url('../fonts/HelveticaNowVar.ttf') format('truetype supports variations'),
         url('../fonts/HelveticaNowVar.ttf') format('truetype');
    font-weight: 50 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Now Var';
    src: url('../fonts/HelveticaNowVarItalic.ttf') format('truetype supports variations'),
         url('../fonts/HelveticaNowVarItalic.ttf') format('truetype');
    font-weight: 50 1000;
    font-style: italic;
    font-display: swap;
}

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

:root {
	--font-size-title: clamp(3rem, 0.8571rem + 6.8571vw, 6rem);
	--color-text: var(--color-white);
	--color-bg: #000;
	--color-link: #fff2f2;
	--color-link-hover: #f4d88c;
	--page-padding: 1rem 1.5rem;
	--color-link-works: #fff;
	--color-link-works-hover: #fff;
	--color-link-works-current: #fff;
	--color-white: #fff2f2;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: "Helvetica Now Var", sans-serif;
	font-optical-sizing: auto;
	font-size: 16px;
	font-weight: 400;
	font-variation-settings: 'wght' 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 10000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 80px;
	height: 80px;
	margin: -40px 0 0 -40px;
	background: url('../media/Simbolo-Nectar.gif') no-repeat center center;
	background-size: contain;
}

a {
	color: var(--color-link);
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.25s;
}

a:hover {
	opacity: 0.7;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.unbutton:focus {
	outline: none;
}

.frame {
	padding: var(--page-padding);
	position: relative;
	min-height: 100vh;
	display: grid;
	z-index: 1000;
	width: 100%;
	grid-row-gap: 1rem;
	grid-column-gap: 2rem;
	justify-items: start;
	grid-template-columns: auto auto auto;
	grid-template-areas: 
		'site year menu'
	  'tagline tagline tagline'
		'contact contact contact'
		'works works works'
		'content content content'
		'title title title'
		'links links links';
}

.frame a {
  pointer-events: auto;
}

.frame__tipo_logo {
	grid-area: tagline;
	max-width: 168px;
}

.frame__minimal__logo {
	margin: 0 auto;
	grid-area: site;
}

.frame__minimal__logo img {
	max-width: 56px;
}

.frame__projects {
	grid-area: works;
	align-self: center;
}

.frame__projects ul {
	grid-area: works;
	display: flex;
	flex-direction: column;
	pointer-events: none;
	padding: 0;
	margin: 0;
}

.frame__projects > span {
	margin-bottom: 0.5rem;
	font-size: 0.7rem;
	opacity: 0.5;
}

.frame__projects a {
	pointer-events: auto;
	padding: 0.4rem 0;
	position: relative;
	font-size: 1rem;
	font-variation-settings: 'wght' 500;
	text-decoration: none;
	color: var(--color-white);
	opacity: 0.5;
	line-height: 1;
}

.frame__projects a:hover,
.frame__projects a.current {
	opacity: 1;
}

.frame__footer-right {
	width: 100%;
	grid-area: footer;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.frame__news {
	grid-area: news;
}

.frame__old {
	justify-self: end;
}

.frame__old a {
	display: flex;
	align-items: center;
}

.frame__news,
.frame__copy,
.frame__old {
	font-size: 12px;
	font-variation-settings: 'wght' 500;
}

.frame__contact {
	grid-area: contact;
	justify-self: end;
	position: relative;
	z-index: 2000;
}

.frame__contact-button {
	max-height: max-content;
	min-width: 39px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 14px;
	font-variation-settings: 'wght' 500;
	padding: 8px 10px;
	border: 1px solid rgba(255,255,255,0.2);
	cursor: pointer;
	transition: border-color 0.3s, background-color 0.3s;
	position: relative;
	z-index: 2000;
}

.frame__contact-button:hover {
	border-color: rgba(255,255,255,0.5);
	background-color: rgba(255,255,255,0.05);
}

.frame__contact-text {
	display: inline;
}

.frame__contact-close {
	display: none;
	font-size: 1.5rem;
	font-weight: 300;
	line-height: 0.875;
}

.frame__contact.contact--active .frame__contact-button {
	border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.05);
}

.frame__contact.contact--active .frame__contact-text {
	display: none;
}

.frame__contact.contact--active .frame__contact-close {
	display: inline;
}

.contact__popup {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 331px;
	background: rgba(0, 0, 0, 0.00);
	backdrop-filter: blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	padding: 1rem 4rem 1rem 1rem;
	font-size: 14px;
	color: var(--color-white);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s linear, visibility 0.3s linear;
}

.frame__contact.contact--active .contact__popup {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
}

.contact__popup h2 {
	font-size: 14px;
	margin: 0 0 1rem 0;
}

.frame__content {
	grid-area: content;
	width: 100%;
	height: 100%;
	min-height: 0;
	display: grid;
	grid-template-areas: 'content-item';
}

.frame__title-main {
	text-transform: none;
	line-height: 0.9;
	font-weight: 400;
	margin: 0;
	grid-area: content;
	color: var(--color-white);
	font-size: var(--font-size-title);
	display: grid;
	align-content: center;
	width: 100%;
	pointer-events: none;
}

.frame__title-main span:last-child {
	margin-left: 1em;
}

.content {
	pointer-events: none;
	position: relative;
	opacity: 0;
	grid-area: content-item;
	display: grid;
	grid-template-columns: repeat(12,1fr);
	grid-template-rows: repeat(12,1fr);
	width: 100%;
	height: 100%;
	min-height: 0;
	max-height: 100%;
	z-index: 0;
}

.content--current {
	opacity: 1;
}

.content__title {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 10;
	text-transform: none;
	font-weight: 500;
	opacity: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin: 0;
	line-height: 0.9;
	color: var(--color-white);
	font-size: var(--font-size-title);
	pointer-events: none;
}

.no-js .content__title,
.no-js .content__text,
.no-js .content--default {
	opacity: 1;
}

.content--default {
    pointer-events: none;
}

.content__text {
	position: relative;
	z-index: 10;
	opacity: 0;
	margin: 0;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--color-white);
	font-size: 16px;
}

.content__text sup {
    font-size: 0.5em;
    vertical-align: super;
    margin-left: 0.2em;
}

.content__text strong {
    font-weight: 500;
    color: #fff;
}

.content--default .content__text {
    color: rgba(255,255,255,0.7);
}


.content__img {
	position: relative;
	will-change: clip-path, filter;
}

.content__img-inner {
	background-size: cover;
	background-position: 50% 0%;
	width: 100%;
	height: 100%;
}

.pos-1 { grid-area: 1 / 1 / 5 / 5; }
.pos-2 { grid-area: 5 / 8 / 10 / 11; }
.pos-3 { grid-area: 8 / 3 / 11 / 5; }

.pos-4 { grid-area: 3 / 5 / 8 / 10; }
.pos-5 { grid-area: 7 / 4 / 10 / 7; }
.pos-6 { grid-area: 2 / 2 / 4 / 4; }

.pos-7 { grid-area: 8 / 2 / 11 / 5; }
.pos-8 { grid-area: 2 / 8 / 8 / 11; }
.pos-9 { grid-area: 3 / 3 / 6 / 6; }

.pos-10 { grid-area: 7 / 7 / 10 / 9; }
.pos-11 { grid-area: 4 / 1 / 10 / 4; }
.pos-12 { grid-area: 2 / 5 / 6 / 9; }

.pos-13 { grid-area: 3 / 8 / 8 / 11; }
.pos-14 { grid-area: 1 / 5 / 5 / 7; }
.pos-15 { grid-area: 6 / 2 / 11 / 5; }

/* New positions for texts */
.pos-center { grid-area: 1 / 1 / -1 / -1; place-self: center; text-align: center; font-size: clamp(3rem, 15vw, 12rem); max-width: none; }
.pos-bottom-right { grid-area: 8 / 8 / 11 / 11; place-self: end; text-align: right; }

.pos-default-paragraph { 
    grid-area: 6 / 6 / 9 / -1; 
    text-align: left;
    font-size: clamp(1.625rem, 1.3571rem + 0.8571vw, 2rem);
	mix-blend-mode: exclusion;
}

.pos-default-paragraph span {
	display: inline-block;
	padding-left: 2rem;
}

.pos-default-sub { 
    grid-area: 9 / 6 / 8/ -1; 
    font-size: 1rem;
	font-variation-settings: 'wght' 500;
    text-transform: none;
    margin-top: 3rem;
	color: var(--color-white) !important;
}


.pos-top-left { 
    grid-area: 1 / 1 / 4 / 4; 
    place-self: start; 
    text-align: left; 
    font-size: 5rem; 
    text-transform: none; 
    letter-spacing: -2px;
    font-weight: 500;
}
.pos-top-right { 
    grid-area: 1 / 10 / 2 / 11; 
    place-self: start; 
    justify-self: end; 
    text-align: right; 
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}
.pos-top-right:hover {
    background: rgba(255,255,255,0.1);
}

/* Vondom specific layout */
.pos-vondom-img { grid-area: 1 / 1 / 8 / 5; }
.pos-top-right-vondom { grid-area: 1 / 8 / 5 / -1; place-self: start; justify-self: end; text-align: left; max-width: 400px; }
.pos-bottom-right-vondom { grid-area: 10 / 8 / 12 / -1; place-self: end; max-width: 400px; }

/* Alma specific layout */
.pos-alma-img { grid-area: 2 / 1 / 8 / 5; }
.pos-top-right-alma { grid-area: 2 / 8 / 5 / -1; place-self: start; justify-self: end; text-align: left; max-width: 400px; }
.pos-bottom-right-alma { grid-area: 7 / 8 / 9 / -1; place-self: end; text-align: left; max-width: 400px; }

/* Arkoslight specific layout */
.pos-arkoslight-img { grid-area: 1 / 8 / 9 / -1; }
.pos-arkoslight-desc { grid-area: 10 / 9 / 10 / -1; place-self: start; justify-self: end; text-align: left; padding-bottom: 1rem; max-width: 400px; }
.pos-arkoslight-sub { grid-area: 11 / 9 / 11 / -1; place-self: end; justify-self: end; text-align: left; width: 100%; max-width: 400px; }

/* Erre specific layout */
.pos-erre-img { grid-area: 4 / 3 / 10 / 6; }
.pos-top-right-erre { grid-area: 4 / 9 / 5 / -1; place-self: start; text-align: left; max-width: 400px; }
.pos-mid-right-erre { grid-area: 6 / 9 / 8 / -1; place-self: start; text-align: left; max-width: 300px; }

/* Belros specific layout */
.pos-belros-img { grid-area: 6 / 7 / -1 / -1; }
.pos-top-right-belros { grid-area: 1 / 9 / 4 / -1; place-self: start; text-align: left; max-width: 400px; }
.pos-mid-right-belros { grid-area: 2 / 9/ 6 / -1; place-self: center start; text-align: left; max-width: 300px; }

/* Zeleros specific layout */
.pos-zeleros-img { grid-area: 1 / 8 / 7 / -1;}
.pos-bottom-right-zeleros { grid-area: 9 / 10 / 11 / -1; place-self: start; text-align: left; max-width: 400px; }
.pos-sub-right-zeleros { grid-area: 10 / 10 / 12 / -1; place-self: end start; text-align: left; max-width: 400px; }

/* IMR specific layout */
.pos-imr-img { grid-area: 5 / 7 / 9 / 10; place-self: center end; }
.pos-top-right-imr { grid-area: 1 / 10 / 5 / -1; place-self: start; text-align: left; max-width: 400px; }
.pos-bottom-right-imr { grid-area: 10 / 10 / 12 / -1; place-self: end start; text-align: left; max-width: 300px; }

/* Ophion specific layout */
.pos-ophion-img { grid-area: 5 / 1 / 12 / 5; }
.pos-top-right-ophion { grid-area: 2 / 10 / 5 / -1; place-self: start; text-align: left; max-width: 400px; }
.pos-bottom-right-ophion { grid-area: 10 / 10 / 10 / -1; place-self: end start; text-align: left; max-width: 300px; }




.background {
	position: fixed;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  z-index: -1;
  grid-template-areas: 'background';
  grid-template-columns: 100%;
  grid-template-rows: 100%;
  pointer-events: none;
  place-items: center;
}

.background::after {
	content: '';
	grid-area: background;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	z-index: 2;
	pointer-events: none;
}


.background__image {
	position: relative;
	z-index: 0;
	grid-area: background;
	background-size: cover;
	width: 100%;
	height: 100%;
	opacity: 0;
}

.background__video {
	position: relative;
	z-index: 1;
	grid-area: background;
	object-fit: cover;
	width: 100%;
	height: 100%;
	opacity: 0;
}

/* ─── Mobile layout (below 1025px / iPad Pro) ───────────────────── */
@media screen and (max-width: 1024px) {

	/* ── Frame: full-viewport grid ── */
	.frame {
		--page-padding: 1rem 0.625rem;

		position: fixed;
		top: 0;
		left: 0;
		height: 100dvh;
		min-height: unset;
		width: 100%;
		overflow: clip;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto 1fr auto;
		grid-row-gap: 0;
		grid-column-gap: 0;
		grid-template-areas:
			'site contact'
			'content content'
			'works works';
		align-items: stretch;
	}

	/* Hide elements not needed on mobile */
	.frame__tipo_logo,
	.frame__news,
	.frame__copy,
	.frame__old,
	.frame__title-main {
		display: none;
	}

	/* ── Header row ── */
	.frame__minimal__logo {
		margin: 0;
		align-self: center;
	}

	.frame__contact {
		justify-self: end;
		align-self: center;
		font-size: 0.75rem;
		padding: 6px 10px;
	}

	/* ── Content area ── */
	.frame__content {
		grid-area: content;
		min-height: 0;
		overflow: hidden;
		padding-bottom: 2rem;
	}

	/* ── Unified project layout ── */
	.content {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1.75rem;
		padding: 0.5rem 1.25rem;
		grid-template-columns: unset;
		grid-template-rows: unset;
	}

	.content--default {
		justify-content: flex-end;
		padding-bottom: 1.5rem;
	}

	/* Title — static, top of card */
	.content__title {
		position: static;
		width: auto;
		height: auto;
		font-size: clamp(2rem, 8vw, 3.5rem);
		order: 1;
		flex-shrink: 0;
	}

	/* Image / Video — center, contained */
	.content__img {
		order: 2;
		width: 80%;
		max-width: 340px;
		aspect-ratio: 4 / 3;
		flex-shrink: 1;
		min-height: 0;
		overflow: hidden;
		border-radius: 4px;
	}

	/* Texts — below image */
	.content__text {
		order: 3;
		font-size: 0.85rem;
		line-height: 1.25;
		text-align: center;
		max-width: 90%;
	}

	/* Reset ALL project-specific grid positions for mobile */
	[class*="pos-"] {
		grid-area: unset !important;
		place-self: unset !important;
		justify-self: unset !important;
		max-width: 600px !important;
	}

	/* Default state texts */
	.pos-default-paragraph {
		font-size: clamp(1.15rem, 4vw, 1.5rem) !important;
		text-align: center;
		max-width: 90% !important;
		mix-blend-mode: exclusion;
	}

	.pos-default-sub {
		font-size: 0.85rem !important;
		text-align: center;
		margin-top: 0.5rem;
	}

	/* ── Project menu — horizontal scroll at bottom ── */
	.frame__projects {
		width: 100%;
		overflow: visible;
	}

	.frame__projects ul {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 0;
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		touch-action: pan-x;
		scroll-snap-type: x mandatory;
		pointer-events: auto;
		/* Glass effect */
		background: rgba(255, 255, 255, 0.4);
		backdrop-filter: blur(18px);
		-webkit-backdrop-filter: blur(18px);
		padding: 0 0.75rem;
		padding-bottom: env(safe-area-inset-bottom, 0);
		white-space: nowrap;
		z-index: 100;
		-ms-overflow-style: none;
		scrollbar-width: none;
		border-radius: 8px;
	}

	.frame__projects ul::-webkit-scrollbar {
		display: none;
	}

	/* Hide "Recent works" label */
	.frame__projects > span {
		display: none;
	}

	/* Each project link — compact horizontal item */
	.frame__projects a {
		padding: 0.85rem 0.75rem;
		font-size: 0.75rem;
		letter-spacing: 0.06em;
		white-space: nowrap;
		color: #000;
		transition: color 0.3s;
		flex-shrink: 0;
		scroll-snap-align: start;
	}

	.frame__projects a.current {
		color: #000;
	}

	/* Remove card-style pseudo-elements */
	.frame__projects a::before,
	.frame__projects a::after {
		display: none;
	}

	/* ── Background — visible on mobile ── */
	.background {
		display: grid;
	}
}

@media screen and (min-width: 1025px) {
	body {
		--page-padding: 1rem 2.5rem;
	}
	.frame {
		position: fixed;
		bottom: 0;
		left: 0;
		height: 100dvh;
		min-height: 725px;
		width: 100%;
		grid-template-columns: 10% 1fr 1fr 1fr 10%;
		grid-template-rows: auto auto 1fr auto auto;
		align-content: space-between;
		grid-template-areas: 
		'tagline ... site year contact'
		'tagline content content content content'
		'works content content content content'
		'. content content content content'
		'news news . footer footer';
	}
	.frame__projects {
    margin-bottom: 10vh;
  }
	.frame__title-main {
		grid-area: 5 / 3 / 2 / 6;
	}
}

@media screen and (max-height: 924px) {
	.pos-default-paragraph {
		grid-area: 5 / 6 / 9 / -1;
	}
}

/* ─── Modal Styles ─────────────────────────────────── */
.modal__text {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.modal__text p {
	margin: 0;
	line-height: 1.25;
}

.modal__contact-info {
	display: flex;
	flex-direction: column;
	margin-bottom: 4rem;
}

.modal__contact-adress {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.modal__social {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.modal__social a {
	font-size: 0.75rem;
}
