/* Fritz Jahn: beige paper ground, floating controls, a draggable gallery of every image and an About page.
   Brand: FJ monogram, Jessen Cicero for display, Instrument Sans for text, purple and gold from the logo. */
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "Jessen Cicero"; src: url("../fonts/jessen-cicero-12.otf") format("opentype"); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F4EFE6;
  --paper-2: #EDE6DA;
  --ink: #121110;
  --soft: #6B645E;
  --line: rgba(18, 17, 16, .12);
  --line-strong: rgba(18, 17, 16, .28);
  --purple: #912C65;
  --purple-deep: #7A2455;
  --gold: #DED237;
  --pale: #F1DCE8;

  --f-display: "Jessen Cicero", "UnifrakturCook", Georgia, serif;
  --f-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --m: clamp(20px, 3.4vw, 56px);
  --s-small: .875rem;
  --s-body: clamp(1.0625rem, 1rem + .2vw, 1.1875rem);
  --s-lead: clamp(1.3rem, 1.1rem + .8vw, 1.875rem);
  --s-h2: clamp(3rem, 1.6rem + 5vw, 6.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --cell: 18.5vw;
  --gap: 5vw;
  --off: 10vw;
  --panel: min(46vw, 660px);

  /* The view switch floats at the bottom; the footer bar is exactly as tall as the switch plus its gap above and below */
  --sw-h: 58px;
  --sw-b: 18px;
  --bar: calc(var(--sw-h) + 2 * var(--sw-b));
}
@media (max-width: 700px) {
  :root { --cell: 46vw; --gap: 9vw; --off: 22vw; --panel: 100vw; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  --bg: var(--paper); --fg: var(--ink); --fg-soft: var(--soft);
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-text); font-size: var(--s-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .9s var(--ease), color .9s var(--ease);
}
/* The heraldry scene fades the page to aubergine: the drawings sit on it like sheets of paper */
body.dark { --bg: #1C0E17; --fg: var(--paper); --fg-soft: #B9A6B1; }
body.dark .her-step .num { color: var(--gold); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 70; background: var(--bg); transition: background-color .9s var(--ease); }
a { color: inherit; }
::selection { background: var(--purple); color: var(--paper); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
h2 { font-family: var(--f-display); font-size: var(--s-h2); line-height: .92; letter-spacing: -.01em; }
p { margin: 0; max-width: 62ch; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
.pad { padding-left: max(var(--m), env(safe-area-inset-left, 0px)); padding-right: max(var(--m), env(safe-area-inset-right, 0px)); }
.lead { font-size: var(--s-lead); line-height: 1.32; }

/* ---------- Floating controls ---------- */
.glass {
  background: rgba(244, 239, 230, .62);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
          backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(18, 17, 16, .08);
  box-shadow: 0 14px 34px -18px rgba(60, 35, 15, .38), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: background-color .9s var(--ease);
}
/* On the aubergine heraldry chapter the glass stays paper-light, so its ink text needs no colour change */
body.dark .glass { background: rgba(244, 239, 230, .84); }
.top {
  position: fixed; z-index: 30; left: 0; right: 0; top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; padding: 5px 18px 5px 5px; border-radius: 999px; color: var(--ink); text-decoration: none; min-width: 0; transition: transform .3s var(--ease), background-color .9s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand img { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--f-display); font-size: 1.15rem; letter-spacing: .14em; line-height: 1; padding-top: 3px; white-space: nowrap; }
.brand-where { font-size: var(--s-small); color: var(--soft); padding-left: 12px; border-left: 1px solid var(--line-strong); white-space: nowrap; }
@media (max-width: 700px) { .brand-where { display: none; } .brand-name { font-size: 1rem; } }

/* Language toggle: Fritz' two little shields, the purple pill slides between them */
.lang {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  font-size: .875rem; font-weight: 600; letter-spacing: .02em;
}
.lang a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px 0 13px; border-radius: 999px;
  color: var(--soft); text-decoration: none; transition: color .35s, transform .2s;
}
.lang a img { width: 15px; height: 19px; flex: none; transition: transform .5s var(--spring); }
.lang a:hover { color: var(--ink); }
.lang a:hover img { transform: rotate(-10deg) scale(1.12); }
.lang a.on, .lang a.on:hover { color: var(--paper); }
.lang a:active { transform: scale(.95); }
.lang a:focus-visible { outline-offset: -2px; }
.lang-ind {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: var(--purple); box-shadow: 0 8px 18px -8px rgba(145, 44, 101, .8);
  transition: transform .65s var(--spring);
}
.lang[data-active="en"] .lang-ind { transform: translateX(100%); }
@media (max-width: 380px) { .lang a span { display: none; } .lang a { padding: 0 13px; } }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 22px; border-radius: 999px;
  background: var(--purple); color: var(--paper);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 12px 26px -12px rgba(145, 44, 101, .75);
  transition: background-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.btn:hover { background: var(--purple-deep); transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(145, 44, 101, .85); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-roll { display: inline-grid; overflow: hidden; line-height: 1.3; height: 1.3em; }
.btn-roll > span { grid-area: 1 / 1; transition: transform .5s var(--ease); }
.btn-roll > span + span { transform: translateY(110%); }
.btn:hover .btn-roll > span:first-child { transform: translateY(-110%); }
.btn:hover .btn-roll > span + span { transform: none; }
.btn-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--purple); display: grid; place-items: center; transition: transform .5s var(--ease); }
.btn:hover .btn-ico { transform: rotate(45deg); }

.switch {
  position: fixed; z-index: 30; left: 50%; bottom: calc(var(--sw-b) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px;
  font-size: .9375rem; font-weight: 600;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.switch a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 128px; height: calc(var(--sw-h) - 12px); padding: 0 20px; border-radius: 11px;
  color: var(--soft); text-decoration: none; transition: color .35s, transform .2s;
}
.switch a:hover { color: var(--ink); }
.switch a.on, .switch a.on:hover { color: var(--paper); }
.switch a:active { transform: scale(.96); }
.switch a:focus-visible { outline-offset: -2px; }
.switch-ind {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 11px;
  background: var(--purple); box-shadow: 0 8px 18px -8px rgba(145, 44, 101, .8);
  transition: transform .65s var(--spring), opacity .35s var(--ease);
}
.switch[data-active="galerie"] .switch-ind { transform: translateX(100%); }
.switch[data-active="none"] .switch-ind { opacity: 0; transform: scale(.7); }
.details-open .switch { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }

/* ---------- Page transition ---------- */
/* The curtain and the details panel are only in the page while they are shown (.on, .details without .off),
   so no invisible full-screen layer lies over the page in between */
.curtain {
  position: fixed; inset: 0; z-index: 60; background: var(--purple);
  display: none; place-items: center; pointer-events: none;
  clip-path: inset(100% 0 0 0);
}
.curtain.on, .arrive .curtain { display: grid; }
.curtain img { width: 112px; height: 112px; opacity: 0; transform: scale(.7) rotate(-14deg); transition: opacity .45s var(--ease), transform .7s var(--spring); }
.curtain.cover { clip-path: inset(0 0 0 0); transition: clip-path .62s var(--ease-io); pointer-events: auto; }
.curtain.cover img { opacity: 1; transform: none; transition-delay: .18s; }
.curtain.leave { clip-path: inset(0 0 100% 0); transition: clip-path .62s var(--ease-io); }
.curtain.leave img { opacity: 0; transform: scale(1.08); transition-delay: 0s; }
/* A page opened from the other language starts covered, then the curtain lifts */
.arrive .curtain { clip-path: inset(0 0 0 0); }
.arrive .curtain img { opacity: 1; transform: none; }

/* Safari on iOS 26 colours its bars after the fixed layer at the middle of each screen edge. If that layer is as large
   as the screen (curtain, gallery, the pinned scenes) it keeps whatever colour it had, so the purple of the first curtain
   stayed for good. These two strips lie above everything at the edges and are not screen-sized, so Safari reads their
   colour each time: the bars follow the page. They are taller than 10px and at least 10% opaque, or Safari skips them. */
.edge {
  position: fixed; z-index: 80; left: 0; right: 0; height: 12px; pointer-events: none;
  opacity: .12; background: var(--bg); transition: background-color .9s var(--ease);
}
.edge-top { top: 0; }
.edge-bottom { bottom: 0; }
.edge.purple { background: var(--purple); }
.edge.deep { background: var(--purple-deep); }
/* The curtain covers from the bottom up and lifts from the bottom up, so the bottom bar turns first and returns first */
.curtain.cover ~ .edge, .curtain.leave ~ .edge-top, .arrive .edge { background: var(--purple); transition-duration: .35s; }
.curtain.cover ~ .edge-top { transition-delay: .3s; }
@media (max-width: 700px) { .details-open .edge { background: var(--purple); } }

/* ---------- Gallery ---------- */
.app .gallery { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
.app body:not(.is-gallery) .gallery { display: none; }
.app body.is-gallery { overflow: hidden; }
.g-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; transition: transform 1s var(--ease-io); }
.g-view.dragging { cursor: grabbing; }
.details-open .g-view { transform: translateX(calc(var(--panel) * -.5)); cursor: default; }
.g-grid { position: absolute; top: 0; left: 0; display: flex; gap: var(--gap); will-change: transform; }
.app .g-grid { opacity: 0; transition: opacity .9s var(--ease); }
.app .g-grid.ready { opacity: 1; }
.g-col { display: flex; flex-direction: column; gap: var(--gap); }
.g-col:nth-child(even) { margin-top: var(--off); }
.g-item {
  all: unset; position: relative; display: block; width: var(--cell); aspect-ratio: 1 / 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.g-item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: transform .65s var(--ease), opacity .65s var(--ease);
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.g-item.out img { transform: scale(.5); opacity: 0; }
.g-view:not(.dragging) .g-item:hover img { transform: scale(1.05); }
.g-item::after {
  content: attr(data-title); position: absolute; left: 50%; top: calc(100% + 10px); transform: translate(-50%, 6px);
  font-size: .8125rem; font-weight: 500; color: var(--soft); white-space: nowrap; opacity: 0; transition: opacity .35s, transform .35s var(--ease);
  pointer-events: none;
}
.g-view:not(.dragging) .g-item:hover::after { opacity: 1; transform: translate(-50%, 0); }
.g-item:focus-visible { outline: 3px solid var(--purple); outline-offset: 8px; border-radius: 10px; }
.g-item.is-open img { visibility: hidden; }

.g-caption {
  position: absolute; z-index: 5; left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  max-width: 320px; padding: 12px 12px 14px 18px; border-radius: 16px; pointer-events: none;
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s;
}
.g-cap-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.g-caption h2 { font-family: var(--f-display); font-size: 1.25rem; line-height: 1; padding-top: 4px; }
.g-caption p { margin-top: 6px; padding-right: 6px; font-size: .9375rem; line-height: 1.4; }
.g-caption .g-hint { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--purple); font-size: .8125rem; font-weight: 600; }
.g-cap-x {
  position: relative; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; pointer-events: auto;
  background: rgba(18, 17, 16, .07); color: var(--ink);
  transition: background-color .25s, color .25s, transform .45s var(--ease);
}
.g-cap-x span::before, .g-cap-x span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; margin: -.8px 0 0 -6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.g-cap-x span::after { transform: rotate(-45deg); }
.g-cap-x:hover { background: var(--purple); color: var(--paper); transform: rotate(90deg); }
.g-cap-x:active { transform: rotate(90deg) scale(.9); }
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }
.details-open .g-caption { opacity: 0; transform: translateY(12px); }
.g-caption.gone { opacity: 0; transform: translateY(14px) scale(.97); visibility: hidden; transition: opacity .4s var(--ease), transform .55s var(--ease), visibility 0s linear .55s; }
@media (max-width: 860px) {
  .g-caption { top: calc(74px + env(safe-area-inset-top, 0px)); bottom: auto; right: max(14px, env(safe-area-inset-right, 0px)); max-width: none; padding: 10px 10px 12px 16px; }
  .g-caption h2 { font-size: 1.15rem; }
  .g-caption p:not(.g-hint) { display: none; }
  .g-caption .g-hint { margin-top: 4px; }
  .g-caption.gone { transform: translateY(-14px) scale(.97); }
}

/* Details panel */
.details {
  position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: var(--panel);
  display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 16px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) clamp(22px, 3vw, 48px) calc(28px + env(safe-area-inset-bottom, 0px));
  background: var(--purple); color: var(--paper);
  transform: translateX(100%); visibility: hidden;
  transition: transform 1s var(--ease-io), visibility 0s linear 1s;
}
.details.open { transform: none; visibility: visible; transition: transform 1s var(--ease-io); }
.details.off { display: none; }
.d-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.d-cat { color: var(--gold); font-size: var(--s-small); font-weight: 600; opacity: 0; transition: opacity .5s var(--ease); }
.details.open .d-cat { opacity: 1; transition-delay: .45s; }
.d-close { position: relative; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(244, 239, 230, .14); transition: background-color .25s, transform .4s var(--ease); }
.d-close:hover { background: rgba(244, 239, 230, .26); transform: rotate(90deg); }
.d-close span::before, .d-close span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: var(--paper); transform: rotate(45deg); }
.d-close span::after { transform: rotate(-45deg); }
.d-close:focus-visible { outline-color: var(--gold); }
.d-title { font-family: var(--f-display); font-size: clamp(2.4rem, 1.2rem + 3vw, 4.4rem); line-height: 1; letter-spacing: -.01em; padding-bottom: .08em; }
.d-title .w { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.d-title .ch { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: 0s; }
.details.open .d-title .ch { transform: none; transition-delay: calc(var(--ci) * 18ms + .38s); }
.d-desc { max-width: 38ch; font-size: 1.125rem; line-height: 1.45; color: var(--pale); opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.details.open .d-desc { opacity: 1; transform: none; transition-delay: .6s; }
.d-thumb { position: relative; min-height: 0; }
.flyer { position: fixed; z-index: 45; object-fit: contain; pointer-events: none; }
.d-thumb .flyer { position: absolute; inset: 0; width: 100%; height: 100%; }

.cross { position: fixed; z-index: 35; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; display: none; }
@media (hover: hover) { .cross { display: block; } }
.cross span { position: absolute; inset: 0; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .45s var(--spring); }
.cross span::before, .cross span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px; background: var(--ink); transform: rotate(45deg); }
.cross span::after { transform: rotate(-45deg); }
@media (hover: hover) { .details-open .cross.on span { transform: scale(1); } }

/* Without the app script the gallery is a plain grid */
html:not(.app) .g-view { position: static; overflow: visible; cursor: auto; touch-action: auto; }
html:not(.app) .g-grid { position: static; flex-wrap: wrap; justify-content: center; padding: 120px var(--m) 80px; }
html:not(.app) .g-caption { position: static; margin: 0 var(--m); }

/* ---------- About ---------- */
.app .about-view { display: none; }
.app body.is-about .about-view { display: block; }
.app body.details-open { overflow: hidden; }
.scrim { position: fixed; inset: 0; z-index: 39; display: none; cursor: pointer; }
.details-open .scrim { display: block; }
@media (hover: hover) { .details-open .scrim { cursor: none; } }

/* Start: the pile of twelve coats of arms spreads into a grid (static base first) */
.intro { padding-top: 120px; }
.intro-copy { display: grid; gap: 28px; }
.intro h1 { font-family: var(--f-display); font-size: clamp(3.4rem, 1.4rem + 6.4vw, 8.4rem); line-height: .9; letter-spacing: -.015em; }
.intro h1 .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.intro h1 .ln > span { display: inline-block; }
.intro-lead { font-size: var(--s-lead); line-height: 1.32; max-width: 26ch; }
.cue { color: var(--purple); font-size: var(--s-small); font-weight: 600; text-decoration: none; display: inline-flex; gap: 10px; align-items: center; width: fit-content; }
.cue::after { content: "↓"; display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
.gal-head { margin: 96px 0 32px; }
.gal-head h2 { font-size: clamp(2.4rem, 1.4rem + 3vw, 4.2rem); }
.gal-head p { margin-top: 8px; color: var(--fg-soft); }
.gal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tile { position: relative; --lift: 0; }
.tile-btn { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tile img { width: 100%; height: 100%; object-fit: contain; transition: transform .45s var(--ease); filter: drop-shadow(0 calc(var(--lift) * 14px) calc(var(--lift) * 22px) rgba(70, 45, 25, calc(var(--lift) * .14))); }
.tile-btn:hover img { transform: translateY(-6px) scale(1.03); }
.tile-btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 6px; border-radius: 10px; }
.tile-btn.is-open img { visibility: hidden; }
@media (max-width: 700px) { .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.motion .intro { padding-top: 0; }
.motion .intro-stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }.motion .intro-copy, .motion .gal-head, .motion .gal-grid { padding-left: 0; padding-right: 0; }
.motion .intro-copy { position: absolute; z-index: 2; left: max(var(--m), env(safe-area-inset-left, 0px)); top: 22vh; width: min(44vw, 640px); }
.motion .gal-head { position: absolute; margin: 0; left: max(var(--m), env(safe-area-inset-left, 0px)); right: max(var(--m), env(safe-area-inset-right, 0px)); top: 92px; visibility: hidden; }
.motion .gal-grid {
  position: absolute; left: max(var(--m), env(safe-area-inset-left, 0px)); right: max(var(--m), env(safe-area-inset-right, 0px));
  top: calc(92px + clamp(2.4rem, 1.4rem + 3vw, 4.2rem) + 64px); bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2.2vh 24px;
}
@media (max-width: 1024px) { .motion .gal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .motion .intro-copy { top: calc(100px + env(safe-area-inset-top, 0px)); width: auto; right: max(var(--m), env(safe-area-inset-right, 0px)); gap: 18px; }
  .motion .intro-lead { max-width: 30ch; font-size: 1.125rem; }
  .motion .gal-head { top: 80px; }
  .motion .gal-head p { display: none; }
  .motion .gal-grid { top: 150px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .motion .cue { display: none; }
}

/* Über mich gets clearly more air than the other sections: it follows the pinned heraldry scene and precedes Referenzen */
.intro-about { padding-block: clamp(200px, 30vh, 340px) clamp(170px, 24vh, 300px); }
@media (max-width: 700px) { .intro-about { padding-block: clamp(150px, 20vh, 200px) clamp(110px, 14vh, 150px); } }
.ia-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 6vw; align-items: center; }
.ia-text { display: grid; gap: 22px; }
.ia-text h2 { margin-bottom: 10px; }
.ia-text .lead { max-width: 30ch; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 26px 0 0; }
.stats div { display: grid; gap: 6px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.stats dt { color: var(--purple); font-family: var(--f-display); font-size: clamp(3.6rem, 2rem + 5vw, 7rem); line-height: .85; font-variant-numeric: tabular-nums; }
.stats dd { margin: 0; max-width: 24ch; color: var(--soft); }
.ia-fig img { width: 100%; max-height: 80vh; object-fit: contain; mix-blend-mode: multiply; }
@media (max-width: 860px) { .ia-grid { grid-template-columns: 1fr; } .ia-fig { max-width: 420px; } }

/* Heraldik */
.her { padding-block: clamp(96px, 12vh, 160px); }
.her-stage { display: grid; gap: 48px; }
.her-text { display: grid; gap: 40px; max-width: 640px; }
.her-step { display: grid; gap: 16px; }
.her-step .num { font-family: var(--f-display); font-size: 4rem; line-height: .8; color: var(--purple); }
.her-step h3 { font-family: var(--f-display); font-size: clamp(2.2rem, 1.3rem + 2.6vw, 3.6rem); line-height: .95; }
.her-intro p:first-of-type { font-size: var(--s-lead); line-height: 1.32; }
.her-step:not(.her-intro) p { font-size: var(--s-lead); line-height: 1.34; max-width: 30ch; }
.her-art { position: relative; }
.st-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.st { background: var(--paper); isolation: isolate; }
.st img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.st-line { display: none; }

.motion .her { padding-block: 0; }
.motion .her-stage { height: 100vh; height: 100svh; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 4vw; }
.motion .her-text { position: relative; height: 70vh; display: block; }
.motion .her-step { position: absolute; inset: 0; align-content: center; }
.motion .her-step:not(.her-intro) { visibility: hidden; }
.motion .her-art { display: grid; height: 86vh; align-content: center; justify-items: center; }
.motion .st-box { display: block; position: relative; height: calc(86vh - 40px); aspect-ratio: 1000 / 1414; max-width: 100%; }
.motion .her-art .st { position: absolute; inset: 0; width: 100%; height: 100%; }
.motion .her-art .st-ink, .motion .her-art .st-color { clip-path: inset(0 100% 0 0); }
.motion .st-line { display: block; position: absolute; top: -2%; bottom: -2%; width: 2px; left: 0; margin-left: -1px; background: var(--purple); opacity: 0; }
/* Narrow screens: the text on top, as tall as its longest step, and the drawing fills the room down to the view switch */
@media (max-width: 860px) {
  .motion .her-stage {
    grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 24px;
    padding-top: calc(84px + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--sw-h) + var(--sw-b) + 16px + env(safe-area-inset-bottom, 0px));
  }
  .motion .her-text { display: grid; height: auto; }
  .motion .her-step { position: relative; inset: auto; grid-area: 1 / 1; align-content: start; gap: 10px; }
  .motion .her-art { display: block; position: relative; height: auto; min-height: 0; }
  .motion .st-box { position: absolute; top: 0; left: 50%; translate: -50% 0; height: 100%; }
  .motion .her-step .num { font-size: 2.6rem; }
  .motion .her-step h3 { font-size: 2rem; }
  .motion .her-intro p:not(:first-of-type) { display: none; }
  .motion .her-intro p:first-of-type, .motion .her-step:not(.her-intro) p { font-size: 1.0625rem; max-width: none; }
}

/* Referenzen */
.refs { padding-block: clamp(96px, 12vh, 160px); }
.refs-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4vw; align-items: end; margin-bottom: clamp(56px, 7vw, 96px); }
.ref-group { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4vw; margin-bottom: clamp(40px, 5vw, 64px); }
.ref-group h3 { align-self: start; display: flex; align-items: center; gap: 12px; padding-top: 24px; color: var(--purple); font-size: .9375rem; font-weight: 600; }
.ref-group h3::before { content: ""; width: 7px; height: 7px; background: var(--purple); transform: rotate(45deg); flex: none; }
.ref-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ref-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0 19px; border-bottom: 1px solid var(--line); }
.ref-rows .t { font-size: clamp(1.3rem, 1rem + 1vw, 1.95rem); font-weight: 500; line-height: 1.15; letter-spacing: -.015em; transition: color .3s, transform .45s var(--ease); }
.ref-rows .d { flex: none; color: var(--soft); font-size: .9375rem; text-align: right; }
.ref-rows li:hover .t { color: var(--purple); transform: translateX(8px); }
@media (max-width: 860px) {
  .refs-head, .ref-group { grid-template-columns: 1fr; gap: 16px; }
  .ref-group h3 { padding-top: 0; }
  .ref-rows li { flex-direction: column; gap: 4px; }
  .ref-rows .d { text-align: left; }
}

