/* Dagens Nonsen.se — modern löpsedel (2026) */

@font-face { font-family: "Archivo"; src: url("fonts/Archivo-900-var.woff2") format("woff2"); font-weight: 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/Oswald-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/Oswald-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url("fonts/RobotoSlab-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
	--paper: #fde24a;          /* klassisk löpsedelsgul */
	--paper-edge: #f2cc22;
	--ink: #111;
	--red: #e3001b;
	--bg-1: #1b1f3a;
	--bg-2: #07080f;
	--accent: #ffe14d;
	--placard-w: min(92vw, 560px, calc((100svh - 150px) * 0.74));
}

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

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	color: #e8e9f2;
	font-family: "Oswald", "Arial Narrow", system-ui, sans-serif;
	background:
		radial-gradient(1200px 700px at 50% -10%, #3a4380 0%, transparent 60%),
		radial-gradient(900px 600px at 50% 120%, #2a0d1e 0%, transparent 60%),
		linear-gradient(var(--bg-1), var(--bg-2));
	background-attachment: fixed;
}

a { color: inherit; }

.stage {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 22px;
	padding: 24px 12px 8px;
}

/* ---------- Själva löpsedeln ---------- */

.placard {
	position: relative;
	width: var(--placard-w);
	aspect-ratio: 550 / 740;
	display: flex;
	flex-direction: column;
	padding: calc(var(--placard-w) * 0.035);
	color: var(--ink);
	background-color: var(--paper);
	/* papperskänsla: lätt brus + mjuk vinjett */
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
		radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(160, 110, 0, .22) 100%),
		linear-gradient(170deg, #fff1a0 0%, var(--paper) 35%, var(--paper-edge) 100%);
	border-radius: 3px;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, .5) inset,
		0 2px 4px rgba(0, 0, 0, .25),
		0 18px 40px -8px rgba(0, 0, 0, .55),
		0 40px 90px -20px rgba(0, 0, 0, .6);
	transform: rotate(-0.6deg);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
	animation: drop-in .5s cubic-bezier(.2, .9, .25, 1.1) both;
}
.placard:hover { transform: rotate(0deg) scale(1.005); }

@keyframes drop-in {
	from { opacity: 0; transform: translateY(-14px) rotate(-2deg); }
	to   { opacity: 1; transform: rotate(-0.6deg); }
}

/* ---------- Tidningshuvud ---------- */

.masthead { text-align: center; }

.tagline {
	margin: 0;
	font: 700 calc(var(--placard-w) * 0.062)/1 "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: .02em;
	display: flex;
	justify-content: space-between;
	gap: .3em;
}
.tagline span { color: var(--red); }

.logo {
	display: flex;
	justify-content: center;   /* centrerar även den hopträngda (scaleX) texten */
	margin-top: calc(var(--placard-w) * 0.012);
	padding: .08em 0 .16em;
	background: var(--red);
	color: #ffeb18;            /* Aftonbladet-gul */
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	font: 900 calc(var(--placard-w) * 0.1)/1.15 "Roboto Slab", Rockwell, Georgia, serif;
	letter-spacing: .01em;
	text-transform: uppercase;
	box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
	transition: filter .2s;
}
/* Kvällstidningslogga: fet slab-serif (Roboto Slab) i gul på röd botten */
.logo-txt {
	flex: none;
}
.logo:hover { filter: brightness(1.08); }

.extra {
	display: flex;
	justify-content: space-around;
	margin: calc(var(--placard-w) * 0.012) 0 0;
	padding: .08em 0;
	background: var(--ink);
	color: #fff;
	font: calc(var(--placard-w) * 0.058)/1.1 "Archivo", sans-serif;
	font-stretch: 80%;
	letter-spacing: .06em;
	text-transform: uppercase;
	transform: skewX(-8deg);
}

/* ---------- Nyheten ---------- */

.news {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-top: calc(var(--placard-w) * 0.03);
	text-align: center;
}

.headline, .subline {
	margin: 0;
	min-width: 0;
	font-family: "Archivo", Impact, "Arial Narrow Bold", sans-serif;
	font-weight: 900;
	font-stretch: 75%;
	text-transform: uppercase;
	overflow-wrap: normal;
	hyphens: manual;
	opacity: 0;
	transition: opacity .25s;
}
.fitted .headline, .fitted .subline { opacity: 1; }
.headline > span, .subline > span { display: block; width: 100%; }
/* Plats ovanför första raden för Å/Ä/Ö-prickar och ringar (annars klipps de av overflow: hidden) */
.headline > span { padding-top: .16em; }

.headline {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	font-size: calc(var(--placard-w) * 0.12);   /* fallback utan JS */
	line-height: 1.12;
	letter-spacing: .005em;
}

.subline {
	font-size: calc(var(--placard-w) * 0.065);
	line-height: 1.14;
	padding: .3em .2em .45em;
	border-top: 3px solid var(--ink);
	margin-right: 9%;   /* plats för hundöret */
}
.subline .who { color: var(--red); }

@media (scripting: none) {
	.headline, .subline { opacity: 1; }
}

/* ---------- Hundöra (ny löpsedel) ---------- */

.flip {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 13%;
	aspect-ratio: 1;
	background: linear-gradient(135deg, #fff6b8 0%, #f0cf33 55%, #c9a10e 100%);
	clip-path: polygon(0 0, 100% 0, 0 100%);
	filter: drop-shadow(-2px -2px 3px rgba(0, 0, 0, .25));
	transition: width .25s ease;
}
.placard::after {
	content: "";
	position: absolute;
	right: 0; bottom: 0;
	width: 13%;
	aspect-ratio: 1;
	background: var(--bg-2);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	pointer-events: none;
	transition: width .25s ease;
}
.placard:has(.flip:hover)::after, .flip:hover { width: 17%; }
.flip:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Knappar ---------- */

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	width: var(--placard-w);
}

.btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .55em 1.1em;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	backdrop-filter: blur(6px);
	color: #f1f2fa;
	font: 500 15px/1.2 "Oswald", system-ui, sans-serif;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, transform .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 6px 20px -6px rgba(227, 0, 27, .7);
}
.btn-primary:hover { background: #ff1a33; border-color: #ff1a33; }

kbd {
	font: 500 12px/1 system-ui, sans-serif;
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .25);
}

/* ---------- Sidfot & toast ---------- */

.site-footer {
	display: flex;
	justify-content: center;
	gap: 1.5em;
	flex-wrap: wrap;
	padding: 14px 12px 20px;
	font: 400 13px/1.4 system-ui, sans-serif;
	color: rgba(255, 255, 255, .45);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }

.toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 20px);
	padding: 10px 18px;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font: 500 15px/1.2 "Oswald", sans-serif;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
	.stage { padding-top: 14px; gap: 16px; }
	kbd { display: none; }
	.btn { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.placard { transform: none; }
}
