/* KVB Alpha GmbH – style.css
   Palette: warm paper, charcoal ink, soft grey, one deep-green accent.
   Fonts: system stacks only (fast, offline-safe, no third-party requests). */

:root {
  --paper: #F2EEE5;
  --paper-2: #E7E1D3;
  --ink: #1B1C1A;
  --soft: #5A5D57;
  --green: #24503B;
  --green-deep: #1C3F2F;
  --sage: #B7CDB5;
  --error: #9B2C1F;
  --line: rgba(27, 28, 26, 0.2);

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 10vw, 9rem);
  --header: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
body.nav-open { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--ink); color: var(--paper); transition: top .2s; }
.skip-link:focus { top: 1rem; }

.title { font: 400 clamp(2.25rem, 5vw, 4.25rem)/1.05 var(--serif); letter-spacing: -0.025em; }
.lead { font: 400 clamp(1.3rem, 2.2vw, 1.65rem)/1.4 var(--serif); }

.btn { display: inline-block; padding: .95rem 1.6rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: .95rem; font-weight: 600; line-height: 1; cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.btn:hover { background: var(--green); border-color: var(--green); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-sm { padding: .6rem 1.05rem; font-size: .85rem; }
.text-link { font-weight: 600; font-size: .95rem; border-bottom: 1px solid currentColor; padding-bottom: .15rem; transition: color .3s var(--ease); }
.text-link:hover { color: var(--green); }

.media { position: relative; overflow: hidden; background: var(--paper-2); }
.media svg { width: 100%; height: 100%; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header); display: flex; align-items: center; border-bottom: 1px solid transparent; transition: height .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease); }
.site-header.is-scrolled { height: 60px; background: rgba(242, 238, 229, 0.97); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.logo { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .7rem; }
.logo-mark { position: relative; width: 20px; height: 20px; background: var(--ink); }
.logo-mark::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: var(--green); border-top-left-radius: 10px; }
.logo-text { font: 400 1.3rem/1 var(--serif); letter-spacing: -0.02em; }
.logo-text small { font: 500 .72rem var(--sans); letter-spacing: .04em; color: var(--soft); margin-left: .2rem; }
.nav { display: flex; align-items: center; gap: 2.5rem; }
.nav-list { display: flex; gap: 2rem; }
.nav-link { position: relative; font-size: .92rem; padding: .4rem 0; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-toggle { display: none; position: relative; z-index: 2; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header) + clamp(2.5rem, 6vw, 5rem)) 0 0; }
.hero-grid { align-items: center; }
.hero-copy { grid-column: 1 / span 7; }
.hero-title { font: 400 clamp(2.75rem, 6.6vw, 6rem)/.98 var(--serif); letter-spacing: -0.035em; }
.hero-title span { display: block; }
.hero-title .indent { padding-left: 1.1em; }
.hero-lead { max-width: 34rem; margin-top: 2rem; font-size: 1.15rem; color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.25rem; }
.hero-visual { grid-column: 8 / -1; position: relative; padding-bottom: 2.5rem; }
.media-main { width: 84%; margin-left: auto; aspect-ratio: 4 / 5; }
.media-sub { position: absolute; left: -8%; bottom: 0; width: 52%; aspect-ratio: 3 / 2; border: 6px solid var(--paper); }
.hero-tag { position: absolute; top: 1.25rem; right: 1.25rem; padding: .65rem .9rem; background: var(--paper); font-size: .8rem; line-height: 1.35; font-weight: 600; }
.hero-vertical { position: absolute; top: 0; left: 4%; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .8rem; color: var(--soft); }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--ink); }
.hero-meta li { padding: 1.4rem 1.5rem 0 0; font-size: .98rem; line-height: 1.5; }
.hero-meta li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.hero-meta span { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; color: var(--green); }

