/* CSS Reset - https://www.joshwcomeau.com/css/custom-css-reset/ */

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

* {
  margin: 0;
}

html, body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

/* End of CSS Reset*/

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/Lato.woff2) format('woff2');
}

html {
	--music-link-height: 62px;
}

body {
	padding: 20px;
	padding-top: 53px;

	font-family: "Lato", helvetica, arial, sans;
	color: white;
}

main {
	max-width: 660px;
	margin-left: auto;
	margin-right: auto;

	/* create new stacking context and position it on top of the background image */
	position: relative;
	z-index: 2;
}

.background {
  position: fixed;
  inset: -50%;
  background-color: #000000;
}

.background img {
  position: absolute;
  inset: 0px;
  margin: auto;

  min-width: 55%;
  min-height: 55%;

  filter: blur(35px);
  opacity: .3;
}

header {
	margin-bottom: 20px;

	border-radius: 10px;
	background-color: #333333;
	
	text-align: center;
	position: relative;
	padding-bottom: 27px;
}

/* Coveret er et link, der åbner lightboxen */
.cover-link {
	display: inline-block;
	cursor: zoom-in;
	border-radius: 10px;
}

.cover-link:focus-visible {
	outline: 2px solid white;
	outline-offset: 4px;
}

header img {
	width: 170px;
	height: 170px;
	max-width: 170px;
	max-height: 170px;
	border-radius: 10px;
	display: inline-block;

	box-shadow: 0px 0px 25px hsl(0deg 0% 0% / 0.35);

	transform: translateY(-28px);
}

h1 {
	display: block;
	margin-top: -9px;

	font-family: helvetica, arial, sans;
	font-size: 34px;
}

h2 {
	margin-top: -6px;

	font-size: 19px;
	font-weight: 400;
}

/* Lokation under kunstnernavn – nål + dæmpet tekst (HyperFollow-stil) */
.location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0 14px;

	font-size: 15px;
	color: hsl(0deg 0% 100% / 0.55);
}

.location__icon {
	flex-shrink: 0;
	display: inline-block;
}

ul {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 20px;

	list-style-type: none;
	padding: 0;
	padding-bottom: 50px;
}

/* Tekstlinje om butikker, der først får indhold på udgivelsesdagen */
.links__upcoming {
	margin: -30px 0 50px;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: hsl(0deg 0% 100% / 0.6);
}

.links__upcoming strong {
	font-weight: 700;
	color: hsl(0deg 0% 100% / 0.85);
}

ul li a {
	display: flex;
	align-items: center;
	height: var(--music-link-height);
	padding-left: 82px;

	border-radius: 10px;
	color: white;
	box-shadow: 0px 0px 25px hsl(0deg 0% 0% / 0.35);

	background-color: hsl(0deg 100% 100% / 0.17);
	background-image: url('../images/caret-right-solid.png');
	background-repeat: no-repeat;
	background-position: center right 20px;

	text-decoration: none;
	font-size: 18px;
	font-weight: 400;

	position: relative;

	/* force rounded corners for music stores logos */
	overflow: hidden;
}

ul li a:hover {
	background-color: hsl(0deg 0% 100% / 0.35);
}

ul li a img {
	max-height: var(--music-link-height);
	position: absolute;
	top: 0;
	left: 0;

	box-shadow: 0px 0px 5px black;
}

@media screen and (max-width: 750px) {
	header{
		background: transparent;
		margin-bottom: 0;
		padding-bottom: 20px;
	}

	h1 {
		margin-top: -20px;
	}

	h2 {
		margin-bottom: 4px;
	}
}
/* Bjælke der vises, når siden åbnes med ?preview=released eller ?now=… */
.preview-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	padding: 8px 16px;

	background-color: #ffcc00;
	color: #000;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
}

.preview-banner a {
	color: inherit;
}

body.has-preview {
	padding-top: 93px; /* 53px normal + bjælkens højde */
}

/* ========================== LIGHTBOX ========================== */

.lightbox {
	margin: auto; /* resettens * { margin: 0 } fjerner ellers browserens centrering af <dialog> */
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	max-width: min(90vw, 90vh);
	max-height: 90vh;
	overflow: visible;
}

.lightbox::backdrop {
	background: hsl(0deg 0% 0% / 0.88);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.lightbox img {
	display: block;
	width: min(90vw, 90vh);
	height: auto;
	border-radius: 10px;
	box-shadow: 0px 0px 40px hsl(0deg 0% 0% / 0.6);
	cursor: zoom-out;
}

.lightbox__close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 40px;
	height: 40px;

	border: none;
	border-radius: 50%;
	background: white;
	color: black;
	font-size: 26px;
	line-height: 40px;
	cursor: pointer;
	box-shadow: 0px 0px 15px hsl(0deg 0% 0% / 0.5);
}

