/* Arctell Sandvík — reset, type, layout, header and footer. */

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

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

body {
	margin: 0;
	background: var(--surface-page);
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	/* Icelandic compounds must never break mid-word. */
	hyphens: none;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, figure, blockquote, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }

a { color: var(--text-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text-accent); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus-visible {
	position: fixed;
	top: 12px; left: 12px;
	z-index: 100;
	width: auto; height: auto;
	clip-path: none;
	padding: 12px 18px;
	background: var(--ink);
	color: var(--bone);
}

/* ---------- Layout ---------- */

.sv-wrap {
	width: 100%;
	max-width: var(--content-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	position: relative;
	padding-block: var(--section-y);
}

.sv-sunken { background: var(--surface-sunken); }
.sv-sky { background: var(--surface-sky); }

.sv-on-dark {
	background: var(--surface-deep);
	color: var(--text-on-dark-muted);
}
.sv-on-dark h1, .sv-on-dark h2, .sv-on-dark h3, .sv-on-dark a { color: var(--text-on-dark); }
.sv-on-dark .rule { border-color: var(--border-on-dark); }
.sv-on-dark .eyebrow { color: var(--text-on-dark-muted); }
.sv-on-dark .prose strong { color: var(--text-on-dark); }
.sv-on-dark .btn--secondary { border-color: var(--border-on-dark); color: var(--text-on-dark); }

/* ---------- Type ---------- */

.h2 {
	font-family: var(--font-display);
	font-weight: 300;
	font-size: var(--fs-h2);
	line-height: 1.12;
	letter-spacing: var(--ls-heading);
	color: var(--text-strong);
	max-width: 22ch;
}

.eyebrow {
	font-size: var(--fs-label);
	font-weight: 600;
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: var(--text-muted);
	margin-block: 16px 24px;
}

.rule {
	border: 0;
	border-top: 1px solid var(--border-hairline);
	margin: 0;
}

/* Deliberately no colour on .prose p: it inherits the section's, so the same block
   reads correctly on a light surface and on .sv-on-dark. */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose--tight { font-size: var(--fs-small); }

.tag {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-1);
	font-size: var(--fs-label);
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--text-muted);
}

/* ---------- Buttons and links ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	border: 1px solid var(--action-primary);
	border-radius: var(--radius-2);
	background: var(--action-primary);
	color: var(--action-primary-text);
	font-size: var(--fs-small);
	font-weight: 600;
	text-decoration: none;
	transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.btn:hover { background: var(--action-primary-hover); border-color: var(--action-primary-hover); color: var(--action-primary-text); }

.btn--secondary { background: transparent; color: var(--text-strong); }
.btn--secondary:hover { background: var(--action-secondary-hover); color: var(--text-strong); }

.arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--fs-small);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
}
.arrow-link .sv-icon { transition: transform var(--dur-base) var(--ease-out); }
.arrow-link:hover .sv-icon { transform: translateX(3px); }

.sv-icon { flex: none; stroke: currentColor; fill: none; }
.sv-icon--accent { color: var(--text-accent); }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(245, 243, 233, .92);
	backdrop-filter: saturate(1.1) blur(14px);
	border-bottom: 1px solid var(--border-hairline);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--header-h);
}

.site-header__brand { text-decoration: none; color: var(--text-strong); }
.wordmark { font-family: var(--font-display); font-size: 20px; letter-spacing: var(--ls-heading); }

/* Arctell wordmark over the sub-brand name. The mark is sized by width alone — its viewBox
   is 7.77:1, so the height follows and the subtitle keeps the same left edge. Colour comes
   from the surface, so the one lockup works on bone and on the deep footer. */
.brand { display: inline-grid; justify-items: start; gap: 7px; }
.brand__mark { display: block; width: 140px; height: auto; }
.brand__sub {
	font-family: var(--font-display);
	font-size: 18px;
	line-height: 1;
	letter-spacing: var(--ls-heading);
}

.site-header__brand .brand__sub { color: var(--text-body); }
.site-footer__brand .brand { color: var(--text-on-dark); }
.site-footer__brand .brand__sub { color: var(--text-on-dark-muted); }

