/* ellenkieweg.com, plain CSS. Copy of the Squarespace site (7.1, fluid engine).
   Every size below is measured from the original; see CLAUDE.md for how the grid works. */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: "Epilogue"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/epilogue-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: "Epilogue"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/epilogue-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Epilogue"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/epilogue-italic-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: "Epilogue"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/epilogue-italic-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/anton-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: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/anton-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f5f5;          /* site background, "light" sections, menu overlay */
  --white: #fff;          /* "white" sections */
  --ink: #000;
  --head: "Anton", sans-serif;
  --body: "Epilogue", sans-serif;
  --max: 2000px;          /* max page width */
  --pad: 4vw;             /* page gutter */
  --pad-m: 6vw;           /* page gutter in the mobile grid */
  /* Type unit, only used for the header height estimate below (text sizes: see Type) */
  --u: min(1.2vw, 24px);
  /* Header height = top padding of the first section (the header floats over it).
     js/site.js replaces this estimate with the measured height. */
  --hh: calc(4vw + 1.7 * (0.8 * var(--u) + 1rem));
}
@media (max-width: 767px) and (orientation: portrait) {
  :root { --u: calc(.012 * min(100vh, 900px)); } /* written like Squarespace: Firefox rounds 1.2vh early */
}
@media (max-width: 799px), (pointer: coarse) and (max-width: 1024px) {
  :root { --hh: calc(12vw + 37px); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* column layout keeps the footer at the bottom when a page is shorter than the window */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
main { flex-grow: 1; }
img, video { display: block; }
a { color: inherit; }

/* "Zum Inhalt springen": hidden off screen until focused with Tab, like the original */
.skip {
  position: absolute; top: 1.5em; left: -1000em; z-index: 100;
  max-width: calc(100vw - 2.6em);
  padding: 1.2em 2em;
  border-radius: 300px;
  background: var(--ink); color: var(--white);
  font-size: 1rem; text-transform: uppercase; text-decoration: underline;
  transition: opacity .1s linear;
}
.skip:focus { left: 1.3em; outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- Type ---------- */
/* Fluid type: each text style sets a size value --v. The formulas are copied character for character
   from Squarespace, because Firefox rounds a simplified version 1/60px differently. */
.text h1, .text h2, .text h3, .text h4, .text p, .site-title, .nav a, .notfound {
  font-size: min(calc((var(--v) - 1) * 1.2vw + 1rem), max(calc((var(--v) - 1) * 0.012 * var(--max) + 1rem), calc(var(--v) * 1rem)));
}
@media (max-width: 767px) and (orientation: portrait) {
  .text h1, .text h2, .text h3, .text h4, .text p, .site-title, .nav a, .notfound {
    font-size: calc((var(--v) - 1) * calc(.012 * min(100vh, 900px)) + 1rem);
  }
}
.text h1, .text h2, .text h3, .text h4 {
  margin: 0;
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: pre-wrap;
  /* Squarespace scales heading line-height down as the size goes up */
  line-height: calc(1.2em * (1 + (1 - var(--v)) / 25));
}
.text h1 { --v: 4; }
.text h2 { --v: 2.8; }
.text h3 { --v: 2.2; }
.text h4 { --v: 1.6; }
.text p {
  --v: 1.8;
  margin: 1rem 0;
  white-space: pre-wrap;
  line-height: 1.5em;
}
.text p.large { --v: 3.5; }
.text p.small { --v: 1.2; }
.text > div > :first-child { margin-top: 0; }
.text > div > :last-child { margin-bottom: 0; }

/* ---------- Header ---------- */
.header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
}
.header-bar {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  padding: 2vw var(--pad);
}
.site-title {
  --v: 1.5;
  font-family: var(--head);
  text-transform: uppercase;
  line-height: 1.2em;
  text-decoration: none;
  white-space: nowrap;
}
.nav { margin-left: auto; padding-left: 2vw; display: flex; }
.nav a {
  --v: 1.8;
  display: flex;
  padding: .1em 0;
  line-height: 1.5em;
  text-decoration: none;
}
.nav a[aria-current="page"] {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: repeat-x;
  background-size: 1px 1px;
  background-position: 0 calc(100% - .1em);
}

.burger {
  display: none;
  position: relative;
  margin-left: auto;
  /* no padding or size on purpose: the browser's default button padding sets it, as on the original */
  border: 0; background: none; color: inherit;
  cursor: pointer;
}
.burger-box { position: relative; display: block; width: 35px; height: 35px; }
.burger-box span {
  position: absolute; top: 17px; left: 0;
  width: 35px; height: 1px;
  background: currentColor;
  transition: transform .25s cubic-bezier(.2, .6, .3, 1), width .25s cubic-bezier(.2, .6, .3, 1);
}
.burger-box span:first-child { transform: translateY(-5.5px); }
.burger-box span:last-child { transform: translateY(5.5px); }
.menu-open .burger-box span { width: 28px; }
.menu-open .burger-box span:first-child { transform: translateX(3.5px) rotate(-135deg); }
.menu-open .burger-box span:last-child { transform: translateX(3.5px) rotate(135deg); }

.menu {
  position: fixed; inset: 0; z-index: 1;
  display: none; flex-direction: column;
  padding-top: var(--hh);
  background: var(--bg);
  text-align: center;
  opacity: 0; visibility: hidden;
  transition: visibility .6s cubic-bezier(.4, 0, .2, 1), opacity .4s cubic-bezier(.4, 0, .2, 1);
}
.menu-list {
  flex-grow: 1;
  display: flex; flex-direction: column; justify-content: center;
  overflow-y: auto;
  transform: translateY(20px);
  will-change: transform; /* own layer, so the text renders exactly like the original */
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.menu-list div { padding: 0 var(--pad); line-height: 1; }
.menu-list a {
  display: inline-flex; align-items: center;
  margin: 3vw 5vw;
  font-size: 8.5vmin;
  text-decoration: none;
}
@media (min-width: 576px) { .menu-list a { font-size: 6.6vmin; } }
@media (min-width: 768px) { .menu-list a { font-size: 6vmin; } }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu-open .menu-list { transform: none; }

@media (max-width: 799px), (pointer: coarse) and (max-width: 1024px) {
  .header-bar { padding: var(--pad-m); }
  .site-title { --v: 1.8; }
  .nav { display: none; }
  .burger { display: block; }
  .menu { display: flex; }
}

/* ---------- Sections ---------- */
.sec {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
.sec.white { background: var(--white); }
.sec.small { min-height: 33vh; }
main > .sec:first-child { padding-top: var(--hh); }
.sec-bg { position: absolute; inset: 0; overflow: hidden; }
.sec-bg img { width: 100%; height: 100%; object-fit: cover; }
.wrap { position: relative; padding: var(--sp, 0) 0; }
.sec.small > .wrap { --sp: 3.3vmax; }
.sec.inset { padding-left: var(--pad); padding-right: var(--pad); padding-bottom: var(--pad); }

/* ---------- Layout grid (8 columns on mobile, 24 from 768px) ---------- */
.grid {
  --cg: 11px;
  --rg: 11px;
  --gut: calc(var(--pad-m) - var(--cg));
  --cell: calc((var(--max) - var(--cg) * 7) / 8);
  display: grid;
  position: relative;
  grid-template-rows: repeat(var(--r), minmax(24px, auto));
  grid-template-columns: minmax(var(--gut), 1fr) repeat(8, minmax(0, var(--cell))) minmax(var(--gut), 1fr);
  row-gap: var(--rg);
  column-gap: var(--cg);
  overflow-x: hidden;
  overflow-x: clip;
}
.blk {
  grid-area: var(--a);
  z-index: var(--z, auto);
  position: relative;
  display: flex; flex-direction: column;
  justify-content: var(--j, flex-start);
  min-width: 0;
}
@media (min-width: 768px) {
  .grid {
    --gut: calc(var(--pad) - var(--cg));
    --cell: calc((var(--max) - var(--cg) * 23) / 24);
    --cw: min(var(--max), calc(100vw - var(--pad) * 2 - var(--inset, 0vw)));
    grid-template-rows: repeat(var(--rd), minmax(calc(var(--cw) * var(--f, .0215)), auto));
    grid-template-columns: minmax(var(--gut), 1fr) repeat(24, minmax(0, var(--cell))) minmax(var(--gut), 1fr);
  }
  .inset .grid { --inset: calc(var(--pad) * 2); }
  .blk { grid-area: var(--ad); justify-content: var(--jd, var(--j, flex-start)); }
}

/* image blocks fill their grid area without sizing the rows */
.blk.img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blk.img a { position: absolute; inset: 0; }
.blk.img.contain img { object-fit: contain; }
.vbox { position: relative; width: 100%; aspect-ratio: 16 / 25; }
.vbox video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* ---------- Masonry gallery (home) ---------- */
.masonry { padding: var(--pad); }
@media (max-width: 767px) { .masonry { padding: var(--pad-m); } }
.m-list { position: relative; }
.m-item { display: block; }
.m-item img { width: 100%; height: 100%; object-fit: cover; }
/* until js/site.js has placed the items: plain 3-column grid */
.m-list:not(.ready) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vw; align-items: start; }
.m-list:not(.ready) .m-item img { height: auto; }
.m-list.ready .m-item { position: absolute; top: 0; left: 0; }
.m-list.ready .m-item span { display: block; overflow: hidden; }
@media (max-width: 768px) { .m-list:not(.ready) { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 404 ---------- */
.notfound {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--hh) var(--pad) var(--pad);
  --v: 1.8;
  line-height: 1.5em;
}
.notfound > :first-child { padding-top: var(--pad); }
.notfound p { margin: 1rem 0; }
.notfound ul { margin: 1em 0; padding-left: 40px; }
.notfound a { text-decoration: none; }