/* ---------- About ---------- */
.about { padding: var(--section) 0; }
.about .title { max-width: 16em; }
.about-layout { margin-top: clamp(3rem, 6vw, 5.5rem); align-items: start; }
.about-visual { grid-column: 1 / span 6; }
.about-text { grid-column: 8 / span 5; padding-top: 1rem; }
.about-text p + p { margin-top: 1.25rem; color: var(--soft); }
.media-about { aspect-ratio: 4 / 3; }
figcaption { margin-top: .6rem; font-size: .82rem; color: var(--soft); }
.statement { margin: 2.5rem 0 0 14%; padding-left: 1.5rem; border-left: 3px solid var(--green); font: italic 400 clamp(1.35rem, 2.2vw, 1.75rem)/1.35 var(--serif); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(3.5rem, 7vw, 6rem); }
.facts div { display: flex; flex-direction: column-reverse; border-top: 1px solid var(--ink); padding-top: 1rem; }
.facts dd { font: 400 clamp(2.25rem, 4vw, 3.25rem)/1 var(--serif); letter-spacing: -0.02em; }
.facts dt { margin-top: .6rem; font-size: .92rem; color: var(--soft); }

/* ---------- Services ---------- */
.services { padding: var(--section) 0; background: var(--paper-2); }
.services-intro { grid-column: 1 / span 4; align-self: start; position: sticky; top: 6rem; }
.services-intro p { margin-top: 1.5rem; color: var(--soft); }
.services-list { grid-column: 6 / -1; border-bottom: 1px solid var(--ink); }
.service { position: relative; isolation: isolate; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) 2.25rem; gap: 0 1.25rem; padding: 2rem 0; border-top: 1px solid var(--ink); }
.service::before { content: ""; position: absolute; inset: 0 -1rem; background: var(--paper); opacity: 0; z-index: -1; transition: opacity .3s var(--ease); }
.service:hover::before { opacity: 1; }
.service-num { padding-top: .55rem; font-size: .85rem; font-weight: 700; color: var(--soft); transition: color .3s var(--ease); }
.service > div { transition: transform .3s var(--ease); }
.service h3 { font: 400 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--serif); letter-spacing: -0.015em; }
.service p { margin-top: .7rem; max-width: 36rem; color: var(--soft); }
.service-link { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 600; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease), color .3s var(--ease); }
.service-icon { width: 2.1rem; height: 2.1rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: color .3s var(--ease); }
.service:hover > div { transform: translateX(8px); }
.service:hover .service-num, .service:hover .service-icon { color: var(--green); }
.service-link:hover { color: var(--green); border-color: var(--green); }

/* ---------- Approach ---------- */
.approach { padding: var(--section) 0; background: var(--green-deep); color: var(--paper); }
.approach-head { align-items: end; }
.approach-head .title { grid-column: 1 / span 7; }
.approach-head p { grid-column: 9 / -1; color: rgba(242, 238, 229, .75); }
.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(3rem, 7vw, 6rem); }
.benefits li { border-top: 1px solid rgba(242, 238, 229, .3); padding-top: 1.25rem; }
.benefits li:nth-child(even) { margin-top: clamp(2rem, 5vw, 4.5rem); }
.benefit-num { display: block; font: 400 clamp(4rem, 7vw, 6.5rem)/1 var(--serif); letter-spacing: -0.04em; color: var(--sage); }
.benefits h3 { margin: 1.25rem 0 .7rem; font: 400 1.5rem/1.2 var(--serif); }
.benefits p { font-size: 1rem; color: rgba(242, 238, 229, .75); }

/* ---------- Contact ---------- */
.contact { padding: var(--section) 0; }
.contact-info { grid-column: 1 / span 5; }
.contact-info > p { margin-top: 1.5rem; color: var(--soft); }
.details { margin-top: 2.5rem; border-top: 1px solid var(--ink); }
.details div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.details span { font-size: .85rem; font-weight: 700; color: var(--green); padding-top: .15rem; }
.details a:not(.text-link) { border-bottom: 1px solid currentColor; }
.details .text-link { display: inline-block; margin-top: .5rem; }
.form { grid-column: 7 / -1; padding: clamp(1.5rem, 3.5vw, 2.75rem); background: var(--paper-2); border-top: 3px solid var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.75rem; }
.field { margin-bottom: .6rem; }
.field label { display: block; margin-bottom: .2rem; font-size: .85rem; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: .65rem 0; border: 0; border-bottom: 1px solid rgba(27, 28, 26, .5); border-radius: 0; background: transparent; font-size: 1.05rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--green); box-shadow: 0 1px 0 var(--green); }
.field.has-error input, .field.has-error textarea { border-bottom-color: var(--error); box-shadow: 0 1px 0 var(--error); }
.field-error { display: block; min-height: 1.5em; padding-top: .25rem; font-size: .85rem; color: var(--error); }
.form .btn { margin-top: .75rem; }
.form-note { margin-top: 1.25rem; font-size: .85rem; color: var(--soft); }
.form-note a { text-decoration: underline; }
.form-status { margin-top: 1.25rem; padding: .9rem 1rem; border-left: 3px solid var(--ink); background: var(--paper); font-size: .95rem; }
.form-status.is-error { border-color: var(--error); color: var(--error); }

