/*
 *
 * @info Base styles: layout presets, root, forms, links, lists, media, text
 * @path assets/css/site/base.css
 *
 */


/*----------  Layout presets: grid  ----------*/

 [data-layout*="grid"] {
  
  display: grid;
  grid-template-columns: var(--grid-template-columns);  
  grid-template-rows: var(--grid-template-rows);  
  column-gap: var(--grid-column-gap);
  row-gap: var(--grid-row-gap);

  > * {
    grid-column: var(--grid-column);  
    grid-row: var(--grid-row);
  }

}

/*----------  Customizations  ----------*/

main {
  --grid-row-gap: var(--space-xs);
}


/*----------  Auto grids  ----------*/

[data-layout*="auto grid"] {
  --grid-gap: 0;
  --grid-column: 1 / -1;
  --grid-min-item-size: min(33vw, 25em);
  --grid-template-columns: repeat(var(--grid-placement, auto-fill), minmax(var(--grid-min-item-size, 16rem), 1fr));
  --grid-template-rows: ;
  --grid-row-gap: ;
}

[data-layout*="auto grid"] > * {
  --grid-column: ;
  --grid-row: ;
}

[data-layout*="auto grid"] {

  --grid-template-columns: repeat(auto-fill, minmax(18ch, 1fr));
}

[data-layout*="thumbs auto grid"] { 
  /* --grid-min-item-size: max(3em, 15vw); */
  /* --grid-min-item-size: var(--space-xl); */
}

[data-layout*="thumbs auto grid"] > * {
  border-right: 1px solid var(--color-default);
  border-bottom: 1px solid var(--color-default);
  margin-top: -1px;
  margin-right: -2px;
  /* margin-bottom: -1px; */
  /* padding: var(--space); */
  transform: translateY(1px);
}


/*----------  Additional column grids  ----------*/

[data-layout*="column grid"] {

  --grid-template-columns:
    var(--space-0-m) 
    var(--space-s-m) 
    repeat(2, minmax(0, var(--space-0-2xl))) 
    1fr 
    repeat(2, minmax(0, var(--space-0-2xl))) 
    var(--space-s-m) var(--space-0-m);
  
  --grid-template-rows: ;
  
  --grid-gap: ;

}


/*----------  Layout presets: flex  ----------*/

 [data-layout*="flex"] {
  
  display: flex;
  flex-direction: var(--flex-direction, column);
  flex-wrap: var(--flex-wrap, wrap);
  /* flex-shrink */
  /* flex-grow */
  /* flex-basis */

  justify-content: var(--justify-content, space-between);
  align-items: var(--align-items, flex-start); 
  row-gap: var(--row-gap);
  column-gap: var(--column-gap);
  
  > * {
    flex-shrink: var(--flex-shrink, 1);
    flex-grow: var(--flex-grow, 1);
  }

}


/*----------  Root colors  ----------*/

html {
  background-color: var(--background-color);
  color: var(--color);
}


/*----------  Forms  ----------*/

 button {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border-radius: 0;
	border: none;
	border: var(--border);
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font-size: 85%;
	font-weight: bold;
	font: inherit;
	padding-block: var(--space-3xs);
	padding-inline: var(--space-2xs);
	text-align: inherit;
}

button {

	&:focus {
		outline: 1px solid var(--color-default);
	}

	&:focus:not(:focus-visible) {}

	&:focus-visible {}

}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font: inherit;
	hanging-punctuation: none;
  background-color: var(--color-subtle, var(--color-background));
  color: var(--color-default);
  border: none;
  padding: .5rem;
}

