/* =========================================================
   BASE — Elektroservice Ernst
   Global typographic defaults and base element styles
   ========================================================= */

/* —— Google Fonts Import ——————————————————————————————————
   Cormorant Garamond: editorial serif for headings
   Syne: geometric grotesque for UI/nav/labels
   DM Sans: clean humanist sans for body
*/
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&family=Syne:wght@400;500;600;700;800&display=swap');

/* —— Body ————————————————————————————————————————————————— */

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-ink);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* —— Headings ————————————————————————————————————————————— */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-ink);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); font-family: var(--font-ui); letter-spacing: var(--ls-wide); }
h6 { font-size: var(--fs-base); font-family: var(--font-ui); letter-spacing: var(--ls-caps); text-transform: uppercase; }

/* —— Body copy ———————————————————————————————————————————— */

p {
  max-width: 68ch;
  color: var(--color-ink-secondary);
}

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

strong, b {
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--fs-sm);
  color: var(--color-ink-muted);
}

/* —— Links ———————————————————————————————————————————————— */

a {
  transition: color var(--duration-fast) ease;
}

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

/* —— Label / Eyebrow text ————————————————————————————————— */

.label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-accent);
}

.label--dark {
  color: var(--color-ink-muted);
}

/* —— Lead paragraph ——————————————————————————————————————— */

.lead {
  font-size: var(--fs-lg);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--color-ink-secondary);
  max-width: 60ch;
}

/* —— Horizontal rule ————————————————————————————————————— */

hr {
  border-color: var(--color-rule);
  margin: var(--space-8) 0;
}

/* —— Images ——————————————————————————————————————————————— */

img {
  border-radius: var(--radius-sm);
}

figure {
  position: relative;
}

figcaption {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--color-ink-muted);
  letter-spacing: var(--ls-wide);
  margin-top: var(--space-2);
}

/* —— Lists ———————————————————————————————————————————————— */

.prose ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.prose ul li {
  padding-left: var(--space-5);
  position: relative;
  color: var(--color-ink-secondary);
  line-height: var(--lh-snug);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 1px;
  background: var(--color-accent);
}

/* —— Blockquote ——————————————————————————————————————————— */

blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-style: italic;
  font-weight: var(--fw-light);
  line-height: var(--lh-snug);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-6);
  color: var(--color-ink);
}

/* —— Scroll snap (global) ————————————————————————————————— */

html {
  scroll-padding-top: var(--header-height);
}

/* —— Selection ———————————————————————————————————————————— */

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* —— Scrollbar ——————————————————————————————————————————— */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-rule-dark); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }
