/* ============================================
   BB Schmiede — Stylesheet
   Felix Bleyl · 2026
   ============================================ */

/* --- Fonts (lokal, kein CDN) --- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@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-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- Design Tokens (nur helles Theme) --- */
:root {
  --anthrazit: #1a1f2e;
  --off-white: #fafaf7;
  --copper: #c87533;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;

  --bg: var(--off-white);
  --bg-elevated: #ffffff;
  --fg: var(--anthrazit);
  --fg-muted: #6b6f7a;
  --border: rgba(26, 31, 46, 0.1);
  --border-strong: rgba(26, 31, 46, 0.2);
  --card-bg: rgba(26, 31, 46, 0.025);
  --accent: var(--copper);
  --accent-soft: rgba(200, 117, 51, 0.12);
  --header-bg: rgba(250, 250, 247, 0.85);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

::selection { background: var(--accent); color: var(--off-white); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1080px;
  padding-inline: 1.25rem;
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; 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: -100px; left: 1rem;
  padding: 0.625rem 1rem; background: var(--accent); color: var(--off-white);
  border-radius: 4px; font-family: var(--font-mono); font-size: 0.875rem;
  z-index: 100; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* --- Site Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 0;
}

.brand-mini {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 0.4em;
  transition: opacity 0.2s;
}
.brand-mini:hover { opacity: 0.8; }
.brand-mini .bracket { color: var(--accent); font-weight: 400; }

.header-nav { display: flex; gap: 1.25rem; align-items: center; }
.header-nav a {
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--fg-muted); transition: color 0.2s;
}
.header-nav a:hover { color: var(--accent); }

@media (max-width: 540px) {
  .header-nav a { display: none; }
}

/* --- Hero-Intro (Schmiede-Video, einmal pro Sitzung) --- */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  /* Farbe des ersten Videoframes — sichtbar nur, bis das Video rendert */
  background: #dfdcd2;
  opacity: 1;
  transition: opacity 0.8s ease;
}
.intro.is-on { display: flex; }
.intro.is-fading { opacity: 0; pointer-events: none; }

/* Seite hinterm Overlay nicht scrollbar, solange das Intro läuft */
html[data-intro] body { overflow: hidden; }

.intro-video {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative; z-index: 1;
}

/* Unschärfe-Ebene fürs Hochformat: dasselbe Video, stark geblurrt als
   Vollbild-Hintergrund. Im Querformat aus (dort läuft das Video als cover). */
.intro-video-bg {
  display: none;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(28px);
  /* leicht aufgezogen, damit die ausgefransten Blur-Ränder außerhalb liegen */
  transform: scale(1.15);
}

/* Hochformat (Handy): cover würde das 16:9-Video seitlich so stark beschneiden,
   dass Logo und Text abgeschnitten wären → scharfes Video komplett einpassen,
   der Blur-Layer füllt den Bildschirm dahinter. */
@media (orientation: portrait) {
  .intro-video { object-fit: contain; }
  .intro-video-bg { display: block; }
}

