/*
 * Bewusst-Zeit · site styles
 * Built on the shared design system of the Eva Marcial brand family (V1).
 * Fonts: Whisper (headlines, accents, logo, text in ovals) and Narnoor (everything else). No others.
 * No pill shapes: corners are square or nearly square; round things are hand-drawn ovals.
 */

:root {
  /* Bewusst-Zeit palette (brand/brand-kit.js) */
  --paper: #FEFADF;
  --tint: #E3EFE2;
  --ink: #543921;
  --accent: #57B7F2;
  --sky: #57B7F2;
  --coral: #F29D7E;
  --olive: #A69B03;
  --clay: #BF814B;

  --muted: rgba(84, 57, 33, 0.68);
  --line: rgba(84, 57, 33, 0.22);
  --photo-paper: #FFFEF6;

  --paper-texture: url("../brand/paper.svg");
  --brush: url("../img/brush.svg");

  /*
   * Type scale. Narnoor: four sizes for text (xl only for the phone menu).
   * Whisper: three heading sizes; the citation is a one-off.
   */
  --text-xs: 13.5px;   /* labels in capitals, captions, small notes */
  --text-s: 15px;      /* menus, form labels, footer */
  --text-m: 17px;      /* tables, forms, teasers */
  --text-l: 18px;      /* running text */
  --text-xl: 21px;     /* phone menu */
  --h1: clamp(50px, 9vw, 104px);
  --h2: clamp(40px, 5.4vw, 56px);
  --h3: clamp(32px, 4vw, 42px);

  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(20px, 5vw, 56px);

  /*
   * Spacing. One distance between blocks (title, pictures, ornaments,
   * dividers, text sections, gallery, two-column layouts), one before the
   * footer. Text blocks drop the margin of their first and last element, so
   * these distances never add up with paragraph or heading margins.
   */
  --space-block: 48px;

  /* widths: the frame of header and footer, wide content inside it */
  --frame: 1320px;
  --space-footer: 96px;
}

* {
  box-sizing: border-box;
}

/* the paper sits on html, so it stays while the page fades */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper) var(--paper-texture);
  background-blend-mode: multiply;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Narnoor";
  font-size: var(--text-l);
  line-height: 1.7;
}

/*
 * Page transitions: the old page dissolves into the new one (a cross-document
 * view transition). The header stays in place, so only the content changes.
 * Browsers without support simply open the next page.
 */
@view-transition {
  navigation: auto;
}

.site-header {
  view-transition-name: site-header;
}

/* while the logo intro plays, the header leaves with the old page instead of
   staying on top of the intro */
.intro .site-header {
  view-transition-name: none;
}

::view-transition-old(site-header):only-child {
  animation: 0.4s ease-in both page-out;
}

::view-transition-old(root) {
  animation: 0.6s ease-in both page-out;
}

::view-transition-new(root) {
  animation: 0.8s ease-out 0.1s both page-in;
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* links in running text sit on a brush stroke under the words;
   on hover a second stroke is painted over it from left to right */
.prose a,
.link {
  padding: 0 0.1em 0.1em;
  background-image: var(--brush), var(--brush);
  background-repeat: no-repeat;
  background-position: left bottom, left bottom;
  background-size: 0 0.5em, 100% 0.5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.45s ease;
}

.prose a.action,
.prose a.action:hover,
.prose a.action:focus-visible {
  padding: 0;
  background: none;
}

.prose a:hover,
.link:hover,
.prose a:focus-visible,
.link:focus-visible {
  background-size: 100% 0.5em, 100% 0.5em;
}

:focus-visible {
  outline: 1.5px dashed var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--paper);
}

.skip:focus {
  top: 12px;
}

/* ── Type ── */