/* Empfehlungen */
.recs { margin-top: clamp(48px, 6vw, 88px); border-radius: 22px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.recs-toggle {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(22px, 2.6vw, 34px) clamp(22px, 3vw, 40px);
}
.recs-toggle:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; border-radius: 22px; }
.recs-title { display: grid; gap: 6px; }
.rt-main { font-family: var(--f-display); font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.8rem); line-height: 1; }
.rt-sub { color: var(--soft); font-size: .9375rem; }
.recs-ico { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--purple); box-shadow: 0 10px 22px -12px rgba(145, 44, 101, .8); transition: transform .55s var(--spring), background-color .3s; }
.recs-ico::before, .recs-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: var(--paper); }
.recs-ico::after { transform: rotate(90deg); }
.recs-toggle:hover .recs-ico { transform: scale(1.07); }
.recs.open .recs-ico { transform: rotate(135deg); background: var(--ink); }
.recs.open .recs-toggle:hover .recs-ico { transform: rotate(135deg) scale(1.07); }
.recs-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .65s var(--ease-io); }
.recs.open .recs-body { grid-template-rows: 1fr; }
.recs-inner { overflow: hidden; min-height: 0; }
.recs-inner > .recs-note { padding: 0 clamp(22px, 3vw, 40px); max-width: calc(62ch + 80px); color: var(--soft); opacity: 0; transition: opacity .4s; }
.recs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px clamp(32px, 4vw, 64px); padding: 28px clamp(22px, 3vw, 40px) clamp(28px, 3vw, 40px); opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .6s var(--ease); }
.recs.open .recs-inner > .recs-note, .recs.open .recs-cols { opacity: 1; transform: none; transition-delay: .2s; }
.recs-cols h4 { font-size: .9375rem; font-weight: 600; color: var(--purple); margin-bottom: 12px; }
.recs-note.small { font-size: .9375rem; color: var(--soft); margin-bottom: 12px; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.links li { border-bottom: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; text-decoration: none; transition: color .25s; }
.links a > span:first-child { transition: transform .4s var(--ease); }
.links .host { flex: none; color: var(--soft); font-size: var(--s-small); transition: color .25s; }
.links .host::after { content: " ↗"; }
.links a:hover { color: var(--purple); }
.links a:hover > span:first-child { transform: translateX(6px); }
.links a:hover .host { color: var(--purple); }
@media (max-width: 760px) { .recs-cols { grid-template-columns: 1fr; } .recs-ico { width: 44px; height: 44px; } }

/* Kontakt: one screen, footer included */
.contact { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--purple); color: var(--paper); }
.contact :focus-visible { outline-color: var(--gold); }
/* Left: the invitation and the address as the one big action. Right: the other ways in, as a short list
   that ends on the same line as the address, so the screen is closed on both sides. */
