﻿
/*
 * Legal Disclaimer for Web licence
 *
 * Licence to use self-hosted webfonts for displaying dynamic text on specified website domains. Our package includes WOFF and WOFF2 font formats.
 *
 * Should the license page views limit be exceeded the license holder will be required to contact Lineto.com for an upgrade.
 * 
 * It is strictly prohibited to rename the font and to download or use these fonts in any other media. 
 * 
 * These Web fonts are licensed exclusively for the use on the following domain(s) and their subdomains:
 *
 * hermes-optik.de (monthly pageviews: <50K)
 *
 */

@font-face {
  font-family: "CircularXXWeb-Light";
  src: url("../fonts/CircularXX/CircularXXWeb-Light.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

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

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

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

@font-face {
  font-family: "CircularXXWeb-Black";
  src: url("../fonts/CircularXX/CircularXXWeb-Black.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

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

html {
  font-synthesis: none;
}

::selection {
  background-color: var(--accent);
  color: var(--button-text);
  -webkit-text-fill-color: var(--button-text);
  text-shadow: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-size: var(--type-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-transform: none;
  overflow-wrap: break-word;
}

h3,
h4,
h5,
h6 {
  font-family: var(--font-ui);
  font-size: var(--type-subhead);
  font-weight: var(--weight-text);
  line-height: var(--leading-subhead);
}

h1,
h3 { text-transform: none; }

/* Abschnittstitel nach Mindforge; Footer-Titel behalten ihre eigene Typografie. */
.section-heading {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  font-size: var(--type-section);
  line-height: 1.2;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.section-heading:where(:not(h1)) {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-heading-end) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title-accent { color: var(--accent); }

.media-caption {
  margin-top: 0.75rem;
  color: var(--media-caption-ink, var(--caption-on-paper));
  font-family: "CircularXXWeb-Light", var(--font-body);
  font-size: clamp(0.9375rem, calc(0.875rem + 0.2vw), 1rem);
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

p + p {
  margin-block-start: 1em;
}

strong,
b {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-link {
  position: relative;
  display: inline-block;
  color: var(--accent-text);
  overflow-wrap: anywhere;
  text-decoration: none;
}

/* Gemeinsamer Mindforge-Lichtlauf und Cursor für Navigation und Textlinks. */
.text-link:is(:hover, :focus-visible) {
  /* Den Verlauf als Ganzes konturieren, damit die transparenten Zeichen offen bleiben. */
  text-shadow: none;
  filter: var(--gradient-link-shadow, none);
  background: linear-gradient(90deg, var(--ink) 0%, var(--accent-text) 25%, var(--ink) 50%, var(--accent-text) 75%, var(--ink) 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: link-flow 3s linear infinite;
}

.text-link::after {
  content: '_';
  position: absolute;
  left: 100%;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  pointer-events: none;
}

/* Automatischer Mindforge-Hinweis für externe Textlinks; Bildlinks bleiben eigene Bedienelemente. */
a[href^="http"]:not([href^="https://www.hermes-optik.de/"]):not([href^="https://hermes-optik.de/"]):not(:has(img, svg, picture), :where(.footer-credit, .impressum-credit) a)::before {
  content: '';
  display: inline-block;
  width: 0.875em;
  height: 0.875em;
  margin-right: 0.375em;
  background: url('../img/icons/external-link-icon-g.svg') center / contain no-repeat;
  vertical-align: middle;
  transform: translateY(-0.1em);
}

.text-link:is(:hover, :focus-visible)::after {
  /* Nach der Nav-Skalierung starten; der Cursor blinkt nur an und aus. */
  animation: link-cursor-blink 0.8s step-end 0.3s infinite;
}

@keyframes link-flow {
  from {
    background-position: 200% center;
  }

  to {
    background-position: 0% center;
  }
}

@keyframes link-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Sprungziele bleiben für Tastatur und Screenreader fokussierbar. */
main :is(section, aside)[tabindex="-1"]:target:focus {
  outline: none;
}

main :is(section, aside, h1, h2, h3, h4)[id]:target {
  scroll-margin-block-start: calc(var(--header-measured-height, var(--header-height)) + 1rem);
}

main section[id]:target {
  scroll-margin-block-start: calc(var(--header-measured-height, var(--header-height)) + 1rem - var(--fragment-heading-inset, 0px));
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

img,
video {
  height: auto;
}

[hidden] {
  display: none;
}
