/* ==========================================================================
   Wine&Siena — the past editions (/edizioni-passate/, page-templates/edizioni.php).
   Loaded after ws.css on that page only. The theme's own language: the dark
   panels of the ticket page (night → brown, a champagne glow), Cormorant for
   the years, gold for what can be touched.
   A gallery, not a download list: each locandina large in its own
   proportions, the year's catalogue as paper sheets «behind» it, and a gold
   tab under it — «Catalogo 2026 · PDF · 6,3 MB» — visible on every screen.
   ≥ 900px: a gold line down the middle, tall posters left and right of it,
   wide ones across it. Phones: one poster per row, full width.
   ========================================================================== */

.ws-eds { --ws-eds-paper: #fbf3e8; --ws-eds-ink-on-dark: #efe3d2; }

/* --------------------------------------------------------------------------
   The story
   -------------------------------------------------------------------------- */
.ws-eds-story {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	margin: 0 0 clamp(2rem, 5vw, 4rem);
	padding: clamp(1.5rem, 4vw, 3.5rem);
	border-radius: var(--ws-radius);
	border: 1px solid rgba(255, 189, 120, .2);
	background: linear-gradient(135deg, rgba(33, 24, 16, .96), rgba(74, 42, 28, .92));
	color: var(--ws-eds-ink-on-dark);
	box-shadow: var(--ws-shadow);
}
.ws-eds-story::after {
	content: "";
	position: absolute;
	top: -35%;
	right: -12%;
	width: 50%;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(255, 189, 120, .26), transparent 62%);
	pointer-events: none;
}
.ws-eds-story > * { position: relative; z-index: 1; }
.ws-eds-story__title { color: #fff; font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 500; margin: 0 0 .5em; }
.ws-eds-story__text p { max-width: 60ch; color: rgba(244, 231, 211, .9); }
.ws-eds-story__text p:last-child { margin-bottom: 0; }
/* the thread: one sentence, large, before the story */
.ws-eds-story__text .ws-eds-story__first { font: italic 500 clamp(1.45rem, 2.4vw, 1.95rem)/1.28 var(--ws-font-display); color: #ffd9a3; max-width: 32ch; margin: 0 0 1.25rem; padding-left: 1rem; border-left: 2px solid var(--ws-gold); }

.ws-eds-stats { display: grid; gap: 1.25rem; align-content: center; margin: 0; }
.ws-eds-stats__item { display: grid; gap: .125rem; padding-left: 1.125rem; border-left: 2px solid var(--ws-gold); }
.ws-eds-stats__n { font: 500 clamp(2.6rem, 4.6vw, 3.6rem)/1 var(--ws-font-display); color: #ffd9a3; }
.ws-eds-stats__l { margin: 0; font-size: .95rem; letter-spacing: .03em; color: rgba(244, 231, 211, .85); }

.ws-eds-pillars {
	grid-column: 1 / -1;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
	margin: 0;
	padding: 0;
}
.ws-eds-pillars__item { padding-top: 1rem; border-top: 1px solid rgba(224, 180, 107, .45); }
.ws-eds-pillars__title { color: #fff; font-size: 1.5rem; font-weight: 500; margin: 0 0 .35em; }
.ws-eds-pillars__item p { margin: 0; font-size: 1rem; color: rgba(244, 231, 211, .86); }

/* --------------------------------------------------------------------------
   The gallery: a dark wall
   -------------------------------------------------------------------------- */
.ws-eds-gallery {
	position: relative;
	overflow: hidden;
	margin: 0 0 clamp(2rem, 5vw, 4rem);
	padding: clamp(1.5rem, 4.5vw, 4rem) clamp(1.25rem, 4.5vw, 4rem);
	border-radius: var(--ws-radius);
	border: 1px solid rgba(255, 189, 120, .16);
	background:
		radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 189, 120, .16), transparent 70%),
		linear-gradient(180deg, rgba(21, 16, 12, .97), rgba(46, 28, 18, .96));
	color: var(--ws-eds-ink-on-dark);
	box-shadow: var(--ws-shadow);
}
.ws-eds-gallery__head { text-align: center; max-width: 46rem; margin: 0 auto clamp(1.5rem, 4vw, 3rem); }
.ws-eds-gallery__title { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 500; margin: 0 0 .3em; }
.ws-eds-gallery__sub { margin: 0 auto; max-width: 58ch; color: rgba(244, 231, 211, .85); }

.ws-eds-list { position: relative; list-style: none; margin: 0; padding: 0; }

/* one edition */
.ws-ed { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 6vw, 6rem); align-items: center; padding: clamp(2rem, 4vw, 3.5rem) 0; }
.ws-ed__media { position: relative; z-index: 1; min-width: 0; }
.ws-ed__body { min-width: 0; max-width: 30rem; }

.ws-ed__label { font: 700 .78rem/1.4 var(--ws-font-text); letter-spacing: .22em; text-transform: uppercase; color: var(--ws-gold); margin: 0 0 .35rem; }
.ws-ed__year { font: 500 clamp(3.4rem, 7vw, 5.75rem)/.92 var(--ws-font-display); color: #fff; margin: 0 0 .5rem; letter-spacing: -.01em; }
.ws-ed__when { font-weight: 700; font-size: 1.0625rem; color: #ffd9a3; margin: 0 0 .5rem; }
.ws-ed__where { display: flex; gap: .5rem; align-items: flex-start; font-size: 1rem; line-height: 1.55; color: rgba(244, 231, 211, .88); margin: 0 0 .9rem; }
.ws-ed__where .ws-svg { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin-top: .125rem; color: var(--ws-gold); }
.ws-ed__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ws-ed__facts li { position: relative; padding-left: 1.25rem; font-size: 1rem; line-height: 1.55; color: var(--ws-eds-ink-on-dark); }
/* what the picture is (locandina, copertina del catalogo, banner, key visual) */
.ws-ed__pic { margin: .9rem 0 0; font-size: .9375rem; line-height: 1.5; font-style: italic; color: rgba(244, 231, 211, .72); }
.ws-ed__facts li::before { content: ""; position: absolute; left: .125rem; top: .62em; width: .45rem; height: .45rem; background: var(--ws-gold); transform: rotate(45deg); }

/* the poster and the catalogue behind it */
.ws-ed__cat, .ws-ed__fig { display: block; position: relative; margin: 0; }
.ws-ed__cat { color: inherit; text-decoration: none; isolation: isolate; border-radius: .5rem; }
.ws-ed__frame { position: relative; z-index: 2; display: block; overflow: hidden; border-radius: .375rem; background: #2a1d14; box-shadow: 0 1.75rem 3.25rem -1.25rem rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 220, 170, .12); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.ws-ed__img { display: block; width: 100%; height: auto; }

.ws-ed__sheets { position: absolute; z-index: 1; top: 0; left: 0; right: 0; bottom: 4.25rem; pointer-events: none; }
.ws-ed__sheets::before, .ws-ed__sheets::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: .375rem;
	background:
		repeating-linear-gradient(180deg, transparent 0 1.1rem, rgba(118, 63, 43, .1) 1.1rem 1.18rem) 1.25rem 2rem / calc(100% - 2.5rem) calc(100% - 4rem) no-repeat,
		linear-gradient(160deg, var(--ws-eds-paper), #eadbc4);
	box-shadow: 0 1rem 2rem -1rem rgba(0, 0, 0, .7);
	transform-origin: 50% 100%;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.ws-ed__sheets::before { transform: translate(.9rem, -.35rem) rotate(3deg); }
.ws-ed__sheets::after { transform: translate(1.7rem, -.6rem) rotate(6deg); opacity: .92; }

.ws-ed__cue {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: .75rem;
	min-height: 3.25rem;
	margin-top: .875rem;
	padding: .625rem 1rem;
	border-radius: .75rem;
	background: linear-gradient(135deg, #e6b36b, #c9903f);
	color: var(--ws-ink);
	box-shadow: 0 .75rem 1.5rem -.75rem rgba(0, 0, 0, .6);
	transition: background .2s;
}
.ws-ed__doc { flex: 0 0 auto; }
.ws-ed__cue-text { display: grid; flex: 1 1 auto; line-height: 1.25; }
.ws-ed__cue-title { font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.ws-ed__cue-ex { font-weight: 600; }
.ws-ed__cue-meta { font-size: .875rem; font-weight: 600; opacity: .82; }
.ws-ed__ext { flex: 0 0 auto; }

.ws-ed__cat:hover .ws-ed__frame, .ws-ed__cat:focus-visible .ws-ed__frame { transform: translate(-.4rem, -.35rem) rotate(-1.5deg); }
.ws-ed__cat:hover .ws-ed__sheets::before, .ws-ed__cat:focus-visible .ws-ed__sheets::before { transform: translate(1.6rem, -.6rem) rotate(5deg); }
.ws-ed__cat:hover .ws-ed__sheets::after, .ws-ed__cat:focus-visible .ws-ed__sheets::after { transform: translate(2.9rem, -.9rem) rotate(10deg); }
.ws-ed__cat:hover .ws-ed__cue, .ws-ed__cat:focus-visible .ws-ed__cue { background: linear-gradient(135deg, #f0c27d, #d49a48); }
.ws-ed__cat:focus-visible { outline: 3px solid var(--ws-gold); outline-offset: .5rem; }

/* a wide sheet tilts less (its corners travel further) */
.ws-ed--wide .ws-ed__sheets::before { transform: translate(.9rem, -.45rem) rotate(1deg); }
.ws-ed--wide .ws-ed__sheets::after { transform: translate(1.8rem, -.8rem) rotate(2deg); }
.ws-ed--wide .ws-ed__cat:hover .ws-ed__frame, .ws-ed--wide .ws-ed__cat:focus-visible .ws-ed__frame { transform: translate(-.4rem, -.35rem) rotate(-.6deg); }
.ws-ed--wide .ws-ed__cat:hover .ws-ed__sheets::before, .ws-ed--wide .ws-ed__cat:focus-visible .ws-ed__sheets::before { transform: translate(1.6rem, -.7rem) rotate(1.8deg); }
.ws-ed--wide .ws-ed__cat:hover .ws-ed__sheets::after, .ws-ed--wide .ws-ed__cat:focus-visible .ws-ed__sheets::after { transform: translate(2.9rem, -1.1rem) rotate(3.4deg); }

/* the editions with no picture: a gold ring with the «&» */
.ws-ed__tile {
	display: grid;
	place-items: center;
	width: clamp(7.5rem, 14vw, 10rem);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 2px solid rgba(224, 180, 107, .75);
	box-shadow: inset 0 0 0 .375rem rgba(21, 16, 12, .9), inset 0 0 0 .45rem rgba(224, 180, 107, .5);
	background: radial-gradient(circle, rgba(255, 189, 120, .14), transparent 70%), #1d140e;
}
.ws-ed__amp { font: italic 500 clamp(3.6rem, 7vw, 5rem)/1 var(--ws-font-display); color: var(--ws-gold); transform: translateY(-.06em); }

/* --------------------------------------------------------------------------
   ≥ 900px: the line down the middle, posters on alternate sides
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
	.ws-eds-list::before {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		left: 50%;
		width: 1px;
		background: linear-gradient(180deg, transparent, rgba(224, 180, 107, .5) 3%, rgba(224, 180, 107, .5) 97%, transparent);
	}
	.ws-ed::before {
		content: "";
		position: absolute;
		z-index: 2;
		left: 50%;
		top: 50%;
		width: .875rem;
		height: .875rem;
		border-radius: 50%;
		background: var(--ws-gold);
		box-shadow: 0 0 0 .35rem rgba(224, 180, 107, .18);
		transform: translate(-50%, -50%);
	}

	/* odd rows: picture left, words right; even rows the other way */
	.ws-ed__media { justify-self: end; }
	.ws-ed__body { justify-self: start; }
	.ws-ed:nth-child(even) .ws-ed__media { order: 2; justify-self: start; }
	.ws-ed:nth-child(even) .ws-ed__body { order: 1; justify-self: end; }
	/* a poster right of the line fans its catalogue toward the line, mirrored */
	.ws-ed--tall:nth-child(even) .ws-ed__sheets::before { transform: translate(-.9rem, -.35rem) rotate(-3deg); }
	.ws-ed--tall:nth-child(even) .ws-ed__sheets::after { transform: translate(-1.7rem, -.6rem) rotate(-6deg); }
	.ws-ed--tall:nth-child(even) .ws-ed__cat:hover .ws-ed__frame, .ws-ed--tall:nth-child(even) .ws-ed__cat:focus-visible .ws-ed__frame { transform: translate(.4rem, -.35rem) rotate(1.5deg); }
	.ws-ed--tall:nth-child(even) .ws-ed__cat:hover .ws-ed__sheets::before, .ws-ed--tall:nth-child(even) .ws-ed__cat:focus-visible .ws-ed__sheets::before { transform: translate(-1.6rem, -.6rem) rotate(-5deg); }
	.ws-ed--tall:nth-child(even) .ws-ed__cat:hover .ws-ed__sheets::after, .ws-ed--tall:nth-child(even) .ws-ed__cat:focus-visible .ws-ed__sheets::after { transform: translate(-2.9rem, -.9rem) rotate(-10deg); }

	.ws-ed--tall .ws-ed__cat, .ws-ed--tall .ws-ed__fig { width: min(100%, 22rem); }

	/* wide pictures cross the line; the words below in two columns */
	.ws-ed--wide .ws-ed__media { grid-column: 1 / -1; order: 0; justify-self: center; width: min(100%, 46rem); margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
	.ws-ed--wide .ws-ed__body { grid-column: 1 / -1; order: 1; justify-self: stretch; max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
	.ws-ed--wide .ws-ed__body > :not(.ws-ed__facts) { grid-column: 1; justify-self: end; text-align: right; }
	.ws-ed--wide .ws-ed__where { display: block; }
	.ws-ed--wide .ws-ed__where .ws-svg { display: inline-block; vertical-align: -.22em; margin: 0 .35rem 0 0; }
	.ws-ed--wide .ws-ed__facts { grid-column: 2; grid-row: 1 / span 5; align-self: center; }
	.ws-ed--wide::before { top: auto; bottom: calc(clamp(2rem, 4vw, 3.5rem) + .5rem); display: none; }
	.ws-ed--wide.ws-ed:nth-child(even) .ws-ed__media, .ws-ed--wide.ws-ed:nth-child(even) .ws-ed__body { order: 0; justify-self: center; }
	.ws-ed--wide.ws-ed:nth-child(even) .ws-ed__body { justify-self: stretch; order: 1; }

	/* the rows with no picture are lighter */
	.ws-ed--bare { padding: clamp(1.5rem, 3vw, 2.5rem) 0; }
}

/* --------------------------------------------------------------------------
   Phones and narrow screens: one poster per row
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
	.ws-eds-story { grid-template-columns: 1fr; }
	.ws-eds-pillars { grid-template-columns: 1fr; }
	.ws-eds-stats__item { grid-template-columns: auto 1fr; align-items: baseline; column-gap: .875rem; }
	.ws-ed { grid-template-columns: 1fr; row-gap: 1.5rem; padding: 2rem 0; border-top: 1px solid rgba(224, 180, 107, .25); }
	.ws-ed:first-child { border-top: 0; padding-top: 0; }
	.ws-ed__body { max-width: none; }
	.ws-ed--tall .ws-ed__cat, .ws-ed--tall .ws-ed__fig { width: min(100%, 26rem); margin: 0 auto; }
	.ws-ed--tall .ws-ed__sheets::after { transform: translate(1.2rem, -.5rem) rotate(5deg); }
	/* no picture: the ring beside the label and the year, the rest full width below */
	.ws-ed--bare { grid-template-columns: auto minmax(0, 1fr); column-gap: 1.25rem; row-gap: 0; align-items: center; }
	.ws-ed--bare .ws-ed__media { grid-row: 1 / span 2; }
	.ws-ed--bare .ws-ed__body { display: contents; }
	.ws-ed--bare .ws-ed__label { grid-column: 2; align-self: end; }
	.ws-ed--bare .ws-ed__year { grid-column: 2; align-self: start; margin-bottom: 0; }
	.ws-ed--bare .ws-ed__when, .ws-ed--bare .ws-ed__where, .ws-ed--bare .ws-ed__facts { grid-column: 1 / -1; }
	.ws-ed--bare .ws-ed__year + .ws-ed__when, .ws-ed--bare .ws-ed__year + .ws-ed__where { margin-top: 1rem; }
	.ws-ed__tile { width: 6rem; }
	.ws-ed__amp { font-size: 3.2rem; }
	.ws-ed__sheets::after { transform: translate(1.2rem, -.5rem) rotate(5deg); }
}
@media (max-width: 480px) {
	.ws-ed__sheets::before { transform: translate(.6rem, -.3rem) rotate(2.5deg); }
	.ws-ed__sheets::after { transform: translate(1rem, -.45rem) rotate(4.5deg); }
}

/* --------------------------------------------------------------------------
   The way onward (the coming edition)
   -------------------------------------------------------------------------- */
.ws-eds-onward__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ws-eds-onward .ws-btn .ws-svg { width: 1.25rem; height: 1.25rem; }
.ws-eds-onward__ghost { background: rgba(255, 255, 255, .08); color: #f6e8d4; border-color: rgba(255, 189, 120, .35); }
.ws-eds-onward__ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* Cormorant and Raleway draw old-style figures (an «11» reads «II»): years,
   dates and sizes in lining figures, as in ws-feed.css. Last in the file: a
   `font:` shorthand earlier would reset it. */
.ws-eds-stats__n, .ws-ed__year, .ws-ed__label, .ws-ed__when, .ws-ed__cue-title, .ws-ed__cue-meta,
.ws-eds-hero .ws-chip, .ws-eds-onward .ws-soon__d, .ws-eds-onward .ws-soon__y { font-variant-numeric: lining-nums; }

@media (prefers-reduced-motion: reduce) {
	.ws-ed__frame, .ws-ed__sheets::before, .ws-ed__sheets::after { transition: none; }
}
@media print {
	.ws-eds-story, .ws-eds-gallery { background: none; color: #000; box-shadow: none; }
	.ws-ed__sheets, .ws-ed__cue .ws-ed__ext { display: none; }
}
