/* Kernholz Tischlerei – Konzeptprojekt von Atilla Okcan
   Räume, Material und Licht tragen die Seite. Eine ruhige Grotesk (Hanken Grotesk),
   Kalkputz und Graphit, Pausblau nur in der technischen Zeichnung. */

@font-face {
  font-family: "Kh Hanken";
  src: url("/fonts/hanken-grotesk-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --kalk: #eceae5;
  --kalk-2: #e2dfd8;
  --graphit: #262522;
  --stein: #6f6b64;
  --linie: #cfcbc3;
  --pausblau: #23415a;
  --eiche: #9c6b3c;
  --pad: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.25, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--kalk); color: var(--graphit); font: 400 1.0625rem/1.65 "Kh Hanken", "Helvetica Neue", Arial, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pausblau); outline-offset: 3px; }
.kh-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kh-skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--graphit); color: var(--kalk); }
.kh-skip:focus { top: 12px; }

.kh-h2 { margin: 0 0 18px; font-weight: 500; font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.12; letter-spacing: -.015em; max-width: 22ch; }
.kh-h3 { margin: 0 0 14px; font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.kh-link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.kh-link:hover { text-decoration-thickness: 2px; }
.kh-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 3px;
  background: var(--graphit); color: var(--kalk); border: 1px solid var(--graphit); text-decoration: none; cursor: pointer;
  font-weight: 500; font-size: .98rem; transition: background-color .2s, color .2s;
}
.kh-btn:hover { background: transparent; color: var(--graphit); }
.kh-btn--line { background: transparent; color: var(--graphit); }
.kh-btn--line:hover { background: var(--graphit); color: var(--kalk); }
.kh-btn--light { background: var(--kalk); color: var(--graphit); border-color: var(--kalk); }
.kh-btn--light:hover { background: transparent; color: var(--kalk); }
.kh-btn--ghost { background: transparent; color: var(--kalk); border-color: rgb(236 234 229 / .45); }
.kh-btn--ghost:hover { border-color: var(--kalk); color: var(--kalk); background: transparent; }

/* ------------------------------------------------------------ Kopf */
.kh-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 28px; padding: 12px var(--pad); background: rgb(236 234 229 / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linie); }
.kh-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.kh-logo__mark { width: 34px; height: 34px; fill: none; stroke: var(--graphit); stroke-width: 1.3; }
.kh-logo__core { fill: var(--eiche); stroke: none; }
.kh-logo__text { display: grid; line-height: 1.1; }
.kh-logo__name { font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.kh-logo__sub { font-size: .78rem; color: var(--stein); }
.kh-nav { display: flex; gap: 24px; font-size: .95rem; }
.kh-nav a { text-decoration: none; }
.kh-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.kh-head .kh-btn { min-height: 42px; padding: 0 16px; font-size: .92rem; }

/* ------------------------------------------------------------ Einstieg */
.hero { position: relative; }
.hero__fig { margin: 0; position: relative; }
.hero__img { width: 100%; height: min(78vh, 64vw); min-height: 420px; object-fit: cover; object-position: 50% 62%; }
.hero__cap { position: absolute; right: var(--pad); bottom: 14px; font-size: .78rem; color: rgb(38 37 34 / .75); background: rgb(236 234 229 / .8); padding: 4px 10px; border-radius: 2px; }
.hero__panel { position: relative; margin: -150px var(--pad) 0; width: min(640px, calc(100% - 2 * var(--pad))); padding: 34px 38px 38px; background: var(--kalk); }
.kh-concept { margin: 0 0 18px; font-size: .85rem; color: var(--stein); }
.hero__title { margin: 0 0 16px; font-weight: 500; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.06; letter-spacing: -.02em; max-width: 16ch; }
.hero__lead { margin: 0 0 26px; max-width: 46ch; color: #3e3c38; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* ------------------------------------------------------------ Werkstück und Materialvergleich */
.piece { padding: clamp(64px, 9vw, 130px) var(--pad) clamp(40px, 6vw, 80px); }
.piece__intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px 64px; margin-bottom: 44px; }
.piece__intro .kh-h2 { grid-column: 1; }
.piece__intro > p { grid-column: 1; margin: 0; max-width: 46ch; }
.specs { grid-column: 2; grid-row: 1 / 3; align-self: end; margin: 0; border-top: 1px solid var(--graphit); }
.specs div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--linie); font-size: .97rem; }
.specs dt { color: var(--stein); }
.specs dd { margin: 0; min-width: 0; hyphens: auto; overflow-wrap: break-word; }