.intro-skip {
  position: absolute; right: 1.25rem; bottom: 1.25rem;
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: rgba(26, 31, 46, 0.65);
  padding: 0.5rem 0.875rem; border-radius: 4px;
  background: rgba(250, 250, 247, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color 0.2s, background 0.2s;
}
.intro-skip:hover, .intro-skip:focus-visible {
  color: var(--copper);
  background: rgba(250, 250, 247, 0.85);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero-logo {
  width: clamp(180px, 28vw, 280px);
  height: auto;
  margin: 0 auto 2rem;
}
.hero-tagline {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.8125rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.75rem;
  display: inline-flex; align-items: center; gap: 0.85em;
}
.hero-tagline::before, .hero-tagline::after {
  content: ''; width: 1.75rem; height: 1px;
  background: var(--accent); opacity: 0.45;
}

.hero-lead {
  font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(1.375rem, 4vw, 2.375rem);
  line-height: 1.25; letter-spacing: -0.01em;
  max-width: min(22ch, 100%); margin: 0 auto 2.75rem; color: var(--fg);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.cta {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.9375rem;
  padding: 0.875rem 1.625rem;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 4px; letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cta:hover, .cta:focus-visible {
  background: var(--accent); color: var(--off-white);
  transform: translateY(-2px);
}
.cta svg { transition: transform 0.2s; }
.cta:hover svg { transform: translateX(3px); }

/* --- Sections --- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }

.section-title {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  letter-spacing: 0.04em;
  text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem);
  color: var(--fg);
}
.section-title .bracket {
  color: var(--accent); font-weight: 400;
  margin: 0 0.75em; display: inline-block;
}

/* --- Leistungen --- */
.leistungen-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem;
  max-width: 880px; margin-inline: auto;
}
@media (min-width: 720px) {
  .leistungen-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
}

.card {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  position: relative;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card-icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: 1.25rem;
  stroke-width: 1.5;
}

.card-title {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 1.0625rem; letter-spacing: 0.01em;
  margin-bottom: 0.875rem; color: var(--fg);
}

.card-text {
  font-size: 0.9375rem; color: var(--fg-muted);
  line-height: 1.65;
}

/* --- Über --- */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem;
  max-width: 880px; margin-inline: auto; align-items: start;
}
@media (min-width: 760px) {
  .about { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 4rem; }
}

.about-text, .about-meta, .card { min-width: 0; }

.about-text p {
  font-size: 1.0625rem; line-height: 1.7;
  color: var(--fg); max-width: 60ch;
}
.about-text p + p { margin-top: 1rem; }
.about-text p strong { color: var(--accent); font-weight: 500; }

.about-meta {
  font-family: var(--font-mono); font-size: 0.875rem;
  padding: 1.75rem; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 6px;
  line-height: 1.5;
}
.about-meta dt {
  color: var(--accent); font-size: 0.8125rem;
  margin-bottom: 0.25rem; letter-spacing: 0.02em;
}
.about-meta dt::before { content: '// '; opacity: 0.55; }
.about-meta dd { color: var(--fg); margin-bottom: 1.125rem; }
.about-meta dd:last-child { margin-bottom: 0; }

/* --- Kontakt --- */
.contact {
  text-align: center; max-width: 600px; margin-inline: auto;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  color: var(--accent); margin-bottom: 1.75rem;
  position: relative; padding-bottom: 6px;
  letter-spacing: -0.01em;
}
.contact-email::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s ease;
}
.contact-email:hover::after, .contact-email:focus-visible::after {
  transform: scaleX(1); transform-origin: left;
}

.contact-meta {
  color: var(--fg-muted); font-size: 0.9375rem; line-height: 1.7;
  overflow-wrap: break-word; text-wrap: pretty;
}

/* --- Site Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  padding: 2rem 0;
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--fg-muted);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--accent); }

/* --- Fade-In Animation --- */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* --- Legal Pages --- */
.legal {
  max-width: 720px; margin-inline: auto;
  padding: 3rem 0 4rem;
}
.legal h1 {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem; letter-spacing: 0.02em;
}
.legal h2 {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 1rem;
  margin-top: 2.5rem; margin-bottom: 0.875rem;
  color: var(--accent); letter-spacing: 0.02em;
}
.legal p, .legal address {
  margin-bottom: 1rem; line-height: 1.7;
  color: var(--fg); font-style: normal;
}
.legal ul { list-style: none; padding-left: 1.125rem; margin-bottom: 1rem; }
.legal ul li { position: relative; margin-bottom: 0.5rem; line-height: 1.7; }
.legal ul li::before {
  content: '·'; color: var(--accent);
  position: absolute; left: -1rem; font-weight: bold;
}
.legal a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  word-break: break-word;
}
.legal a:hover { text-decoration-thickness: 2px; }
.legal code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--card-bg); padding: 2px 6px; border-radius: 3px;
}
.legal .placeholder {
  background: var(--accent-soft); padding: 2px 8px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 0.9em; color: var(--accent);
}

.back-home {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--fg-muted); margin-bottom: 2rem;
  transition: color 0.2s, transform 0.2s;
}
.back-home:hover { color: var(--accent); transform: translateX(-3px); }

