/* ==========================================================================
   Needle Drop – Base
   Schrift, Reset, Typografie, Layout-Container, Skip-Link, Fokus,
   reduced motion. Nur Tokens aus tokens.css.
   Ausrichtung laut Entwurf: linksbündig, Zentrierung nur gezielt (.center).
   Hinweis: Media Queries können keine CSS-Variablen nutzen. Breakpoints
   stehen daher als Zahl: 36rem (576 px), 48rem (768 px), 56rem (896 px).
   ========================================================================== */

/* --- Schriften: alle lokal, keine externen Requests ------------------- */
/* Manrope, variabel 300–700, Latin-Subset, SIL OFL 1.1 */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* The Rose Atelier (PeachCreme), unverändert wie geliefert, siehe
   LIZENZ-the-rose-atelier.txt. Nur für kurze handgeschriebene Zeilen.
   Kein Preload: Die Zeilen sind Akzente, kein Inhalt, der sofort da sein muss. */
@font-face {
  font-family: "The Rose Atelier";
  src: url("../fonts/the-rose-atelier.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--space-12) + var(--space-4));
}

body {
  min-height: 100vh;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

address {
  font-style: normal;
}

::selection {
  background: var(--color-ink);
  color: var(--color-paper);
}

/* --- Typografie --------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-accent);
  line-height: var(--lh-heading);
  text-wrap: balance;
}

/* Lange deutsche Wörter (z. B. „Verbraucherstreitbeilegung“) auf schmalen
   Displays trennen statt überlaufen lassen */
h1,
h2,
h3,
p,
li,
summary {
  hyphens: auto;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-light);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
}

p,
li {
  max-width: var(--width-text);
  text-wrap: pretty;
}

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

small,
.text-small {
  font-size: var(--fs-small);
}

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

strong {
  font-weight: var(--fw-bold);
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: var(--line-width);
  text-underline-offset: var(--underline-offset);
  transition: text-underline-offset var(--motion-duration) var(--motion-ease);
}

a:hover {
  text-underline-offset: var(--underline-offset-hover);
  text-decoration-color: var(--color-accent);
}

/* Label: Versalien mit Laufweite, z. B. „NEEDLE DROP STUDIO“, „THE ARTIST“ */
.label {
  hyphens: manual;
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: var(--lh-heading);
}

/* --- Layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--width-layout);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* Textspalte: linksbündig an der Kante der übrigen Abschnitte (Entwurf),
   die Zeilenlänge begrenzen die Kindelemente */
.container--text > * {
  max-width: var(--width-text);
}

.section {
  padding-block: var(--space-8);
}

.section--surface {
  background: var(--color-surface);
}

/* Feine Trennlinie nur zwischen zwei Abschnitten auf Cream */
.section:not(.section--surface) + .section:not(.section--surface) {
  border-top: var(--line-soft);
}

/* Handgeschriebene Akzentzeile (The Rose Atelier). Nie für Pflichtinfos. */
.script {
  font-family: var(--font-script);
  font-size: var(--fs-script);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  letter-spacing: 0;
  text-transform: none;
}

.script--small {
  font-size: var(--fs-script-small);
}

.stack > * + * {
  margin-top: var(--space-3);
}

.center {
  text-align: center;
}

.center p,
.center li {
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--space-4);
  }


  .section {
    padding-block: var(--space-12);
  }
}

/* --- Barrierefreiheit --------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  padding: var(--space-1) var(--space-2);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--fs-small);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Fokus auf Elementen, die per Skript fokussiert werden (z. B. main) */
[tabindex="-1"]:focus-visible {
  outline: none;
}

/* --- Bewegung ----------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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