/* Tischlerei Otto / shared editorial refinement.
   Retains the approved palette, media, topic padding, 848px hero and live contours.
   Used on all four pages after the existing base, palette and detail sheets. */

/* Clear chapter hierarchy, numbered once and in reading order. */
.chapter-label,
.section-heading .chapter-label {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 12px;
  font: 700 10px/1.5 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--palette-taupe);
}
.chapter-label__number { font-variant-numeric: tabular-nums; }
.chapter-label__slash { opacity: .65; font-weight: 400; }
.section-heading > div { min-width: 0; }
.section-heading h2 { display: block; font-weight: 700; }
.section-heading h2::after { content: none; display: none; }
.section-heading > p {
  border-left: 1px solid var(--rule);
  padding-left: 27px;
  max-width: none;
}
.hero__copy h1 { font-weight: 600; }
.hero-discover {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  margin-top: 17px;
  padding: 7px 0;
  color: var(--ivory);
  font-size: 13px;
  text-decoration: none;
}
.hero-discover span { font-size: 21px; line-height: 1; }
.hero-discover:hover { color: #fff; text-decoration: underline; }
.hero-discover:focus-visible { outline-color: var(--ivory); box-shadow: none; }

/* Selected work: a lead project on the left, two real projects on the right. */
.references-grid--editorial {
  grid-template-columns: minmax(0,1.16fr) minmax(0,1fr);
  grid-template-rows: repeat(2, auto);
  gap: 28px;
  align-items: stretch;
}
.references-grid--editorial .project-card { min-width: 0; }
.references-grid--editorial .project-card--featured { grid-column: 1; grid-row: 1 / 3; }
.references-grid--editorial .project-card--featured .tile__surface {
  display: grid;
  grid-template-rows: minmax(310px,1fr) auto;
}
.references-grid--editorial .project-card--secondary .tile__surface {
  display: grid;
  grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr);
  grid-template-rows: 1fr;
  min-height: 252px;
}
.references-grid--editorial .project-card__media { position: relative; min-width: 0; min-height: 0; }
.references-grid--editorial .project-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
}
.references-grid--editorial .project-card--secondary:nth-child(2) .project-card__image { object-position: 38% center; }
.references-grid--editorial .project-card--secondary:nth-child(3) .project-card__image { object-position: 50% center; }
.references-grid--editorial .project-card__body {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
  padding: 25px 27px 24px;
  border-top: 1px solid var(--rule);
  min-width: 0;
}
.references-grid--editorial .project-card--secondary .project-card__body {
  padding: 23px 22px;
  border-top: 0;
  border-left: 1px solid var(--rule);
}
.references-grid--editorial .project-card__body .eyebrow { font-size: 9px; }
.references-grid--editorial .project-card__body h3 { font-size: 25px; font-weight: 700; line-height: 1.12; }
.references-grid--editorial .project-card--featured .project-card__body h3 { font-size: 31px; }
.references-grid--editorial .project-card__body p { font-size: 13px; line-height: 1.65; }
.project-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 7px 0 2px;
  min-height: 36px;
  margin-top: auto;
  font: 700 13px/1.4 var(--sans);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.project-link span { font: 20px/1 var(--sans); }
.project-link:hover { color: var(--palette-taupe); }
.references-actions { justify-content: flex-start; }
.references-actions .button { min-height: 44px; }

/* The original contact information stays in its established two-column panel. */
.contact-main .chapter-label { margin-bottom: 13px; }
.contact-details { gap: 16px 23px; }
.contact-details .contact-telephone {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  text-decoration-thickness: 1.25px;
}
.contact-details__item { min-width: 0; }

