/* ==========================================================================
   AgentZ Merch - Reset, Typografie, Formulare, Fokus
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--az-black);
  color: var(--az-white);
  font-family: var(--az-font-body);
  font-size: 1rem;
  line-height: 1.625;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

figure {
  margin: 0;
}

/* --- Ueberschriften ----------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6,
.az-display {
  font-family: var(--az-font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  color: var(--az-white);
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
}

h4 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.02em;
}

h5,
h6 {
  font-size: 1rem;
  letter-spacing: 0.05em;
}

p {
  margin: 0 0 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

.az-lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--az-muted-strong);
  max-width: var(--az-measure);
}

.az-measure,
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
  max-width: var(--az-measure);
}

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

a {
  color: var(--az-green);
  text-decoration: none;
  text-underline-offset: 0.25em;
  transition: color var(--az-transition) var(--az-ease),
    background-color var(--az-transition) var(--az-ease),
    border-color var(--az-transition) var(--az-ease);
}

.entry-content a,
.az-prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

a:hover,
a:focus-visible {
  color: var(--az-green-light);
}

/* --- Listen ------------------------------------------------------------- */

ul,
ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25em;
}

li {
  margin-bottom: 0.4em;
}

hr {
  border: 0;
  height: 2px;
  background: var(--az-gray-light);
  margin: 3rem 0;
}

blockquote {
  margin: 0 0 1.5em;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 4px solid var(--az-green);
  color: var(--az-muted-strong);
  font-style: normal;
}

code,
kbd,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: var(--az-gray);
  border: 1px solid var(--az-gray-light);
  padding: 0.1em 0.35em;
}

pre {
  background: var(--az-gray);
  border: var(--az-border);
  padding: 1rem;
  overflow-x: auto;
}

/* --- Tabellen ----------------------------------------------------------- */

.az-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--az-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--az-gray-light);
}

th {
  font-family: var(--az-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
  color: var(--az-white);
  background: var(--az-gray);
}

/* --- Formulare ---------------------------------------------------------- */

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--az-gray);
  border: var(--az-border);
  border-radius: var(--az-radius);
  color: var(--az-white);
  padding: 0.75rem 1rem;
  line-height: 1.4;
  transition: border-color var(--az-transition) var(--az-ease);
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300dc82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--az-muted);
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--az-green-50);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--az-green);
}

label {
  display: block;
  font-family: var(--az-font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--az-muted-strong);
  margin-bottom: 0.4rem;
}

fieldset {
  border: var(--az-border);
  padding: 1.25rem;
  margin: 0 0 1.5rem;
}

legend {
  font-family: var(--az-font-display);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.8125rem;
  color: var(--az-green);
  padding: 0 0.5rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--az-green);
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* --- Fokus, nicht verhandelbar ----------------------------------------- */

:focus-visible {
  outline: 3px solid var(--az-green);
  outline-offset: 3px;
}

/* Aeltere Browser ohne :focus-visible bekommen wenigstens den klassischen Ring */
:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: var(--az-green);
  color: var(--az-black);
}

/* --- Skip-Link ---------------------------------------------------------- */

.az-skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 999;
  background: var(--az-green);
  color: var(--az-black);
  font-family: var(--az-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.75rem 1.25rem;
  transition: top 0.2s var(--az-ease);
}

.az-skip-link:focus {
  top: 1rem;
  color: var(--az-black);
}

/* --- Screenreader ------------------------------------------------------- */

.screen-reader-text,
.az-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: static !important;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
}

/* --- Bewegung ----------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