.compare { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; align-items: start; }
.compare__stage { position: relative; aspect-ratio: 3 / 2; background: var(--kalk-2); overflow: hidden; }
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .55s var(--ease); }
.compare__img.is-on { opacity: 1; }
.compare__label { position: absolute; left: 16px; bottom: 14px; margin: 0; padding: 4px 10px; background: rgb(236 234 229 / .88); font-size: .85rem; font-weight: 500; }
.woods { display: grid; gap: 8px; margin-bottom: 22px; }
.woods button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 14px 8px 8px; border: 1px solid var(--linie); border-radius: 3px; background: transparent; cursor: pointer; text-align: left; font-weight: 500; font-size: 1rem; transition: border-color .2s, background-color .2s; }
.woods button:hover { border-color: var(--graphit); }
.woods button[aria-checked="true"] { border-color: var(--graphit); background: #f6f5f2; box-shadow: inset 3px 0 0 var(--eiche); }
.woods__chip { width: 40px; height: 40px; border-radius: 2px; flex: none; background-size: cover; }
.woods__chip--eiche { background: linear-gradient(100deg, #c99a62, #b4834e 40%, #d1a46d 55%, #b07f4a); }
.woods__chip--nuss { background: linear-gradient(100deg, #5a3b28, #4a2f1f 45%, #6b4630 60%, #4b301f); }
.woods__chip--esche { background: linear-gradient(100deg, #e6dccb, #d8ccb6 45%, #ece3d4 60%, #d6c9b2); }
.wood-info__lead { margin: 0 0 14px; font-size: 1.05rem; }
.wood-info__facts { margin: 0; font-size: .93rem; }
.wood-info__facts div { display: grid; grid-template-columns: 6rem 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--linie); }
.wood-info__facts dt { color: var(--stein); }
.wood-info__facts dd { margin: 0; }
.compare__note { margin: 20px 0 0; font-size: .85rem; color: var(--stein); }

/* ------------------------------------------------------------ Details */
.details { padding: clamp(40px, 6vw, 90px) var(--pad) clamp(64px, 9vw, 130px); }
.details__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; }
.detail { margin: 0; }
.detail--offset { margin-top: 90px; }
.detail img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail figcaption { margin-top: 14px; max-width: 46ch; font-size: .98rem; color: #3e3c38; }

/* ------------------------------------------------------------ Planung: Zeichnung und Möbel */
.plan { padding: clamp(64px, 9vw, 120px) var(--pad); background: #f5f4f1; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.plan__text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px 64px; margin-bottom: 36px; }
.plan__text p { margin: 0; max-width: 52ch; }
.plan__text .kh-h2 { grid-row: 1 / 3; }
.plan__hint { color: var(--stein); font-size: .92rem; }
.xray { position: relative; aspect-ratio: 2 / 1; background: #fff; overflow: hidden; user-select: none; touch-action: pan-y; }
.xray__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xray__drawing { position: absolute; inset: 0; background: #fbfbf9; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background-image: linear-gradient(rgb(35 65 90 / .06) 1px, transparent 1px), linear-gradient(90deg, rgb(35 65 90 / .06) 1px, transparent 1px); background-size: 2.5% 5%; }
.xray__drawing svg { width: 100%; height: 100%; display: block; }
.xray__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--pausblau); pointer-events: none; }
.xray__handle span { position: absolute; top: 50%; left: calc(50% + (50 - var(--p, 50)) / 50 * 22px); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--pausblau); box-shadow: 0 0 0 4px rgb(255 255 255 / .7); }
.xray__handle span::before, .xray__handle span::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.xray__handle span::before { left: 7px; border-right-color: #fff; }
.xray__handle span::after { right: 7px; border-left-color: #fff; }
.xray__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.xray:has(.xray__range:focus-visible) .xray__handle span { outline: 3px solid var(--pausblau); outline-offset: 4px; }

/* ------------------------------------------------------------ Ablauf */
.steps { padding: clamp(64px, 9vw, 120px) var(--pad); }
.steps__list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps__list li { counter-increment: s; border-top: 1px solid var(--graphit); padding-top: 16px; }
.steps__list li::before { content: counter(s); display: block; font-size: .9rem; color: var(--stein); margin-bottom: 26px; }
.steps__list h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; }
.steps__list p { margin: 0; font-size: .97rem; color: #3e3c38; }

/* ------------------------------------------------------------ Kontakt */
.contact { background: var(--graphit); color: var(--kalk); padding: clamp(64px, 9vw, 120px) var(--pad); }
.contact__inner { max-width: 760px; }
.contact p { max-width: 54ch; color: #d6d3cc; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.contact__msg { min-height: 1.6em; margin: 16px 0 0; font-size: .95rem; }
.contact__addr { margin-top: 30px !important; font-size: .9rem; color: #a9a59d !important; }
.contact :focus-visible { outline-color: var(--kalk); }

.kh-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 14px 30px; padding: 30px var(--pad) 40px; font-size: .88rem; color: var(--stein); }
.kh-foot p { margin: 0; max-width: 80ch; }
.kh-foot .kh-link { color: var(--graphit); }

.kh-bar { display: none; }

/* ------------------------------------------------------------ Mobil */
@media (max-width: 900px) {
  .kh-nav, .kh-head__call { display: none; }
  .kh-head { gap: 12px; }
  .kh-logo__sub { display: none; }
  .hero__img { height: 62vh; min-height: 340px; object-position: 62% 60%; }
  .hero__cap { left: 16px; right: auto; bottom: auto; top: 12px; }
  .hero__panel { margin: -40px 0 0; width: auto; padding: 28px var(--pad) 8px; }
  .piece__intro, .plan__text { grid-template-columns: 1fr; }
  .specs { grid-column: 1; grid-row: auto; }
  .specs div { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .kh-h2, .hero__title { hyphens: auto; overflow-wrap: break-word; }
  .compare { grid-template-columns: 1fr; gap: 20px; }
  .woods { grid-template-columns: repeat(3, 1fr); }
  .woods button { flex-direction: column; gap: 6px; padding: 8px 4px; font-size: .9rem; text-align: center; }
  .woods__chip { width: 100%; height: 26px; }
  .details__grid { grid-template-columns: 1fr; }
  .detail--offset { margin-top: 0; }
  .plan__text .kh-h2 { grid-row: auto; }
  /* Am Handy: linke Möbelhälfte größer, Foto und Zeichnung gleich beschnitten */
  .xray { aspect-ratio: 1.15 / 1; }
  .xray__photo { object-position: 0 50%; }
  .xray__handle span { width: 38px; height: 38px; margin: -19px 0 0 -19px; left: calc(50% + (50 - var(--p, 50)) / 50 * 19px); }
  .steps__list { grid-template-columns: 1fr; gap: 0; }
  .steps__list li { padding: 14px 0 20px; }
  .steps__list li::before { margin-bottom: 6px; }
  body { padding-bottom: 64px; }
  .kh-bar { position: fixed; inset: auto 0 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--linie); border-top: 1px solid var(--linie); }
  .kh-bar > * { display: flex; align-items: center; justify-content: center; min-height: 56px; background: var(--kalk); border: 0; text-decoration: none; font-weight: 600; font-size: 1rem; cursor: pointer; }
  .kh-bar > a { background: var(--graphit); color: var(--kalk); }
  .kh-head__cta { display: none; }
}

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

/* Handy: eigenes Hochformat-Rendering (raummobil), das ganze Sideboard bleibt im Bild */
@media (max-width: 760px) {
  .hero__img { height: auto; aspect-ratio: 4 / 5; min-height: 0; max-height: 82vh; object-position: 50% 55%; }
  .hero__cap { top: 12px; bottom: auto; left: auto; right: 12px; max-width: 13rem; font-size: .72rem; line-height: 1.35; }
}
