/* =================================================================
   GOLDKAUTION.DE — Design-System (main.css)
   Statische Website · Kein Framework · Kein Build-Tool
   Stand: März 2026
   ================================================================= */

/* -----------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   ----------------------------------------------------------------- */
:root {
  /* Hintergründe — clean, neutral (FinTech) */
  --bg-primary:      #FFFFFF;
  --bg-secondary:    #F5F5F7;
  --bg-elevated:     #FFFFFF;
  --bg-dark:         #1A1A1F;

  /* Gold — frisch, wie echte Barren, nicht braun */
  --gold-primary:    #D4AF37;
  --gold-accent:     #DFC25A;
  --gold-light:      #F0E3A8;
  --gold-subtle:     #FDF9ED;

  /* Text — dunkles Blau für Headlines, passend zum Hero-Bild */
  --text-primary:    #0F1A2E;
  --ink:             #262626;
  --ink-body:        #575757;
  --text-body:       #374151;
  --text-secondary:  #6B7280;
  --text-muted:      #9CA3AF;
  --text-on-dark:    #F9FAFB;

  /* Semantic */
  --success:         #059669;
  --success-text:    #047857;
  --gold-hover:      #C09A2F;
  --success-bg:      #ECFDF5;
  --danger:          #DC2626;
  --danger-bg:       #FEF2F2;

  /* Borders — kühl, neutral */
  --border:          #E5E7EB;
  --border-strong:   #D1D5DB;

  /* Typography — Satoshi durchgängig (moovnao Brand) */
  --font-display:    'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:       'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Fluid Type Scale — Basis 18px für luftiges Lesen */
  --text-sm:   clamp(0.8125rem, 1vw, 0.9375rem);
  --text-base: 1.125rem;
  --text-lg:   clamp(1.1875rem, 1.5vw, 1.375rem);
  --text-xl:   clamp(1.375rem, 2vw, 1.625rem);
  --text-2xl:  clamp(1.875rem, 3.5vw, 2.625rem);
  --text-3xl:  clamp(2.375rem, 5vw, 3.625rem);
  --text-hero: clamp(3rem, 8vw, 5.5rem);

  /* Spacing scale — großzügig, die Seite atmet */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  5rem;
  --space-2xl: 8rem;
  --space-3xl: clamp(6rem, 10vw, 9rem);
  --section-space: clamp(4.5rem, 8vw, 7rem);

  /* Startseiten-Skala: jede Größe kommt von hier */
  --fs-display: clamp(2.75rem, 6.4vw, 5.5rem);
  --fs-h2:      clamp(2.25rem, 4.4vw, 3.5rem);
  --fs-num:     clamp(2.75rem, 5.2vw, 4.5rem);
  --fs-h3:      1.5rem;
  --fs-lead:    1.25rem;
  --fs-body:    1.125rem;
  --fs-small:   0.9375rem;
  --chapter-space: clamp(4rem, 7vw, 6rem);
  --chapter-pause: clamp(5rem, 9vw, 8rem);
  --head-gap:   clamp(2.5rem, 5vw, 4rem);
  --measure:    560px;
  --tool-bg:    #0F1A2E;
  --tool-line:  rgba(255, 255, 255, 0.14);
  --tool-text:  #D8DEE7;

  /* Border radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows (neutral, modern) */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.06),
                 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.08),
                 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.10),
                 0 4px 8px rgba(0, 0, 0, 0.05);
  --shadow-gold: 0 0 0 3px rgba(184, 134, 11, 0.15);

  /* Layout — Mindify-Gerüst: 1200px + 40px Padding */
  --container-max: 1296px;
  --container-narrow: 800px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Focus ring (A11y) */
  --focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px #262626;
}


/* -----------------------------------------------------------------
   2. @FONT-FACE — Satoshi via Fontshare CDN
   Einheitliche Unternehmensschrift (moovnao Brand Foundation)
   ----------------------------------------------------------------- */
/* Satoshi wird via <link> im HTML-Head geladen (performanter als @import) */


/* -----------------------------------------------------------------
   3. CSS RESET (modern, minimal)
   ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

img {
  font-style: italic; /* Shows alt text styled if image fails */
}

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

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

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

fieldset {
  border: none;
}


/* -----------------------------------------------------------------
   4. ACCESSIBILITY FOUNDATIONS
   ----------------------------------------------------------------- */

/* Focus styles — visible on keyboard nav, hidden on mouse */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 9999;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-weight: 500;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Screen-reader only (visually hidden but accessible) */
.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;
}

/* Ensure sufficient touch target size (WCAG 2.5.8) */
a,
button,
input,
select,
textarea,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
}

/* Exception: inline links in body text */
p a,
li a,
td a {
  min-height: auto;
  min-width: auto;
}


/* -----------------------------------------------------------------
   5. TYPOGRAPHY
   ----------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
  font-weight: 500;
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

p {
  max-width: 60ch;
  font-size: var(--text-base);
}

/* Gold accent in headlines */
.gold {
  color: var(--gold-primary);
}

em {
  font-style: normal;
  color: var(--gold-primary);
  font-family: var(--font-display);
  font-weight: 300;
}

strong {
  font-weight: 500;
}

/* Text utility classes */
.text-small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.text-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.text-large {
  font-size: var(--text-lg);
  line-height: 1.75;
}

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

/* Eyebrow text above headlines. Gold nur als Punkt, Text dunkel
   (Gold auf Weiss erreicht nur 2,1:1 Kontrast). */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-body);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  flex-shrink: 0;
}


/* -----------------------------------------------------------------
   6. LAYOUT
   ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 32px;
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 48px;
  }
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Section spacing — generous, space is the design */
section,
.section {
  padding-block: var(--space-3xl);
}

/* Alternating section backgrounds */
.bg-primary   { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-elevated  { background-color: var(--bg-elevated); }
.bg-dark      { background-color: var(--bg-dark); color: var(--text-on-dark); }

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  section,
  .section {
    padding-block: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  section,
  .section {
    padding-block: var(--space-xl);
  }

  .container {
    padding-inline: var(--space-sm);
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

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

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }


/* -----------------------------------------------------------------
   7. LINKS & INTERACTIVE BASE
   ----------------------------------------------------------------- */
/* Body text links */
p a,
li a,
.content-link {
  color: var(--gold-primary);
  text-decoration: underline;
  text-decoration-color: var(--gold-light);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast);
}

p a:hover,
li a:hover,
.content-link:hover {
  text-decoration-color: var(--gold-primary);
}

/* Selection */
::selection {
  background-color: var(--gold-subtle);
  color: var(--text-primary);
}


/* -----------------------------------------------------------------
   8. PRINT STYLES
   ----------------------------------------------------------------- */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

  .site-header,
  .site-footer,
  .goldprice-bar,
  .skip-link,
  nav {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
  }
}