h1,
h2,
h3 {
  font-family: "Whisper";
  font-weight: 400;
  line-height: 1.05;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

h1 {
  display: inline;
  margin: 0;
  padding: 0 0.2em;
  font-size: var(--h1);
  background: var(--brush) no-repeat center 88% / 100% 0.42em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

h2 {
  margin: 2.2em 0 0.4em;
  font-size: var(--h2);
}

h3 {
  margin: 1.6em 0 0.3em;
  font-size: var(--h3);
}

p {
  margin: 0 0 1.15em;
}

.kicker {
  display: block;
  margin-bottom: 14px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker a {
  background: var(--brush) no-repeat left 100% / 100% 0.7em;
}

/* a single line set as an accent in Whisper */
.accent-line {
  margin-block: var(--space-block);
  font-family: "Whisper";
  font-size: var(--h2);
  line-height: 1.15;
  text-align: center;
}

/* stands in for text that will be supplied */
.tbd {
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Layout ── */

.prose {
  width: min(var(--measure), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* the block distance alone separates text blocks from what is around them */
.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child,
main > :last-child,
.article > :last-child {
  margin-bottom: 0;
}

.wide {
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.page-head {
  position: relative;
  padding: 64px var(--gutter) 8px;
  text-align: center;
}

.page-head .lead {
  max-width: var(--measure);
  margin: 28px auto 0;
  /* centred text: even line lengths, no lone word on the last line */
  text-wrap: balance;
}

main {
  display: block;
  padding-bottom: 32px;
}

/* ── Ornaments (drawn by assets/js/site.js from the shared brand kit) ── */

.ornament svg,
[data-draw] svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ornament {
  width: min(300px, 72%);
  margin: var(--space-block) auto;
}

.ornament.small {
  width: min(220px, 60%);
}

.divider {
  width: min(280px, 70%);
  margin: var(--space-block) auto;
}

/* ── Header and navigation ── */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
}

.site-logo {
  flex: none;
  display: block;
}

.site-logo img {
  display: block;
  width: auto;
  height: 78px;
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-m);
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: inline-block;
  padding: 6px 2px;
}

/*
 * Menu lines: on hover a brush stroke is painted from left to right; when the
 * pointer leaves it dries away. The current page keeps its stroke.
 */
.site-nav li:not(.nav-action) > a,
.footer-nav a {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 2px 2px 9px;
}

.site-nav li:not(.nav-action) > a::after,
.footer-nav a::after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  bottom: 1px;
  z-index: -1;
  height: 12px;
  background: var(--brush) no-repeat center / 100% 100%;
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  /* leaving: fade slowly, then reset the stroke unseen */
  transition: opacity 1.2s ease, clip-path 0s linear 1.2s;
}

.site-nav li:not(.nav-action) > a:hover::after,
.site-nav li:not(.nav-action) > a:focus-visible::after,
.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: clip-path 0.45s cubic-bezier(0.3, 0.6, 0.35, 1), opacity 0.15s ease;
}

.site-nav li:not(.nav-action).is-active > a::after,
.footer-nav li.is-active a::after {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: none;
}

/*
 * Submenus have no box: the items rest on a faint wash that fades into the paper.
 */
.site-nav .sub {
  position: absolute;
  top: 100%;
  left: -36px;
  z-index: 30;
  isolation: isolate;
  margin: 0;
  padding: 12px 26px 18px 30px;
  list-style: none;
  font-size: var(--text-s);
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.5s ease, visibility 0s linear 0.35s;
}

.site-nav .has-sub:hover > .sub,
.site-nav .has-sub:focus-within > .sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* the paper fades out towards the edges, no hard border anywhere */
.site-nav .sub::before {
  content: "";
  position: absolute;
  inset: -20px -34px -14px -24px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(254, 250, 223, 0.97) 52%, rgba(254, 250, 223, 0.82) 72%, rgba(254, 250, 223, 0) 100%);
}

.site-nav .sub .sub-wash {
  position: absolute;
  inset: -4px -12px 2px -6px;
  z-index: -1;
  pointer-events: none;
}

.site-nav .sub .sub-wash svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.site-nav .sub > li:not([role]) {
  position: relative;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.site-nav .has-sub:hover > .sub > li,
.site-nav .has-sub:focus-within > .sub > li {
  opacity: 1;
  transform: none;
}

.site-nav .sub > li:nth-child(3) {
  transition-delay: 0.08s;
}

.site-nav .sub > li:nth-child(4) {
  transition-delay: 0.16s;
}

.site-nav .sub a {
  padding: 6px 0;
  white-space: nowrap;
}

.site-nav .sub a::after {
  height: 9px;
}

.nav-action a {
  padding: 0;
}

.nav-action .oval {
  display: block;
  height: auto;
  width: auto;
  max-height: 72px;
  overflow: visible;
}

.menu-toggle {
  display: none;
  padding: 6px 4px;
  border: 0;
  background: var(--brush) no-repeat center 92% / 100% 10px;
  color: inherit;
  font: inherit;
  font-size: var(--text-m);
  cursor: pointer;
}

@media (max-width: 1120px) {
  .js .menu-toggle {
    display: inline-block;
    position: relative;
    z-index: 41;
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    overflow-y: auto;
    padding: 120px var(--gutter) 48px;
    background: var(--paper) var(--paper-texture);
    background-blend-mode: multiply;
  }

  .js .menu-open .site-nav {
    display: block;
  }

  .menu-open {
    overflow: hidden;
  }

  .site-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    font-size: var(--text-xl);
  }

  .site-nav .sub,
  .site-nav .sub > li:not([role]) {
    position: static;
    min-width: 0;
    padding: 2px 0 4px 1.4em;
    font-size: var(--text-m);
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav .sub > li:not([role]) {
    padding: 0;
  }

  .site-nav .sub::before,
  .site-nav .sub .sub-wash {
    display: none;
  }

  .nav-action {
    margin-top: 16px;
  }

  /* without JavaScript the menu wraps below the logo */
  html:not(.js) .site-header {
    flex-wrap: wrap;
  }

  html:not(.js) .site-nav > ul {
    flex-direction: row;
    flex-wrap: wrap;
    font-size: var(--text-s);
  }

  html:not(.js) .site-nav .sub {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-logo img {
    height: 58px;
  }
}

/* ── Citation (homepage) ── */

.citation {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px var(--gutter) 24px;
  text-align: center;
}

.citation > * {
  position: relative;
}

.citation .citation-splash {
  position: absolute;
  left: 50%;
  top: -48px;
  width: 380px;
  max-width: 80%;
  transform: translateX(-50%);
}

.citation .citation-branch {
  position: absolute;
  top: -6px;
  width: 230px;
}

.citation .citation-branch.left {
  left: 2%;
}

.citation .citation-branch.right {
  top: 22px;
  right: 3%;
  width: 200px;
  transform: scaleX(-1) rotate(-4deg);
}

.citation blockquote {
  margin: 0;
}

.citation blockquote p {
  margin: 12px auto 0;
  max-width: 14em;
  font-family: "Whisper";
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.08;
}

@media (max-width: 980px) {
  .citation .citation-branch {
    display: none;
  }
}

/* ── Logo intro (every homepage visit) ── */

.intro-screen {
  display: none;
}

.intro .intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper) var(--paper-texture);
  background-blend-mode: multiply;
  cursor: pointer;
  transition: opacity 0.9s ease;
  /* safety net: never stays if the script does not run */
  animation: intro-away 0.6s ease 6s forwards;
}

.intro-logo {
  width: min(560px, 80vw);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.8s ease, transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.intro-screen.is-visible .intro-logo {
  opacity: 1;
  transform: none;
}

.intro-done .intro-screen {
  opacity: 0;
  pointer-events: none;
}

@keyframes intro-away {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ── Photos on torn-out rough paper ── */

.torn {
  position: relative;
  display: block;
  margin: var(--space-block) auto;
  padding: clamp(10px, 1.6vw, 18px);
}

.torn > .torn-fiber,
.torn > .torn-paper {
  position: absolute;
  inset: 0;
  border-radius: 4px;
}

/* the frayed edge, just outside the paper */
.torn > .torn-fiber {
  background: var(--clay);
  opacity: 0.3;
}

.torn > .torn-paper {
  background: var(--photo-paper) var(--paper-texture);
  background-blend-mode: multiply;
}

.torn-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ratio, 3 / 2);
  border-radius: 3px;
  background: var(--tint);
}

.torn-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* artworks are shown whole: never cropped, no torn edge on the picture
   itself; the paper shows around a work that is not square */
.torn-photo.is-art {
  background: transparent;
}

.torn-photo.is-art img {
  object-fit: contain;
}

.torn-photo .photo-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.photo-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

/* once JavaScript has torn the edges, the rounded fallback is not needed */
.torn.is-torn > .torn-fiber,
.torn.is-torn > .torn-paper,
.torn.is-torn .torn-photo {
  border-radius: 0;
}

/* the homepage picture: the original photo, whole, at a modest width */
.torn.hero {
  width: min(420px, 100% - 2 * var(--gutter));
}

.torn.portrait {
  width: min(420px, 100% - 2 * var(--gutter));
  transform: rotate(-1.4deg);
}

.torn.medium {
  width: min(var(--wide), 100% - 2 * var(--gutter));
}

/* a square picture above an article, shown whole */
.torn.feature {
  width: min(480px, 100% - 2 * var(--gutter));
}

/* the pictures above the articles and the course page stay modest */
.torn.feature.small {
  width: min(300px, 100% - 2 * var(--gutter));
}

/* the square pictures above the two articles, larger than the course picture */
.torn.feature.mid {
  width: min(420px, 100% - 2 * var(--gutter));
}

.torn.narrow {
  width: min(var(--measure), 100% - 2 * var(--gutter));
}

.torn.tilt-right {
  transform: rotate(1.2deg);
}

/* ── The Viel-Falter: the butterfly flying around the top of "Über Mich" ── */

.falter-stage {
  position: relative;
}

.falter-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.falter {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  will-change: transform;
}

/* a few drops of paint where it lands; they fade like the ovals dry */
.falter-drop {
  position: absolute;
  width: 60px;
  height: 30px;
  margin: -20px 0 0 -30px;
  animation: falter-drop 2.2s ease-out forwards;
}

.falter-drop svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes falter-drop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }

  15% {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.08);
  }
}