/* ---------- Footer ---------- */
.site-footer { overflow: hidden; padding: clamp(4rem, 8vw, 6rem) 0 0; background: var(--ink); color: var(--paper); }
.site-footer .logo-mark { background: var(--paper); }
.site-footer .logo-text small { color: rgba(242, 238, 229, .6); }
.footer-grid { row-gap: 2.5rem; }
.footer-brand { grid-column: 1 / span 4; }
.footer-brand p { margin-top: 1.25rem; max-width: 26rem; font-size: .95rem; color: rgba(242, 238, 229, .7); }
.footer-col { font-size: .95rem; line-height: 1.9; }
.footer-col:nth-of-type(1) { grid-column: 6 / span 2; }
.footer-col:nth-of-type(2) { grid-column: 8 / span 3; }
.footer-col:nth-of-type(3) { grid-column: 11 / span 2; }
.footer-col h2 { margin-bottom: .6rem; font: 700 .85rem var(--sans); color: var(--sage); }
.footer-col a { display: block; width: fit-content; color: rgba(242, 238, 229, .85); transition: color .2s; }
.footer-col a:hover { color: var(--sage); }
.footer-word { margin-top: 3rem; font: 400 clamp(4rem, 16.5vw, 15rem)/.82 var(--serif); letter-spacing: -0.05em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(242, 238, 229, .22); user-select: none; }
.footer-bottom { padding: 1.5rem 0; border-top: 1px solid rgba(242, 238, 229, .2); font-size: .85rem; color: rgba(242, 238, 229, .6); }

/* ---------- Legal dialogs ---------- */
.dialog { width: min(640px, calc(100% - 2rem)); max-height: min(80vh, 720px); padding: 0; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.dialog::backdrop { background: rgba(27, 28, 26, .6); }
.dialog[open] { animation: dialog-in .28s var(--ease); }
.dialog-inner { padding: clamp(1.5rem, 4vw, 2.5rem); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { font: 400 2rem/1.1 var(--serif); }
.dialog-close { flex: none; width: 2.5rem; height: 2.5rem; border: 1px solid var(--ink); background: transparent; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.dialog-close:hover { background: var(--ink); color: var(--paper); }
.dialog h3 { margin-top: 1.4rem; font-size: .95rem; }
.dialog p { margin-top: .4rem; font-size: .97rem; color: var(--soft); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-list { grid-column: 5 / -1; }
}

@media (max-width: 960px) {
  .grid12 > * { grid-column: 1 / -1; }
  .hero-visual { margin-top: 3rem; max-width: 560px; }
  .media-sub { left: 0; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta li, .hero-meta li + li { padding: 1.1rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .about-text { padding-top: 2.5rem; }
  .services-intro { position: static; margin-bottom: 3rem; }
  .approach-head p { margin-top: 1.25rem; }
  .form { margin-top: 3.5rem; }
  .footer-col:nth-of-type(n) { grid-column: span 6; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: stretch; gap: 2rem; padding: calc(var(--header) + 1.5rem) var(--gutter) 2rem; background: var(--paper); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link { display: block; padding: 1rem 0; border-bottom: 1px solid var(--line); font: 400 1.9rem/1.2 var(--serif); }
  .nav-link::after { display: none; }
  .nav .btn { align-self: flex-start; }
}

@media (max-width: 640px) {
  .hero-title .indent { padding-left: .5em; }
  .about-visual, .about-text { grid-column: 1 / -1; }
  .statement { margin-left: 0; }
  .facts, .benefits, .form-row { grid-template-columns: 1fr; }
  .benefits li:nth-child(even) { margin-top: 0; }
  .service { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .service-icon { display: none; }
  .details div { grid-template-columns: 5.5rem 1fr; }
  .footer-col:nth-of-type(n) { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
