/* Jakob Tanner AG — site styles */

@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/host-grotesk-latin.woff2") format("woff2");
}

:root {
  --red: #e2001a;
  --red-deep: #b50015;
  --ink: #121315;
  --ink-2: #4b4d52;
  --ink-3: #686a6f;
  --line: #e3e3e1;
  --paper: #ffffff;
  --paper-2: #f3f3f1;
  --night: #121315;
  --night-2: #1c1d20;
  --night-line: #2e3034;
  --night-ink: #f3f3f1;
  --night-ink-2: #a7a9ad;

  --font: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --header-h: 76px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --fs-display: clamp(3.4rem, 8.6vw, 8.25rem);
  --fs-h1: clamp(2.75rem, 7vw, 5.5rem);
  --fs-h2: clamp(2rem, 4.2vw, 3.4rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.75rem);
  --fs-lead: clamp(1.35rem, 2.3vw, 2rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  --space-section: clamp(88px, 12vw, 176px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: #b9bab7 var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--red);
}

::selection { background: var(--red); color: #fff; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Type ---------- */

.display {
  font-size: var(--fs-display);
  line-height: .95;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.h1 {
  font-size: var(--fs-h1);
  line-height: .98;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 500;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-wrap: pretty;
}

.prose { max-width: 62ch; color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.prose a:hover { color: var(--red); }

.muted { color: var(--ink-3); }

/* ---------- Buttons & links ---------- */

.btn {
  --h: 52px;
  display: inline-flex; align-items: center; gap: 12px;
  height: var(--h);
  padding: 0 24px;
  border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; }
.btn--line { border-color: currentColor; color: inherit; background: transparent; }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--ink); color: #fff; }
.btn--small { --h: 42px; padding: 0 18px; font-size: .9375rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 4px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .35s var(--ease-out); }
.link-arrow:hover { color: var(--red); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); flex: none;
}
.brand__mark { width: 50px; height: auto; flex: none; }
.brand__name {
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1;
}
.brand__name span { display: block; font-size: .72rem; font-weight: 400; letter-spacing: .01em; color: var(--ink-3); margin-top: 5px; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: clamp(14px, 1.8vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative;
  text-decoration: none; font-size: .96rem; font-weight: 450; color: var(--ink);
  padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 500; font-size: .96rem;
}
.header-phone svg { width: 16px; height: 16px; color: var(--red); }
.header-phone:hover { color: var(--red); }

.header-call {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--red); color: #fff; place-items: center;
}
.header-call svg { width: 19px; height: 19px; }
.header-call:hover { background: var(--red-deep); }
.menu-toggle {
  display: none;
  height: 44px; padding: 0 16px 0 18px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent;
  font: inherit; font-weight: 500; color: var(--ink); cursor: pointer;
  align-items: center; gap: 10px;
}
.menu-toggle__bars { width: 18px; height: 10px; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}
.menu-toggle__bars::before { top: 1px; }
.menu-toggle__bars::after { top: 8px; }
.menu-open .menu-toggle__bars::before { top: 4.5px; transform: rotate(45deg); }
.menu-open .menu-toggle__bars::after { top: 4.5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: var(--paper);
  padding: 24px var(--gutter) 40px;
  display: flex; flex-direction: column;
  overflow-y: auto;
  visibility: hidden; opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), visibility 0s .45s;
}
.menu-open .mobile-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; font-size: 1.9rem; letter-spacing: -0.03em; font-weight: 500; text-decoration: none;
}
.mobile-menu li a[aria-current="page"] { color: var(--red); }
.mobile-menu li a svg { width: 22px; height: 22px; color: var(--ink-3); }
.mobile-menu__contact { margin-top: auto; padding-top: 32px; display: grid; gap: 12px; }
.mobile-menu__contact .btn { justify-content: center; }
.menu-open { overflow: hidden; }

@media (max-width: 1080px) {
  .nav, .header-actions { display: none; }
  .header-call { display: grid; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1081px) {
  .mobile-menu { display: none; }
}

/* ---------- Home hero ---------- */

.hero { padding-top: clamp(40px, 7vw, 96px); }

.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: end;
  padding-bottom: clamp(36px, 5vw, 64px);
}
.hero__title { color: var(--ink); }
.hero__aside { display: grid; gap: 28px; justify-items: start; padding-bottom: .6em; }
.hero__sub { font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--ink-2); max-width: 30ch; text-wrap: balance; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media {
  position: relative;
  height: clamp(400px, 78vh, 900px);
  overflow: hidden;
  background: var(--paper-2);
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%;
}

.hero__roof {
  position: absolute; left: var(--gutter); top: 0;
  width: clamp(200px, 27%, 400px); height: auto;
  pointer-events: none;
  overflow: visible;
}
.hero__roof path {
  fill: none; stroke: var(--red); stroke-width: 26; stroke-linejoin: miter; stroke-linecap: butt;
}


/* hero reveal — content visible by default, motion only when allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__media img { animation: hero-img 1.6s var(--ease-out) both; }
  .js .hero__media { animation: hero-wipe 1.3s var(--ease-out) both; }
  .js .hero__roof path { stroke-dasharray: 1600; animation: roof-draw 1.5s .45s var(--ease-out) both; }
  .js .hero__title { animation: rise 1s .05s var(--ease-out) both; }
  .js .hero__aside { animation: rise 1s .18s var(--ease-out) both; }
}
@keyframes hero-wipe { from { clip-path: inset(18% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hero-img { from { transform: scale(1.08); } to { transform: none; } }
@keyframes roof-draw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */

.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(64px, 8vw, 112px); }
.section--grey { background: var(--paper-2); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .prose { justify-self: end; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Statement (Firma intro) */
.statement {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 32px 48px;
}
.statement__text { font-size: clamp(1.6rem, 3.3vw, 2.9rem); line-height: 1.16; letter-spacing: -0.028em; font-weight: 400; text-wrap: pretty; }
.statement__text em { font-style: normal; color: var(--ink-3); }
.statement__more { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }

/* ---------- Trades index (signature) ---------- */

.trades { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.trade { border-bottom: 1px solid var(--line); }
.trade a {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) 48px;
  gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 38px) 0;
  text-decoration: none; color: var(--ink);
}
.trade__num { font-size: var(--fs-small); color: var(--ink-3); font-variant-numeric: tabular-nums; align-self: start; padding-top: .9em; }
.trade__name {
  font-size: clamp(2.3rem, 5.6vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; font-weight: 500;
  transition: transform .5s var(--ease-out), color .3s;
}
.trade__desc { color: var(--ink-2); max-width: 36ch; }
.trade__arrow {
  justify-self: end;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  transition: background-color .3s, border-color .3s, color .3s, transform .5s var(--ease-out);
}
.trade__arrow svg { width: 18px; height: 18px; }
.trade__thumb { display: none; }

.trade a:hover .trade__name, .trade a:focus-visible .trade__name { color: var(--red); transform: translateX(10px); }
.trade a:hover .trade__arrow, .trade a:focus-visible .trade__arrow { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(-45deg); }

.trade-float {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: clamp(240px, 22vw, 340px); aspect-ratio: 4 / 5;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, -50%, 0) scale(.85);
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
  will-change: transform;
}
.trade-float.is-on { opacity: 1; }
.trade-float img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.trade-float img.is-active { opacity: 1; }

@media (hover: none), (max-width: 760px) {
  .trade-float { display: none; }
}

/* ---------- Award ---------- */

.award {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.award__media { position: relative; }
.award__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.award__date { margin-top: 14px; font-size: 1.125rem; color: var(--ink-2); }
.award__text { margin-top: 24px; }
.award__link { margin-top: 36px; }

/* ---------- Project grid ---------- */

.projects {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 28px);
}
.project { grid-column: span 4; }
.project--wide { grid-column: span 8; }
.project--half { grid-column: span 6; }
.project--offset { margin-top: clamp(0px, 10vw, 140px); }
.project a { display: block; text-decoration: none; color: inherit; }
.project__media { overflow: hidden; background: var(--paper-2); }
.project__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.project--wide .project__media img { aspect-ratio: 16 / 10; }
.project--tall .project__media img { aspect-ratio: 4 / 5; }
.project a:hover .project__media img { transform: scale(1.04); }
.project__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: .8rem; color: var(--ink-2); line-height: 1;
}
.project__title { margin-top: 12px; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; text-wrap: balance; }
.project a:hover .project__title { color: var(--red-deep); }