.contact-main {
  flex: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto;
  column-gap: 6vw; align-content: center; padding-top: 112px; padding-bottom: clamp(48px, 8vh, 88px);
}
.c-intro { grid-column: 1; }
.contact h2 { font-size: clamp(2.3rem, 1rem + 4.3vw, 6rem); }
.contact .lead { margin-top: 22px; color: var(--pale); font-size: clamp(1.15rem, 1rem + .5vw, 1.5rem); }
.mail {
  grid-column: 1; align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: clamp(14px, 1.4vw, 22px); max-width: 100%;
  margin-top: clamp(40px, 6vh, 72px); text-decoration: none;
}
.s-k { color: var(--pale); font-size: .9375rem; }
.mail-v {
  font-size: clamp(1.7rem, .9rem + 2.6vw, 3.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05;
  overflow-wrap: anywhere; padding-bottom: 8px;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 2px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
}
.mail-ico {
  flex: none; width: clamp(44px, 3.6vw, 60px); height: clamp(44px, 3.6vw, 60px); border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); transition: transform .55s var(--ease);
}
.mail:hover .mail-v, .mail:focus-visible .mail-v { background-size: 100% 5px; color: var(--gold); }
.mail:hover .mail-ico, .mail:focus-visible .mail-ico { transform: rotate(45deg) scale(1.06); }
.mail:active .mail-ico { transform: rotate(45deg) scale(.94); }