input[type="submit"] {
  /* border: 1px solid var(--color-subtle, var(--color-background)); */
  margin-left: 2px;
  background-color: var(--color-accent);
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

input:focus-visible {
  outline: 3px solid var(--color-interactive);
  background-color: var(--color-background);
}


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

/*----------    ----------*/

/* the footer has no surface of its own, so the root shares the page's
   colour: iOS Safari's bounce past the end shows the same paper */
html {
  background-color: var(--background-color);
}

body {
  background-color: var(--background-color);
  min-height: 100dvh;
  max-width: 100vw;
  /* overflow-x: hidden; */
}

body > * {
  --grid-column: v-start / v-end;  
}

main {
  --grid-column-gap: var(--space-3xs) ;
  overflow-x: hidden;
}
main > * {
  --grid-column: c-start / c-end;  
} 

footer {
  margin-block-start: var(--space-m-l);
}


/*----------  Details  ----------*/

/* no default disclosure triangle: the collapsible block draws its own sign.
   Three separate rules — in one selector list, a browser that does not know
   one of the pseudo-elements (Firefox: -webkit-details-marker) drops all */
summary {
  list-style: none;
}

summary::marker {
  content: "";
}

summary::-webkit-details-marker {
  display: none;
}


/*----------  Pictures on the light green  ----------*/

/* the illustrations' white (the bubbles, „Ausgerechnet") and the paper of the
   balancing figures (seiltanz) take on the light green instead of standing
   out as white patches (from templates/home.css, 2026-11-30) */
main img[src*=".svg"],
main img[src*="seiltanz"] {
	mix-blend-mode: multiply;
}


/*----------  Links  ----------*/

/* a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
} */

a, [data-type="link"] {
	
	color: currentColor;

	text-decoration-line: underline;
	text-decoration-skip-ink: all;
	text-decoration-style: solid;
	text-decoration-color: var(--color-accent);
	text-decoration-thickness: .19ex;
	text-underline-offset: .3ex;

	/* the type is blue already: a hovered link goes dark blue */
	&:hover {
		color: var(--color-interactive-hover);
		text-decoration-color: currentColor;
	}

}

a:visited {
	/* color: var(--color-link-visited, var(--color-interactive)); */
}

a:hover, [data-type="link"]:hover {
	
}

/* p a, main span a {

	&:hover {
		background-color: var(--blue);
		color: var(--white);
		
		padding: var(--space-4xs) var(--space-3xs);
		margin-left: calc(var(--space-3xs)*(-1));
		border-radius: .15ex;
		
		mix-blend-mode: multiply;
	}
} */

a:focus {
	/* outline: 2px solid currentColor; */
  /* outline-offset: 0.25lh; */
}

a.active {
	
}

@media (pointer: fine) {
	a, [data-type="link"] {}
}

/* @check */
/* a:focus-visible {
	outline: medium solid var(--color-default);
	outline-offset: var(--space, 0.25 );
	z-index: 2;
} */


/*----------    ----------*/



/*----------  Lists  ----------*/

/*----------  Generic  ----------*/


ul, ol {
  padding:0;
}

ul[role="list"] {
  list-style: none;
  margin-left: 0;
}


/*----------  ----------*/

main {
  ul {
    li+li {
      /* padding-block-start: var(--space-2xs); */
    }
  }
  ul+ul {
    padding-block-start: var(--space-s-m);
  }
}

/*----------  Definition lists  ----------*/

 dl {
  
  /* dt::before {
  } */
    
  dd+dt {
    margin-block-start: calc(var(--space)*.5);

  }

  dt > * {
    padding: initial;
  }
  
  dd {

  }
  
 }


/*----------  Media  ----------*/

 

/*----------    ----------*/

img {
	display: block;
	height: auto;
  max-width: 100%;
  /* max-inline-size: 100%; */
	/* object-fit: contain; */
}

/* @info Let svg graphics embedded via <img> tag scale without boundaries */

img[src$=".svg"] {
	width: 100%;
	max-width: none;
}

figure img[src$=".svg"] {
	pointer-events: none;
	user-select: none;
}

/*----------    ----------*/

figure {
	width: 100%;

	:has(figcaption) {
		
	}
}

a[data-target*="viewer"] {
	cursor: zoom-in;
	cursor: var(--cursorZoomIn)!important;
	transition: all 550ms ease-out;
	
	/* &:hover {
		filter: opacity(.3);
	}

	img:hover {
		
	} */
}

figcaption {
	h3 {
		padding: unset;
	}
}

@supports(figure(:has(figcaption))) {

	figure:has(figcaption) img {}

	figure:not(:has(:not(img))) {}

	figure:has(figcaption) {}

}


svg {
	height: auto;
	width: auto;
	max-inline-size: 100%;
}

svg[data-type="clippath"] {
	height: 0px;
	width: 0px;
	position: absolute;
	bottom: 0;
	right: 0;
}


/*----------    ----------*/

video {

}



audio {

}

/*----------  Mux player  ----------*/


mux-player {
	display: block;
}


main > figure {
  --grid-column: v-start / v-end;
	/* height: auto; */
  
	text-align: center;
	vertical-align: top;
  
  /* max-height: 25vh; */
  /* max-height: 35dvh; */

  
}

main > figure > *{
  /* margin-inline: auto; */
}

main > figure[data-image-type*="inline"] {
  /* margin-inline: auto; */
  /* min-height: 10rem; */
} 

main > figure[data-image-type*="inline"] > * {
  /* min-height: 10rem;
  max-height: 50vh; */
	/* display:none; */
} 


/*----------  Menus  ----------*/

menu {
  /* padding:0; */
  /* margin:0; */
  list-style: none;
}


/*----------  States  ----------*/

:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}