/* ---------- Apprenticeship ---------- */

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__body { display: grid; gap: 28px; justify-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li {
  height: 40px; padding: 0 18px; display: inline-flex; align-items: center;
  border: 1px solid var(--ink); border-radius: 999px; font-weight: 500;
}

/* ---------- Contact band ---------- */

.cta-band { background: var(--red); color: #fff; overflow: hidden; position: relative; }
.cta-band ::selection { background: #fff; color: var(--red); }
.cta-band__inner {
  position: relative;
  padding-block: clamp(80px, 11vw, 160px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px; align-items: end;
}
.cta-band__text { font-size: clamp(2rem, 4.4vw, 3.9rem); line-height: 1.05; letter-spacing: -0.032em; font-weight: 500; text-wrap: balance; }
.cta-band__contact { display: grid; gap: 6px; justify-items: start; }
.cta-band__phone {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem); letter-spacing: -0.03em; font-weight: 500; text-decoration: none; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cta-band__phone:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cta-band__mail { font-size: 1.15rem; text-decoration: none; opacity: .92; }
.cta-band__mail:hover { text-decoration: underline; }
.cta-band .btn { margin-top: 24px; }
.cta-band__roof {
  position: absolute; right: -4%; bottom: -30%;
  width: min(70%, 900px); height: auto; pointer-events: none;
}
.cta-band__roof path { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 26; stroke-linejoin: miter; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: var(--night-ink); }
.site-footer ::selection { background: var(--red); color: #fff; }
.site-footer__grid {
  padding-block: clamp(64px, 8vw, 104px) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}
.site-footer .brand { color: var(--night-ink); }
.site-footer .brand__name span { color: var(--night-ink-2); }
.footer-col h2 { font-size: var(--fs-small); font-weight: 500; color: var(--night-ink-2); margin-bottom: 16px; }
.footer-col p, .footer-col li { color: var(--night-ink); line-height: 1.75; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.footer-col .muted { color: var(--night-ink-2); }
.site-footer__base {
  border-top: 1px solid var(--night-line);
  padding-block: 24px 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: var(--fs-small); color: var(--night-ink-2);
}
.site-footer__base a { text-decoration: none; }
.site-footer__base a:hover { color: var(--night-ink); }

/* ---------- Sub page ---------- */

.page-head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 72px); }
.page-head__grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px 48px; align-items: end;
}
.page-head__crumb { font-size: var(--fs-small); color: var(--ink-3); margin-bottom: 20px; display: flex; gap: 8px; align-items: center; }
.page-head__crumb a { text-decoration: none; }
.page-head__crumb a:hover { color: var(--red); }
.page-head__crumb svg { width: 12px; height: 12px; }
.page-head__intro { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.4; letter-spacing: -0.012em; color: var(--ink-2); max-width: 40ch; text-wrap: pretty; padding-bottom: .4em; }

.page-media { height: clamp(320px, 70vh, 820px); overflow: hidden; background: var(--paper-2); position: relative; }
.page-media img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .js .page-media { animation: hero-wipe 1.2s var(--ease-out) both; }
  .js .page-media img { animation: hero-img 1.5s var(--ease-out) both; }
}

/* Services list */
.services {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 32px 48px;
}
.services__lead { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; max-width: 18ch; }
.services__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); columns: 2; column-gap: 40px; }
.services__list li {
  break-inside: avoid;
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.services__list li svg { width: 14px; height: 14px; margin-top: 5px; color: var(--red); }
.services__note { grid-column: 2; color: var(--ink-2); max-width: 62ch; }

/* Project block on sub pages */
.block { padding-top: clamp(72px, 9vw, 136px); }
.block__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 48px; align-items: end;
  padding-bottom: clamp(24px, 3vw, 40px);
  margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.block__head .prose { justify-self: end; }
.block__head--solo { grid-template-columns: 1fr; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(8px, 1.2vw, 16px);
}
.gallery button {
  all: unset; display: block; cursor: zoom-in; position: relative; overflow: hidden; background: var(--paper-2);
}
.gallery button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 1s var(--ease-out), opacity .3s;
}
.gallery button:hover img { transform: scale(1.035); }
.gallery .g-big { grid-column: span 2; grid-row: span 2; }
.gallery .g-big img { aspect-ratio: auto; }
.gallery .g-wide { grid-column: span 2; }
.gallery .g-wide img { aspect-ratio: auto; }
.gallery .g-full { grid-column: 1 / -1; }
.gallery .g-full img { aspect-ratio: 21 / 9; }
.gallery--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.gallery--portrait img { aspect-ratio: 2 / 3; }
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.fig-caption { font-size: var(--fs-small); color: var(--ink-3); margin-top: 14px; }

