/* ============================================
   TB-Holzbau
   Design System: Trust-first, white background
   Brand: #6F6D6E (gray), #FBBA21 (yellow), #36833A (green)
   ============================================ */

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

:root {
  --color-gray: #6F6D6E;
  --color-gray-dark: #4A494A;
  --color-gray-light: #E8E7E6;
  --color-gray-bg: #F5F5F4;
  --color-yellow: #FBBA21;
  --color-yellow-dark: #E5A813;
  --color-green: #36833A;
  --color-green-dark: #2A6B2D;
  --color-green-light: #4A9C4E;
  --color-text: #2A2929;
  --color-text-muted: #6F6D6E;
  --color-white: #FFFFFF;
  --color-border: #D8D7D5;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  /* Brand fonts matched to the logo:
     display = low-contrast serif in the spirit of the "TB HOLZBAU" wordmark
     claim   = humanist sans with a true single-storey italic 'a', like "Ideen aus Holz" */
  --font-display: 'Charis SIL', Charter, Georgia, 'Times New Roman', serif;
  --font-claim: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1280px;
  --nav-height: 72px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
:root { color-scheme: light; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--color-text);
  letter-spacing: -0.005em; /* serif: far less negative tracking than the old sans */
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { max-width: 65ch; }

a { color: var(--color-green); text-decoration: none; touch-action: manipulation; }
a:hover { text-decoration: underline; }

button, .btn { touch-action: manipulation; }

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

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-lg { padding: 6rem 0; }
.section-tight { padding: 3rem 0; }
.bg-gray { background: var(--color-gray-bg); }
.bg-dark { background: var(--color-gray-dark); color: var(--color-white); }
.bg-dark h2, .bg-dark h3 { color: var(--color-white); }
.bg-dark p { color: rgba(255,255,255,0.85); }

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Holzrahmenbau "Warum" list + aside image */
.why-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  /* Single column on mobile; the aside image would only shrink the
     text space, so hide it entirely. */
  .why-grid { grid-template-columns: 1fr; }
  .why-media { display: none; }
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
/* horizontal lockup: tiles + wordmark, sized by height so it fits the bar */
.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}
.nav-logo:hover { text-decoration: none; }

/* Footer: stacked logo with the claim, white text on the dark bar */
.footer-logo {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
}
.footer-logo img { width: 165px; height: auto; display: block; }
.footer-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-green); }
.nav-links a.active { color: var(--color-green); font-weight: 600; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-yellow);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.nav-cta:hover { background: var(--color-yellow-dark); text-decoration: none; }
.nav-cta:active { transform: scale(0.98); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: 0.3s;
}

/* Navigation: mit sieben Punkten plus Button wird es schon deutlich vor
   768px eng, deshalb klappt das Menü bereits ab 1100px zum Burger. */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-logo img { height: 34px; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-yellow);
  color: var(--color-text);
}
.btn-primary:hover { background: var(--color-yellow-dark); text-decoration: none; }

.btn-secondary {
  background: var(--color-green);
  color: var(--color-white);
}
.btn-secondary:hover { background: var(--color-green-dark); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-gray); text-decoration: none; }

.btn-lg { padding: 1.125rem 2.25rem; font-size: 1.0625rem; }

/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-white);
  /* Height = 16:9 ratio of viewport up to 1280px -> 720px max. */
  height: clamp(420px, 56.25vw, 720px);
}

.hero-full {
  height: calc(100vh - var(--nav-height));
  min-height: 480px;
}

.hero-screen {
  height: calc(100vh - var(--nav-height));
  min-height: 520px;
}
.hero-full .hero-video {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  max-height: 720px;
  object-fit: contain;
  object-position: center center;
}
.hero-full .hero-bg::after {
  display: none;
}

@media (max-width: 768px) {
  .hero-full {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Center the video, cap at 1280px */
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.hero-bg-img {
  display: block;
}
.hero-bg-img::after {
  max-width: none;
  left: 0;
  transform: none;
  width: 100%;
}
.hero-bg video,
.hero-video {
  display: block;
  /* Fill hero up to 1280px, then stop scaling */
  width: 100%;
  max-width: 1280px;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  flex-shrink: 0;
}
.hero-bg::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, rgba(42,41,42,0.85) 0%, rgba(42,41,42,0.6) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 2rem 0;
}
.hero h1 { color: var(--color-white); margin-bottom: 1.25rem; }
.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 50ch;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Cards --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--color-text-muted); font-size: 0.9375rem; margin-bottom: 0; }

