/* ==========================================================================
   Höfert ITC — Design Tokens
   ========================================================================== */

:root {
  /* Soft Structuralism palette */
  --paper: #f6f5f2;
  --surface: #ffffff;
  --surface-shell: rgba(20, 22, 28, 0.035);
  --ink: #14161c;
  --ink-70: rgba(20, 22, 28, 0.7);
  --ink-55: rgba(20, 22, 28, 0.55);
  --ink-38: rgba(20, 22, 28, 0.38);
  --line: rgba(20, 22, 28, 0.09);
  --line-soft: rgba(20, 22, 28, 0.06);

  /* Brand accent derived from the original logo blue (#4472C4) */
  --accent: #4472c4;
  --accent-strong: #35599c;
  --accent-tint: rgba(68, 114, 196, 0.08);
  --accent-ink: #1f3358;
  --accent-ink-soft: #2a3f6b;

  /* Original logo colors, preserved */
  --brand-green: #70ad47;
  --brand-blue: #4472c4;
  --brand-orange: #ed7d31;

  /* Brand colors darkened just enough for legible white text (~6-8:1
     contrast) while staying recognizably true to the original hues —
     used only as small monogram accents on the Leistungen cards,
     mirroring the logo's own 2x2 color layout (green / blue / orange /
     neutral) instead of spreading saturated color across the page. */
  --green-ink: #43682b;
  --blue-ink: #294476;
  --orange-ink: #8e4b1d;

  --shadow-soft: 0 1px 2px rgba(20, 22, 28, 0.04), 0 24px 48px -24px rgba(20, 22, 28, 0.16);
  --shadow-lift: 0 1px 2px rgba(20, 22, 28, 0.05), 0 40px 64px -32px rgba(20, 22, 28, 0.22);

  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  --container: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Visible keyboard focus on every interactive element */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero a:focus-visible,
.hero button:focus-visible {
  outline-color: #fff;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

/* Fixed grain overlay — never on scrolling containers */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

section {
  padding-block: clamp(72px, 10vw, 152px);
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-top: 16px;
}

.section-head p {
  margin-top: 18px;
  color: var(--ink-55);
  font-size: 17px;
  line-height: 1.7;
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 900ms var(--ease-out-soft), transform 900ms var(--ease-out-soft),
    filter 900ms var(--ease-out-soft);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  --btn-fg: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 500ms var(--ease-fluid), box-shadow 500ms var(--ease-fluid),
    background 500ms var(--ease-fluid);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--accent);
  box-shadow: var(--shadow-lift);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 500ms var(--ease-fluid), background 500ms var(--ease-fluid);
}

.btn-primary .btn-icon {
  background: rgba(255, 255, 255, 0.16);
}

.btn:hover .btn-icon {
  transform: translate(2px, -2px) scale(1.06);
}

.btn-icon svg {
  width: 15px;
  height: 15px;
}

.btn-ghost {
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost .arrow {
  transition: transform 500ms var(--ease-fluid);
}

.btn-ghost:hover .arrow {
  transform: translate(3px, -3px);
}

.btn-ghost svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   Navigation — floating glass island
   ========================================================================== */

.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(760px, 100%);
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(20, 22, 28, 0.07);
  box-shadow: 0 1px 1px rgba(20, 22, 28, 0.03), 0 20px 40px -24px rgba(20, 22, 28, 0.28);
  transition: background 500ms var(--ease-fluid);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  margin-right: auto;
}

.nav-logo svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  transition: background 400ms var(--ease-fluid), color 400ms var(--ease-fluid);
}

.nav-links a:hover {
  background: var(--surface-shell);
  color: var(--ink);
}

.nav .btn-primary {
  padding: 6px 6px 6px 18px;
  font-size: 13.5px;
}

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-burger span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 500ms var(--ease-fluid), opacity 300ms var(--ease-fluid);
}

.nav-burger span:first-child {
  transform: translateY(-4px);
}

.nav-burger span:last-child {
  transform: translateY(4px);
}

.nav.is-open .nav-burger span:first-child {
  transform: translateY(0) rotate(45deg);
}

.nav.is-open .nav-burger span:last-child {
  transform: translateY(0) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(20, 22, 28, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms var(--ease-fluid), visibility 500ms;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 30px;
  color: rgba(255, 255, 255, 0.92);
  padding: 12px 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out-soft), transform 600ms var(--ease-out-soft);
}

.mobile-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.is-open a:nth-child(1) {
  transition-delay: 80ms;
}
.mobile-menu.is-open a:nth-child(2) {
  transition-delay: 140ms;
}
.mobile-menu.is-open a:nth-child(3) {
  transition-delay: 200ms;
}
.mobile-menu.is-open a:nth-child(4) {
  transition-delay: 260ms;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  .nav .btn-primary span {
    display: none;
  }
  .nav .btn-primary {
    padding: 6px;
  }
  .nav-burger {
    display: flex;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(140px, 20vw, 200px);
  padding-bottom: clamp(80px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 22px;
}

.hero p.lead {
  margin-top: 26px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-55);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* Double-bezel component */
.bezel {
  background: var(--surface-shell);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 6px;
}

.bezel-core {
  background: var(--surface);
  border-radius: 17px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), var(--shadow-soft);
  height: 100%;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: 0.01em;
}

/* Hero cascade — stacked, slightly rotated "document" cards that settle
   into order on hover: the ECM promise (bringing structure to content)
   made literal. */
.hero-cascade {
  position: relative;
  height: 300px;
}

.doc-card {
  position: absolute;
  width: 200px;
  transition: transform 650ms var(--ease-fluid), box-shadow 500ms var(--ease-fluid);
}

.doc-card .bezel-core {
  padding: 20px 22px;
}

.doc-card.doc-1 { top: 0; left: 0; transform: rotate(-6deg); z-index: 1; }
.doc-card.doc-2 { top: 78px; left: 108px; transform: rotate(4deg); z-index: 2; }
.doc-card.doc-3 { top: 168px; left: 30px; transform: rotate(-3deg); z-index: 3; }

.hero-cascade:hover .doc-card { box-shadow: var(--shadow-lift); }
.hero-cascade:hover .doc-card.doc-1 { transform: rotate(0deg) translate(-6px, -4px); }
.hero-cascade:hover .doc-card.doc-2 { transform: rotate(0deg) translate(4px, -2px); transition-delay: 40ms; }
.hero-cascade:hover .doc-card.doc-3 { transform: rotate(0deg) translate(-2px, 4px); transition-delay: 80ms; }

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-cascade {
    height: auto;
    display: flex;
    gap: 12px;
    margin-top: 48px;
    flex-wrap: wrap;
  }
  .doc-card,
  .hero-cascade:hover .doc-card {
    position: static;
    width: auto;
    flex: 1 1 140px;
    transform: none !important;
  }
}