.captioned { display: grid; gap: 10px; }
.captioned figcaption { font-size: .95rem; color: var(--ink-2); }

/* Stage strip: numbered construction sequence (Umkehrdach) */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); counter-reset: stage; }
.stage button { all: unset; display: block; cursor: zoom-in; overflow: hidden; }
.stage button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.stage img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s var(--ease-out); }
.stage button:hover img { transform: scale(1.035); }
.stage figcaption { display: flex; gap: 12px; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--ink); margin-top: 14px; font-weight: 500; }
.stage figcaption::before { counter-increment: stage; content: counter(stage); font-size: var(--fs-small); color: var(--red); font-variant-numeric: tabular-nums; }

/* Next page link */
.next-page { border-top: 1px solid var(--line); }
.next-page a {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-block: clamp(40px, 6vw, 80px);
  text-decoration: none;
}
.next-page__label { font-size: var(--fs-small); color: var(--ink-3); display: block; margin-bottom: 8px; }
.next-page__name { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.035em; font-weight: 500; transition: color .3s; }
.next-page a:hover .next-page__name { color: var(--red); }
.next-page__arrow {
  width: clamp(56px, 7vw, 96px); height: clamp(56px, 7vw, 96px); border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--ink); color: #fff;
  transition: background-color .3s, transform .5s var(--ease-out);
}
.next-page__arrow svg { width: 40%; height: 40%; }
.next-page a:hover .next-page__arrow { background: var(--red); transform: rotate(-45deg); }