/* ── Homepage ── */

.home-text {
  text-align: center;
  /* even line lengths, so no word is left alone on the last line */
  text-wrap: balance;
}

.teasers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px clamp(28px, 4vw, 64px);
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: 0 auto;
}

.teaser h2 {
  margin: 0 0 12px;
  font-size: var(--h2);
}

.teaser h3 {
  margin: 0 0 6px;
  font-size: var(--h3);
}

.teaser p {
  font-size: var(--text-m);
}

.teaser .list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.teaser .list li {
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .teasers {
    grid-template-columns: 1fr;
    max-width: var(--measure);
  }
}

/* painted ovals as actions */

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 24px 0;
}

.actions.center {
  justify-content: center;
}

.action {
  display: inline-block;
  line-height: 0;
}

.action .oval {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  overflow: visible;
}

/*
 * Ovals are empty loops. On hover the colour is painted in: the wash soaks in
 * and spreads, then the drops spatter one after the other. When the pointer
 * leaves, everything dries away slowly. assets/js/site.js runs these
 * animations, so they play every time, also on the same oval again.
 * The oval of the current page keeps its colour.
 */
.oval-wash,
.oval-drops {
  opacity: 0;
}

.oval-wash,
.oval-drops circle {
  transform-box: fill-box;
  transform-origin: center;
}

