/* Hallmark · checked: 2026-11-14 · genre: editorial (inferred) · theme: brand (TB-Holzbau gray, yellow, green)
 * hero: Stage (/) · imagery: logo intro video, plays once, ends on the logo · floor fixes: 6a, 7a, 26a, 34, 40, 48, 49a, 62, 63, 67
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · reworded "Thorben Brünjes — Ihr Zimmerermeister" to "Thorben Brünjes, Ihr Zimmerermeister" · 19 names the dash */
/* Hallmark · dismissed hero-review 3 · the three coloured tiles are the company's real logo; a polish keeps the brand */
/* Hallmark · waive 39b · button.project-shot is the gallery photo itself, a picture-sized hit target · on /referenzen each project photo opens its lightbox gallery */
/* ============================================
   TB-Holzbau — Zimmerei & 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: oklch(98.9% 0.006 85);   /* paper, a hair warm instead of pure #fff (7b) */
  --color-ink-deep: #2A292A;
  --color-on-dark: oklch(93% 0.006 85);         /* text on gray-dark / green bands */
  --color-on-dark-muted: oklch(84% 0.006 85);   /* secondary text on dark, >= 4.5:1 on gray-dark */
  --color-rule-on-dark: oklch(48% 0.004 85);
  --color-rule-on-dark-strong: oklch(78% 0.006 85);
  --color-scrim-strong: rgb(42 41 42 / 0.85);   /* overlays: alpha is fine here */
  --color-scrim-soft: rgb(42 41 42 / 0.6);
  --color-scrim: rgb(42 41 42 / 0.82);
  --color-lightbox: rgb(20 20 20 / 0.94);
  --color-lightbox-btn: rgb(255 255 255 / 0.12);
  --color-lightbox-btn-hover: rgb(255 255 255 / 0.26);
  --color-green-wash: #EDF3EC;
  --color-error: #C53030;
  --color-todo-bg: #FFF8E6;
  --color-frame: rgb(42 41 42 / 0.08);
  --color-focus: #2A6B2D;          /* green-dark: 6:1 on paper */
  --color-focus-on-dark: var(--color-white);
  --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 */
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}

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; text-wrap: pretty; }

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: var(--color-on-dark); }

.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: 400;
  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: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.nav-cta:hover { background: var(--color-gray-bg); text-decoration: none; }
.nav-cta:active { transform: translateY(1px); }

.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;
  min-height: 48px;
  padding: 0 1.5rem;
  line-height: 1.2;
  white-space: nowrap;
  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: translateY(1px); }

.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-text);
}
.btn-outline:hover { background: var(--color-gray-bg); text-decoration: none; }

.btn-lg { min-height: 52px; padding: 0 1.75rem; font-size: 1.0625rem; }

/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* White base for the strips beside the 1280px-capped video, matching
     the video's white background. The full-width gradient overlay sits
     on top, so the sides blend seamlessly with the video center. */
  background: var(--color-white);
  /* Height = 16:9 ratio of viewport up to 1280px -> 720px max. */
  height: clamp(420px, 56.25vw, 720px);
}
/* Index page: full-viewport video hero — no dark overlay, no text,
   video fills the whole frame so it stays fully visible. */
.hero-full {
  height: calc(100svh - var(--nav-height));
  min-height: 480px;
}
/* Full-viewport hero that keeps its dark overlay + content
   (Holzrahmenbau). Background image fills via .hero-bg img cover. */
.hero-screen {
  height: calc(100svh - var(--nav-height));
  min-height: 520px;
}
.hero-full .hero-video {
  /* Das Video ist eine Logo-Animation, kein Hintergrundfilm: es darf nicht
     beschnitten werden. Deshalb "contain" statt "cover" — sonst wird auf
     breiten Bildschirmen hochskaliert, bis der Claim oben unter der
     Navigation verschwindet. Die Ränder bleiben unsichtbar, weil Video und
     Hero denselben weißen Hintergrund haben.
     Die Deckelung auf 1280x720 hält das Logo auch auf großen Monitoren in
     einer vernünftigen Größe. */
  width: 100%;
  max-width: 1280px;
  height: 100%;
  max-height: 720px;
  object-fit: contain;
  object-position: center center;
}
.hero-full .hero-bg::after {
  display: none;
}
/* On narrow/portrait screens a 16:9 video can't fill a tall viewport
   without cropping the logo, so match the hero box to the video's
   aspect ratio: it fills edge-to-edge with no crop and no whitespace. */
@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;
  /* Push video down so content sits visually centered.
     cover crops top by default; bias toward center/lower. */
  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, var(--color-scrim-strong) 0%, var(--color-scrim-soft) 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: var(--color-on-dark);
  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: border-color 0.2s;
}
.card:hover { border-color: var(--color-gray); }

.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;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-green-dark);
  margin-bottom: 0.75rem;
}

/* Claim / tagline voice — same feel as "Ideen aus Holz" in the logo */
.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: border-color 0.22s ease;
}
.service-card:hover { border-color: var(--color-gray); }
.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 { text-decoration: underline; text-decoration-color: var(--color-border); text-underline-offset: 0.2em; }
.service-card-link:hover { text-decoration-color: currentColor; }

@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-dark);
  color: var(--color-white);
  padding: 3rem 0;
}
.contact-bar h2 { color: var(--color-white); }
.contact-bar p { color: var(--color-white); }
.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-dark); }
.contact-bar .btn-primary:hover { background: var(--color-gray-bg); }