/* Shared subpage opening: breadcrumb, original title and original description. */
.subpage #main-content { min-height: 65vh; padding-bottom: 86px; }
.page-hero { padding: 34px 0 68px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.breadcrumb li + li::before { content: '/'; display: inline-block; margin-right: 9px; opacity: .6; }
.breadcrumb a { text-decoration-thickness: 1px; }
.page-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.02fr);
  align-items: center;
  gap: 65px;
  margin-top: 48px;
}
.page-heading h1 { font-size: clamp(43px,4.6vw,64px); font-weight: 700; }
.page-heading > p { max-width: 57ch; border-left: 1px solid var(--rule); padding-left: 27px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.page-heading .eyebrow { margin-bottom: 13px; }
.site-nav__link[aria-current=page] { font-weight: 700; }
.site-footer .footer-nav a[aria-current=page] { font-weight: 700; }

/* Reference archive. The overview, descriptions, external links and every
   original gallery caption are preserved; photographs are not re-generated. */
.reference-section { padding-top: 0; }
.reference-intro { margin-bottom: 28px; }
.reference-intro h2 { font-size: 36px; }
.project-index { margin-bottom: 48px; }
.project-index ul { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; list-style: none; padding: 0; }
.project-index a {
  display: grid;
  grid-template-columns: 25px minmax(0,1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 0;
  border-block: 1px solid var(--rule);
  font: 600 18px/1.35 var(--serif);
  text-decoration: none;
}
.project-index__number { font: 700 11px/1.4 var(--sans); letter-spacing: .05em; color: var(--palette-taupe); }
.project-index a:hover { background: rgba(201,211,192,.3); }
.project-detail { scroll-margin-top: 118px; margin-bottom: 88px; }
.project-detail__intro .tile__surface { padding: 0; }
.reference-card__image { display: block; width: 100%; aspect-ratio: 2.35; object-fit: cover; object-position: center; }
.project-detail__body {
  display: grid;
  grid-template-columns: minmax(0,.84fr) minmax(0,1.16fr);
  gap: 13px 44px;
  padding: 30px 35px 32px;
  border-top: 1px solid var(--rule);
}
.project-detail__body .chapter-label { grid-column: 1; grid-row: 1; margin: 0; }
.project-detail__body h2 { grid-column: 1; grid-row: 2; font-size: 34px; font-weight: 700; }
.project-detail__body > p { grid-column: 2; grid-row: 1 / 4; align-self: center; color: var(--muted); line-height: 1.8; font-size: 15px; }
.detail-contact-link { grid-column: 1; grid-row: 3; justify-self: start; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; padding: 4px 0; font-size: 13px; font-weight: 700; }
.text-link span { font-size: 20px; }
.project-gallery-section { padding-top: 30px; }
.project-gallery-heading { margin-bottom: 21px; font-size: 24px; }
.project-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; align-items: stretch; }
.project-photo .tile__surface { display: flex; flex-direction: column; padding: 0; }
.project-gallery__image { line-height: 0; margin: 0; overflow: hidden; }
.project-gallery__image img { display: block; width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; }
.project-photo figcaption { padding: 17px 22px 19px; font-size: 13px; line-height: 1.7; color: var(--muted); border-top: 1px solid var(--rule); }
.reference-cta .tile__surface { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 30px; align-items: center; padding: 34px 36px; }
.reference-cta h2 { font-size: 34px; color: var(--ivory); }
.reference-cta p { max-width: 65ch; margin-top: 12px; font-size: 15px; line-height: 1.7; }
.reference-cta .button { white-space: nowrap; }

/* Legal pages: visual redesign only. No changes to the legal content. */
.legal-grid { display: grid; grid-template-columns: 238px minmax(0,1fr); gap: 42px; align-items: start; }
.legal-nav-card { position: sticky; top: 112px; }
.legal-nav-card .tile__surface { padding: 23px 23px 21px; }
.legal-nav-card strong { display: block; margin-bottom: 15px; font: 700 20px/1.3 var(--serif); }
.legal-nav-card ul { list-style: none; padding: 0; }
.legal-nav-card li + li { border-top: 1px solid var(--rule); }
.legal-nav-card a { display: block; padding: 10px 0; min-height: 44px; font-size: 13px; line-height: 1.65; text-decoration: none; }
.legal-nav-card a:hover { text-decoration: underline; }
.legal-content { display: grid; gap: 28px; min-width: 0; }
.legal-card { scroll-margin-top: 116px; }
.legal-card .tile__surface { padding: 30px 34px 32px; }
.legal-card h2 { font-size: 29px; font-weight: 700; line-height: 1.22; }
.legal-card h2 + *, .legal-card h3 + * { margin-top: 17px; }
.legal-card p, .legal-card li, .legal-card address { font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.legal-card p + p, .legal-card ul + p, .legal-card p + ul { margin-top: 15px; }
.legal-card ul { padding-left: 22px; }
.legal-card li + li { margin-top: 8px; }
.legal-card address { font-style: normal; }
.legal-card address span { display: block; }
.legal-card a { overflow-wrap: anywhere; }
.legal-card .notice { margin-top: 17px; padding: 15px 18px; border-left: 2px solid var(--palette-taupe); background: rgba(247,248,242,.45); }

/* Accessible fallbacks and narrow-screen adaptations. */
.no-js .tile__surface { clip-path: inset(1px); }
.no-js .video-control { display: none; }
@media (max-width: 1180px) {
  .references-grid--editorial .project-card__body { padding: 22px; }
  .references-grid--editorial .project-card--secondary .project-card__body { padding: 21px 18px; }
  .page-heading { gap: 40px; }
}
@media (max-width: 1100px) and (min-width: 681px) {
  .references-grid--editorial { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto auto; }
  .references-grid--editorial .project-card--featured { grid-column: 1 / -1; grid-row: auto; }
  .references-grid--editorial .project-card--featured .tile__surface { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: minmax(290px,auto); }
  .references-grid--editorial .project-card--featured .project-card__body { border-left: 1px solid var(--rule); border-top: 0; justify-content: center; }
  .references-grid--editorial .project-card--secondary .tile__surface { display: flex; flex-direction: column; min-height: 0; }
  .references-grid--editorial .project-card--secondary .project-card__media { aspect-ratio: 1.6; }
  .references-grid--editorial .project-card--secondary .project-card__body { flex: 1; border-left: 0; border-top: 1px solid var(--rule); padding: 23px; }
}
@media (max-width: 1024px) {
  .legal-grid { grid-template-columns: 200px minmax(0,1fr); gap: 28px; }
  .project-detail__body { gap: 15px 30px; padding: 29px; }
  .project-detail__body h2 { font-size: 30px; }
  .project-index ul { gap: 22px; }
  .project-index a { font-size: 17px; }
}
@media (max-width: 832px) {
  .section-heading > p { padding-left: 20px; }
  .section-heading { gap: 19px; }
  .page-hero { padding: 26px 0 48px; }
  .page-heading { grid-template-columns: 1fr; gap: 20px; margin-top: 33px; }
  .page-heading > p { max-width: 66ch; padding-left: 20px; font-size: 15px; }
  .page-heading h1 { font-size: 48px; }
  .legal-grid { grid-template-columns: 1fr; }
  .legal-nav-card { position: relative; top: auto; }
  .legal-nav-card ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
  .legal-nav-card li + li { border: 0; }
  .reference-cta .tile__surface { grid-template-columns: 1fr; gap: 23px; }
  .reference-cta .button { justify-self: start; }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 14px; }
  .no-js .menu-button { display: none; }
  .no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; width: 100%; padding: 10px 0; background: none; box-shadow: none; }
  .no-js .site-nav__list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
}
@media (max-width: 680px) {
  .chapter-label,.section-heading .chapter-label { font-size: 9px; letter-spacing: .12em; gap: 8px; margin-bottom: 10px; }
  .section-heading > p { padding-left: 17px; }
  .hero-discover { font-size: 12px; margin-top: 14px; }
  .references-grid--editorial { grid-template-columns: 1fr; grid-template-rows: none; gap: 30px; }
  .references-grid--editorial .project-card--featured { grid-column: auto; grid-row: auto; }
  .references-grid--editorial .project-card--featured .tile__surface,
  .references-grid--editorial .project-card--secondary .tile__surface { display: flex; flex-direction: column; min-height: 0; }
  .references-grid--editorial .project-card__media { width: 100%; aspect-ratio: 1.6; }
  .references-grid--editorial .project-card__body,
  .references-grid--editorial .project-card--secondary .project-card__body { padding: 22px 23px; border-left: 0; border-top: 1px solid var(--rule); gap: 12px; }
  .references-grid--editorial .project-card__body h3,
  .references-grid--editorial .project-card--featured .project-card__body h3 { font-size: 26px; }
  .project-link { margin-top: 2px; }
  .project-index ul { grid-template-columns: 1fr; gap: 0; }
  .project-index a { border-top: 0; min-height: 58px; }
  .project-index li:first-child a { border-top: 1px solid var(--rule); }
  .project-index { margin-bottom: 34px; }
  .reference-intro h2 { font-size: 31px; }
  .reference-card__image { aspect-ratio: 1.5; }
  .project-detail { margin-bottom: 58px; }
  .project-detail__body { display: flex; flex-direction: column; gap: 13px; padding: 24px; }
  .project-detail__body h2 { font-size: 30px; }
  .project-detail__body > p { font-size: 14px; align-self: stretch; }
  .project-gallery-section { padding-top: 26px; }
  .project-gallery-heading { font-size: 22px; margin-bottom: 19px; }
  .project-gallery { grid-template-columns: 1fr; gap: 25px; }
  .project-photo figcaption { font-size: 13px; padding: 17px 21px; }
  .reference-cta .tile__surface { padding: 28px 25px; }
  .reference-cta h2 { font-size: 31px; }
  .reference-cta p { font-size: 14px; }
  .page-heading h1 { font-size: 44px; }
  .subpage #main-content { padding-bottom: 54px; }
  .legal-card .tile__surface { padding: 26px 24px; }
  .legal-card h2 { font-size: 26px; overflow-wrap: anywhere; }
  .legal-card p,.legal-card li,.legal-card address { font-size: 14px; line-height: 1.8; }
  .legal-nav-card .tile__surface { padding: 23px; }
}
@media (max-width: 380px) {
  .legal-nav-card ul { grid-template-columns: 1fr; }
  .legal-card .tile__surface { padding: 24px 21px; }
  .project-detail__body { padding: 23px 21px; }
}
@media (forced-colors:active) {
  .chapter-label,.chapter-label__number,.project-index__number { color: CanvasText; }
  .section-heading > p,.page-heading > p,.project-index a,.project-card__body { border-color: CanvasText; }
  .hero-discover,.reference-cta h2,.reference-cta p { color: CanvasText; }
}
@media print {
  .hero-discover,.breadcrumb,.project-index,.legal-nav-card,.appearance-entry { display: none !important; }
  .page-hero { padding-block: 20px; }
  .legal-grid { display: block; }
  .legal-card,.project-detail__intro,.project-photo { break-inside: avoid; }
  .legal-card { margin-bottom: 20px; }
  .references-grid--editorial { display: block; }
  .references-grid--editorial .project-card { margin-bottom: 20px; }
  .references-grid--editorial .project-card__media { min-height: 250px; }
  .reference-cta h2,.reference-cta p { color: var(--ink); }
}

/* Underline the action words, not the directional arrow. */
.project-link,.text-link { text-decoration:none; }
.project-link > .project-link__label,.text-link > .text-link__label { font:inherit; text-decoration:underline; text-underline-offset:5px; }
