/* ==========================================================================
   Fonts — self-hosted (no CDN calls at runtime), sourced from Google Fonts:
   Anton = bold condensed display type for headlines/badges.
   Permanent Marker = hand-lettered accent for the logo wordmark.
   ========================================================================== */
@font-face {
	font-family: 'Anton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/anton-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Anton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/anton-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Permanent Marker';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/permanent-marker-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Design tokens — palette lifted from the "Marvão Rock Fest" poster:
   hot pink field, orange glow, ink black type, torn-paper off-white.
   ========================================================================== */
:root {
	--color-pink: #e21a74;
	--color-pink-deep: #b81163;
	--color-orange: #f37b34;
	--color-ink: #141110;
	--color-paper: #f2ddcc;
	--color-paper-dim: #e6c7ac;
	--color-white: #fffaf3;

	--font-display: 'Anton', 'Arial Narrow Bold', 'Helvetica Neue', sans-serif;
	--font-marker: 'Permanent Marker', cursive;
	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--ease-punch: cubic-bezier(0.22, 1, 0.36, 1);
	--gutter: 2rem;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

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

body {
	position: relative;
	margin: 0;
	overflow-x: hidden;
	font-family: var(--font-body);
	line-height: 1.5;
	color: var(--color-ink);
	background: var(--color-paper);
}

/* Full-bleed helper — breaks an element out of .site-main's max-width so its
   background spans the whole viewport, regardless of how deep it's nested. */
.full-bleed {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/* Faint paper grain — ties the light sections back to the hero's grain/poster
   feel without competing with it. Fixed so it reads as one continuous texture
   as the page scrolls, not a per-section repeat. */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: radial-gradient(rgba(20, 17, 16, 0.07) 1px, transparent 1px);
	background-size: 3px 3px;
	opacity: 0.6;
}

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

a {
	color: inherit;
}

/* Header — sticky so the logo (which links home) and nav stay reachable while
   scrolling standalone pages like Contactos/Onde Ficar, not just at page load. */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1.25rem 2rem;
	background: var(--color-ink);
	color: var(--color-white);
	box-shadow: 0 2px 0 var(--color-pink);
}

.site-title {
	font-family: var(--font-marker);
	font-size: 1.5rem;
	color: var(--color-white);
	text-decoration: none;
	transform: rotate(-2deg);
	display: inline-block;
}

.site-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}

.site-logo-image {
	height: 3.75rem;
	width: auto;
}

.site-logo-text {
	font-family: var(--font-marker);
	font-size: 1.35rem;
	color: var(--color-white);
	white-space: nowrap;
}

.primary-nav ul,
.primary-nav #primary-menu-fallback {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav a {
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--color-white);
	padding-bottom: 0.2rem;
}

.primary-nav a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--color-pink);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s var(--ease-punch);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* Mobile nav toggle (hamburger) — hidden on desktop, shown under 768px */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	background: transparent;
	border: 2px solid var(--color-white);
	border-radius: 0.35rem;
	cursor: pointer;
}

.nav-toggle-bar {
	display: block;
	width: 1.25rem;
	height: 2px;
	margin: 0 auto;
	background: var(--color-white);
	transition: transform 0.3s var(--ease-punch), opacity 0.2s;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Main content */
.site-main {
	max-width: 1100px;
	margin: 0 auto;
	padding: var(--gutter);
}

/* Full-bleed first/last sections would otherwise leave a gap showing the body
   background, since .site-main's own top/bottom padding still applies around
   them — pull whichever section is first/last flush against the header/footer. */
.site-main.front-page > :first-child {
	margin-top: calc(var(--gutter) * -1);
}

.site-main.front-page > :last-child {
	margin-bottom: calc(var(--gutter) * -1);
}

/* Shared heading treatment for standard inner pages (Contactos, Informações,
   Regulamento, and any generic page.php) — without this they fall back to
   unstyled browser-default h1, out of step with the rest of the site. */
.site-main article > h1 {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: clamp(2rem, 5vw, 3rem);
	letter-spacing: 0.02em;
	margin-bottom: 1rem;
}

/* ==========================================================================
   Hero — pink field with a slow-pulsing orange glow, like the poster.
   ========================================================================== */
.hero {
	overflow: hidden;
	text-align: center;
	padding: 3rem 1.5rem 4rem;
	background: var(--color-pink);
	color: var(--color-ink);
	isolation: isolate;
}

.hero::before {
	content: '';
	position: absolute;
	inset: -20%;
	background: radial-gradient(circle at 50% 60%, var(--color-orange) 0%, transparent 60%);
	opacity: 0.9;
	animation: glow-pulse 6s ease-in-out infinite;
	z-index: -1;
}

@keyframes glow-pulse {
	0%, 100% { transform: scale(1); opacity: 0.85; }
	50% { transform: scale(1.12); opacity: 1; }
}

.hero-noise {
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0.05;
	background-image: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 3px),
		repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 3px);
	mix-blend-mode: multiply;
}