/* ==========================================================================
   Cascade grid — Leistungen (documents settling into order)
   ========================================================================== */

.cascade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 32px;
  padding-block: 24px 12px;
}

.bento-card {
  padding: 2px;
  transition: transform 550ms var(--ease-fluid);
  transform-origin: center;
}

.cascade-grid .bento-card:nth-child(1) { transform: rotate(-2.2deg); }
.cascade-grid .bento-card:nth-child(2) { transform: rotate(1.6deg); }
.cascade-grid .bento-card:nth-child(3) { transform: rotate(1.8deg); }
.cascade-grid .bento-card:nth-child(4) { transform: rotate(-1.6deg); }

.bento-card:hover {
  transform: rotate(0deg) translateY(-6px);
  z-index: 2;
}

.bento-card .bezel-core {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
  transition: box-shadow 500ms var(--ease-fluid);
}

.bento-card:hover .bezel-core {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), var(--shadow-lift);
}

@media (max-width: 860px) {
  .cascade-grid {
    grid-template-columns: 1fr;
  }
  .cascade-grid .bento-card {
    transform: none;
  }
  .bento-card:hover {
    transform: translateY(-3px);
  }
}

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: fit-content;
  min-width: 46px;
  height: 46px;
  padding-inline: 10px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: background 400ms var(--ease-fluid);
}

/* Mirrors the logo's own layout: green, blue, orange, neutral (empty 4th) */
.cascade-grid .bento-card:nth-child(1) .monogram { background: var(--green-ink); }
.cascade-grid .bento-card:nth-child(2) .monogram { background: var(--blue-ink); }
.cascade-grid .bento-card:nth-child(3) .monogram { background: var(--orange-ink); }

.bento-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}

.bento-card p {
  color: var(--ink-55);
  font-size: 15px;
  line-height: 1.7;
}

/* Service-type row */
.service-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.service-card {
  padding: 2px;
}

.service-card .bezel-core {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card .icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.service-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.service-card p {
  color: var(--ink-55);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 860px) {
  .service-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .service-row {
    grid-template-columns: 1fr;
  }
}

/* REST-API callout */
.callout {
  margin-top: 16px;
  padding: 2px;
}

.callout .bezel-core {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.callout .icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  flex-shrink: 0;
}

.callout strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}

.callout p {
  color: var(--ink-55);
  font-size: 15px;
  line-height: 1.65;
  margin-top: 4px;
}

/* ==========================================================================
   Über mich — editorial split + timeline
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.15;
  margin-top: 16px;
}

.about-text p {
  margin-top: 20px;
  color: var(--ink-55);
  font-size: 17px;
  line-height: 1.75;
  max-width: 480px;
}

.about-text .btn-ghost {
  margin-top: 28px;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--surface);
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.timeline-year {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-strong);
}

.timeline-item p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-70);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Kontakt — editorial split, on-brand light section
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(48px, 6vw, 84px);
}

.contact-intro {
  max-width: 420px;
}

.contact-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-top: 16px;
}

.contact-intro p {
  margin-top: 18px;
  color: var(--ink-55);
  font-size: 17px;
  line-height: 1.7;
}

.contact-intro .btn-primary {
  margin-top: 32px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-card {
  padding: 2px;
  display: block;
  transition: transform 500ms var(--ease-fluid);
}

.contact-card:hover {
  transform: translateY(-3px);
}

.contact-card .bezel-core {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  height: 100%;
}

.contact-card .icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card .icon-wrap svg {
  width: 17px;
  height: 17px;
}

.contact-card .label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-38);
}

.contact-card .value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  word-break: break-word;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-intro {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  padding-block: 64px 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  max-width: 340px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.footer-logo svg {
  width: 24px;
  height: 24px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--ink-55);
  font-size: 14.5px;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-38);
  margin-bottom: 14px;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  font-size: 14.5px;
  color: var(--ink-70);
  transition: color 300ms var(--ease-fluid);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-38);
}

/* ==========================================================================
   Legal pages (Impressum / Datenschutz)
   ========================================================================== */

.legal {
  padding-top: clamp(140px, 18vw, 180px);
  padding-bottom: 100px;
}

.legal .wrap {
  max-width: 760px;
}

.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 42px);
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal p,
.legal li {
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.75;
}

.legal ul {
  margin-top: 8px;
  padding-left: 20px;
  list-style: disc;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--ink-55);
  font-size: 14px;
  font-weight: 500;
}

.legal .back svg {
  width: 14px;
  height: 14px;
}