*:focus-visible { 
  outline: 2px solid var(--color-interactive);
	outline-offset: 0.3rem;
	border-radius: 0.125rem;
}

:target {
	scroll-margin-top: 2ex;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-accent-reverse);
}


/*----------  Typography  ----------*/

 :root {

  font-family: sans-serif;
  font-family: var(--font-family);
  
  font-size: 1rem;
  font-size: var(--font-size);
	
  font-weight: 400;
  font-weight: var(--font-weight);

  font-variant-ligatures: discretionary-ligatures;
	font-variant-numeric: slashed-zero;

	hanging-punctuation: first allow-end last;

  line-height: 1.35;
  line-height: var(--line-height);

	text-decoration-skip-ink: auto;
  text-rendering: optimizeSpeed;
  text-size-adjust: none;
	/* text-wrap: pretty; */
  
	-moz-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;

}

@supports (font-variation-settings: normal) {
	:root {
		font-feature-settings: 'liga' 1, 'calt' 1;
	}
}

html[lang="de"], html[lang="en"] {
	/* hyphens: auto; */
}

strong {

}

em {
	/* box-shadow: inset 0 -.23em 0 var(--green); */
	font-style: italic;
	/* background: var(--color-accent); */
}

p {
  max-width: 60ch;
}

p+p {
  padding-block-start: calc(var(--font-size-0));
}

u {
	background-color: var(--color-accent-25);
	text-decoration: none;
}

:where(h1, h2, h3, h4, h5, h6,
[data-type="h2"], [data-type="h3"], [data-type="h4"], [data-type="h5"], [data-type="h6"]) {
	font-family: var(--font-family);
	font-size: var(--font-size);
	font-weight: var(--font-weight);
	line-height: var(--line-height);
	text-wrap: balance;
	
	span {
		overflow-wrap: break-word;
	}
}

h1 {
	--font-size: var(--font-size-1);
	--line-height: 1.3;
	--grid-column: l-start / r-end;
}

main h1 {
	padding-block-start: var(--space-s);
	padding-block-end: var(--space-s);
}

h2, [data-type="h2"] {
	--font-size: var(--font-size-1);
	--font-weight: 400;
	padding-block-start: var(--space-s-m);
	padding-block-end: var(--space-2xs);
}

h3, [data-type="h3"] {
	--font-size: var(--font-size-1);
	--font-weight: 400;
	padding-block-start: var(--space-s-m);
	padding-block-end: var(--space-2xs);
}

h4, [data-type="h4"] {
	--font-size: var(--font-size-0);
	--font-weight: 500;
	--line-height: 1.1;
}

h5, [data-type="h5"] {
	/* --font-size: ; */
	/* --font-weight: ; */
	/* --line-height: ; */
}

h6, [data-type="h6"] {
	/* --font-size: ; */
	/* --font-weight: ; */
	/* --line-height: ; */
}


/*----------  User preferences  ----------*/

@media (prefers-reduced-motion: reduce) {
	
	*,
	*::before,
	*::after {

		--animation-delay: -1ms !important;
		--animation-duration: 1ms !important;
		--animation-iteration-count: 1 !important;
		--color-background-attachment: initial !important;
		
		scroll-behavior: auto !important;
		transition-duration: 0s !important;
		transition-delay: 0s !important;

	}
}

@media (prefers-contrast: more) {
  :root {

	}
} 

@media (scripting: none) {
	:root {

	}
}

@media (scripting: enabled) {
	:root {

	}
} 
