/* ==========================================================================
   borgards.biz — Relaunch 2026
   Design-System: Light/Dark via data-theme, Fonts lokal (Sora + Inter)
   ========================================================================== */

:root {
  --brand:        #A92D12;
  --brand-strong: #8C250E;
  --brand-bright: #C2461F;
  --brand-soft:   rgba(169, 45, 18, .08);
  --brand-glow:   rgba(169, 45, 18, .16);

  --bg:        #FAF8F5;
  --bg-soft:   #F2EEE7;
  --card:      #FFFFFF;
  --text:      #1C1915;
  --muted:     #5E574E;
  --line:      rgba(28, 25, 21, .10);
  --shadow:    0 18px 40px -18px rgba(28, 25, 21, .18);
  --shadow-sm: 0 6px 18px -8px rgba(28, 25, 21, .12);

  --header-bg: rgba(250, 248, 245, .82);
  --cta-grad-1: #A92D12;
  --cta-grad-2: #7E1F0B;
  --on-brand: #FFF7F2;

  --radius:    20px;
  --radius-sm: 14px;
  --font-head: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  color-scheme: light;
}

[data-theme="dark"] {
  --brand:        #D0522B;
  --brand-strong: #B6431F;
  --brand-bright: #E0653A;
  --brand-soft:   rgba(224, 101, 58, .12);
  --brand-glow:   rgba(224, 101, 58, .22);

  --bg:        #14110E;
  --bg-soft:   #1B1712;
  --card:      #201B15;
  --text:      #F4F0E9;
  --muted:     #ABA296;
  --line:      rgba(244, 240, 233, .12);
  --shadow:    0 18px 44px -18px rgba(0, 0, 0, .55);
  --shadow-sm: 0 6px 18px -8px rgba(0, 0, 0, .45);

  --header-bg: rgba(20, 17, 14, .82);
  --cta-grad-1: #C2461F;
  --cta-grad-2: #8C250E;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background-color .35s ease, color .35s ease;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 4.7vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em; }

h1 em, h2 em {
  font-style: italic;
  color: var(--brand);
  /* Sora hat keinen echten Kursiv-Schnitt: synthetisches Kursiv laesst
     das folgende Leerzeichen verschwinden — Padding gleicht das aus. */
  padding-right: .18em;
}

p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-bright); }

.container {
  width: min(1180px, 100% - 3rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: .5rem;
  z-index: 200;
  background: var(--brand);
  color: var(--on-brand);
  padding: .6rem 1rem;
  border-radius: 8px;
}
.skip-link:focus { left: .5rem; color: var(--on-brand); }

:focus-visible {
  outline: 2.5px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Kicker ---------- */
.kicker {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 10px 24px -10px var(--brand-glow), var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--brand-strong);
  color: var(--on-brand);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px var(--brand-glow), var(--shadow-sm);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

.btn-light {
  background: #FFF7F2;
  color: #7E1F0B;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .35);
}
.btn-light:hover { background: #FFFFFF; color: #7E1F0B; transform: translateY(-2px); }

.btn-small { padding: .55rem 1.15rem; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .35s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: .8rem;
}

.brand { display: inline-flex; align-items: center; }
.brand .logo { width: clamp(190px, 22vw, 250px); height: auto; }

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: .5rem .85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  transition: color .2s ease, background-color .2s ease;
}
.main-nav a:hover { color: var(--text); background: var(--brand-soft); }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-left: auto;
}
.main-nav + .nav-actions { margin-left: 0; }

/* Theme-Toggle */
.theme-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); transform: rotate(8deg); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: opacity .25s ease, transform .35s ease; }
.icon-moon { opacity: 0; transform: rotate(-40deg) scale(.6); }
[data-theme="dark"] .icon-sun  { opacity: 0; transform: rotate(40deg) scale(.6); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: none; }

/* Burger */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 340px at 85% 8%, var(--brand-glow), transparent 65%),
    radial-gradient(680px 420px at -10% 100%, var(--brand-soft), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy .lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 2.4rem;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.hero-facts li {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.45;
}
.hero-facts svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--brand);
  margin-top: .1rem;
}
.hero-facts strong { color: var(--text); }

.hero-media { position: relative; }
.hero-media figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transform: rotate(1.2deg);
  transition: transform .5s ease;
}
.hero-media figure:hover { transform: rotate(0deg); }
.hero-media img { width: 100%; height: auto; }

