@font-face {
  font-family: Montserrat;
  src: url('assets/fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --brand: #3e5c76;
  --night: #182b3c;
  --ink: #1c2530;
  --muted: #4a5a69;
  --paper: #fff;
  --mist: #f4f7fa;
  --ice: #e8eff5;
  --line: #c9d5df;
  --gutter: clamp(20px, 4.65vw, 80px);
  --section-space: clamp(50px, 6.5vw, 110px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem/1.65 Montserrat, Arial, sans-serif;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2 {
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -.05em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 3.5vw, 3.875rem); }
h3 { font-size: clamp(1.05rem, 1.45vw, 1.275rem); font-weight: 700; line-height: 1.35; letter-spacing: -.025em; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, summary { font: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-space); }

.skip {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  background: var(--paper);
  transform: translateY(calc(-100% - 12px));
}
.skip:focus { transform: translateY(0); }
.mast {
  position: sticky;
  z-index: 5;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mast-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--night);
  font-size: .875rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
}
.brand b { margin-left: 4px; color: var(--brand); font-weight: 650; letter-spacing: .08em; }
.mast nav, footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 clamp(17px, 2.6vw, 42px);
  font-size: .875rem;
  font-weight: 650;
}
.mast nav { margin-left: auto; }
.mast nav a, footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.mast nav a:hover, footer nav a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: .3em; }
.contact-short, .nav-short { display: none; }
.mast-actions { display: flex; flex: none; align-items: center; gap: clamp(6px, 1vw, 16px); }
.language-switch {
  display: flex;
  align-items: center;
  flex: none;
  border-left: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 650;
}
.language-switch :is(a, span) { display: grid; place-items: center; min-height: 44px; }
.language-switch span { min-width: 30px; color: var(--night); text-decoration: underline; text-underline-offset: .35em; }
.language-switch a { min-width: 44px; color: var(--brand); text-decoration: none; }
.language-switch a:hover { background: var(--line); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  background: var(--night);
  color: var(--paper);
}
.hero-copy {
  align-self: center;
  padding: clamp(48px, 6vw, 104px) clamp(26px, 4vw, 78px);
  padding-left: max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter)));
}
.eyebrow {
  margin-bottom: 18px;
  color: #c9dcee;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .065em;
}
.hero h1 {
  max-width: 17ch;
  font-size: clamp(2.45rem, 4.25vw, 5rem);
  line-height: 1.04;
  text-wrap: initial;
}
.hero-lead { max-width: 46ch; margin-top: 23px; color: #e0eaf2; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 22px; margin-top: 28px; }
.button, .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
.button {
  justify-content: center;
  min-height: 46px;
  padding: 12px 17px;
  background: var(--brand);
  color: var(--paper);
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: .875rem;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--night); }
.button-light { background: var(--paper); color: var(--night); }
.button-light:hover { background: var(--ice); }
.text-link {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
}
.text-link:hover { text-decoration-thickness: 2px; }
.hero .text-link { color: var(--paper); font-size: .875rem; }
.hero :focus-visible, .contact address :focus-visible { outline-color: #b7d6f0; }

.hero-figure { position: relative; min-height: clamp(455px, 43vw, 740px); }
.erlenhof-cover { position: absolute; inset: 0; display: block; }
.erlenhof-cover:focus-visible { z-index: 1; outline-offset: -5px; }
.hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}
.hero-figure figcaption {
  pointer-events: none;
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 30px clamp(18px, 3vw, 44px) 17px;
  background: linear-gradient(transparent, #101c2a 95%);
  color: #fff;
  font-size: .875rem;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: end;
  column-gap: clamp(28px, 6vw, 100px);
  margin-bottom: clamp(26px, 3.6vw, 52px);
}
.section-head p, .sequence p, .views p, .use-cases p, .faq p, .film-copy p { color: var(--muted); }
.sequence, .use-cases, .gallery, .reel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 48px);
}
.sequence { counter-reset: steps; margin: 0; padding: 0; list-style: none; }
.sequence li { border-top: 1px solid var(--line); padding-top: 17px; }
.sequence li::before {
  counter-increment: steps;
  content: counter(steps, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: .875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sequence p, .use-cases p { margin-top: 8px; }

.views { background: var(--ice); }
.views-inner, .contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(28px, 6vw, 94px);
}
.views img { width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; }
.views figcaption { padding-top: 8px; color: var(--muted); font-size: .875rem; }
.views h2 + p { margin-top: 15px; }
.view { margin-top: 16px; padding-top: 14px; border-top: 1px solid #b6c8d8; }
.view p { margin-top: 5px; }
.view a { font-size: .9375rem; }
.view-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }

.use-cases { gap: clamp(14px, 2vw, 28px); }
.use-cases article { padding: clamp(18px, 2.6vw, 34px); background: var(--mist); border-top: 3px solid var(--brand); }
.portfolio { background: var(--mist); }
.gallery { gap: clamp(17px, 2.5vw, 35px); }
.gallery-image { display: block; position: relative; overflow: hidden; cursor: zoom-in; background: var(--ice); }
.gallery-image img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.gallery-image:hover img { transform: scale(1.035); }
.gallery-label {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  background: var(--night);
  color: var(--paper);
  font-size: .8125rem;
  font-weight: 650;
}
.gallery figcaption { display: grid; gap: 2px; padding-top: 10px; }
.gallery figcaption strong { font-weight: 700; }
.gallery figcaption span { color: var(--muted); font-size: .875rem; }
.film {
  display: grid;
  grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(18px, 4vw, 66px);
  margin-top: clamp(26px, 5vw, 68px);
  padding: clamp(20px, 3.6vw, 54px);
  background: var(--night);
  color: var(--paper);
}
.film-copy h3 { font-size: clamp(1.6rem, 2.45vw, 2.75rem); }
.film-copy p { margin-top: 8px; color: #e0eaf2; }
video { display: block; width: 100%; max-width: 100%; height: auto; background: var(--night); }
.film video { aspect-ratio: 16 / 9; }
.reels { margin-top: 18px; }
.reel-grid { max-width: 950px; gap: clamp(16px, 2vw, 30px); margin: 12px 0 20px; }
.reel-grid video { aspect-ratio: 9 / 16; }
.reel-grid figcaption { margin-top: 8px; color: var(--muted); font-size: .875rem; }

.faq { background: var(--ice); }
.faq-inner { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(18px, 5vw, 80px); }
.faq details, .reels { border-block-start: 1px solid var(--line); }
.faq details:last-child, .reels { border-block-end: 1px solid var(--line); }
summary { position: relative; padding: 14px 34px 14px 0; list-style: none; font-weight: 680; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  position: absolute;
  top: 10px;
  right: 4px;
  color: var(--brand);
  font-size: 1.375rem;
  font-weight: 500;
}
details[open] > summary::after { content: '−'; }
.faq details p { margin-bottom: 15px; }

.contact { background: var(--night); color: var(--paper); }
.contact-inner { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: start; }
.contact-lead { max-width: 42ch; margin: 18px 0; color: #e0eaf2; }
.contact address { display: flex; flex-wrap: wrap; gap: 0 20px; font-style: normal; }
.contact address a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .25em; }
.contact .projektkontakt { padding: clamp(18px, 3vw, 36px); color: var(--ink); background: var(--paper); }
.contact .projektkontakt input, .contact .projektkontakt textarea {
  font-size: 1rem;
  background: var(--mist);
  border-color: var(--line);
  color: var(--ink);
}
.contact .projektkontakt input { min-height: 44px; }
.contact .projektkontakt textarea { resize: vertical; }
.contact .projektkontakt button { background: var(--brand); border-color: var(--brand); }
.contact .projektkontakt button:hover:enabled { background: var(--night); }
.contact .projektkontakt :focus-visible { outline-color: var(--brand); }
.contact .projektkontakt output:empty { display: none; }
.footer-inner { padding-block: 12px; }

.gallery-dialog {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 94dvh;
  padding: clamp(12px, 2vw, 28px);
  border: 0;
  color: var(--ink);
  background: var(--paper);
}
.gallery-dialog::backdrop { background: #101c2ae6; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dialog-head h2 { font-size: clamp(1.15rem, 2.6vw, 2.25rem); overflow-wrap: anywhere; }
.gallery-dialog img { width: 100%; max-height: calc(94dvh - 110px); object-fit: contain; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 49fr) minmax(0, 51fr); }
  .hero-copy { padding-inline: var(--gutter) 22px; }
  .mast nav { gap: 0 16px; }
  .mast nav a { font-size: .8125rem; }
  .brand { gap: 7px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 116px; }
  .mast-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding-top: 6px; min-height: 0; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0 8px; margin-left: 0; }
  .mast-actions { grid-column: 2; grid-row: 1; }
  .contact-full, .nav-full { display: none; }
  .contact-short, .nav-short { display: inline; }
  .hero, .views-inner, .section-head, .contact-inner, .film, .faq-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 39px var(--gutter) 29px; }
  .hero h1 { max-width: 14ch; }
  .hero-lead { margin-top: 17px; }
  .hero-actions { margin-top: 19px; }
  .hero-figure { min-height: 0; aspect-ratio: 1.68; }
  .section-head { row-gap: 12px; }
  .views-copy { grid-row: 1; }
  .view { margin-top: 13px; }
  .sequence, .use-cases { grid-template-columns: minmax(0, 1fr); }
  .sequence li { padding-top: 12px; }
  .sequence li::before { margin-bottom: 4px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 490px) {
  .mast-inner { padding-inline: 15px; }
  .brand { font-size: .8125rem; letter-spacing: .08em; }
  .brand img { width: 29px; height: 29px; }
  .mast .brand { font-size: .76rem; letter-spacing: .055em; }
  .mast .brand b { margin-left: 2px; }
  .mast-actions .nav-contact { padding-inline: 12px; font-size: .79rem; }
  .mast nav a { font-size: .8125rem; }
  .hero h1 { font-size: clamp(2.05rem, 8.4vw, 2.65rem); }
  .hero-actions { align-items: start; flex-direction: column; gap: 2px; }
  .gallery, .reel-grid { grid-template-columns: minmax(0, 1fr); }
  .reel-grid { max-width: 290px; }
  .footer-inner { align-items: start; flex-direction: column; gap: 2px; }
}
@media (max-width: 360px) {
  .mast-inner { column-gap: 6px; padding-inline: 10px; }
  .mast-actions .nav-contact { padding-inline: 9px; }
  .mast .brand { gap: 5px; font-size: .75rem; letter-spacing: .045em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-image img { transition: none; }
}

/* Erlenhof financing study */
.capital { background: var(--paper); color: var(--ink); }
.capital-scene { isolation: isolate; position: relative; background: var(--night); color: white; overflow: hidden; }
.capital-scene img, .capital-scene::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.capital-scene img { object-fit: cover; object-position: center 51%; }
.capital-scene::after { content: ""; background: linear-gradient(90deg,rgba(13,29,42,.97),rgba(13,29,42,.86) 32%,rgba(13,29,42,.34) 65%,transparent); }
.capital-heading { padding-block: clamp(4rem,8vw,8rem); }
.capital-kicker { font-size: .82rem; font-weight: 650; letter-spacing: .045em; }
.capital-heading h2 { max-width: 11ch; margin: 16px 0 22px; font-size: clamp(2.7rem,5.8vw,6rem); line-height: 1.01; }
.capital-heading > p:last-child { max-width: 38ch; }
.capital-body { padding-block: var(--section-space); }
.capital-model,.capital-invest { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,8vw,8rem); }
.capital h3 { font-size: clamp(1.3rem,2.2vw,2rem); line-height: 1.18; }
.capital h3 + p,.capital-invest p + p { margin-top: .85rem; }
.capital-controls { margin-top: 1.45rem; }
.capital-controls label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; font-size: .9rem; }
.capital-controls input { display: block; width: 100%; height: 44px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.capital-presets { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem; }
.capital-presets button { cursor: pointer; min-height: 44px; padding: 0 .5rem; font: inherit; font-size: .875rem; color: var(--brand); background: transparent; border: 0; border-bottom: 2px solid transparent; }
.capital-presets button[aria-pressed=true] { border-color: currentColor; font-weight: 700; }
.capital-result { align-self: center; color: var(--brand); font-variant-numeric: tabular-nums; }
.capital-result strong { display: block; font-size: clamp(3.1rem,6.6vw,6.7rem); font-weight: 550; letter-spacing: -.065em; line-height: 1.17; }
.capital-scale { position: relative; margin-top: 1.25rem; height: 13px; background: repeating-linear-gradient(to right,var(--line) 0 1px,transparent 1px calc(100% / 60)); border-bottom: 1px solid var(--line); }
.capital-scale i { display: block; width: 100%; height: 3px; background: var(--brand); transform-origin: left; transform: scaleX(var(--fraction,.5)); transition: transform .16s ease-out; }
.capital-method { margin-top: 2rem; border-block: 1px solid var(--line); }
.capital-method summary { font-weight: 650; cursor: pointer; padding: .85rem 0; }
.capital-method p { max-width: 80ch; margin-bottom: .7rem; }
.capital-method dl { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.capital-method dd { margin: 0; font-weight: 650; }
.capital-note { margin-top: 1rem; max-width: 100ch; color: var(--muted); font-size: .9rem; }
.capital-invest { margin-top: clamp(2.25rem,5vw,4.5rem); }
.capital-invest a { margin-top: .65rem; gap: .5em; }
@media(max-width:760px) {
  .capital-model,.capital-invest { grid-template-columns: minmax(0,1fr); gap: 1.7rem; }
  .capital-scene::after { background: linear-gradient(0deg,rgba(13,29,42,.97),rgba(13,29,42,.85) 49%,rgba(13,29,42,.16) 86%); }
  .capital-heading { padding-top: 9.5rem; padding-bottom: 2rem; }
  .capital-heading h2 { font-size: clamp(2.65rem,10vw,4.25rem); }
}
@media(prefers-reduced-motion:reduce) { .capital-scale i { transition: none; } }
