/* Albrecht Installations GmbH — shared design system */

:root {
  --bg: #f6f5f1;
  --surface: #fff;
  --surface-2: #eceae3;
  --ink: #15233f;
  --ink-2: #45506a;
  --muted: #7a8398;
  --brand: #1f3a8a;
  --accent: #e23b2e;
  --border: rgba(21, 35, 63, 0.1);
  --ink-bg: #11203b;
  --r: 14px;
  --container: 1200px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --section-padding: clamp(3.5rem, 6vw, 6rem);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-text: "Inter", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", monospace;
  --shadow-sm: 0 1px 3px rgba(21, 35, 63, 0.06);
  --shadow-md: 0 8px 30px rgba(21, 35, 63, 0.1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-sm);
}

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

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-block: var(--section-padding);
}

.section--alt {
  background: var(--surface-2);
}

.section--dark {
  background: var(--ink-bg);
  color: #fff;
}

.section--dark .muted,
.section--dark .lead {
  color: rgba(255, 255, 255, 0.78);
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section-header {
  margin-bottom: var(--space-lg);
  max-width: 42rem;
}

.section-header.center {
  text-align: center;
  margin-inline: auto;
}

/* ── Typography helpers ── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink-2);
}

.muted {
  color: var(--muted);
  font-size: 0.9375rem;
}

.prose {
  max-width: 65ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--r);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

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

.btn--primary:hover {
  background: #c93227;
  border-color: #c93227;
  color: #fff;
}

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

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

.section--dark .btn--ghost,
.hero .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ── Grids ── */
.grid-2 {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  gap: var(--space-md);
}

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

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

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

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-md);
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover h3 {
  color: var(--accent);
}

.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: calc(var(--r) - 4px);
  background: rgba(226, 59, 46, 0.1);
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.icon-box svg {
  width: 24px;
  height: 24px;
}

/* ── Stats ── */
.stats-strip {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding-block: var(--space-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

.stat {
  text-align: center;
  padding: var(--space-sm);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ── Pill ── */
.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(31, 58, 138, 0.08);
  color: var(--brand);
  border-radius: 999px;
}

/* ── Split ── */
.split {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

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

.split-media {
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}

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

/* ── Feature list ── */
.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--space-sm);
  color: var(--ink-2);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── CTA band ── */
.cta-band {
  background: var(--brand);
  color: #fff;
  padding-block: var(--space-xl);
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cta-band .lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 36rem;
  margin-inline: auto;
}

.cta-band .btn--primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}

.cta-band .btn--primary:hover {
  background: var(--surface-2);
  border-color: var(--surface-2);
  color: var(--brand);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: clamp(520px, 85vh, 760px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--ink-bg) center / cover no-repeat;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(17, 32, 59, 0.55) 0%,
    rgba(17, 32, 59, 0.82) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(4rem, 12vh, 8rem) var(--section-padding);
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  color: #fff;
  max-width: 16ch;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.88);
  max-width: 42rem;
}

.hero .eyebrow {
  color: var(--accent);
}

[data-hero-title] .hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-hero-title].is-ready .hero-word {
  opacity: 1;
  transform: none;
}

/* ── Contact form ── */
.contact-grid {
  display: grid;
  gap: var(--space-lg);
}

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

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-family: var(--font-text);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--r) - 4px);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.15);
}

.contact-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-md);
}

.contact-details dl {
  margin: 0;
}

.contact-details dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: var(--space-md);
}

.contact-details dt:first-child {
  margin-top: 0;
}

.contact-details dd {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
}

.contact-details a {
  text-decoration: none;
  font-weight: 500;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* ── Referenzen teaser ── */
.ref-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s, padding 0.25s;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  max-width: 12rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: calc(var(--r) - 4px);
  cursor: pointer;
}

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

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  border-radius: calc(var(--r) - 4px);
  transition: color 0.2s, background 0.2s;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(21, 35, 63, 0.04);
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--r) !important;
}

.nav-cta:hover {
  background: #c93227 !important;
  color: #fff !important;
}

@media (max-width: 899px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s;
  }

  .primary-nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 0.875rem 1rem;
    border-radius: calc(var(--r) - 4px);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
  }
}

/* ── Footer ── */
.site-footer {
  background: var(--ink-bg);
  color: rgba(255, 255, 255, 0.85);
  padding-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-about .brand {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-about .brand img {
  width: 52px;
  height: 52px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: #fff;
}

.footer-about p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 28ch;
}

.footer-nav h3,
.footer-contact h3 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.footer-nav ul li {
  margin-bottom: 0.5rem;
}

.footer-nav a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: #fff;
}

.footer-contact address {
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--space-md);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-inner a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-bottom-inner a:hover {
  color: #fff;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ── Reveal animations (JS only) ── */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
}

html.js-ready .reveal.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-ready .stagger > * {
  opacity: 0;
  transform: translateY(16px);
}

html.js-ready .reveal.in-view .stagger > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.js-ready .reveal,
  html.js-ready .stagger > * {
    opacity: 1;
    transform: none;
  }

  [data-hero-title] .hero-word {
    opacity: 1;
    transform: none;
  }
}

/* ── Overflow safety ── */
body {
  overflow-x: hidden;
}