[aria-current="page"] > .oval .oval-wash,
[aria-current="page"] > .oval .oval-drops {
  opacity: 1;
}

.oval-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 0;
  cursor: pointer;
}

/* before the oval is drawn, or without JavaScript */
html:not(.js) .action,
html:not(.js) .oval-button {
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 46% / 50%;
  font-family: "Whisper";
  font-size: 26px;
  line-height: 1.2;
}

/* ── Lists of subpages ── */

/* a centred column, one entry under the other */
.entries {
  margin-block: 40px 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.entry + .entry {
  margin-top: 40px;
}

/* the small tendril between entries (drawn by site.js) */
.entry-mark {
  display: block;
  width: 120px;
  margin: 0 auto 26px;
}

.split .entry-mark {
  margin-left: 0;
}

/* without the script: a short faint line instead */
html:not(.js) .entry + .entry {
  padding-top: 40px;
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / 96px 1px;
}

.entry h2 {
  margin: 0 0 0.3em;
}

.entry .actions {
  justify-content: center;
}

.entry h2 a {
  padding: 0 0.12em;
  background: var(--brush) no-repeat left 92% / 0 0.4em;
  transition: background-size 0.3s;
}

.entry h2 a:hover,
.entry h2 a:focus-visible {
  background-size: 100% 0.4em;
}

/* previous and next article, at the end of each article */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  width: min(var(--measure), 100% - 2 * var(--gutter));
  margin: var(--space-block) auto 0;
}

.article-nav a {
  display: block;
}

.article-nav-next {
  grid-column: 2;
  text-align: right;
}

.article-nav-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-nav-prev .article-nav-label::before {
  content: "‹ ";
}

.article-nav-next .article-nav-label::after {
  content: " ›";
}

/* the title gets the brush line, painted in from the left on hover */
.article-nav-title {
  padding: 0 0.12em;
  font-family: "Whisper";
  font-size: var(--h3);
  line-height: 1.2;
  background: var(--brush) no-repeat left 92% / 0 0.4em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.45s ease;
}

.article-nav a:hover .article-nav-title,
.article-nav a:focus-visible .article-nav-title {
  background-size: 100% 0.4em;
}

@media (max-width: 560px) {
  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-next {
    grid-column: 1;
  }
}

/* ── Tables ── */

.info {
  width: 100%;
  margin: 28px 0 32px;
  border-collapse: collapse;
  font-size: var(--text-m);
  line-height: 1.55;
}

