/* Geisler Dächer, Webvisitenkarte. Plain CSS, no build step.
   Font: Archivo (SIL OFL 1.1), variable wdth + wght, self-hosted. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F4F0;
  --ink: #171615;
  --ink-2: #55514D;
  --rule: #A7A29C;
  --red: #DF0526;
  --night: #1C1B1A;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --pad: 20px;
  --max: 1440px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Type */

h1, h2, h3 {
  margin: 0;
  font-weight: 900;
  font-stretch: 75%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  word-spacing: 0.08em;
}

h1 {
  font-size: clamp(2.9rem, 13vw, 8.75rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(2.25rem, 9vw, 4.25rem);
}

h3 {
  font-weight: 800;
  font-stretch: 80%;
  font-size: 1.625rem;
  letter-spacing: -0.01em;
}

.kicker {
  margin: 0;
  font-weight: 500;
  font-stretch: 100%;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-2);
}

p { margin: 0; }

/* Header */

.site-header { padding: 22px 0 0; }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: block; flex: 0 1 auto; }

.logo img {
  width: clamp(220px, 28vw, 400px);
  aspect-ratio: 912 / 256;
  mix-blend-mode: multiply;
}

.hlink {
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding: 14px 0 14px 8px;
}

/* Buttons */

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  border-radius: 0;
  font-weight: 700;
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.btn--call {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn:active { transform: translateY(1px); }

/* Hero */

.hero { padding: 40px 0 72px; }

.hero .accent {
  display: block;
  width: 56px;
  height: 3px;
  margin-bottom: 28px;
  background: var(--red);
}

.hero h1 { margin: 20px 0 28px; }

.hero .actions { max-width: 26rem; }

.hero .lead {
  max-width: 34ch;
  margin-bottom: 36px;
  font-size: 1.1875rem;
  line-height: 1.5;
}

.hero .note {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* Headline: always two lines ("Schöne Dächer" / "für Generationen."), sized to its column */
.hero-text { container-type: inline-size; }
.hero h1 { font-size: min(12cqi, 6.5rem); }

/* Hero photo: one column below 1100 px, photo under the text; bleeds to the screen edges on phones */
.hero-photo { margin: 40px calc(var(--pad) * -1) 0; }

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

/* Sections */

.section {
  padding: 64px 0 72px;
  border-top: 1px solid var(--rule);
}

.section h2 { margin-top: 16px; }

/* Soziales is the dark section: light, light, light, dark, light, dark (footer) */
.section--dark {
  background: var(--night);
  color: var(--paper);
  border-top: 0;
}

.section--dark .kicker { color: #BDB8B1; }

.section--dark + .section { border-top: 0; }

/* Leistungen */

.services {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  counter-reset: svc;
}

.services li {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  column-gap: 12px;
  align-content: start;
  padding: 28px 0 30px;
  border-top: 1px solid var(--rule);
}

.services .num {
  grid-row: 1 / span 2;
  font-weight: 300;
  font-stretch: 75%;
  font-size: 3.5rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}

.services p { margin-top: 10px; max-width: 46ch; }

/* Gallery "Aus unserer Arbeit" */

.gallery {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.gallery figure { margin: 0; }

.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #E4E0D9;
}

.gallery figcaption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* Soziales */

.social-photo { margin: 40px 0 0; }

.social-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 480;
  object-fit: cover;
}

.social-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 36px;
}

.social-text p { max-width: 60ch; }

/* Kontakt (the climax: big call button) */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 36px;
}

.contact-grid .btn--call {
  min-height: 80px;
  padding-inline: 20px;
  font-size: clamp(1.375rem, 4.5vw, 2.25rem);
  font-weight: 900;
  font-stretch: 75%;
  letter-spacing: 0;
}

address {
  font-style: normal;
  font-size: 1.1875rem;
  line-height: 1.5;
}

address strong {
  display: block;
  font-weight: 800;
  font-stretch: 80%;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.linklist {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 420px;
  border-bottom: 1px solid var(--rule);
}

.linklist li { border-top: 1px solid var(--rule); }

.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
}

.linklist a::after {
  content: "\2192";
  content: "\2192" / "";
}

/* Social icons */

.social {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  gap: 12px;
}

.ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}

.ico svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico svg .fill { fill: currentColor; stroke: none; }

/* Footer */

.site-footer {
  background: var(--night);
  color: var(--paper);
  padding: 48px 0 56px;
  font-size: 1rem;
  line-height: 1.6;
}

.site-footer .wrap {
  display: grid;
  gap: 20px;
}

.site-footer .legal { font-weight: 600; }

.site-footer .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.site-footer .nav a {
  display: inline-block;
  padding: 10px 0;
  white-space: nowrap;
}

.site-footer small { font-size: 0.9375rem; opacity: 0.8; }

/* Text pages (Impressum, Datenschutz) */

.doc { padding: 48px 0 88px; }

