/* ============================================================
   Nordform Architekten — style.css
   Palette: #FCFCFB / #1A1A1A / Akzent #E34234 (Zinnober)
   Fonts: STIX Two Text (Statements) + Archivo (alles andere)
   ============================================================ */

:root {
  --paper: #FCFCFB;
  --ink: #1A1A1A;
  --zinnober: #E34234;
  --hairline: rgba(26, 26, 26, 0.16);
  --hairline-soft: rgba(26, 26, 26, 0.07);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --serif: "STIX Two Text", Georgia, serif;
  --sans: "Archivo", sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Sichtbares Raster: feine vertikale Linien */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--hairline-soft) 0,
    var(--hairline-soft) 1px,
    transparent 1px,
    transparent calc((100vw - 2 * var(--gutter)) / 12)
  );
  background-position: var(--gutter) 0;
  background-repeat: no-repeat;
  background-size: calc(100vw - 2 * var(--gutter) + 1px) 100%;
}

main, header, footer { position: relative; z-index: 1; }

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--zinnober); color: var(--paper); }

/* ---------- Labels (12px, gesperrt) ---------- */
.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.4rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-dot {
  display: inline-block;
  width: 0.42em; height: 0.42em;
  background: var(--zinnober);
  margin: 0 0.5em 0.05em;
}

.site-nav { display: flex; gap: 2.2rem; }

.site-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--zinnober);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

/* ============================================================
   HERO — Strich wird Gebäude
   ============================================================ */
.hero-scroll { height: 180vh; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 5.5rem var(--gutter) 1.5rem;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.8rem;
}

.hero-index { color: var(--zinnober); }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 1.6rem 0 1.8rem;
}

.hero-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--paper);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  will-change: opacity, transform;
}

.hero-drawing {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  will-change: opacity;
}

.hero-drawing .thin { stroke-width: 1.3; }

.hero-drawing .dims { will-change: opacity; }

.hero-hint {
  margin-top: 0.9rem;
  color: rgba(26, 26, 26, 0.45);
  letter-spacing: 0.22em;
}

/* ============================================================
   HALTUNG
   ============================================================ */
.haltung {
  padding: clamp(120px, 16vw, 200px) var(--gutter);
  max-width: 68rem;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 1.8rem 0 2.4rem;
}

.haltung-sub {
  max-width: 34rem;
  color: rgba(26, 26, 26, 0.72);
  border-left: 1px solid var(--hairline);
  padding-left: 1.6rem;
}

/* ============================================================
   PROJEKTE — Archiv-Tabelle
   ============================================================ */
.projekte {
  padding: clamp(120px, 14vw, 180px) var(--gutter);
  position: relative;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.8rem;
  margin-bottom: 0;
}

.archiv {
  width: 100%;
  border-collapse: collapse;
}

.archiv th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.5);
  padding: 1.1rem 0 0.6rem;
  border-bottom: 1px solid var(--hairline);
}

.archiv td {
  padding: 1.35rem 1.5rem 1.35rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9rem;
  vertical-align: baseline;
  transition: color 0.4s var(--ease);
}

.archiv td:first-child {
  font-variant-numeric: tabular-nums;
  color: rgba(26, 26, 26, 0.55);
  width: 8%;
}

.archiv .p-name {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  width: 42%;
}

.archiv tbody tr { cursor: default; }

.archiv tbody tr[data-img] { cursor: pointer; }

.archiv tbody tr:hover td,
.archiv tbody tr:focus-visible td { color: var(--zinnober); }

/* Schwebendes Projektbild */
.hover-img {
  position: fixed;
  top: 0; left: 0;
  width: min(26rem, 34vw);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.45s var(--ease);
  will-change: transform, opacity;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--paper);
}

.hover-img.visible { opacity: 1; }

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

/* ============================================================
   LEISTUNGEN
   ============================================================ */
.leistungen {
  padding: clamp(120px, 14vw, 180px) var(--gutter);
}

.leistung-liste {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--gutter);
}

.leistung-liste li {
  padding: 2.4rem 0 2.8rem;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  column-gap: 1.2rem;
}

.l-num {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--zinnober);
  font-variant-numeric: tabular-nums;
  padding-top: 0.5rem;
}

.leistung-liste h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  margin-bottom: 0.7rem;
}

.leistung-liste p {
  grid-column: 2;
  max-width: 26rem;
  color: rgba(26, 26, 26, 0.72);
  font-size: 0.92rem;
}

/* ============================================================
   BÜRO
   ============================================================ */
.buero {
  padding: clamp(120px, 14vw, 180px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.buero-bild img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.buero-bild figcaption {
  margin-top: 0.8rem;
  color: rgba(26, 26, 26, 0.5);
  font-size: 0.7rem;
}

.buero-text { padding-top: 0.4rem; }

.buero-text h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.1;
  margin: 1.4rem 0 1.6rem;
  letter-spacing: -0.01em;
}

.buero-text > p:not(.label) {
  max-width: 30rem;
  color: rgba(26, 26, 26, 0.72);
}

.buero-zahlen {
  display: flex;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 3rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.6rem;
}

.buero-zahlen dt {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.buero-zahlen dd {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
  margin-top: 0.5rem;
}

/* ============================================================
   KONTAKT
   ============================================================ */
.kontakt {
  padding: clamp(120px, 14vw, 180px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  border-top: 1px solid var(--ink);
}

.kontakt h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.12;
  margin: 1.4rem 0 1.8rem;
  letter-spacing: -0.01em;
}

.kontakt address {
  font-style: normal;
  line-height: 1.9;
  color: rgba(26, 26, 26, 0.75);
}

.kontakt address a:hover { color: var(--zinnober); }

.kontakt-form { display: grid; gap: 1.8rem; align-content: start; }

.feld { display: grid; gap: 0.45rem; }

.feld label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
}

.feld input,
.feld textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.5rem 0;
  border-radius: 0;
  resize: vertical;
  transition: border-color 0.4s var(--ease);
}

.feld input:focus,
.feld textarea:focus {
  outline: none;
  border-bottom-color: var(--zinnober);
}

.kontakt-form button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 1rem 2.4rem;
  cursor: pointer;
  justify-self: start;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.kontakt-form button:hover,
.kontakt-form button:focus-visible {
  background: var(--zinnober);
  border-color: var(--zinnober);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  padding: 3.5rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 1.6rem;
}

.site-foot nav { display: flex; gap: 2rem; flex-wrap: wrap; }

.site-foot nav a {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-foot nav a:hover { color: var(--zinnober); }

.impressum,
.template-line {
  font-size: 0.72rem;
  color: rgba(26, 26, 26, 0.5);
  line-height: 1.8;
}

.template-line a {
  color: var(--ink);
  border-bottom: 1px solid var(--zinnober);
}

/* ============================================================
   Scroll-Reveals
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

tr.reveal { display: table-row; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .leistung-liste { grid-template-columns: 1fr; }
  .buero { grid-template-columns: 1fr; row-gap: 3.5rem; }
  .kontakt { grid-template-columns: 1fr; row-gap: 3.5rem; }
}

@media (max-width: 768px) {
  .site-nav { gap: 1.1rem; }
  .site-nav a { letter-spacing: 0.1em; font-size: 0.66rem; }
  .hero-scroll { height: 165vh; }
  .hero-title { margin: 1.2rem 0 1.2rem; }
  .archiv th:nth-child(3), .archiv td:nth-child(3) { display: none; }
  .archiv .p-name { width: auto; }
  .hover-img { display: none; }
  .hero-meta .hero-index { display: none; }
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hover-img { transition: none; }
}
