/* ==========================================================
   Banda di Nervesa – style.css
   ========================================================== */

:root {
	--navy-900: #070f22;
	--navy-800: #0a1630;
	--navy-700: #10224a;
	--navy-600: #1a3266;
	--copper:   #e0965a;
	--copper-2: #f2b37d;
	--cyan:     #49c6e5;
	--text:     #e9eef8;
	--muted:    #a9b6d3;
	--line:     rgba(233, 238, 248, .12);
	--radius:   16px;
	--shadow:   0 18px 40px -18px rgba(0, 0, 0, .6);
	--nav-h:    68px;
	--font-head: "Montserrat", system-ui, sans-serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--nav-h);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--navy-800);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	overflow-x: hidden;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: var(--copper-2); }

h1, h2, h3 {
	font-family: var(--font-head);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	margin: 0 0 .6em;
}
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
p { margin: 0 0 1.1em; }

:focus-visible {
	outline: 3px solid var(--copper);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 100;
	background: var(--copper);
	color: var(--navy-900);
	padding: .6rem 1rem;
	border-radius: 8px;
	font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
	width: 100%;
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.eyebrow {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--copper);
	margin: 0 0 .6rem;
}

/* ---------- Navigation ---------- */

.nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 max(1.25rem, calc((100% - 1160px) / 2 + 1.25rem));
	transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-solid {
	background: rgba(7, 15, 34, .92);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 var(--line);
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: .65rem;
	color: var(--text);
	text-decoration: none;
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 1.05rem;
}
.nav-brand img { width: 40px; height: 40px; }

.nav-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: .25rem;
}
.nav-links a {
	display: block;
	padding: .55rem .9rem;
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
	font-size: .95rem;
	border-radius: 999px;
	transition: background-color .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.is-active {
	background: rgba(224, 150, 90, .16);
	color: var(--copper-2);
}

.nav-toggle {
	display: none;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	cursor: pointer;
	padding: 12px;
}
.nav-toggle span {
	display: block;
	height: 2px;
	margin: 5px 0;
	background: var(--text);
	border-radius: 2px;
	transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
	.nav-toggle { display: block; }
	.nav-links {
		position: absolute;
		top: var(--nav-h);
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		padding: .5rem 1rem 1.25rem;
		background: rgba(7, 15, 34, .97);
		box-shadow: 0 20px 30px -10px rgba(0, 0, 0, .6);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s, transform .2s, visibility .2s;
	}
	.nav-links.is-open {
		transform: none;
		opacity: 1;
		visibility: visible;
	}
	.nav-links a {
		padding: .9rem 1rem;
		font-size: 1.05rem;
		border-radius: 10px;
	}
	.nav.menu-open { background: rgba(7, 15, 34, .97); }
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: calc(var(--nav-h) + 2rem) 1.25rem 7rem;
	text-align: center;
	background:
		linear-gradient(180deg, rgba(7, 15, 34, .75) 0%, rgba(10, 22, 48, .7) 55%, var(--navy-800) 100%),
		url("../img/Sfondo_alto.jpg") center 30% / cover no-repeat;
	background-color: var(--navy-800);
}
.hero-content { max-width: 760px; }
.hero-logo {
	width: clamp(96px, 18vw, 128px);
	height: auto;
	margin: 0 auto 1.25rem;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5));
}
.hero h1 {
	font-size: clamp(2.6rem, 8vw, 5rem);
	margin-bottom: .35em;
	text-shadow: 0 4px 30px rgba(0, 0, 0, .5);
}
.hero-sub {
	font-size: clamp(1.05rem, 2.4vw, 1.3rem);
	color: var(--text);
	opacity: .9;
	margin-bottom: 2rem;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .75rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: .75rem 1.6rem;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--copper); color: var(--navy-900); }
.btn-primary:hover { background: var(--copper-2); }
.btn-ghost { border: 2px solid rgba(233, 238, 248, .55); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(233, 238, 248, .08); }

/* ---------- Sound-wave dividers ---------- */

.wave {
	display: block;
	width: 100%;
	height: 50px;
	fill: var(--copper);
	opacity: .75;
}
.wave-hero {
	position: absolute;
	left: 0;
	bottom: 1.5rem;
}
.wave-divider { background: var(--navy-800); margin-bottom: -1px; }
.wave-footer { height: 36px; opacity: .45; margin-bottom: 2rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--navy-700); }
.section-head { text-align: center; margin-bottom: 2.75rem; }

/* Chi siamo */
.about {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}
.about-text { max-width: 68ch; }
.about-stats { display: grid; gap: 1rem; }
.stat {
	display: flex;
	flex-direction: column;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
}
.stat-num {
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 2.4rem;
	line-height: 1.1;
	color: var(--copper);
}
.stat-label { color: var(--muted); font-size: .95rem; }

