@font-face {
  font-family: 'Mono0856';
  src: url('assets/Mono0856.woff2') format('woff2'),
       url('assets/Mono0856.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Halden Architekten — Stylesheet
   Minimalistisch, ruhig, dauerhaft. */

:root {
  --background: #f6f5f1;
  --foreground: #1c1b19;
  --muted: #e8e6e0;
  --muted-foreground: #6c6a64;
  --border: #d8d5cd;
  --max: 1600px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "SFMono-Regular", "JetBrains Mono", "Consolas", "Liberation Mono", Menlo, monospace;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Typografie ---------- */
.text-display {
  font-family: 'Mono0856', cursive;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.text-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
}
em { font-style: italic; font-weight: 300; }
.muted { color: var(--muted-foreground); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
@media (min-width: 768px) { .wrap { padding: 0 4rem; } }
@media (min-width: 1280px) { .wrap { padding: 0 6rem; } }

.section { margin-top: 6rem; }
@media (min-width: 768px) { .section { margin-top: 10rem; } }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(246,245,241,0.85);
  backdrop-filter: saturate(180%) blur(10px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.brand { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; }
.brand .name { font-family: 'Mono0856', cursive; font-size: 1.25rem; font-weight: 600; }
.brand .sub { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-foreground); }

nav.main { display: none; gap: 2rem; align-items: center; }
@media (min-width: 768px) { nav.main { display: flex; } }
nav.main a {
  font-family: 'Mono0856', cursive;
  font-size: 0.9rem; text-decoration: none; color: var(--muted-foreground);
  transition: color 0.2s ease; letter-spacing: -0.01em;
}
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--foreground); }

.menu-btn { display: inline-block; background: none; border: 0; cursor: pointer; }
@media (min-width: 768px) { .menu-btn { display: none; } }
.menu-btn .text-eyebrow { color: var(--foreground); }

/* mobile menu */
nav.mobile { display: none; border-top: 1px solid var(--border); }
nav.mobile.open { display: block; }
nav.mobile a {
  font-family: 'Mono0856', cursive;
  display: block; padding: 1rem 0; text-decoration: none;
  border-bottom: 1px solid var(--border); color: var(--foreground); font-size: 1.1rem;
}
@media (min-width: 768px) { nav.mobile { display: none !important; } }

/* ---------- Hero ---------- */
.hero { padding-top: 4rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .hero { padding-top: 7rem; padding-bottom: 5rem; } }
.hero h1 {
  margin: 1.5rem 0 0; max-width: 64rem;
  font-size: clamp(3rem, 9vw, 7.5rem);
}
.hero-foot {
  margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem;
}
@media (min-width: 768px) {
  .hero-foot { margin-top: 4rem; flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.hero-foot p { max-width: 28rem; font-size: 1.05rem; color: var(--muted-foreground); margin: 0; }

.link-arrow {
  display: inline-block; text-decoration: none;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  border-bottom: 1px solid var(--foreground); padding-bottom: 0.25rem;
  align-self: flex-start; white-space: nowrap;
}
@media (min-width: 768px) { .hero-foot .link-arrow { align-self: flex-end; } }

/* ---------- Featured / Cards ---------- */
.card { display: block; text-decoration: none; color: inherit; }
.card .frame { overflow: hidden; background: var(--muted); }
.card .frame img {
  width: 100%; object-fit: cover;
  transition: transform 1.2s ease;
}
.card:hover .frame img { transform: scale(1.03); }
.ratio-1610 img { aspect-ratio: 16 / 10; }
.ratio-43 img { aspect-ratio: 4 / 3; }

.card-meta { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; }
.card-title { font-family: 'Mono0856', cursive; font-weight: 500; }

.headrow { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

/* Statement */
.statement { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 768px) { .statement { grid-template-columns: repeat(12, 1fr); } }
.statement .label { grid-column: span 3; }
.statement p {
  margin: 0; grid-column: span 9;
  font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.4;
}

/* Project grid (zwei Spalten, versetzt) */
.grid-2 { display: grid; gap: 2rem 2rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 5rem 2rem; } }
.offset { margin-top: 0; }
@media (min-width: 768px) { .offset { margin-top: 6rem; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
.gallery a { display: block; overflow: hidden; background: var(--muted); }
.gallery img { aspect-ratio: 1/1; width: 100%; object-fit: cover; transition: transform 0.9s ease, filter 0.4s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery .tall { grid-row: span 2; }
.gallery .tall img { aspect-ratio: 1/2; }

/* Services / list */
.svc { display: grid; gap: 0; border-top: 1px solid var(--border); }
.svc .item {
  display: grid; gap: 0.75rem 2rem; padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .svc .item { grid-template-columns: 4rem 1fr 1.4fr; align-items: baseline; } }
.svc .num { color: var(--muted-foreground); font-size: 0.85rem; }
.svc .title { font-family: 'Mono0856', cursive; font-size: 1.6rem; font-weight: 500; }
.svc .desc { color: var(--muted-foreground); margin: 0; }

/* Prose / two column text */
.cols { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .cols { grid-template-columns: repeat(12, 1fr); gap: 2.5rem; } }
.cols .label { grid-column: span 3; }
.cols .body { grid-column: span 9; max-width: 52rem; }
.cols .body p { color: var(--muted-foreground); }
.cols .body p + p { margin-top: 1.25rem; }

/* Team */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (min-width: 768px) { .team { grid-template-columns: repeat(4, 1fr); } }
.team .person .frame { background: var(--muted); overflow: hidden; }
.team .person img { aspect-ratio: 3/4; width: 100%; object-fit: cover; }
.team .person .pname { font-family: 'Mono0856', cursive; font-size: 1.3rem; margin-top: 0.75rem; }

/* Contact / form */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
address { font-style: normal; line-height: 1.8; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }
.field label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-foreground); }
.field input, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--foreground);
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  padding: 0.6rem 0; outline: none; transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--foreground); }
.btn {
  display: inline-block; cursor: pointer; background: var(--foreground); color: var(--background);
  border: 0; padding: 0.9rem 2rem; font-family: inherit;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.82; }

/* hover underline */
.hover-underline { text-decoration: none; position: relative; }
.hover-underline::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: currentColor; transition: width 0.3s ease;
}
.hover-underline:hover::after { width: 100%; }

/* Page header (interne Seiten) */
.page-head { padding-top: 4rem; }
@media (min-width: 768px) { .page-head { padding-top: 6rem; } }
.page-head h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); margin: 1rem 0 0; }
.page-head .lead { max-width: 40rem; margin-top: 1.5rem; color: var(--muted-foreground); font-size: 1.1rem; }

