/* drewes+strenge architekten – relaunch stylesheet */

@font-face { font-family: Barlow; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --bg-elev: #f4f4f3;
  --fg: #161616;
  --fg-muted: #6b6b6b;
  --line: #e2e2e0;
  --accent: #e4013a;
  --accent-contrast: #ffffff;
  --img-filter: none;
  --font: Barlow, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 2px;
  --ease: 200ms ease;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141414;
  --bg-elev: #1e1e1e;
  --fg: #ededed;
  --fg-muted: #9a9a9a;
  --line: #2c2c2c;
  --accent: #ff2d5b;
  --accent-contrast: #141414;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414;
    --bg-elev: #1e1e1e;
    --fg: #ededed;
    --fg-muted: #9a9a9a;
    --line: #2c2c2c;
    --accent: #ff2d5b;
    --accent-contrast: #141414;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--ease), color var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-contrast); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }

/* header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { color: inherit; }
.brand-main { font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); font-weight: 400; }
.brand-main b { font-weight: 600; }
.brand-main em { font-style: normal; color: var(--accent); font-weight: 600; }
.brand-main span { color: var(--fg-muted); }
.brand-main small { font-size: 1em; color: var(--fg-muted); font-weight: 600; }
.brand-sub { font-size: clamp(0.72rem, 0.6rem + 0.5vw, 0.95rem); color: var(--fg-muted); font-weight: 400; align-self: flex-end; }
.brand-sub b { font-weight: 600; color: var(--fg); }

.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 2rem); font-weight: 500; text-transform: lowercase; }
.site-nav > a { position: relative; padding: 0.25rem 0; }
.site-nav > a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.lang-switch, .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  transition: border-color var(--ease), color var(--ease);
}
.lang-switch:hover, .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.nav-toggle { display: none; width: 2.5rem; height: 2.5rem; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform var(--ease), opacity var(--ease); }
@media (max-width: 860px) {
  /* backdrop-filter would turn the header into the containing block of the fixed nav */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 0; top: 0; z-index: 40;
    flex-direction: column; justify-content: center; gap: 1.5rem;
    background: var(--bg); font-size: 1.6rem;
    transform: translateX(100%); transition: transform 250ms ease; visibility: hidden;
  }
  body.nav-open .site-nav { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .nav-toggle { position: relative; z-index: 60; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-tools { border: 0; margin: 1rem 0 0; padding: 0; gap: 1rem; }
  .lang-switch, .theme-toggle { height: 2.75rem; min-width: 2.75rem; font-size: 1rem; }
}

/* page head ----------------------------------------------------------------- */
.page-head { padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.25rem, 3vw, 2.5rem); }
.page-head h1 { margin-bottom: 0.25em; }
.eyebrow { text-transform: lowercase; color: var(--fg-muted); font-weight: 500; letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.eyebrow a:hover { color: var(--accent); }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.45; max-width: 36em; }
.small { font-size: 0.9rem; color: var(--fg-muted); }
.button {
  display: inline-block; padding: 0.75rem 1.4rem; border: 1px solid var(--fg); border-radius: 999px;
  font-weight: 600; text-transform: lowercase; transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.button:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* home ----------------------------------------------------------------------- */
.hero { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(2rem, 5vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-text h1 { max-width: 12em; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-media figcaption { font-size: 0.85rem; color: var(--fg-muted); margin-top: 0.5rem; }
@media (min-width: 760px) { .hero { grid-template-columns: 1fr 1fr; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head a { font-weight: 500; color: var(--fg-muted); }
.featured .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.featured { padding: clamp(1.5rem, 4vw, 3rem) 0; border-top: 1px solid var(--line); }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.area-link { display: flex; justify-content: space-between; align-items: baseline; padding: 1.25rem 1rem; background: var(--bg); font-weight: 600; text-transform: lowercase; font-size: 1.1rem; transition: background var(--ease); }
.area-link small { color: var(--fg-muted); font-weight: 400; }
.area-link:hover { background: var(--bg-elev); }

/* works grid ---------------------------------------------------------------- */
.filter { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; }
.filter a { padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; text-transform: lowercase; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.filter a:hover { border-color: var(--fg); color: var(--fg); }
.filter a[aria-current="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(1rem, 2.5vw, 2rem) clamp(0.75rem, 2vw, 1.5rem); }
.card a { display: block; }
.card figure { margin: 0 0 0.6rem; overflow: hidden; background: var(--bg-elev); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); transition: filter 350ms ease, transform 600ms ease; }
.card a:hover img, .card a:focus-visible img { filter: none; transform: scale(1.03); }
.card-title { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.card-meta { display: block; color: var(--fg-muted); font-size: 0.9rem; }
.card a:hover .card-title { color: var(--accent); }
.card[hidden] { display: none; }
.empty { color: var(--fg-muted); padding: 2rem 0; }
@media (hover: none) { .card img { filter: none; } }

/* project page -------------------------------------------------------------- */
.project-head h1 .location { display: block; font-weight: 400; color: var(--fg-muted); font-size: 0.55em; margin-top: 0.3em; }
.gallery { display: grid; gap: clamp(0.75rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.gallery li { margin: 0; }
.gallery button { display: block; width: 100%; background: var(--bg-elev); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity var(--ease); }
.gallery button:hover img { opacity: 0.9; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery li:first-child { grid-column: span 2; grid-row: span 2; }
}
.project-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-top: clamp(2rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); font-weight: 600; }
.project-nav small { display: block; font-weight: 400; color: var(--fg-muted); font-size: 0.85rem; }
.project-nav [rel="next"] { text-align: right; }
.project-nav .center { color: var(--fg-muted); font-weight: 500; }
@media (max-width: 600px) {
  .project-nav { grid-template-columns: 1fr 1fr; }
  .project-nav .center { grid-column: 1 / -1; text-align: center; order: 3; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4rem; }
.lightbox img { height: min(calc(100dvh - 7rem), 900px); width: auto; max-width: 100%; object-fit: contain; }
.lightbox figcaption { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.7; }
.lightbox button { position: absolute; font-size: 2.5rem; line-height: 1; width: 3rem; height: 3rem; display: grid; place-items: center; color: #fff; opacity: 0.8; }
.lightbox button:hover { opacity: 1; color: var(--accent); }
.lb-close { top: 0.5rem; right: 0.5rem; }
.lb-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox figure { padding: 3rem 0.5rem; } .lb-prev, .lb-next { top: auto; bottom: 0.25rem; transform: none; } }

/* office / text ------------------------------------------------------------- */
.subnav { display: flex; gap: 1.5rem; font-weight: 500; text-transform: lowercase; border-bottom: 1px solid var(--line); }
.subnav a { padding: 0.5rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a[aria-current="page"] { border-color: var(--accent); }
.two-col { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.media { margin: 0; }
.media.wide { margin-bottom: 2rem; }
.media.wide img { width: 100%; max-height: 70vh; object-fit: cover; object-position: top; }
.prose { max-width: 70ch; }
.prose.narrow { max-width: 62ch; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.5rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.prose address { font-style: normal; }
.partners { display: grid; gap: 2rem; }
@media (min-width: 760px) { .partners { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.partner h2 { font-size: 1.5rem; }
.cv li { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.members-title { margin-top: 3rem; font-size: 1.3rem; }
.members { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.members li { display: flex; flex-direction: column; gap: 0.15rem; padding: 1rem; background: var(--bg-elev); }
.members a { color: var(--fg-muted); font-size: 0.95rem; word-break: break-all; }
.members a:hover { color: var(--accent); }

/* footer ---------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem var(--gutter) 2rem; font-size: 0.95rem; color: var(--fg-muted); }
.footer-grid { max-width: var(--max); margin: 0 auto; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid strong { color: var(--fg); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; text-transform: lowercase; font-weight: 500; }
.footer-note { max-width: var(--max); margin: 1.5rem auto 0; font-size: 0.8rem; }
