/* säm · reset, type primitives, buttons, interior pages. */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--header-h);
	background: var(--night);
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--night);
	color: var(--paper);
	font-family: var(--font);
	font-size: var(--step-text);
	line-height: 1.5;
	font-kerning: normal;
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 5px; }

h1, h2, h3, h4 {
	margin: 0;
	font-weight: 700;
	line-height: 0.9;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 62ch; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--crimson); color: var(--paper); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; /* taste-skill-ignore: screen-reader-only box */
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed; z-index: 200; top: 8px; left: 8px;
	width: auto; height: auto; clip: auto;
	padding: 12px 16px;
	background: var(--paper); color: var(--night);
}

.wrap { width: 100%; padding-inline: var(--margin); }

.statement { font-size: var(--step-statement); line-height: 1.3; max-width: 30ch; }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }

/* Buttons: square, filled, heavy. */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 56px;
	padding: 0 28px;
	border: 2px solid transparent;
	border-radius: var(--radius);
	font: inherit;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms, color 180ms, border-color 180ms, transform 90ms;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-step); color: var(--accent-ink); }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--night); border-color: var(--ink); }
.chapter--album .btn--ghost:hover { color: var(--sky); }
.btn__arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(5px); }

/* Big text links (socials, streaming): the type is the control. */
.biglink {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3em;
	font-weight: 700;
	font-stretch: 80%;
	text-decoration: none;
	transition: color 160ms;
}
.biglink::after { content: "↗"; font-size: 0.6em; transition: transform 200ms var(--ease-out); }
.biglink:hover { color: var(--crimson-light); }
.chapter--album .biglink:hover { color: var(--burgundy); }
.biglink:hover::after { transform: translate(3px, -3px); }

/* Marks temporary example content: plain words, never a badge. */
.temp-note { display: block; font-size: var(--step-small); font-weight: 650; color: var(--muted); }

/* Entrances: hidden only after the script has run. */
.reveal-ready [data-reveal] > * {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 760ms var(--ease-out), transform 760ms var(--ease-out);
}
.reveal-ready [data-reveal].is-in > * { opacity: 1; transform: none; }
.reveal-ready [data-reveal].is-in > :nth-child(2) { transition-delay: 80ms; }
.reveal-ready [data-reveal].is-in > :nth-child(3) { transition-delay: 160ms; }
.reveal-ready [data-reveal].is-in > :nth-child(4) { transition-delay: 240ms; }
.reveal-ready [data-reveal].is-in > :nth-child(n + 5) { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
	.reveal-ready [data-reveal] > * { opacity: 1; transform: none; }
}

/* ---------- Section hero (videos, shop): the name, huge and short ---------- */

.page-hero {
	padding: calc(var(--header-h) + clamp(24px, 5vh, 64px)) var(--margin) clamp(20px, 3vh, 40px);
	background: var(--blue-950);
	color: var(--paper);
	overflow: hidden;
}
.page-hero--wine { background: var(--wine); }
.page-hero__title {
	margin: 0;
	font-size: clamp(5rem, 1rem + 17vw, 19rem);
	font-weight: 700;
	font-stretch: 72%;
	line-height: 0.78;
	letter-spacing: -0.045em;
	text-transform: lowercase;
}
/* Long single words: sized so a word of up to ~20 letters fills, but never overflows, the line. */
.page-hero__title--long { font-size: clamp(2.5rem, 13vw, 14rem); line-height: 1; }

/* ---------- Interior pages: a still of the storm, then night ground ---------- */

.page-band {
	position: relative;
	min-height: 64svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: calc(var(--header-h) + 48px) var(--margin) clamp(32px, 5vw, 72px);
	overflow: hidden;
	isolation: isolate;
	background: var(--blue-900);
}
.page-band__sky {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
	filter: brightness(0.5) saturate(0.95);
}
.page-band__title {
	font-size: clamp(3.5rem, 1rem + 10vw, 12rem);
	font-weight: 700;
	font-stretch: 78%;
	line-height: 0.84;
	letter-spacing: -0.035em;
	text-transform: lowercase;
}
.page-band__title--long { font-size: clamp(2.75rem, 1rem + 6vw, 7.5rem); }
.page-band__intro { margin: 18px 0 0; }

.entry { padding: clamp(40px, 6vw, 96px) var(--margin) clamp(96px, 10vw, 160px); }
.entry__content { max-width: 70ch; }
.entry__content > * + * { margin-top: 1em; }
.entry__content h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); margin-top: 1.4em; }
.entry__content a { color: inherit; }
.entry__meta { color: var(--muted); }

.archive-list { display: grid; gap: 48px; padding: 0; margin: 0; list-style: none; }
.archive-list h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.archive-list a { text-decoration: none; }
.archive-list a:hover h2 { color: var(--crimson-light); }

.pagination { display: flex; gap: 20px; margin-top: 48px; font-weight: 700; }