.doc h1 {
  font-size: clamp(2.75rem, 11vw, 6rem);
  margin-bottom: 40px;
}

.doc h2 {
  margin: 44px 0 10px;
  font-weight: 800;
  font-stretch: 85%;
  font-size: 1.625rem;
  letter-spacing: -0.01em;
}

.doc p, .doc dl { max-width: 65ch; }

.doc p + p { margin-top: 14px; }

.doc dl { margin: 0; border-bottom: 1px solid var(--rule); }

.doc .row {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.doc dt {
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-2);
}

.doc dd { margin: 4px 0 0; }

.doc a { text-underline-offset: 4px; }

mark.todo {
  background: #FFE45C;
  color: var(--ink);
  padding: 1px 4px;
}

/* Sticky call bar (phones only, index.html only, no JS) */

.callbar { display: none; }

/* Motion: one gentle rise on load, colour fades on interaction. All off with reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .rise {
    animation: rise 450ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .rise-2 { animation-delay: 80ms; }
  .rise-3 { animation-delay: 160ms; }

  /* The call bar fades in during the first 500 px of scroll, where supported; otherwise it is simply visible */
  @supports (animation-timeline: scroll()) {
    .callbar {
      animation: callbar-in linear both;
      animation-timeline: scroll(root);
      animation-range: 0 500px;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes callbar-in {
  from { opacity: 0; visibility: hidden; }
  to { opacity: 1; visibility: visible; }
}

.btn,
.ico {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ico svg,
.ico svg * { transition: fill 0.3s ease, stroke 0.3s ease; }

.hlink,
.linklist a,
.site-footer .nav a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.3s ease, color 0.3s ease;
}

.hlink:focus-visible,
.linklist a:focus-visible,
.site-footer .nav a:focus-visible { text-decoration-color: currentColor; }

.doc a { transition: color 0.3s ease, text-decoration-color 0.3s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Hover only on devices that hover, so a tapped button does not stay dark on phones */

@media (hover: hover) {
  .btn:hover { background: var(--ink); color: var(--paper); }

  .btn--call:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

  .ico:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

  .hlink:hover,
  .linklist a:hover,
  .site-footer .nav a:hover { text-decoration-color: currentColor; }

  .doc a:hover { color: var(--red); }
}

/* Small phones */

@media (max-width: 459px) {
  .kicker { font-size: 0.75rem; letter-spacing: 0.2em; }
}

/* Phones: sticky call bar, room for it at the bottom of the page */

@media (max-width: 699px) {
  .callbar {
    display: flex;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-width: 2px 0 0;
    font-size: 1.1875rem;
  }

  body.has-callbar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* Gallery: 2 columns from 560 px */

@media (min-width: 560px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
}

/* Tablet and up */

@media (min-width: 700px) {
  :root { --pad: 40px; }

  body { font-size: 1.125rem; }

  .hlink { font-size: 0.875rem; }

  .site-header { padding-top: 36px; }

  .actions { gap: 16px; }

  .btn { padding: 14px 36px; font-size: 1.125rem; }

  .hero { padding: 72px 0 112px; }

  .hero .lead { font-size: 1.375rem; max-width: 36ch; }

  .hero-photo { margin-inline: 0; }

  .hero-photo img { aspect-ratio: 16 / 9; }

  .section { padding: 96px 0 112px; }

  .services {
    column-gap: 72px;
    margin-top: 64px;
  }

  .services .num { font-size: 4.75rem; }

  .services li { grid-template-columns: 6rem 1fr; padding: 32px 0 40px; }

  .gallery { gap: 56px 32px; margin-top: 64px; }

  .gallery figcaption { font-size: 1rem; }

  .social-text { grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 48px; }

  .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 72px; margin-top: 48px; align-items: start; }

  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; gap: 8px 48px; }

  .site-footer small { grid-column: 1 / -1; margin-top: 12px; }

  .doc { padding: 80px 0 128px; }

  .doc .row { display: grid; grid-template-columns: 14rem 1fr; gap: 24px; }

  .doc dd { margin: 0; }
}

/* Desktop: two-column hero, three-column gallery */

@media (min-width: 1100px) {
  .site-header { padding-top: 40px; }

  .hero { padding: 80px 0 112px; }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: 72px;
    align-items: center;
  }

  .hero-photo { margin: 0; }

  .hero-photo img { aspect-ratio: 4 / 5; }

  .gallery { grid-template-columns: repeat(3, 1fr); gap: 64px 40px; }
}

@media (min-width: 1200px) {
  :root { --pad: 64px; }
}

/* Wide desktop: hero buttons side by side once the text column is wide enough for both */

@media (min-width: 1300px) {
  .hero .actions {
    display: flex;
    max-width: none;
  }
}

/* Leistungen in two columns once each column can hold "Versicherungsschäden" */

@media (min-width: 900px) {
  .services { grid-template-columns: 1fr 1fr; }
}