/* --- Form --- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-weight: 400;
  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-text-muted);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--color-green); }
.form-input:focus-visible, .form-textarea:focus-visible, .form-select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
/* Dark and green bands: the ring turns light so it stays >= 3:1 */
.footer :focus-visible, .contact-bar :focus-visible, .bg-dark :focus-visible,
.hero-screen :focus-visible, .lightbox :focus-visible { outline-color: var(--color-focus-on-dark); }
.nav-links a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 4px;
}
.form-textarea { min-height: 150px; resize: vertical; }
.form-error {
  display: block;
  color: var(--color-error);
  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: var(--color-on-dark);
  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: 1rem;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer p, .footer-address { color: var(--color-on-dark-muted); font-size: 0.9375rem; }
.footer p { max-width: 45ch; }
.footer ul li a {
  color: var(--color-on-dark-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer ul li a:hover { color: var(--color-white); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.footer-bottom a { color: var(--color-on-dark); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-bottom a:hover { color: var(--color-white); }
.footer-credits { margin-top: 1rem; font-size: 0.8125rem; color: var(--color-on-dark-muted); max-width: none; }
.footer-credits a { color: var(--color-on-dark-muted); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--color-rule-on-dark);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-on-dark-muted);
  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: 700;
  font-variant-numeric: tabular-nums;
  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; }

/* --- 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 --- */
/* Hidden only once main.js has run (html.js), so the page never ships blank */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal.visible { opacity: 1; transform: none; }
}
@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 --- */
/* Crop maths: the SVG viewBox is 872x450. To show one region the <img> is
   scaled up and shifted inside an overflow-hidden box. */
.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: var(--color-ink-deep); 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: var(--color-on-dark-muted); }
.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-dark);
  background: var(--color-green-wash);
  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-dark);
  background: var(--color-green-wash);
  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.875rem;
  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;
}
/* Jedes zweite Projekt spiegelt die Seiten. Damit die Bilder dabei gleich
   groß bleiben, wandert die breitere Spalte mit — sonst landet die Galerie
   in der schmalen Textspalte und wird kleiner als beim Projekt darüber. */
.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;
}
.project-cover img { aspect-ratio: 3/2; }
.project-shot:hover { outline: 2px solid var(--color-border); outline-offset: 3px; }
.project-shot:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.project-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: var(--color-scrim);
  color: var(--color-white);
  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;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-green-dark);
  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.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}
.project-facts dd { margin: 0; font-weight: 600; font-size: 0.9375rem; hyphens: auto; overflow-wrap: break-word; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-lightbox);
  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: var(--color-on-dark);
  font-size: 0.9375rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}
.lightbox-counter { color: var(--color-on-dark-muted); font-size: 0.8125rem; white-space: nowrap; }
.lightbox-close, .lightbox-nav {
  background: var(--color-lightbox-btn);
  color: var(--color-white);
  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: var(--color-lightbox-btn-hover); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 2px solid var(--color-white); 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: clip; }

@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: var(--color-todo-bg);
  border-left: 4px solid var(--color-yellow);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  color: var(--color-text) !important;
}

/* Honeypot: invisible to people, still in the form for bots (no -9999px offset) */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Contact bar: outline button on green --- */
.contact-bar .btn-outline { color: var(--color-white); border-color: var(--color-rule-on-dark-strong); }
.contact-bar .btn-outline:hover { border-color: var(--color-white); }
.hero-screen .btn-outline { color: var(--color-white); border-color: var(--color-rule-on-dark-strong); }

/* --- Home hero: Stage (text 5 cols, picture 7) --- */
.hero-stage {
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--nav-height));
  padding: 3rem 0;
  background: var(--color-white);
}
.hero-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  width: 100%;
}
.hero-stage h1 {
  font-size: clamp(2.5rem, 3.6vw + 1rem, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: none;
}
.hero-stage .lead {
  font-size: clamp(1.125rem, 0.35vw + 1rem, 1.375rem);
  line-height: 1.45;
  color: var(--color-text-muted);
  max-width: 34ch;
  margin: 1.25rem 0 2.25rem;
}
.hero-stage-media {
  position: relative;
  margin: 0;
  height: min(80svh, 700px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-gray-bg);
}
.hero-stage-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid var(--color-frame);
  outline-offset: -1px;
}
@media (max-width: 60rem) {
  .hero-stage { min-height: 0; padding: 2.5rem 0 3rem; }
  .hero-stage-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero-stage-media { height: auto; aspect-ratio: 4 / 3; }
}

/* Logo-Intro: kein Rahmen, das Weiß des Videos verschmilzt per multiply mit dem Papierton.
   Das Logo sitzt im Video oben in der Mitte und füllt nur ~46 % der Breite,
   darum wird auf das Logo hin vergrößert. */
.hero-stage-intro {
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  background: transparent;
}
.hero-intro {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.45);
  transform-origin: 50% 36%;
  mix-blend-mode: multiply;
}
@media (max-width: 60rem) {
  .hero-stage-intro { aspect-ratio: 16 / 9; }
}

/* --- Karte und Bildnachweis --- */
.map-note { margin: 1rem auto 0; font-size: 0.875rem; color: var(--color-text-muted); }
.map-note a { color: inherit; text-decoration: underline; }
.photo-credits-section { padding-top: 0; }
.photo-credits { margin: 0; padding-left: 1.2rem; font-size: 0.9375rem; color: var(--color-text-muted); }
.photo-credits li { margin-bottom: 0.35rem; }
.photo-credits a { color: var(--color-green-dark); text-decoration: underline; overflow-wrap: anywhere; }
