/* =========================================================
   base.css – schuehle.de
   ========================================================= */

/* 0. Schriftarten (lokal)
   ========================================================= */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-300i.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 1. Design-Tokens
   ========================================================= */
:root {
  --bg:       #0e1210;
  --surface:  #141a14;
  --border:   #1e2c1e;
  --text:     #b0c4ac;
  --body:     #8aa086;
  --muted:    #3a5040;
  --accent:   #3ecf6e;
  --accent-g: rgba(62,207,110,0.18);

  --fd: 'Cormorant Garamond', 'Georgia', serif;
  --fu: 'Figtree', 'Helvetica Neue', sans-serif;
  --fm: 'JetBrains Mono', 'Courier New', monospace;

  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  --tx-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --tx-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --tx-hero: clamp(3.2rem, 9vw, 8.5rem);

  --r-sm: 2px;
  --r-md: 4px;
  --ease: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Reset
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: var(--fu);
  font-size: var(--tx-base);
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  line-height: 1.7;
  margin: 0;
}

::selection {
  background: rgba(62, 207, 110, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 3. Hintergrund-Grid
   ========================================================= */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(62, 207, 110, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 207, 110, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
}

.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    transparent 40%,
    rgba(14, 18, 16, 0.7) 100%
  );
}

/* 4. Layout
   ========================================================= */
header {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  width: 100%;
  padding: 0 var(--sp-8);
}

.page-content {
  position: relative;
  z-index: 1;
}

.inner-page {
  max-width: 660px;
  margin-inline: auto;
  padding: var(--sp-12) var(--sp-8) var(--sp-16);
}

.inner-page--wide {
  max-width: 720px;
}

/* 5. Top-Nav
   ========================================================= */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-8);
}

.top-nav__back,
.top-nav__brand {
  font-family: var(--fu);
  font-size: var(--tx-xs);
  color: var(--muted);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--ease);
}

.top-nav__back:hover,
.top-nav__brand:hover {
  color: var(--accent);
}

/* 6. Inner-Page-Typografie
   ========================================================= */
.inner-page h1 {
  font-family: var(--fd);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-6);
}

.inner-page h2 {
  font-family: var(--fu);
  font-weight: 500;
  font-size: var(--tx-xs);
  color: var(--accent);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.inner-page p,
.inner-page li {
  font-family: var(--fu);
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--body);
  line-height: 1.8;
}

.inner-page a {
  color: var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}

.inner-page a:hover {
  color: var(--accent);
}

/* 7. Intern-Komponenten
   ========================================================= */
.kv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-6);
}

.kv-table td {
  padding: var(--sp-2) 0;
  vertical-align: top;
}

.kv-table td:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 38%;
}

.kv-table td:last-child {
  color: var(--text);
  font-size: 0.88rem;
}

.highlight-block {
  border-left: 2px solid var(--accent);
  background: rgba(62, 207, 110, 0.04);
  padding: var(--sp-4) var(--sp-6) var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.tag {
  border: 1px solid var(--border);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
}

.tag--active {
  color: var(--accent);
  border-color: var(--accent);
}

.category-tag {
  color: var(--accent);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.inner-page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
}

.inner-page ul li::before {
  content: '— ';
  color: var(--muted);
  font-family: var(--fm);
}

.inner-page ol {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
  counter-reset: ol-counter;
}

.inner-page ol li {
  counter-increment: ol-counter;
}

.inner-page ol li::before {
  content: counter(ol-counter, decimal-leading-zero) '. ';
  color: var(--muted);
  font-family: var(--fm);
}

/* 8. Logo
   ========================================================= */
#site-logo {
  font-family: var(--fm);
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.8rem;
}

.logo-main {
  color: var(--text);
}

.logo-dot {
  color: var(--accent);
}

/* 9. Footer
   ========================================================= */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-6) var(--sp-8);
  z-index: 10;
  pointer-events: none;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__notice {
  font-family: var(--fu);
  font-size: 0.54rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin: 0;
  pointer-events: none;
}

.site-footer * {
  pointer-events: all;
}

.footer__copy {
  font-family: var(--fu);
  font-size: 0.54rem;
  color: var(--body);
  letter-spacing: 0.06em;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer__links a {
  color: var(--body);
  text-decoration: none;
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  font-family: var(--fu);
  transition: color var(--ease);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__sep {
  color: var(--muted);
  font-size: 0.54rem;
}

/* 10. Mobile
    ========================================================= */
@media (max-width: 768px) {
  #site-logo {
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .site-footer {
    padding: var(--sp-4);
  }
}

@media (max-width: 480px) {
  #site-logo {
    font-size: 1.4rem;
  }

  #coords {
    display: none;
  }

  .footer__copy,
  .footer__notice,
  .footer__links a,
  .footer__sep {
    font-size: 0.45rem;
  }
}

@media (hover: none) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}