.info caption {
  padding-bottom: 8px;
  text-align: left;
}

.info th,
.info td {
  padding: 13px 20px 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.info thead th {
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--ink);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.info tbody th {
  width: 40%;
  font-weight: 600;
}

.info td p {
  margin: 0 0 0.4em;
}

.info td p:last-child {
  margin: 0;
}

/* the line under a group is dark all the way across; the name cell spans
   the whole group, so it ends on that line too */
.info .group-end th,
.info .group-end td,
.info tbody th[scope="rowgroup"] {
  border-bottom-color: var(--ink);
  border-bottom-width: 1px;
}

@media (max-width: 560px) {
  .info tbody th {
    width: 44%;
  }

  .info th,
  .info td {
    padding-right: 12px;
  }
}

/* ── Two columns: text and form beside a picture ── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 40px clamp(32px, 5vw, 80px);
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: var(--space-block) auto 0;
}

.split .torn {
  width: 100%;
  margin: 0 0 8px;
}

.split .ornament {
  margin-top: 28px;
}

/* picture on the left, text on the right (Artikel) */
.split.picture-first {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
}

.torn.tilt-left {
  transform: rotate(-1.2deg);
}

.split .entries {
  margin: 0;
  text-align: left;
}

html:not(.js) .split .entry + .entry {
  background-position: left top;
}

.split .entry .actions {
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .split,
  .split.picture-first {
    grid-template-columns: 1fr;
    max-width: var(--measure);
  }

  .split.picture-first .torn {
    width: min(420px, 100%);
    margin: 0 auto;
  }
}

/* ── Forms (placeholders without function for now) ── */

.form {
  display: grid;
  gap: 24px;
  margin: 8px 0 0;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 4px;
  padding: 0;
  font-size: var(--text-s);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Fields have no box: a soft wash that fades into the paper and a
   hand-drawn ink line. On focus the brush is painted in from the left. */
.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  --ink-line: url("../img/field-line.svg");
  --wash: radial-gradient(closest-side at 50% 56%, rgba(255, 254, 246, 0.8), rgba(255, 254, 246, 0.45) 55%, rgba(255, 254, 246, 0));
  display: block;
  width: 100%;
  padding: 12px 4px 10px;
  border: 0;
  border-radius: 0;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-m);
  background-color: transparent;
  background-image: var(--ink-line), var(--brush), var(--wash);
  background-repeat: no-repeat;
  background-position: left bottom 1px, left bottom, center;
  background-size: 100% 10px, 0 20px, 100% 100%;
  transition: background-size 0.5s ease;
}

.form .field:nth-of-type(even) input,
.form .field:nth-of-type(even) select {
  --ink-line: url("../img/field-line-2.svg");
}

.form select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 28px;
  background-image: var(--ink-line), var(--brush), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.8C4 4.2 5.4 5.6 7 7.2 8.7 5.4 10.2 4 12.6 1.4' fill='none' stroke='%23543921' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"), var(--wash);
  background-position: left bottom 1px, left bottom, right 6px center, center;
  background-size: 100% 10px, 0 20px, 14px 9px, 100% 100%;
}

.form input[type="text"]:focus,
.form input[type="email"]:focus {
  background-size: 100% 10px, 100% 20px, 100% 100%;
}

.form select:focus {
  background-size: 100% 10px, 100% 20px, 14px 9px, 100% 100%;
}

/* the message field is lined like writing paper, the lines drawn by hand;
   its wash fades out on every side */
.form textarea {
  min-height: 196px;
  resize: none;
  field-sizing: content;
  line-height: 32px;
  padding: 2px 4px 12px;
  background-image: url("../img/writing-lines.svg"), radial-gradient(closest-side, rgba(255, 254, 246, 0.75), rgba(255, 254, 246, 0.4) 60%, rgba(255, 254, 246, 0));
  background-repeat: repeat-y, no-repeat;
  background-position: left top, center;
  background-size: 100% 96px, 100% 100%;
  background-attachment: local, scroll;
  transition: background-color 0.5s ease;
}

.form textarea:focus {
  background-size: 100% 96px, 100% 100%;
  background-color: transparent;
  background-image: url("../img/writing-lines.svg"), radial-gradient(closest-side, rgba(255, 254, 246, 0.95), rgba(227, 239, 226, 0.45) 65%, rgba(227, 239, 226, 0));
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-m);
}

/* radio buttons and the checkbox are drawn loops; the chosen one gets
   a dab of paint or a painted tick */