.not-found { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter) clamp(32px, 5vw, 96px); align-items: end; }
.not-found__image { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 767px) { .not-found { grid-template-columns: minmax(0, 1fr); } }

/* Preview badge (administrators only, while ?sam_state is active). */
.preview-badge { position: fixed; left: 50%; bottom: 16px; z-index: 900; transform: translateX(-50%); padding: 10px 16px; background: var(--paper); color: var(--night); font-size: var(--step-small); font-weight: 700; text-decoration: none; }
.preview-badge:hover { background: var(--sky); }

/* Search page */
.search-page,
.search-page .entry { background: var(--blue-950); }
.search-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 clamp(32px, 6vh, 64px); }
.search-form input { flex: 1 1 260px; min-height: 56px; padding: 0 16px; border: 2px solid rgba(241, 240, 237, 0.55); border-radius: 0; background: transparent; color: var(--paper); font: inherit; font-size: var(--step-statement); }
.search-form input:focus { border-color: var(--paper); outline: 3px solid var(--sky); outline-offset: 1px; }
.search-page .statement { margin: 0 0 24px; }
.search-page .biglink { font-size: clamp(2rem, 1rem + 3vw, 4rem); font-stretch: 78%; }

/* Legal pages (privacy, terms): a readable document on the night blue. */
.entry--legal { background: var(--blue-950); }
.entry--legal .entry__content { max-width: 68ch; font-size: 1.0625rem; line-height: 1.65; }
.entry--legal .entry__content > * + * { margin-top: 0.85em; }
.entry--legal .entry__content h2 { margin-top: 2em; font-size: clamp(1.75rem, 1rem + 1.6vw, 2.75rem); font-weight: 700; font-stretch: 78%; line-height: 1; letter-spacing: -0.02em; }
.entry--legal .entry__content ul { padding-left: 1.2em; }
.entry--legal .entry__content a { text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.entry--legal .entry__content a:hover { color: var(--sky); }

/* ---------- Cookie banner: a sky-blue card, bottom left; never a wall ---------- */

.consent {
	position: fixed;
	left: var(--margin);
	bottom: var(--margin);
	z-index: 80;
	width: min(440px, calc(100% - 2 * var(--margin)));
	max-height: calc(100dvh - 2 * var(--margin));
	overflow-y: auto;
	padding: clamp(20px, 2vw, 28px);
	background: var(--sky);
	color: var(--night);
	font-size: 0.9375rem;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out);
}
.consent.is-in { opacity: 1; transform: none; }
.consent[hidden] { display: none; }
.consent__title { margin: 0 0 8px; font-size: 1.75rem; font-weight: 700; font-stretch: 78%; line-height: 1; letter-spacing: -0.02em; }
.consent__title:focus { outline: none; }
.consent__text { margin: 0; }
.consent a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.consent__prefs { display: grid; gap: 14px; margin-top: 20px; }
.consent__prefs[hidden] { display: none; }
.consent__cat { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; cursor: pointer; }
.consent__cat input { grid-row: span 2; width: 22px; height: 22px; margin: 0; accent-color: var(--blue-800); cursor: pointer; }
.consent__cat input:disabled { cursor: default; opacity: 0.6; }
.consent__cat-name { font-weight: 700; }
.consent__cat-text { grid-column: 2; font-size: var(--step-small); color: #26354d; }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.consent__btn {
	flex: 1 1 0;
	min-height: 48px;
	padding: 0 16px;
	border: 2px solid var(--night);
	background: var(--night);
	color: var(--paper);
	font: inherit;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background 160ms, color 160ms;
}
.consent__btn:hover { background: var(--blue-800); border-color: var(--blue-800); }
.consent__btn[hidden], .consent__more[hidden] { display: none; }
.consent__more { flex-basis: 100%; min-height: 40px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.consent :focus-visible { outline: 2px solid var(--night); outline-offset: 3px; }
@media (max-width: 479px) {
	.consent { left: 8px; bottom: 8px; width: calc(100% - 16px); padding: 18px; }
	.consent__btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.consent { transition: none; transform: none; }
}

/* Footer "Küpsiste seaded" and the privacy policy button look like links. */
.finale__cookies, .consent-reopen { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.finale__cookies:hover, .consent-reopen:hover { color: var(--sky); }

/* The cookie table in the privacy policy. */
.cookie-table { overflow-x: auto; }
.cookie-table table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.cookie-table th, .cookie-table td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(241, 240, 237, 0.18); }
.cookie-table th { font-weight: 700; }
.cookie-table code { font-size: 0.875em; overflow-wrap: anywhere; }
@media (max-width: 599px) {
	.cookie-table thead { display: none; }
	.cookie-table tr { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(241, 240, 237, 0.18); }
	.cookie-table td { padding: 0; border: 0; }
	.cookie-table td:nth-child(n+3) { color: var(--muted); font-size: var(--step-small); }
}