/* Firma: award story */
.story {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px clamp(32px, 6vw, 96px);
}
.story__aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: grid; gap: 20px; }
.story__aside .award__date { display: block; }
.story .prose { font-size: 1.125rem; }
.story__source { font-size: var(--fs-small); color: var(--ink-3); }

.external { display: inline-flex; gap: 6px; align-items: center; }
.external svg { width: 13px; height: 13px; }

/* Info note */
.note {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--ink-2); max-width: 70ch;
}
.note svg { width: 22px; height: 22px; color: var(--red); margin-top: 2px; }

/* ---------- Contact page ---------- */

.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 48px clamp(40px, 7vw, 120px);
  padding-bottom: var(--space-section);
}
.contact__info { display: grid; gap: 40px; align-content: start; }
.contact__phone {
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; font-weight: 500; text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.contact__phone:hover { color: var(--red); }
.contact__dl { display: grid; grid-template-columns: 90px 1fr; gap: 14px 16px; margin: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.contact__dl dt { color: var(--ink-3); font-size: var(--fs-small); padding-top: .2em; }
.contact__dl dd { margin: 0; }
.contact__dl a { text-decoration: none; }
.contact__dl a:hover { color: var(--red); text-decoration: underline; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; align-content: start; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; }
.field label .req { font-weight: 400; color: var(--ink-3); font-size: .82rem; }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  width: 100%;
  border: 0; border-bottom: 1px solid #b9bab7; border-radius: 0;
  background: transparent;
  padding: 10px 0 12px;
  font-size: 1.125rem;
  transition: border-color .25s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--ink); padding-bottom: 11px; }
.field input::placeholder, .field textarea::placeholder { color: #8b8d91; }
.field[data-invalid] input, .field[data-invalid] textarea { border-bottom-color: var(--red); }
.field__error { color: var(--red-deep); font-size: .88rem; min-height: 1.2em; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 8px; }
.form__status { font-size: .95rem; color: var(--ink-2); }
.form__status[data-state="error"] { color: var(--red-deep); }
.form__status[data-state="ok"] { color: #1d6b3a; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(10, 10, 11, .96); color: #fff;
}
.lightbox::backdrop { background: rgba(10, 10, 11, .6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); font-size: var(--fs-small); color: #c9cacc; font-variant-numeric: tabular-nums; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 clamp(56px, 8vw, 120px); }
.lightbox__stage img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.lightbox__caption { padding: 16px var(--gutter) 24px; text-align: center; color: #c9cacc; font-size: .95rem; min-height: 1.5em; }
.lb-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28);
  background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background-color .25s, border-color .25s;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: clamp(8px, 2vw, 32px); }
.lb-next { right: clamp(8px, 2vw, 32px); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__top, .section-head, .page-head__grid, .block__head, .statement, .statement__more,
  .award, .split, .cta-band__inner, .services, .story, .contact { grid-template-columns: minmax(0, 1fr); }
  .section-head .prose, .block__head .prose { justify-self: start; }
  .services__note { grid-column: 1; }
  .story__aside { position: static; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project, .project--wide, .project--half { grid-column: span 1; }
  .project--wide { grid-column: 1 / -1; }
  .project--offset { margin-top: 0; }
  .trade a { grid-template-columns: 40px minmax(0, 1fr) 48px; }
  .trade__desc { grid-column: 2; grid-row: 2; }
  .trade__arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .split__media img { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand__mark { width: 42px; }
  .brand__name { font-size: 1rem; }
  .brand__name span { display: none; }
  .site-header__inner { gap: 10px; }
  .menu-toggle { padding: 0 14px; }
  .menu-toggle { flex: none; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project, .project--wide, .project--half { grid-column: 1 / -1; }
  .services__list { columns: 1; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .g-big { grid-column: 1 / -1; grid-row: auto; }
  .gallery .g-big img, .gallery .g-wide img { aspect-ratio: 4 / 3; }
  .gallery--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .trade a { grid-template-columns: 28px minmax(0, 1fr) 40px; gap: 14px; }
  .trade__arrow { width: 40px; height: 40px; }
  .trade__thumb { display: block; grid-column: 2 / -1; grid-row: 3; margin-top: 6px; }
  .trade__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .hero__roof { width: 58%; }
  .page-media .hero__roof { width: 44%; }
  .hero__roof path, .cta-band__roof path { stroke-width: 34; }
  .lightbox__stage { padding: 0 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}

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