.form input[type="radio"],
.form input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: url("../img/choice-ring.svg") no-repeat center / 100% 100%;
  cursor: pointer;
}

.form input[type="radio"]:checked {
  background-image: url("../img/choice-ring-on.svg");
}

.form input[type="checkbox"] {
  border-radius: 30%;
  background-image: url("../img/check-loop.svg");
}

.form input[type="checkbox"]:checked {
  background-image: url("../img/check-loop-on.svg");
}

.choice {
  cursor: pointer;
}

/* the loop sits a little lower, level with the words beside it */
.choice input {
  position: relative;
  top: 2px;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  font-size: var(--text-s);
  line-height: 1.5;
}

.consent input {
  margin-top: 3px !important;
}

.form-note {
  margin: 0;
  padding: 12px 0 20px;
  background: url("../img/field-line-2.svg") no-repeat left top / 100% 10px, url("../img/field-line.svg") no-repeat left bottom / 100% 10px;
  opacity: 0.9;
  font-size: var(--text-s);
}

.form-note[hidden] {
  display: none;
}

.details {
  margin: 0 0 28px;
  font-size: var(--text-m);
}

.details dt {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.details dd {
  margin: 0 0 20px;
}

/* ── Gallery ── */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.8vw, 22px);
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: var(--space-block) auto 0;
  padding: 0;
  list-style: none;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: zoom-in;
  transition: transform 0.35s;
}

.gallery-item .torn {
  margin: 0;
  padding: clamp(5px, 0.9vw, 10px);
}

.gallery li:nth-child(3n + 1) .gallery-item {
  transform: rotate(-0.8deg);
}

.gallery li:nth-child(3n + 2) .gallery-item {
  transform: rotate(0.5deg);
}

.gallery li:nth-child(4n) .gallery-item {
  transform: rotate(-0.3deg);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: rotate(0deg) scale(1.025);
}

/* full view */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(54, 36, 21, 0.86);
}

.lightbox-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  height: 100%;
  padding: 16px clamp(8px, 3vw, 32px);
}

.lightbox-stage {
  grid-column: 2;
  grid-row: 2;
  width: min(78vh, 100%);
}

.lightbox .torn {
  width: 100%;
  margin: 0;
}

.lightbox button {
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: "Narnoor";
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.lightbox .close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  font-size: 34px;
}

.lightbox .prev {
  grid-column: 1;
  grid-row: 2;
}

.lightbox .next {
  grid-column: 3;
  grid-row: 2;
}

.lightbox .count {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
}

.lightbox :focus-visible {
  outline-color: var(--paper);
}

/* ── Legal pages ── */

.legal h2 {
  margin-top: 1.6em;
  font-size: var(--h3);
}

.legal-date {
  margin-top: 2.4em;
  font-size: var(--text-s);
  color: var(--muted);
}

/* ── Footer ── */

.site-footer {
  position: relative;
  margin-top: var(--space-footer);
  padding: 56px var(--gutter) 30px;
  background: var(--tint) var(--paper-texture);
  background-blend-mode: multiply;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
  /* the same edges as the header */
  max-width: calc(var(--frame) - 2 * var(--gutter));
  margin: 0 auto;
}

.footer-trail {
  width: min(540px, 100%);
}

.footer-grass {
  width: 260px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-s);
}

/* footer links share the painted line of the menu (see above) */

/* the menu and the copyright line share their first line, also when the menu
   wraps onto two lines */
.footer-nav,
.footer-meta {
  align-self: start;
}

.footer-meta {
  margin: 0;
  /* centred under the grass; the same padding as the menu links (2px above,
     9px below for their brush line), so both texts sit on one line */
  padding: 2px 0 9px;
  text-align: center;
  font-size: var(--text-s);
  color: var(--muted);
}

.footer-meta a {
  background: var(--brush) no-repeat left 100% / 100% 0.6em;
  color: var(--ink);
}

/* small links get a larger touch area on phones, without looking different */
.footer-meta a,
.kicker a {
  position: relative;
}

.footer-meta a::before,
.kicker a::before {
  content: "";
  position: absolute;
  inset: -12px -6px;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-grass {
    display: none;
  }

  .footer-meta {
    padding-left: 2px;
    text-align: left;
  }
}

/* a sister brand fills with the host's wash when pointed at */
.family-trail a path[stroke] {
  transition: fill-opacity 0.3s;
}

.family-trail a:hover path[stroke],
.family-trail a:focus-visible path[stroke] {
  fill-opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