/* --- NFC-Visitenkarte (karte.html) --- */
.vcard-body {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 3rem 1.25rem;
}
.vcard { width: 100%; max-width: 360px; text-align: center; }

.vcard-logo {
  width: clamp(150px, 48vw, 200px);
  margin: 0 auto 1.5rem;
}
.vcard-name {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 1.5rem; color: var(--fg); letter-spacing: -0.01em;
  margin-bottom: 2.25rem;
}
.vcard-role {
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--fg-muted); margin-top: 0.35rem; margin-bottom: 2.25rem;
}
.vcard-role .bracket { color: var(--accent); }

.vcard-actions { display: flex; flex-direction: column; gap: 0.75rem; }

/* Konzept 2: 2-Spalten-Grid für die schnellen Kontaktwege */
.vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.vcard-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.9375rem;
  padding: 0.95rem 1.25rem; border-radius: 6px;
  border: 1px solid var(--border-strong); color: var(--fg);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}
.vcard-btn svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.vcard-btn:hover, .vcard-btn:focus-visible {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px);
}

.vcard-btn--primary {
  background: var(--accent); border-color: var(--accent); color: var(--off-white);
}
.vcard-btn--primary svg { color: var(--off-white); }
.vcard-btn--primary:hover, .vcard-btn--primary:focus-visible {
  background: #b3672c; border-color: #b3672c; color: var(--off-white);
}

.vcard-foot {
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--fg-muted); margin-top: 2rem; letter-spacing: 0.06em;
}

/* --- Tempero-Highlight-Karte --- */
.vcard-tempero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  margin-top: 1.25rem; padding: 0.95rem 1.1rem;
  border-radius: var(--border-radius-lg, 12px);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.vcard-tempero:hover, .vcard-tempero:focus-visible {
  transform: translateY(-2px);
  background: rgba(200, 117, 51, 0.2);
  box-shadow: 0 6px 22px -10px rgba(200, 117, 51, 0.7);
}
.vt-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent); color: var(--off-white);
  display: flex; align-items: center; justify-content: center;
}
.vt-icon svg { width: 23px; height: 23px; }
.vt-text { display: flex; flex-direction: column; flex: 1; min-width: 0; text-align: left; }
.vt-name { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--accent); letter-spacing: 0.02em; }
.vt-sub { font-size: 0.76rem; color: var(--fg-muted); margin-top: 1px; }
.vt-arrow { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent); transition: transform 0.2s ease; }
.vcard-tempero:hover .vt-arrow { transform: translateX(4px); }

/* Kupfer-Shimmer (Licht auf poliertem Metall) */
.vt-shine {
  position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 200, 140, 0.3), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: vt-shimmer 5s ease-in-out infinite 1.8s;
  pointer-events: none;
}
@keyframes vt-shimmer {
  0% { transform: translateX(-160%) skewX(-18deg); }
  32%, 100% { transform: translateX(330%) skewX(-18deg); }
}

/* --- Entrance: gestaffelter Reveal beim Öffnen --- */
@keyframes vc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vc-pop  { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
.vcard-logo { animation: vc-pop 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.vcard-name { animation: vc-rise 0.6s ease both 0.2s; }
.vcard-actions > .vcard-btn { animation: vc-rise 0.55s ease both 0.3s; }
.vc-grid .vcard-btn { animation: vc-rise 0.5s ease both; }
.vc-grid .vcard-btn:nth-child(1) { animation-delay: 0.42s; }
.vc-grid .vcard-btn:nth-child(2) { animation-delay: 0.50s; }
.vc-grid .vcard-btn:nth-child(3) { animation-delay: 0.58s; }
.vc-grid .vcard-btn:nth-child(4) { animation-delay: 0.66s; }
.vcard-tempero { animation: vc-pop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both 0.82s; }
.vcard-foot { animation: vc-rise 0.6s ease both 1s; }

@media (prefers-reduced-motion: reduce) {
  .vcard-logo, .vcard-name, .vcard-actions .vcard-btn, .vcard-tempero, .vcard-foot { animation: none; }
  .vt-shine { display: none; }
}