.hero-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.5rem;
	max-width: 900px;
	margin: 0 auto 2.5rem;
}

.hero-logo {
	display: inline-block;
	transform: rotate(-3deg);
}

/* Text fallback (no logo image bundled/uploaded yet) */
.hero-logo.site-title {
	font-family: var(--font-marker);
	font-size: 1.75rem;
	line-height: 1.1;
	color: var(--color-white);
	text-shadow: 2px 2px 0 var(--color-ink);
}

.hero-logo .site-logo-image {
	height: 4.5rem;
	width: auto;
	filter: drop-shadow(2px 2px 0 var(--color-ink));
}

.hero-datebadge {
	background: var(--color-ink);
	color: var(--color-white);
	font-family: var(--font-display);
	font-size: 1.25rem;
	line-height: 1.15;
	letter-spacing: 0.03em;
	padding: 0.6rem 1rem;
	border-radius: 0.25rem;
	transform: rotate(3deg);
	transition: transform 0.3s var(--ease-punch);
}

.hero-datebadge:hover {
	transform: rotate(0deg) scale(1.05);
}

.hero-datebadge small {
	display: block;
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-top: 0.25rem;
}

.hero-headline {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: clamp(1.9rem, 6vw, 3.75rem);
	line-height: 1.05;
	max-width: 900px;
	margin: 0 auto;
	letter-spacing: 0.01em;
}

.hero-cartaz {
	display: inline-block;
	font-family: var(--font-marker);
	font-size: 1.5rem;
	color: var(--color-white);
	margin-top: 1.5rem;
	transform: rotate(-2deg);
	animation: wiggle 4s ease-in-out infinite;
}

@keyframes wiggle {
	0%, 100% { transform: rotate(-2deg); }
	50% { transform: rotate(2deg); }
}

/* Ticker strip */
.ticker {
	overflow: hidden;
	background: var(--color-ink);
	color: var(--color-pink);
	white-space: nowrap;
	padding: 0.6rem 0;
}

.ticker-track {
	display: inline-block;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.9rem;
	animation: ticker-scroll 22s linear infinite;
}

@keyframes ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* Buttons */
.button {
	display: inline-block;
	margin-top: 1.5rem;
	padding: 0.85rem 2rem;
	border-radius: 999px;
	text-decoration: none;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.95rem;
	transition: transform 0.25s var(--ease-punch), background-color 0.25s, color 0.25s;
}

.button-primary {
	background: var(--color-ink);
	color: var(--color-white);
}

.button-primary:hover,
.button-primary:focus-visible {
	background: var(--color-white);
	color: var(--color-ink);
	transform: translateY(-3px) rotate(-1deg);
}