/* Maestro */
.maestro {
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}
.maestro-photo {
	position: sticky;
	top: calc(var(--nav-h) + 1.5rem);
	aspect-ratio: 2 / 3;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	outline: 1px solid var(--line);
}
.maestro-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.maestro-text p:not(.eyebrow) { opacity: .92; }

/* Componenti */
.groups {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.5rem;
}
.group-card {
	display: flex;
	flex-direction: column;
	background: var(--navy-700);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform .25s, border-color .25s;
}
.group-card:hover { transform: translateY(-4px); border-color: rgba(224, 150, 90, .45); }

.group-photo {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}
.group-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}
.group-card:hover .group-photo img { transform: scale(1.04); }
.group-photo figcaption {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: 2.5rem 1.1rem .85rem;
	background: linear-gradient(180deg, transparent, rgba(7, 15, 34, .92));
}
.group-photo h3 { font-size: 1.4rem; margin: 0; }
.badge {
	min-width: 2.1rem;
	padding: .15rem .6rem;
	border-radius: 999px;
	background: var(--copper);
	color: var(--navy-900);
	font-weight: 700;
	font-size: .9rem;
	text-align: center;
}

.members {
	list-style: none;
	margin: 0;
	padding: 1.1rem;
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}
.members li {
	padding: .3rem .75rem;
	border-radius: 999px;
	background: rgba(233, 238, 248, .07);
	border: 1px solid var(--line);
	font-size: .9rem;
	line-height: 1.5;
}

/* Majorette */
.split {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}
.split-photo {
	aspect-ratio: 3 / 2;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	outline: 1px solid var(--line);
}
.split-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Contatti */
.contact-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	margin-bottom: 2rem;
}
.contact-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .35rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--navy-700);
	color: var(--text);
	text-decoration: none;
	transition: transform .2s, border-color .2s;
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(224, 150, 90, .55); }
.contact-card svg {
	width: 44px;
	height: 44px;
	padding: 10px;
	margin-bottom: .5rem;
	border-radius: 12px;
	fill: var(--copper);
	background: rgba(224, 150, 90, .14);
}
.contact-label { color: var(--muted); font-size: .9rem; }
.contact-value { font-weight: 600; overflow-wrap: anywhere; }

.section-alt .contact-card,
.section-alt .social-links a { background: var(--navy-800); }

/* Progetti */
.project-text { max-width: 68ch; margin: 0 auto 2rem; }
.doc-cards {
	grid-template-columns: repeat(2, 1fr);
	max-width: 820px;
	margin: 0 auto;
}

.map {
	aspect-ratio: 16 / 9;
	max-height: 460px;
	width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}
.map iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	filter: saturate(.85);
}

.social { text-align: center; margin-top: 3rem; }
.social p {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.2rem;
}
.social-links { display: flex; justify-content: center; gap: 1rem; }
.social-links a {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--navy-700);
	transition: background-color .2s, transform .2s;
}
.social-links a:hover { background: var(--copper); transform: translateY(-3px); }
.social-links svg { width: 24px; height: 24px; fill: var(--text); }
.social-links a:hover svg { fill: var(--navy-900); }

/* Footer */
.site-footer {
	background: var(--navy-900);
	padding-bottom: 2.5rem;
	text-align: center;
	color: var(--muted);
	font-size: .9rem;
}
.footer-inner img { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: .9; }
.footer-inner p { margin: 0 0 .3rem; }
.credit { opacity: .7; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.about { grid-template-columns: 1fr; }
	.about-stats { grid-template-columns: repeat(3, 1fr); order: 2; }
	.maestro, .split { grid-template-columns: 1fr; }
	.maestro-photo { position: static; max-width: 360px; width: 100%; margin: 0 auto; }
	.contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
	body { font-size: 1rem; }
	.about-stats { grid-template-columns: 1fr; }
	.stat { flex-direction: row; align-items: baseline; gap: .75rem; padding: 1rem 1.25rem; }
	.stat-num { font-size: 1.9rem; }
	.hero { padding-bottom: 6rem; }
	.hero-actions .btn { flex: 1 1 100%; }
	.hero-sub br { display: none; }
	.map { aspect-ratio: 4 / 5; }
	.contact-cards { gap: .9rem; }
	.contact-card {
		display: grid;
		grid-template-columns: 44px 1fr;
		column-gap: 1rem;
		row-gap: .1rem;
		align-items: center;
		padding: 1.1rem 1.25rem;
	}
	.contact-card svg { grid-row: span 2; margin: 0; }
	.nav-brand span { font-size: 1rem; }
}