.socials { grid-column: 2; grid-row: 1 / span 2; align-self: end; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 4px;
  padding: 18px 0; border-top: 1px solid rgba(244, 239, 230, .2); text-decoration: none;
}
.socials li:last-child a { border-bottom: 1px solid rgba(244, 239, 230, .2); }
.s-k { grid-column: 1; }
.s-v { grid-column: 1; font-size: clamp(1.25rem, 1rem + .7vw, 1.75rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; transition: color .3s, transform .45s var(--ease); }
.s-ico {
  grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(244, 239, 230, .35); transition: background-color .3s, border-color .3s, color .3s, transform .55s var(--ease);
}
.socials a:hover .s-v, .socials a:focus-visible .s-v { color: var(--gold); transform: translateX(6px); }
.socials a:hover .s-ico, .socials a:focus-visible .s-ico { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: rotate(45deg); }
@media (max-width: 900px) {
  .contact-main { grid-template-columns: 1fr; padding-top: 104px; }
  .socials { grid-column: 1; grid-row: auto; margin-top: 44px; }
}

/* Footer bar: exactly the height of the view switch plus its gaps, so the switch sits in its middle at the bottom */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px;
  min-height: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--purple-deep); color: var(--paper); font-size: var(--s-small);
}
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--pale); text-decoration: none; white-space: nowrap; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: color .25s, background-size .4s var(--ease); }
.foot-links a:hover, .foot-links a[aria-current] { color: var(--gold); background-size: 100% 1px; }

