/* ==========================================================================
   Design tokens and the self-hosted DM Sans faces.

   The palette is the one the site has always used: a warm bone page, deep teal
   text, and the dark green of the association's mark for accents.

   DM Sans is served from the theme in a single latin subset. That subset covers
   U+0000-00FF, which is every letter Icelandic needs - á ð é í ó ú ý þ æ ö - so
   there is no latin-ext file to load and no flash of fallback on an Icelandic word.
   ========================================================================== */

@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/DMSans-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "DM Sans";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/DMSans-Italic.woff2") format("woff2");
}

@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/DMSans-Medium.woff2") format("woff2");
}

@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/DMSans-Bold.woff2") format("woff2");
}

:root {
	/* Colour */
	--bg: #f6f4ed;
	--fg: #002a32;
	--accent: #064710;
	--ink: #121313;
	--white: #fff;

	/* Tints derived from the two brand colours, so a surface never introduces
	   a colour the palette does not already contain. */
	--rule: color-mix(in srgb, var(--fg) 16%, transparent);
	--rule-strong: color-mix(in srgb, var(--fg) 30%, transparent);
	--muted: color-mix(in srgb, var(--fg) 68%, transparent);
	--surface: color-mix(in srgb, var(--fg) 4%, var(--bg));

	/* Type */
	--font: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;

	--step-display: clamp(2.25rem, 1.3rem + 4vw, 4rem);
	--step-h1: clamp(2rem, 1.3rem + 3vw, 3.25rem);
	--step-h2: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);
	--step-h3: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
	/* Floors, not preferences: body never below 17px, secondary never below 15px.
	   Icelandic sets longer than English at the same size, so the reading sizes
	   here are the lower bound of comfortable, not a starting point to shrink. */
	--step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
	--step-lede: clamp(1.1875rem, 1.05rem + 0.7vw, 1.5rem);
	--step-small: 0.9375rem;
	/* The figures sit three to a row inside the right-hand half of the stats
	   grid, so their ceiling is set by that column, not by the viewport. Sized
	   off vw alone they collide around 800-1000px, where the grid has already
	   stacked but the row of three has not. */
	--step-figure: clamp(2.25rem, 1.3rem + 2.9vw, 3.5rem);

	/* Space */
	--header-h: 92px;
	--wrap: 1240px;
	/* Wider than the reading wrap, for a band that should run past the text it
	   belongs to - a stacked photograph, say. Still bounded: edge to edge on a
	   27" display makes a horizon look like a desktop wallpaper. */
	--wrap-wide: 1600px;
	--wrap-narrow: 760px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--section-y: clamp(3.5rem, 7vw, 7rem);
	--gap: clamp(1.5rem, 3vw, 2.75rem);

	/* Shape. Hairlines rather than shadows; the original site had no shadow
	   anywhere and gains nothing from one. */
	--radius: 2px;
	--radius-media: 4px;

	/* Motion. One distance, one duration and one curve for every reveal on the
	   site, so the page arrives as a single movement rather than as a set of
	   separate effects. The rise is deliberately about a line of text: far
	   enough to be a movement, short enough that nothing has visibly travelled.
	   The curve leaves fast and settles long, which is what makes 1rem read as
	   arriving rather than as sliding in from somewhere. */
	--reveal-rise: 1rem;
	--reveal-time: 700ms;
	--reveal-step: 70ms;
	--reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
