/* ============================================================
   main.css — vbjaenicke.de · Layout & Komponenten
   Baut auf assets/tokens.css (Designer, byte-for-byte übernommen).
   Paarungsregeln: --accent nur auf HELL, --accent-bright nur auf DUNKEL.
   ============================================================ */

/* --- Fonts (lokal eingebettet, Inter) --- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }

/* --- Skip-Link --- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink-strong); color: var(--surface);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: var(--surface); }

/* --- Container / Sheet --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.sheet {
  background: var(--surface); max-width: var(--container);
  margin: 1.5rem auto 2.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sheet); overflow: hidden;
}
.section { padding: clamp(1.5rem, 4vw, 3rem); }
.section--narrow { max-width: 62rem; }

/* --- Header (sticky, anthrazit) --- */
.site-header {
  background: var(--ink-strong); color: var(--surface);
  position: sticky; top: 0; z-index: 20;
  transition: box-shadow var(--t-med) var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 14px rgba(18,23,28,.35); }
.brand { display: flex; align-items: baseline; gap: .75rem; padding: .8rem 0 .5rem; flex-wrap: wrap; }
.brand__name { font-weight: 700; font-size: 1.15rem; color: var(--surface); }
.brand__tag { color: var(--text-muted-dark); font-size: .8125rem; }

/* --- Navigation (Pillen) --- */
.nav { display: flex; gap: .25rem; padding-bottom: .8rem; flex-wrap: wrap; align-items: center; }
.nav__link {
  display: inline-block; padding: .45rem 1rem; border-radius: var(--radius-pill);
  color: var(--surface); text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav__link:hover { background: rgba(255,255,255,.09); }
.nav__link[aria-current="page"] { background: var(--accent-bright); color: var(--ink-strong); font-weight: 600; }
.nav__toggle { display: none; }

/* Dropdown (Desktop) */
.nav__item { position: relative; }
.nav__dropdown {
  position: absolute; top: 100%; left: 0; margin-top: .35rem;
  background: var(--ink-strong); border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(18,23,28,.4);
  min-width: 15rem; padding: .4rem;
  display: none; flex-direction: column; gap: .15rem;
}
.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown { display: flex; }
/* Hover-Brücke: schließt den toten Raum zwischen Eltern-Link und Dropdown (margin-top:.35rem),
   damit der Mausweg vom Eltern-Eintrag zu den Submenü-Links in einem Zug offen bleibt. */
.nav__dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -.6rem; height: .6rem; }
.nav__dropdown a { padding: .5rem .9rem; border-radius: 8px; color: var(--surface); text-decoration: none; }
.nav__dropdown a:hover { background: rgba(255,255,255,.09); }

/* --- Hero --- */
.hero { position: relative; min-height: clamp(20rem, 45vw, 30rem); display: flex; align-items: center; overflow: hidden; }
.hero--compact { min-height: 11rem; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,23,28,.78) 0%, rgba(18,23,28,.42) 46%, rgba(18,23,28,.06) 78%, rgba(18,23,28,0) 100%); }
.hero__content { position: relative; padding: clamp(1.5rem, 5vw, 3rem); max-width: 52rem; color: var(--surface); }
.hero__content h1 { color: var(--surface); font-size: clamp(1.55rem, 3.4vw, 2.35rem); }
.hero__content p { color: var(--surface); max-width: 62ch; }
.hero--compact .hero__content { padding: 1.6rem clamp(1.5rem, 5vw, 4rem); }
.hero--compact .hero__content h1 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin-bottom: 0; }
@media (max-width: 560px) { .hero__content { padding: 1.25rem; } }

/* --- Eyebrow-Pille --- */
.eyebrow {
  display: inline-block; background: var(--accent-bright); color: var(--ink-strong);
  font-weight: 600; font-size: .8125rem; padding: .3rem .85rem; border-radius: var(--radius-pill);
  margin-bottom: .8rem;
}

/* --- Hinweis-Band (Startseite) --- */
.notice {
  border-left: 4px solid var(--notice-border); background: var(--notice-bg);
  max-width: var(--container); margin: 1.5rem auto 0; border-radius: var(--radius);
  box-shadow: var(--shadow-sheet); padding: 1rem 1.5rem;
  display: flex; gap: .75rem; align-items: baseline;
}
.notice[hidden] { display: none; } /* hidden gewinnt gegen display:flex */
.notice [data-notice-text] { display: flex; flex-direction: column; gap: .35rem; }
.notice strong { color: var(--ink); }