.button-secondary {
	background: transparent;
	color: var(--color-ink);
	border: 2px solid var(--color-ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
	background: var(--color-ink);
	color: var(--color-white);
	transform: translateY(-3px) rotate(1deg);
}

/* Front page sections */
.front-page section {
	padding: 4.5rem 0;
	border-top: 1px solid var(--color-paper-dim);
}

.front-page h2 {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	letter-spacing: 0.02em;
	margin-bottom: 1rem;
}

.front-page .sponsors,
.front-page .contact-teaser {
	background: var(--color-ink);
	color: var(--color-white);
	padding: 4.5rem var(--gutter);
	text-align: center;
	border-top: none;
}

.front-page .sponsors p,
.front-page .contact-teaser p {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.front-page .sponsors h2,
.front-page .contact-teaser h2 {
	color: var(--color-pink);
}

.front-page .sponsors .button-secondary,
.front-page .contact-teaser .button-secondary {
	color: var(--color-white);
	border-color: var(--color-white);
}

.front-page .sponsors .button-secondary:hover,
.front-page .contact-teaser .button-secondary:hover {
	background: var(--color-white);
	color: var(--color-ink);
}

/* Spotify mockup — same strip size as .ticker, but centered with a gentle sway
   instead of a full-width scroll (there's only one short message, not a dense
   repeating line, so scrolling it off to the side left the strip looking empty).
   See the PHP comment above this section on the front page for the real-embed swap-in. */
.spotify-ticker {
	display: flex;
	align-items: center;
	justify-content: center;
}

.spotify-ticker .ticker-track {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: #1db954;
	animation: spotify-sway 3s ease-in-out infinite;
}

.spotify-ticker .card-icon svg {
	width: 1rem;
	height: 1rem;
	stroke: #1db954;
}

@keyframes spotify-sway {
	0%, 100% { transform: translateX(-10px); }
	50% { transform: translateX(10px); }
}

/* Lineup */
.lineup-intro {
	opacity: 0.75;
}

.lineup-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.lineup-card {
	padding: 1.75rem 1rem;
	text-align: center;
	background: var(--color-paper);
	border: 2px dashed var(--color-ink);
	border-radius: 0.5rem;
	transition: transform 0.3s var(--ease-punch), background-color 0.3s;
}

.lineup-card:hover {
	transform: rotate(-2deg) translateY(-4px);
	background: var(--color-white);
}

.lineup-day {
	display: block;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.5rem;
}

.lineup-slot {
	opacity: 0.6;
}

/* Contact page cards */
.contact-info {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-top: 2rem;
}

.contact-block {
	min-width: 0;
	padding: 1.5rem;
	background: var(--color-paper-dim);
	border-radius: 0.5rem;
	transition: transform 0.3s var(--ease-punch);
}

.contact-block p {
	overflow-wrap: break-word;
	word-break: break-word;
}

.contact-block:hover {
	transform: translateY(-4px);
}

.contact-block h2 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.contact-block .card-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.contact-block .card-icon svg {
	width: 1.25rem;
	height: 1.25rem;
	stroke: var(--color-pink);
}

.contact-map {
	height: 350px;
	margin-top: 2rem;
	border-radius: 0.5rem;
	overflow: hidden;
	border: 2px solid var(--color-ink);
}

/* Regulamento page — plain rules list, just needs comfortable reading spacing */
.page-regulamento ul {
	margin: 1.5rem 0;
	padding-left: 1.25rem;
}

.page-regulamento li {
	margin-bottom: 0.65rem;
	line-height: 1.6;
}

/* Centered statement hero — used by 404 and Bilhetes (Tickets, still "brevemente") */
.page-hero {
	text-align: center;
	padding: 5rem 1rem;
}

.page-hero h1 {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: clamp(1.75rem, 5vw, 3rem);
}

.page-hero p {
	opacity: 0.75;
	margin-bottom: 1.5rem;
}

/* Informações page — jump links + stacked sections */
.info-jumplinks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.5rem 0 3rem;
}

.info-jumplinks a {
	display: inline-block;
	padding: 0.4rem 1rem;
	border: 2px solid var(--color-ink);
	border-radius: 999px;
	text-decoration: none;
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.03em;
	transition: background-color 0.25s, color 0.25s;
}

.info-jumplinks a:hover {
	background: var(--color-ink);
	color: var(--color-white);
}

.info-section {
	padding: 2.5rem 0;
	border-top: 1px solid var(--color-paper-dim);
}

.info-section:first-of-type {
	border-top: none;
}

.info-section h2 {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	margin-bottom: 1rem;
}

.info-section h3 {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: 1.1rem;
	margin: 1.75rem 0 0.5rem;
}

.info-section h4 {
	font-weight: 700;
	margin: 1.25rem 0 0.25rem;
}

.info-section li {
	margin-bottom: 0.4rem;
}

.info-tip {
	font-style: italic;
	opacity: 0.75;
}

/* Tickets teaser on the homepage */
.tickets-teaser {
	text-align: center;
}

/* Footer */
.site-footer {
	padding: 2rem;
	margin-top: 3rem;
	background: var(--color-ink);
	color: var(--color-white);
	font-size: 0.875rem;
}

.site-footer a:hover {
	color: var(--color-pink);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.language-switcher {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.language-switcher a {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--color-white);
	border-radius: 999px;
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease-punch);
}

.language-switcher a:hover {
	transform: translateY(-2px);
}

.language-switcher a.is-active {
	background: var(--color-pink);
	border-color: var(--color-pink);
	color: var(--color-ink);
}

/* ==========================================================================
   Responsive — tablet and phone adjustments.
   ========================================================================== */
@media (max-width: 768px) {
	:root {
		--gutter: 1.5rem;
	}

	.nav-toggle {
		display: flex;
	}

	.primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-nav ul,
	.primary-nav #primary-menu-fallback {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
		padding-top: 1rem;
	}

	.hero-top {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.hero-logo,
	.hero-datebadge {
		transform: rotate(0deg);
	}

	.hero {
		padding: 2.5rem 1rem 3rem;
	}

	.front-page section {
		padding: 3rem 0;
	}

	.front-page .sponsors,
	.front-page .contact-teaser {
		padding: 3rem var(--gutter);
	}

	.contact-info {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.site-logo-image {
		height: 2.75rem;
	}

	.site-logo-text {
		font-size: 1.1rem;
	}

	.hero-headline {
		font-size: clamp(1.6rem, 8vw, 2.25rem);
	}

	.hero-logo {
		font-size: 1.4rem;
	}

	.hero-cartaz {
		font-size: 1.25rem;
	}

	.button {
		display: block;
		width: 100%;
		text-align: center;
	}

	.lineup-grid {
		grid-template-columns: 1fr 1fr;
	}

	.contact-info {
		grid-template-columns: 1fr;
	}

	.contact-map {
		height: 250px;
	}
}
