/* =====================================================================
   KRAFFT Rechtsanwälte — Design System "Swiss Modern"
   International Typographic Style: strict 12-col grid, asymmetric layout,
   grotesque type, flush-left, hierarchy through scale and weight.
   Palette: white / cool grey / ink + ONE accent (bordeaux). No beige, no gold.
   Shape: all-sharp (radius 0) everywhere.
   Type: Geist (display + text) + Geist Mono (numbers, labels).
   ===================================================================== */

:root {
  --bg:         #ffffff;
  --bg-2:       #f3f4f6;   /* cool grey sections */
  --bg-3:       #e8eaed;
  --ink:        #0e1013;   /* headlines, rules */
  --text:       #30353c;   /* body */
  --muted:      #69707a;   /* secondary */
  --faint:      #9ba1a9;
  --line:       #e2e4e8;   /* hairlines */
  --rule:       #0e1013;   /* structural rules */
  --accent:     #8a1c2b;   /* bordeaux — the only colour */
  --accent-ink: #6e1622;
  --accent-soft:#f6e8ea;

  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --col-gap: clamp(1rem, 2vw, 2rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- primitives ---- */
.label {
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.sq { display: inline-block; width: .62em; height: .62em; background: var(--accent); flex: none; }
.dot { color: var(--accent); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.28rem); line-height: 1.55; color: var(--text); margin: 0; max-width: 56ch; }

/* ---- scroll progress ---- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%; z-index: 200;
}

/* =========================== HEADER =========================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, #fff 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 72px; position: relative; }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.logo .sq { width: 14px; height: 14px; }
.logo b { font-weight: 700; }
.logo .wm-sub { font-weight: 400; color: var(--muted); }

.nav-links { list-style: none; display: flex; align-items: center; gap: 2.2rem; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  text-decoration: none; color: var(--ink); font-size: .94rem; font-weight: 500;
  padding: .35rem 0; background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s var(--ease), color .2s var(--ease);
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn).active { color: var(--accent); background-size: 100% 1.5px; }

/* ---- buttons (sharp) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  height: 50px; padding: 0 1.5rem; border: 1px solid transparent; border-radius: 0;
  font-family: var(--sans); font-size: .96rem; font-weight: 500; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.nav-links .btn { height: 42px; padding: 0 1.15rem; font-size: .9rem; }

.textlink { color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ink); transition: color .2s, border-color .2s; }
.textlink:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; place-items: center; border-radius: 0; }
.nav-toggle svg { width: 20px; height: 20px; }

/* =========================== HERO =========================== */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
.hero-copy { grid-column: 1 / 8; padding-bottom: .5rem; }
.hero-copy .label { margin-bottom: 2rem; display: flex; align-items: center; gap: .7rem; }
.hero h1 {
  font-family: var(--sans); font-weight: 600; color: var(--ink);
  font-size: clamp(3rem, 7vw, 6.4rem); line-height: .95; letter-spacing: -.05em; margin: 0;
}
.hero-lead { margin-top: 2rem; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }

.hero-figure { grid-column: 9 / 13; margin: 0; }
.hero-photo { position: relative; aspect-ratio: 4 / 5; }
.hero-photo::before {
  content: ""; position: absolute; left: -1.25rem; bottom: -1.25rem; width: 62%; height: 58%;
  background: var(--accent); z-index: 0;
}
.hero-photo img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%;
  filter: grayscale(100%) contrast(1.05);
}
.hero-figure figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: .8rem; border-top: 1px solid var(--rule); }
.hero-figure figcaption span:first-child { font-weight: 600; color: var(--ink); font-size: .95rem; }
.hero-figure figcaption span:last-child { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); align-self: center; }

/* facts row */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); margin: clamp(3rem, 6vw, 5rem) 0 0; border-top: 1px solid var(--rule); }
.facts > div { padding-top: 1.1rem; }
.facts dt { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .45rem; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; font-size: 1rem; line-height: 1.45; }
.facts a { text-decoration: none; }
.facts a:hover { color: var(--accent); }

/* =========================== SECTIONS =========================== */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section--grey { background: var(--bg-2); }
.sec-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.sec-label { grid-column: 1 / 4; display: flex; gap: .9rem; align-items: baseline; align-self: start; position: sticky; top: 96px; }
.sec-label .num { font-family: var(--mono); font-size: .8rem; color: var(--accent); font-weight: 500; }
.sec-label .name { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); font-weight: 500; }
.sec-body { grid-column: 4 / 13; }

.sec-title {
  font-family: var(--sans); font-weight: 600; color: var(--ink);
  font-size: clamp(2.1rem, 4.4vw, 3.8rem); line-height: 1; letter-spacing: -.045em; margin: 0 0 1.6rem;
}
.statement {
  font-weight: 500; color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.15; letter-spacing: -.035em; margin: 0; max-width: 24ch;
}
.statement + .lead { margin-top: 2.2rem; color: var(--muted); max-width: 60ch; }

/* ---- principles ---- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 2.5rem; }
.principle { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.section--grey .principle { border-top-color: #cfd3d9; }
.principle .p-num { font-family: var(--mono); font-size: .8rem; color: var(--accent); font-weight: 500; }
.principle h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.025em; color: var(--ink); margin: 2.2rem 0 .7rem; line-height: 1.2; }
.principle p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }

/* ---- leistungen ---- */
.services { margin-top: 3rem; border-top: 1px solid var(--rule); }
.service {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) 2rem; column-gap: 1.5rem; align-items: start;
  padding: 1.7rem 0; border-bottom: 1px solid var(--line);
}
.service .s-num { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding-top: .45rem; transition: color .2s var(--ease); }
.service h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -.035em; color: var(--ink); margin: 0; line-height: 1.15; transition: color .2s var(--ease); }
.service p { margin: .55rem 0 0; color: var(--muted); font-size: 1rem; max-width: 60ch; }
.service .s-go { font-size: 1.25rem; color: var(--faint); padding-top: .2rem; justify-self: end; transition: color .2s var(--ease), transform .3s var(--ease); }
.service:hover h3, .service:hover .s-num, .service:hover .s-go { color: var(--accent); }
.service:hover .s-go { transform: translateX(4px); }