/* --- Services (index, editorial) --- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-claim);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-green);
  margin-bottom: 0.75rem;
}

/* Claim / tagline voice */
.claim {
  font-family: var(--font-claim);
  font-style: italic;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.005em;
}
.services-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}
.services-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.services-intro {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
  padding-bottom: 0.4rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.25rem 2rem 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-yellow);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.28s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleY(1); }
.service-card-num {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-border);
  margin-bottom: 1.5rem;
  transition: color 0.28s ease;
}
.service-card:hover .service-card-num { color: var(--color-yellow); }
.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.service-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.service-card-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-green);
}
.service-card-link::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.2s ease;
}
.service-card:hover .service-card-link::after { transform: translateX(4px); }

@media (max-width: 900px) {
  .services-head { grid-template-columns: 1fr; align-items: start; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --- Service List --- */
.service-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}
.service-item:last-child { border-bottom: none; }
.service-number {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-yellow);
  min-width: 2rem;
  padding-top: 0.25rem;
}
.service-content h3 { margin-bottom: 0.5rem; }
.service-content p { color: var(--color-text-muted); font-size: 0.9375rem; }

/* --- Contact Bar --- */
.contact-bar {
  background: var(--color-green);
  color: var(--color-white);
  padding: 3rem 0;
}
.contact-bar h2 { color: var(--color-white); }
.contact-bar p { color: rgba(255,255,255,0.9); }
.contact-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact-bar .btn-primary { background: var(--color-white); color: var(--color-green); }
.contact-bar .btn-primary:hover { background: var(--color-gray-bg); }

/* --- Form --- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(54,131,58,0.15);
}
.form-input:focus-visible, .form-textarea:focus-visible, .form-select:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}
.nav-links a:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 4px;
  border-radius: 4px;
}
.form-textarea { min-height: 150px; resize: vertical; }
.form-error {
  display: block;
  color: #C53030;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }

/* --- Footer --- */
.footer {
  background: var(--color-gray-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 {
  color: var(--color-white);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer ul li a:hover { color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Page Header (non-home pages) --- */
.page-header {
  background: var(--color-gray-bg);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
}
.page-header h1 { margin-bottom: 0.75rem; }
.page-header p { color: var(--color-text-muted); font-size: 1.125rem; }

/* --- Stats --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label { color: var(--color-text-muted); font-size: 0.875rem; }

/* --- Gallery --- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-gray-bg);
  aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* --- Contact Info --- */
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--color-gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; color: var(--color-green); }
.contact-item h4 { margin-bottom: 0.25rem; }
.contact-item p { color: var(--color-text-muted); margin: 0; font-size: 0.9375rem; }
.contact-item a { color: var(--color-text); text-decoration: none; }
.contact-item a:hover { color: var(--color-green); }

/* --- Testimonials --- */
.testimonial {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
}
.testimonial p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  font-style: italic;
}
.testimonial-author { font-weight: 600; font-size: 0.9375rem; color: var(--color-text); }
.testimonial-location { color: var(--color-text-muted); font-size: 0.875rem; }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-green); }

/* --- Animation --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-prose { max-width: 65ch; }
/* --- Logo page --- */
.logo-stage {
  display: flex;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.logo-hero { width: 100%; max-width: 560px; height: auto; }

.logo-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.logo-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--color-gray-bg);
  border-radius: var(--radius);
}
.logo-meta-k { font-size: 0.8125rem; color: var(--color-text-muted); }
.logo-meta-v { font-weight: 700; }

.size-ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2.5rem;
}
.size-item { margin: 0; }
.size-item img { display: block; height: auto; max-width: 100%; }
.size-item figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.bg-demo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.bg-demo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.bg-demo-tile img { max-width: 100%; height: auto; }
.bg-demo-light { background: var(--color-white); }
.bg-demo-soft { background: var(--color-gray-bg); }
.bg-demo-dark { background: #2A292A; border-color: transparent; }
.bg-demo-label { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-muted); }
.bg-demo-dark .bg-demo-label { color: rgba(255,255,255,0.7); }
.bg-demo-label code { font-size: 0.78125rem; }