.lightbox__close:hover {
	background: #eee;
}

.lightbox__close:focus-visible {
	outline: 2px solid white;
	outline-offset: 3px;
}

/* ========================== PRE-SAVE SECTION ========================== */

.presave {
	margin-bottom: 20px;
}

.presave__heading {
	margin: 0 0 12px;
	text-align: center;
	font-size: 19px;
	font-weight: 400;
	opacity: .85;
}

.presave__card {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 24px;

	border-radius: 10px;
	background-color: #333333;
	box-shadow: 0px 0px 25px hsl(0deg 0% 0% / 0.35);

	/* nyt stacking context + klip den slørede baggrund til kortets hjørner */
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

/* Sløret cover-baggrund */
.presave__backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transform: scale(1.25);
	filter: blur(40px);
	z-index: -2;
}

/* Fast mørkt scrim så tekst altid er læsbar uanset coverets farver */
.presave__scrim {
	position: absolute;
	inset: 0;
	background-color: hsl(0deg 0% 0% / 0.55);
	z-index: -1;
}

.presave__artwork {
	flex-shrink: 0;
	width: 220px;
	height: 220px;
	object-fit: cover;
	border-radius: 10px;
	box-shadow: 0px 0px 25px hsl(0deg 0% 0% / 0.5);
}

.presave__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	min-width: 0;

	padding: 16px 20px;
	border-radius: 16px;
	border: 1px solid hsl(0deg 0% 100% / 0.1);
	background-color: hsl(0deg 0% 0% / 0.35);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);

	text-align: center;
}

.presave__title {
	margin: 0;
	font-family: helvetica, arial, sans;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.presave__artist {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	opacity: .7;
}

/* Nedtælling */
.countdown {
	display: flex;
	align-items: center;
	gap: 8px;
}

.countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 48px;
}

.countdown__value {
	font-size: 36px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.countdown__label {
	margin-top: 4px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	opacity: .7;
}

.countdown__colon {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	padding-bottom: 16px;
	opacity: .6;
	user-select: none;
}

.countdown__released {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	color: #ff5c5c;
	animation: presaveFadeIn 0.5s ease both;
}

@keyframes presaveFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: none; }
}

/* Knap */
.presave__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 28px;

	border: none;
	border-radius: 12px;
	background-color: #1DB954;
	color: white;
	box-shadow: 0px 0px 25px hsl(0deg 0% 0% / 0.35);

	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
}

.presave__button:hover:not(:disabled) {
	background-color: #1ed760;
}

.presave__button:active:not(:disabled) {
	transform: scale(.98);
}

.presave__button:focus-visible {
	outline: 2px solid white;
	outline-offset: 3px;
}

.presave__button:disabled {
	cursor: default;
	opacity: .85;
}

.presave__icon {
	flex-shrink: 0;
}

/* Apple Music pre-add – sekundær knap, samme form som Spotify-knappen */
.presave__button--apple {
	background-color: #fa243c;
	text-decoration: none;
}

.presave__button--apple:hover {
	background-color: #ff3b4f;
}

/* "↗" i knapperne: markerer at man forlader siden */
.presave__ext {
	font-size: 14px;
	opacity: .75;
	margin-left: -2px;
}

/* Knap + tilhørende forklaring */
.presave__action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.presave__action .presave__button {
	width: 100%;
}

/* Forklaring under hver knap */
.presave__hint {
	margin: 0;
	max-width: 36ch;
	font-size: 12px;
	line-height: 1.45;
	color: hsl(0deg 0% 100% / 0.6);
}

.presave__hint strong {
	font-weight: 700;
	color: hsl(0deg 0% 100% / 0.85);
}

.presave__buttons {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	width: 100%;
}

@media screen and (max-width: 750px) {
	.presave__card {
		flex-direction: column;
		padding: 20px;
		gap: 20px;
	}

	.presave__artwork {
		width: 200px;
		height: 200px;
	}

	.presave__panel {
		width: 100%;
		padding: 16px 12px;
	}

	.presave__title {
		font-size: 24px;
	}

	.countdown {
		gap: 4px;
	}

	.countdown__unit {
		min-width: 40px;
	}

	.countdown__value {
		font-size: 28px;
	}

	.countdown__colon {
		font-size: 22px;
		padding-bottom: 14px;
	}

}