/* Prose (Impressum / Datenschutz) */
.prose { max-width: 46rem; }
.prose h2 { font-family: 'Mono0856', cursive; font-size: 1.6rem; font-weight: 500; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1rem; margin: 1.5rem 0 0.4rem; }
.prose p, .prose li { color: var(--muted-foreground); }
.prose a { color: var(--foreground); }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--border); margin-top: 8rem; }
.footer-grid { display: grid; gap: 3rem; padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid .wide { grid-column: span 2; }
.footer-grid .big { font-family: 'Mono0856', cursive; font-size: 2rem; font-weight: 500; }
.footer-grid p { max-width: 28rem; color: var(--muted-foreground); font-size: 0.9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-grid a { text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .row {
  display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem;
  font-size: 0.78rem; color: var(--muted-foreground);
}
@media (min-width: 768px) { .footer-bottom .row { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-bottom .links { display: flex; gap: 1.5rem; }
.footer-bottom a { text-decoration: none; }

.mt-3 { margin-top: 0.75rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

/* Override: h1 a 2rem, regular; testo bold solo su parole evidenziate.
   Gli h1 restano in monospace, tutto il resto usa Mono0856 (impostato sopra). */
h1.text-display { font-family: 'Mono0856', cursive; font-size: 2rem; font-weight: 400; }
h1.text-display em { font-weight: 400; }
h1.text-display strong { font-weight: 700; font-style: normal; }

/* Colore testo dei paragrafi */
p, .hero-foot p, .footer-grid p, .cols .body p, .prose p, .svc .desc, .page-head .lead { color: #1c1b19; }

/* ---------- Dettaglio progetto ---------- */
.section-sm { margin-top: 3.5rem; }
@media (min-width: 768px) { .section-sm { margin-top: 5rem; } }

.proj-head { padding-top: 3rem; }
@media (min-width: 768px) { .proj-head { padding-top: 5rem; } }
.proj-back { display: inline-block; text-decoration: none; margin-bottom: 1.5rem; }
.proj-title { font-size: clamp(2.4rem, 6vw, 4.5rem); margin: 0; }
.proj-sub { margin-top: 1rem; font-size: 1.1rem; }

.proj-hero { overflow: hidden; background: var(--muted); margin-top: 2rem; }
.proj-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

/* Fascia dati */
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--border);
}
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: 1.1rem 1.25rem 1.1rem 0; border-bottom: 1px solid var(--border); }
.fact dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-foreground); }
.fact dd { margin: 0.35rem 0 0; font-size: 1.05rem; }

/* Descrizione */
.proj-desc { max-width: 46rem; }
.proj-desc p { font-size: 1.15rem; line-height: 1.7; margin: 0 0 1.25rem; color: #1c1b19; }
.proj-desc p:last-child { margin-bottom: 0; }

/* Galleria progetto */
.proj-gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .proj-gallery { grid-template-columns: 1fr 1fr; } }
.proj-gallery a { display: block; overflow: hidden; background: var(--muted); cursor: zoom-in; }
.proj-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.9s ease; }
.proj-gallery a:hover img { transform: scale(1.04); }

/* Prev / Next */
.proj-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.proj-nav .pn.right { text-align: right; margin-left: auto; }
.proj-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 0.35rem; }
.proj-nav .pn-title { font-family: 'Mono0856', cursive; font-size: 1.3rem; }
.proj-nav a:hover .pn-title { text-decoration: underline; }
