/* ============================================================
   terramedis GmbH — Base Styles & Reset
   ============================================================ */

/* --- Modern Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typography Base --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-light);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl);  }
h4 { font-size: var(--text-lg);  }
h5 { font-size: var(--text-md);  }
h6 { font-size: var(--text-base);}

p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text);
}

p + p {
  margin-top: var(--space-md);
}

strong {
  font-weight: var(--weight-medium);
}

em {
  font-style: italic;
}

/* --- Links --- */
a:not([class]) {
  color: var(--color-primary);
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease-out);
}

a:not([class]):hover {
  color: var(--color-primary-dark);
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* --- Selection --- */
::selection {
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
}

/* --- Horizontal Rule --- */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* --- Reveal Animation Base --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Utility Classes --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center { text-align: center; }
.text-left   { text-align: left;   }

.font-heading { font-family: var(--font-heading); }

/* --- Decorative Mark --- */
.deco-mark {
  display: inline-block;
  font-size: 0.6em;
  line-height: 1;
  color: var(--color-primary);
  margin-bottom: 0.15em;
  vertical-align: middle;
  letter-spacing: 0;
}
