/* ============================================================
   Holz & Stein Meisterbetrieb — Branchen-Referenz One-Pager
   Colors: #1A1A1A · #F5F2EB · Accent #E85D04 · Trust #2F6B4F
   Type: Space Grotesk / Inter / JetBrains Mono
   ============================================================ */

:root {
  --ink: #1A1A1A;
  --paper: #F5F2EB;
  --accent: #E85D04;
  --accent-hover: #d45303;
  --trust: #2F6B4F;
  --ink-soft: rgba(26, 26, 26, 0.72);
  --ink-muted: rgba(26, 26, 26, 0.48);
  --paper-elevated: #ffffff;
  --line: rgba(26, 26, 26, 0.1);
  --header-h: 72px;
  --ease: cubic-bezier(0.33, 1, 0.68, 1); /* power2.out-ish */
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1120px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-label: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: auto; /* Lenis owns scrolling */
  -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

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

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

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

ul, ol {
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Type */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 4rem); /* 44–64 */
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem); /* 28–36 */
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.label,
.eyebrow {
  font-family: var(--font-label);
  font-size: 0.75rem; /* 12 */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-lead {
  font-size: 1.0625rem; /* 17 */
  color: var(--ink-soft);
  max-width: 36rem;
  margin-top: 0.75rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.accent-text {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.btn-sm {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-ghost-light {
  background: transparent;
  border-color: rgba(245, 242, 235, 0.4);
  color: var(--paper);
}
.btn-ghost-light:hover {
  border-color: var(--paper);
  background: rgba(245, 242, 235, 0.08);
}

.btn-block {
  width: 100%;
}

.cta-pulse {
  animation: ctaPulse 2.8s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 4, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(232, 93, 4, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 242, 235, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(26, 26, 26, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: var(--ink);
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.logo-sub {
  font-family: var(--font-label);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: none;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover {
  color: var(--ink);
}

.header-ctas {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header-ctas .btn-label {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (min-width: 900px) {
  .site-nav ul {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .header-ctas {
    margin-left: 1.5rem;
  }
  .header-ctas .btn-label {
    display: inline;
  }
  .site-nav {
    margin-left: auto;
  }
}

/* Mobile nav open */
@media (max-width: 899px) {
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.08);
  }
  .site-nav.is-open ul {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .site-nav.is-open a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
}

/* Hero — full-bleed cinematic (NO grid split, NO white panel) */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: 4rem 0 5rem;
  color: #F5F2EB;
  overflow: hidden;
  background: #0c0a08;
  /* never display:grid / 2-col split */
}

.hero-media,
.hero-media.ki-media {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-media img,
.hero-media.ki-media img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(12,10,8,0.88) 0%, rgba(12,10,8,0.62) 42%, rgba(12,10,8,0.28) 100%),
    linear-gradient(to top, rgba(12,10,8,0.55) 0%, transparent 45%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  background: transparent; /* not a white card */
  color: #F5F2EB;
}

/* Explicit H1 colors — line 1 never cream-on-light / inherited wrong */
.hero h1 {
  color: #F5F2EB;
}
.hero h1 .hero-line {
  color: #F5F2EB;
}
.hero h1 .accent-text {
  color: var(--accent);
}

.hero .eyebrow {
  color: rgba(245, 242, 235, 0.7);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(245, 242, 235, 0.85);
  margin: 1.25rem 0 2rem;
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  right: max(1.5rem, calc((100% - var(--container)) / 2));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  color: rgba(245, 242, 235, 0.6);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(245, 242, 235, 0.6), transparent);
}

/* Trust */
.trust {
  padding: 2.5rem 0;
  background: var(--ink);
  color: var(--paper);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 1.25rem;
}

.trust-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.25rem;
}

.trust-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.trust-suffix {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.trust-label {
  flex-basis: 100%;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: rgba(245, 242, 235, 0.55);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--trust);
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Services */
.services {
  padding: 5rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.service-card {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.service-card:hover {
  border-color: rgba(232, 93, 4, 0.35);
  transform: translateY(-2px);
}

.service-card--accent {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.service-card--accent .service-icon {
  color: var(--accent);
}

.service-card--accent p {
  color: rgba(245, 242, 235, 0.7);
}

.service-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Projects – horizontal scrub */
.projects {
  padding: 5rem 0 0;
  overflow: hidden;
}

.projects-intro {
  margin-bottom: 2rem;
}

.projects-pin {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.projects-track {
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem 4rem;
  width: max-content;
  will-change: transform;
}

@media (min-width: 1120px) {
  .projects-track {
    padding-left: max(1rem, calc((100vw - var(--container)) / 2));
  }
}

.project-card {
  flex: 0 0 min(85vw, 420px);
  background: var(--paper-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #ddd;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-meta {
  padding: 1.25rem 1.35rem 1.5rem;
}

.project-meta .label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.project-meta h3 {
  margin-bottom: 0.5rem;
}

.project-meta p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

@media (min-width: 768px) {
  .project-card {
    flex-basis: min(70vw, 520px);
  }
}

/* Before / After */
.before-after {
  padding: 5rem 0;
}

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  background: #ccc;
  box-shadow: 0 16px 48px rgba(26, 26, 26, 0.12);
}

.ba-before,
.ba-after {
  position: absolute;
  inset: 0;
}

.ba-before img,
.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-after {
  clip-path: inset(0 0 0 50%);
}

.ba-tag {
  position: absolute;
  top: 1rem;
  padding: 0.35rem 0.7rem;
  background: rgba(26, 26, 26, 0.75);
  color: var(--paper);
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}

.ba-tag--before { left: 1rem; }
.ba-tag--after { right: 1rem; }

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.ba-handle-knob {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ba-handle:focus-visible .ba-handle-knob {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* About / Process */
.about {
  padding: 5rem 0;
  background: var(--paper-elevated);
  border-block: 1px solid var(--line);
}

.about-grid {
  display: grid;
  gap: 3rem;
}

.about-copy p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.process-num {
  color: var(--accent);
  font-weight: 500;
  padding-top: 0.15rem;
}

.process-step h3 {
  margin-bottom: 0.25rem;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}

/* CTA / Contact */
.cta-band {
  padding: 5rem 0;
  background: var(--ink);
  color: var(--paper);
}

.cta-band .eyebrow {
  color: rgba(245, 242, 235, 0.5);
}

.cta-band .section-lead,
.cta-copy > p {
  color: rgba(245, 242, 235, 0.7);
  margin-top: 0.75rem;
}

.cta-grid {
  display: grid;
  gap: 2.5rem;
}

.cta-facts {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cta-facts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(245, 242, 235, 0.85);
}

.cta-facts svg {
  flex-shrink: 0;
  color: var(--accent);
}

.cta-facts a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form {
  background: rgba(245, 242, 235, 0.06);
  border: 1px solid rgba(245, 242, 235, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.5);
}

.form-field input,
.form-field textarea {
  background: rgba(245, 242, 235, 0.08);
  border: 1px solid rgba(245, 242, 235, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: var(--paper);
  transition: border-color 0.2s var(--ease);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(245, 242, 235, 0.35);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-note {
  min-height: 1.2em;
  color: var(--trust);
}

.form-note.is-error {
  color: #f07167;
}

@media (min-width: 900px) {
  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

/* Footer */
.site-footer {
  padding: 1.75rem 0;
  background: #111;
  color: rgba(245, 242, 235, 0.55);
  border-top: 1px solid rgba(245, 242, 235, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  justify-content: space-between;
}

.footer-brand strong {
  color: var(--paper);
  font-family: var(--font-display);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a:hover {
  color: var(--paper);
}

.footer-copy {
  flex-basis: 100%;
  color: rgba(245, 242, 235, 0.35);
}

@media (min-width: 700px) {
  .footer-copy {
    flex-basis: auto;
    margin-left: auto;
  }
}

/* Reveal defaults — stay visible; JS only enhances when scrolling from top */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal.is-pending {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal.is-pending {
    opacity: 1;
    transform: none;
  }
}


/* KI image labeling */
.ki-media { position: relative; overflow: hidden; }
.ki-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* CRITICAL: .ki-media must NEVER demote hero to relative / in-flow split */
.hero-media.ki-media {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.hero-media.ki-media img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  background: transparent;
}
/* Keep absolute — relative demotes it to full-width in-flow and overlaps CTAs */
.hero-scroll {
  position: absolute !important;
  z-index: 3;
  width: auto;
  left: auto;
  pointer-events: none;
}
.hero .ki-badge {
  z-index: 4;
}
/* Re-assert H1 after any later accent-text / color resets */
.hero h1,
.hero h1 .hero-line {
  color: #F5F2EB;
}
.hero h1 .accent-text {
  color: var(--accent);
}
.ki-badge {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 3;
  padding: 0.35rem 0.65rem; border-radius: 999px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(10,10,12,0.78); color: #e8c56a; border: 1px solid rgba(232,197,106,0.45);
  pointer-events: none;
}

/* ——— Demo → Agency back link (shared) ——— */
.demo-back {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1.25rem;
  background: #1a1d21;
  color: #f2f3f5;
  text-decoration: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(95, 168, 211, 0.35);
  box-sizing: border-box;
}
.demo-back:hover,
.demo-back:focus-visible {
  background: #24282e;
  color: #7cb9e8;
  outline: none;
}