.site-nav__list { display: flex; gap: 28px; }
.site-nav__item a {
	text-decoration: none;
	font-size: var(--fs-small);
	color: var(--text-body);
	padding-block: 6px;
	border-bottom: 1px solid transparent;
}
.site-nav__item.is-current a { color: var(--text-strong); border-bottom-color: var(--border-strong); }

.lang-switch {
	font-size: var(--fs-small);
	color: var(--text-body);
	text-decoration: none;
	padding-block: 6px;
	border-bottom: 1px solid transparent;
	white-space: nowrap;
}
.lang-switch:hover,
.lang-switch:focus-visible { color: var(--text-strong); border-bottom-color: var(--border-strong); }

.site-header__toggle {
	display: none;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-2);
	background: transparent;
	color: var(--text-strong);
	padding: 8px;
	cursor: pointer;
}

.drawer {
	position: fixed;
	inset: var(--header-h) 0 0;
	z-index: 40;
	background: var(--surface-page);
	padding: var(--gutter);
	overflow-y: auto;
}
.drawer[hidden] { display: none; }
.drawer__nav a {
	display: block;
	padding: 18px 0;
	border-bottom: 1px solid var(--border-hairline);
	font-family: var(--font-display);
	font-size: 28px;
	text-decoration: none;
}

@media (max-width: 860px) {
	.site-nav { display: none; }
	.site-header__toggle { display: inline-flex; }
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--surface-deep);
	color: var(--text-on-dark-muted);
	padding-top: clamp(56px, 7vw, 96px);
}
.site-footer a { color: var(--text-on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .eyebrow { color: var(--text-on-dark-muted); }

.site-footer__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 48px;
	padding-bottom: 56px;
}
.site-footer__address { font-style: normal; display: grid; gap: 6px; margin-top: 20px; }
.site-footer__column ul { display: grid; gap: 10px; }

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	padding-block: 24px;
	border-top: 1px solid var(--border-on-dark);
	font-size: var(--fs-small);
}
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- Plain page, posts, search ---------- */

.page-plain__title, .post-single__title, .event-single__title, .notfound__title {
	font-family: var(--font-display);
	font-weight: 300;
	font-size: var(--fs-display-l);
	line-height: 1.08;
	letter-spacing: var(--ls-display);
	color: var(--text-strong);
	margin-block: 16px 32px;
	max-width: 20ch;
}
.post-single__inner, .event-single__inner, .notfound__inner { max-width: 760px; }
.post-single__media, .event-single__media { margin-block: 32px; }

/* Date and start time read as one line, as they do on the cards. */
.event-single__when { display: flex; flex-wrap: wrap; gap: 10px; }
.event-single__lede { font-size: var(--fs-lead); color: var(--text-strong); max-width: var(--measure); }
.event-single__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.event-single__past { font-size: var(--fs-small); color: var(--text-muted); }
.event-single__back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-hairline); }
/* The shared arrow-link nudges its icon right on hover; this one points back. */
.event-single__back .arrow-link:hover .sv-icon { transform: translateX(-3px); }

.search-results { display: grid; gap: 4px; border-top: 1px solid var(--border-strong); }
.search-results a {
	display: grid;
	gap: 6px;
	padding: 22px 0;
	border-bottom: 1px solid var(--border-hairline);
	text-decoration: none;
}
.search-results__title { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--text-strong); }
.search-results__excerpt { font-size: var(--fs-small); color: var(--text-muted); }

.notfound__form { display: flex; gap: 12px; flex-wrap: wrap; margin-block: 32px; }
.notfound__form input {
	flex: 1 1 260px;
	padding: 13px 16px;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-1);
	background: var(--white);
	font: inherit;
	font-size: var(--fs-small);
}
.notfound__links { display: grid; gap: 2px; border-top: 1px solid var(--border-strong); margin-top: 40px; }
.notfound__links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--border-hairline);
	text-decoration: none;
}

/* ---------- Cards ---------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 32px;
}
.card {
	display: grid;
	gap: 18px;
	text-decoration: none;
	border-top: 1px solid var(--border-strong);
	padding-top: 20px;
}
.card__media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__body { display: grid; gap: 10px; }
.card__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.15; color: var(--text-strong); }
.card__text { font-size: var(--fs-small); color: var(--text-muted); }
.card:hover .card__title { color: var(--text-accent); }

.media-slot {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 4 / 5;
	padding: 20px;
	background: var(--surface-sky);
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: var(--text-accent);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