.hero-badge {
  position: absolute;
  left: -1.2rem;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem 1.1rem;
  box-shadow: var(--shadow);
  animation: float 5.5s ease-in-out infinite;
}
.hero-badge svg { width: 30px; height: 30px; color: var(--brand); flex: none; }
.hero-badge strong { display: block; font-family: var(--font-head); font-size: 1.05rem; line-height: 1.2; }
.hero-badge span { font-size: .85rem; color: var(--muted); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; scroll-margin-top: 4.5rem; }

.section-alt {
  background: var(--bg-soft);
  transition: background-color .35s ease;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}
.section-lead { color: var(--muted); font-size: 1.12rem; margin: 0; }

/* ---------- Leistungs-Karten ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .35s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45em; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 1.1rem;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { background: var(--brand); color: var(--on-brand); transform: scale(1.05) rotate(-3deg); }

/* ---------- Referenzen ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .35s ease;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--brand); }

.project figure {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.project figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.project:hover figure img { transform: scale(1.045); }

.project-body { padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.project-body h3 { margin-bottom: .4em; }
.project-body > p { color: var(--muted); font-size: .97rem; }

.project-tag {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6rem;
}

.project-body ul {
  list-style: none;
  margin: .4rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px dashed var(--line);
  font-size: .92rem;
  color: var(--muted);
}
.project-body ul li { position: relative; padding-left: 1.4rem; margin-bottom: .35rem; }
.project-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .48em;
  width: .5em;
  height: .5em;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg) scale(.8);
}

/* ---------- Über mich ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.about-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  transition: transform .5s ease;
}
.about-media:hover { transform: rotate(0deg); }

.about-copy p { color: var(--muted); }
.about-copy p strong { color: var(--text); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.4rem 0 0;
  padding: 0;
}
.chips li {
  font-family: var(--font-head);
  font-size: .86rem;
  font-weight: 600;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.chips li:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }

/* ---------- Kontakt-CTA ---------- */
.cta-card {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(700px 300px at 110% -20%, rgba(255, 247, 242, .14), transparent 60%),
    linear-gradient(135deg, var(--cta-grad-1), var(--cta-grad-2));
  color: #FFF7F2;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px var(--brand-glow), var(--shadow);
}
.cta-inner {
  padding: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 46rem;
}
.cta-card h2 { color: #FFF7F2; }
.cta-card h2 em { color: #FFD9C7; }
.cta-card p { color: rgba(255, 247, 242, .85); font-size: 1.1rem; }
.cta-card .cta-row { margin: 1.8rem 0 1.4rem; }
.cta-note { font-size: .92rem; margin: 0; }
.cta-note a { color: #FFF7F2; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  transition: background-color .35s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem 0 2rem;
}

.footer-brand .logo { width: 240px; height: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); font-size: .95rem; max-width: 26rem; margin: 0; }

.footer-title {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: .35rem 0 .9rem;
}

.footer-nav ul, .footer-contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li, .footer-contact li { margin-bottom: .5rem; }
.footer-nav a, .footer-contact a {
  color: var(--text);
  text-decoration: none;
  font-size: .97rem;
  transition: color .2s ease;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--brand); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 1.6rem;
}
.footer-bottom p { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- Reveal-Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .65, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr 1fr; }
  .project:first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-badge { left: .8rem; bottom: 1.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav ul { flex-direction: column; padding: .8rem 1.5rem 1.2rem; gap: .2rem; }
  .main-nav a { font-size: 1.05rem; padding: .7rem 1rem; }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }
  .cards { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr; gap: .9rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .cta-row .btn { width: 100%; justify-content: center; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Rechtsseiten (Impressum, Datenschutz) & einfache Seiten ---------- */
.section-legal { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.legal { max-width: 52rem; }

.legal-title {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  margin-bottom: 1.2em;
}

.legal h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin: 2.2em 0 .55em;
}

.legal h3 {
  font-size: 1.12rem;
  margin: 1.7em 0 .4em;
}

.legal h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5em 0 .35em;
}

.legal p { color: var(--muted); }
.legal p strong, .legal li strong { color: var(--text); }

.legal ul, .legal ol {
  color: var(--muted);
  padding-left: 1.3rem;
}
.legal li { margin-bottom: .35rem; }

.legal a { word-break: break-word; }

.legal address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.7;
}