/* Designer credit: the smiley in the same circle as Fritz' monogram, white on purple with a gold ring */
.credit { display: inline-flex; align-items: center; gap: 16px; color: var(--pale); text-decoration: none; white-space: nowrap; transition: color .3s; }
.credit-t { display: grid; gap: 2px; line-height: 1.25; }
.credit-by { color: var(--paper); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; transition: color .3s; }
.credit:hover .credit-by, .credit:focus-visible .credit-by { color: var(--gold); }
.credit-badge {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--purple); border: 2px solid var(--gold); color: #fff;
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .55s var(--spring);
}
.credit-smiley {
  display: block; width: 66%; height: 66%; background: currentColor;
  -webkit-mask: url("../img/logo/sebek-smiley.svg") center / contain no-repeat;
          mask: url("../img/logo/sebek-smiley.svg") center / contain no-repeat;
  animation: credit-spin 14s linear infinite;
}
@keyframes credit-spin { to { transform: rotate(360deg); } }
.credit:hover, .credit:focus-visible { color: var(--gold); }
.credit:hover .credit-badge, .credit:focus-visible .credit-badge { background: var(--gold); color: var(--purple); transform: scale(1.08); }

/* Narrower than the bar can hold: content on top, the switch keeps its own band underneath */
@media (max-width: 859px) {
  .foot { padding-top: 24px; padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); min-height: 0; }
  .foot-links { flex-direction: column; align-items: flex-end; gap: 8px; }
}
@media (max-width: 420px) {
  .credit { gap: 12px; font-size: .8125rem; }
  .credit-by { font-size: 1rem; }
  .credit-badge { width: 56px; height: 56px; }
}