.group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.group-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.group-card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.group-card-art-tiles svg { width: 280px; height: auto; }
.group-card code, .icon-item code, .swatch code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--color-green);
  background: rgba(54,131,58,0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.group-card h3 { margin: 0.75rem 0 0.5rem; font-size: 1.125rem; }
.group-card p { color: var(--color-text-muted); font-size: 0.9375rem; margin: 0; }

/* Crop windows: viewBox is 550x333. scale = displayed width / region width.
   tiles are ~160 wide at y69.4 ; wordmark y272..333 ; claim x275..550, y0..34 */
.crop { position: relative; overflow: hidden; }
.crop img { position: absolute; max-width: none; }
.crop-word { width: 280px; height: 31px; }
.crop-word img { width: 280px; left: 0; top: -138.7px; }
.crop-tag { width: 280px; height: 35px; }
.crop-tag img { width: 560px; left: -279.8px; top: 0; }

.icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.icon-item { margin: 0; }
.icon-crop {
  position: relative;
  width: 180px;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.icon-crop img { position: absolute; width: 618.75px; max-width: none; top: -78.1px; }
.icon-crop-1 img { left: 0; }
.icon-crop-2 img { left: -199.7px; }
.icon-crop-3 img { left: -398.9px; }
.icon-item figcaption { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.icon-item figcaption span { font-size: 0.9375rem; color: var(--color-text-muted); }

.swatch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.swatch {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.swatch-chip {
  width: 100%;
  height: 72px;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.swatch-use { font-size: 0.875rem; color: var(--color-text-muted); }

@media (max-width: 900px) {
  .logo-meta { grid-template-columns: repeat(2, 1fr); }
  .bg-demo, .group-grid, .icon-grid { grid-template-columns: 1fr; }
  .swatch-grid { grid-template-columns: repeat(2, 1fr); }
  .size-ladder { gap: 1.75rem; }
  .icon-crop { width: 100%; max-width: 260px; }
}

/* --- Typography specimen (logo page) --- */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.type-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.type-serif { font-family: var(--font-display); }
.type-claim { font-family: var(--font-claim); font-style: italic; }
.type-specimen {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.type-serif.type-specimen { font-weight: 700; }
.type-alphabet {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  word-break: break-word;
}
.type-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.type-card p { color: var(--color-text-muted); font-size: 0.9375rem; margin-bottom: 1rem; }
.type-card code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-green);
  background: rgba(54,131,58,0.08);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.type-note { font-size: 0.8125rem; color: var(--color-text-muted); }

.type-sample {
  margin-top: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-white);
}
.type-sample-tag {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-gray-bg);
  padding: 0.6rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.type-sample-body { padding: 2.5rem 2rem; }
.type-sample-logo { width: 180px; height: auto; margin-bottom: 2rem; }
.type-sample-body h3 { margin-bottom: 0.35rem; }
.type-sample-body .claim { font-size: 1.0625rem; margin-bottom: 1.25rem; }
.type-sample-body p:last-child { font-size: 0.875rem; color: var(--color-text-muted); margin: 0; }
.type-disclaimer {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 80ch;
}
@media (max-width: 900px) {
  .type-grid { grid-template-columns: 1fr; }
}

/* --- Projects (Referenzen) --- */
.projects { display: flex; flex-direction: column; gap: 4rem; }
.project {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.project:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.project:nth-child(even) .project-media { order: 2; }

.project-media { display: flex; flex-direction: column; gap: 0.6rem; }
.project-shot {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  line-height: 0;
}
.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-cover img { aspect-ratio: 3/2; }
.project-shot:hover img { transform: scale(1.04); }
.project-shot:focus-visible { outline: 3px solid var(--color-green); outline-offset: 3px; }

.project-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(42,41,42,0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  line-height: 1.4;
  pointer-events: none;
}
.project-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.project-thumbs .project-shot { border-radius: var(--radius); }
.project-thumbs img { aspect-ratio: 4/3; }

.project-cat {
  display: inline-block;
  font-family: var(--font-claim);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-green);
  margin-bottom: 0.6rem;
}
.project-info h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-bottom: 0.35rem; }
.project-meta { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.project-desc { color: var(--color-text-muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }

.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
  margin: 0;
}
.project-facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}
.project-facts dd { margin: 0; font-weight: 600; font-size: 0.9375rem; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20,20,20,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox-stage figcaption {
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}
.lightbox-counter { color: rgba(255,255,255,0.55); font-size: 0.8125rem; white-space: nowrap; }
.lightbox-close, .lightbox-nav {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.26); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  font-size: 1.9rem;
  line-height: 1;
}
.lightbox-nav { width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
  .project,
  .project:nth-child(even) { grid-template-columns: 1fr; gap: 1.5rem; }
  .project:nth-child(even) .project-media { order: 0; }
  .projects { gap: 3rem; }
  .lightbox { padding: 0.75rem; gap: 0.4rem; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-stage img { max-height: 68vh; }
}

/* --- Rechtstexte --- */
.legal h2 { font-size: 1.25rem; margin: 2.25rem 0 0.75rem; }
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--color-text-muted); font-size: 0.9375rem; margin-bottom: 0.85rem; }
.legal-todo {
  background: #FFF8E6;
  border-left: 4px solid var(--color-yellow);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  color: var(--color-text) !important;
}