/* --- Stellen-Werbeblock (Startseite, eigenes Sheet nach dem Willkommenstext) --- */
.stellen { background: var(--stellen-bg); border-left: 4px solid var(--stellen-border);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.stellen h2 { margin-top: 0; }
.stellen a { font-weight: 600; }
/* Hover = Anheben + Schatten wie die Karten (Designer: Fläche/Linie, Text auf --ink) */
.stellen:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

/* --- Grid / Karten --- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.card h3 { margin-top: 0; }
.card a { font-weight: 600; }

/* --- Listen (einheitlicher Chevron-Marker als CSS-Mask, kein ::marker-Doppel) --- */
/* Alle Inhaltslisten teilen sich einen Marker; Footer/Rechtliches bleibt ohne Icon (Navigation). */
ul.default, ol.default, .checklist, .contact-block ul { list-style: none; padding: 0; }
ul.default, ol.default, .checklist { margin: 0 0 1.25rem; }
ul.default li, ol.default li, .checklist li, .contact-block li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
ul.default li::before, ol.default li::before, .checklist li::before, .contact-block li::before {
  content: "";
  position: absolute; left: 0; top: .5em;
  width: .7rem; height: .7rem;
  background: var(--accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat;
  mask-size: contain; mask-repeat: no-repeat;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
/* Hover: Icon 3px nach rechts + --accent-mid — ohne box-shadow (kein Schatten!) */
ul.default li:hover::before, ol.default li:hover::before, .checklist li:hover::before, .contact-block li:hover::before {
  transform: translateX(3px);
  background: var(--accent-mid);
}

/* Hover-Sprache der Inhaltslisten (A; die 3-px-Akzentleiste C auf Svenwunsch wieder entfernt: „to much").
   A = Tint nur auf Zeilen mit direktem Link (sagt „klickbar"), die 63 Text-Zeilen bleiben ruhig. */
ul.default li, ol.default li, .checklist li, .contact-block li {
  border-radius: 6px;
  transition: background-color var(--t-fast) var(--ease);
}
/* Tokenfrei: der Tint leitet sich aus --accent-mid ab (color-mix), kein vierter Handwert. */
ul.default li:has(> a):hover, ol.default li:has(> a):hover,
.checklist li:has(> a):hover, .contact-block li:has(> a):hover,
ul.default li:has(> a):focus-within, ol.default li:has(> a):focus-within,
.checklist li:has(> a):focus-within, .contact-block li:has(> a):focus-within {
  background-color: color-mix(in srgb, var(--accent-mid) 8%, transparent);
}

/* --- Kontakt-Block --- */
.contact-block { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-block address { font-style: normal; line-height: 1.8; }
.contact-block ul { list-style: none; padding: 0; margin: 0; }
.contact-block li { margin-bottom: .5rem; }
.contact-block a { font-weight: 600; }
@media (max-width: 700px) { .contact-block { grid-template-columns: 1fr; } }

/* --- Bürozeiten-Tabelle --- */
.hours { width: 100%; border-collapse: collapse; max-width: 26rem; }
.hours th, .hours td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--hairline); }
.hours th { color: var(--ink-strong); font-weight: 600; }

/* --- Footer --- */
.site-footer { background: var(--ink-strong); color: var(--text-muted-dark); padding: 2.5rem 0 2rem; margin-top: 2.5rem; }
.site-footer a { color: var(--text-muted-dark); text-decoration: none; }
.site-footer a:hover { color: var(--surface); }
.site-footer h2 { color: var(--surface); font-size: .95rem; margin-bottom: .8rem; }
.footer-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; padding: 0 1.5rem; }
.footer-grid address { font-style: normal; line-height: 1.8; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid > .footer-col--legal { grid-column: 3; }
.footer-legal { max-width: var(--container); margin: 1.8rem auto 0; padding: 1rem 1.5rem 0; border-top: 1px solid rgba(255,255,255,.12); color: var(--text-muted-dark); font-size: .875rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } .footer-grid > .footer-col--legal { grid-column: auto; } }

/* --- Nach-oben-Button --- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--ink-strong); color: var(--surface);
  border: none; cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(18,23,28,.3);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.to-top.is-visible { display: flex; }
.to-top:hover { transform: translateY(-2px); }
.to-top svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* --- FadeIn (nicht auf Legal-Seiten) --- */
.fade { opacity: 0; transform: translateY(12px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.fade.is-in { opacity: 1; transform: none; }
body.no-anim .fade { opacity: 1; transform: none; }

/* --- Breadcrumb --- */
.breadcrumb { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* --- Anker-Scroll-Abstand --- */
[data-anchor], h2[id], h3[id] { scroll-margin-top: 6rem; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .brand__tag { display: none; }
  /* Dropdowns auf Touch-Geräten inline sichtbar machen (kein Hover verfügbar) */
  .nav__dropdown {
    position: static; display: flex; flex-direction: column;
    margin: .2rem 0 .4rem 1.2rem; box-shadow: none;
  }
  .nav__dropdown a { padding: .4rem .8rem; font-size: .95rem; }
}