/* ---------- Impressum and Datenschutz ---------- */
.app .legal { display: none; }
.app body.is-legal .legal { display: flex; }
html:not(.app) .legal { display: none; }
.legal { min-height: 100vh; min-height: 100svh; flex-direction: column; }
.legal-main {
  flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 4vw; align-items: start;
  padding-top: clamp(132px, 18vh, 200px); padding-bottom: clamp(96px, 14vh, 180px);
}
.legal-head { position: sticky; top: 120px; display: grid; gap: 32px; justify-items: start; }
.legal-head h2 { font-size: clamp(3rem, 1.6rem + 4vw, 6rem); }
.legal-body { max-width: 66ch; }
.legal-body h3 { margin: 2.4em 0 .7em; font-size: clamp(1.2rem, 1.05rem + .45vw, 1.5rem); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.legal-body h3:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 .85em; }
.legal-body ul { list-style: none; margin: 0 0 .85em; padding: 0; }
.legal-body li { position: relative; padding-left: 1.5em; }
.legal-body li::before { content: "—"; position: absolute; left: 0; color: var(--purple); }
.legal-body a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-body a:hover { text-decoration-thickness: 2px; }
@media (max-width: 860px) {
  .legal-main { grid-template-columns: 1fr; padding-top: 120px; }
  .legal-head { position: static; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .g-item img, .g-view, .switch-ind, .lang-ind, .g-caption, .details, .d-title .ch, .d-desc, .curtain, .curtain img, .edge, .recs-body, .recs-cols, .recs-ico, .tile img { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .cue::after, .credit-smiley { animation: none; }
  .g-item.out img { transform: none; }
}