.adjacent { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.adjacent .label { margin-right: .6rem; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 .85rem; border: 1px solid var(--line); background: #fff; font-size: .9rem; color: var(--ink); }
.section--grey .chip { background: var(--bg); }

/* ---- team ---- */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 2.5rem; margin-top: 3rem; }
.member figure { margin: 0; }
.member .portrait { aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-3); }
.member .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: grayscale(100%); transition: filter .5s var(--ease), transform .7s var(--ease); }
.member:hover .portrait img { filter: grayscale(0%); transform: scale(1.03); }
.member figcaption { border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: .8rem; }
.member .m-name { font-weight: 600; color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; }
.member .m-role { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-top: .25rem; }
.member .m-focus { margin: .6rem 0 0; color: var(--muted); font-size: .93rem; line-height: 1.5; }

/* ---- kontakt ---- */
.kontakt-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }
.kontakt-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); margin: 4rem 0 0; }
.kontakt-data > div { border-top: 1px solid var(--rule); padding: 1.1rem 0 2rem; }
.kontakt-data dt { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .5rem; }
.kontakt-data dd { margin: 0; color: var(--ink); font-size: 1.12rem; font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.kontakt-data a { text-decoration: none; }
.kontakt-data a:hover { color: var(--accent); }

/* =========================== FOOTER =========================== */
.site-footer { background: var(--bg-2); padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: 2rem; overflow: hidden; }
.footer-word {
  display: flex; align-items: flex-end; gap: .06em;
  font-weight: 700; color: var(--ink); margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-size: clamp(4.5rem, 21vw, 18rem); line-height: .78; letter-spacing: -.07em;
}
.footer-word .sq { width: .16em; height: .16em; margin-bottom: .04em; }
.footer-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); border-top: 1px solid var(--rule); padding-top: 1.4rem; }
.footer-col:nth-child(1) { grid-column: 1 / 6; }
.footer-col:nth-child(2) { grid-column: 7 / 9; }
.footer-col:nth-child(3) { grid-column: 9 / 13; }
.footer-col p { margin: 0; color: var(--muted); max-width: 40ch; }
.footer-col h4 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; margin: 0 0 .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-col li { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom .legal { display: flex; gap: 1.5rem; }
.footer-bottom .legal a { text-decoration: none; color: var(--muted); }
.footer-bottom .legal a:hover { color: var(--accent); }

/* =========================== LEGAL PAGES =========================== */
.legal-page { padding-block: clamp(3rem, 7vw, 5.5rem); }
.legal-page .inner { max-width: 760px; }
.legal-page .back { display: inline-block; margin-bottom: 2.5rem; font-size: .92rem; }
.legal-page h1 { font-weight: 600; font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.05em; line-height: 1; color: var(--ink); margin: 0 0 2.5rem; }
.legal-page h2 { font-weight: 600; font-size: 1.35rem; letter-spacing: -.025em; color: var(--ink); margin: 3rem 0 .8rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.legal-page h3 { font-weight: 600; font-size: 1.05rem; color: var(--ink); margin: 1.8rem 0 .5rem; }
.legal-page p, .legal-page li { color: var(--text); line-height: 1.7; }
.legal-page ul { padding-left: 1.1rem; }
.legal-page a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.legal-page .stand { margin-top: 3rem; font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* =========================== MOTION (restrained) =========================== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal[data-in="true"] { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.intro { opacity: 0; transform: translateY(14px); animation: intro .8s var(--ease) forwards; }
.intro.d1 { animation-delay: .1s; }
.intro.d2 { animation-delay: .2s; }
@keyframes intro { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .intro { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .member .portrait img, .btn, .service * { transition: none !important; }
}

/* =========================== RESPONSIVE =========================== */
@media (max-width: 1060px) {
  .hero-copy { grid-column: 1 / 13; }
  .hero-figure { grid-column: 1 / 13; max-width: 400px; margin-top: 3.5rem; margin-left: 1.25rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  .sec-label { grid-column: 1 / 13; position: static; margin-bottom: 2.2rem; }
  .sec-body { grid-column: 1 / 13; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col:nth-child(1) { grid-column: 1 / 13; margin-bottom: 2rem; }
  .footer-col:nth-child(2) { grid-column: 1 / 6; }
  .footer-col:nth-child(3) { grid-column: 7 / 13; }
}
@media (max-width: 800px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 100%; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--rule);
    padding: .5rem var(--gutter) 1.4rem;
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path .35s var(--ease), opacity .25s var(--ease);
  }
  .nav[data-open="true"] .nav-links { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li.nav-cta { border-bottom: 0; padding-top: 1.2rem; }
  .nav-links a:not(.btn) { display: block; padding: 1rem 0; background: none; }
  .nav-links .btn { width: 100%; height: 50px; }
  .principles { grid-template-columns: 1fr; }
  .principle h3 { margin-top: 1rem; }
  .kontakt-data { grid-template-columns: 1fr; }
  .service { grid-template-columns: 2.8rem minmax(0, 1fr); }
  .service .s-go { display: none; }
}
@media (max-width: 520px) {
  .logo .wm-sub { display: none; }
  .facts { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; max-width: 380px; }
  .hero-actions .btn { width: 100%; }
  .footer-col:nth-child(2), .footer-col:nth-child(3) { grid-column: 1 / 13; margin-bottom: 1.5rem; }
}
