/* ---------- FONT ---------- */
@font-face {
  font-family: "Stanhope";
  src: url(../fonts/Stanhope-Medium.otf) format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- TOKENS: all shared values ---------- */
:root {
  --bg: #121110;
  --fg: #f0ece4;
  --mute: #a3a29c;
  --plate: #2a2926;
  --line: #f0ece4;
  --foot: #f0ece4;
  --veil: rgba(18,17,16,.15);
  --t-text: clamp(15px,2.4vh,21px);
  --t-body: clamp(14px,2.2vh,20px);
  --t-lead: clamp(18px,min(2.4vw,3.3vh),36px);
  --gap: clamp(10px,2.6vh,44px);
  --sec-pad: clamp(6px,1.3vh,20px);
  /* text width: paragraphs, player */
  --measure: 100%;
  /* corners of the Sound player. Rounded option: 12px */
}

/* ---------- BASE ---------- */
* {
  box-sizing: border-box;
}

html,body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body {
  color: var(--fg);
  font-family: "Stanhope",sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.167;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.extend {
  color: var(--mute);
}

a:visited {
  color: var(--fg);
}

a:hover,.extend:hover {
  opacity: .55;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

[hidden] {
  display: none!important;
}

:focus-visible {
  outline: 1.5px solid var(--line);
  outline-offset: 2px;
}

/* ---------- LAYOUT: window, split/full columns, text area ---------- */
.root {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.halves {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
}

.imgcol {
  min-height: 0;
  overflow: hidden;
}

.imgcol img {
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;}

/* hero-mock only (re-enable together with it in index.html):
zoom past the mock's transparent margin
.imgcol img {
  transform: scale(1.65);
}

vertical layout: fit the whole image so the mock is never cropped
@media (max-width:760px) {
  .imgcol img {
    object-fit: contain;
  }
}
*/

body.is-full .halves {
  grid-template-columns: minmax(0,0fr) minmax(0,1fr);
}

/* same text width as beside the image on About (half the window minus main's padding) */
body.is-full {
  --measure: calc(50vw - 48px);
}

/* small gap: the text area (and its fades) runs close to breadcrumb and logos */
main {
  --pad: 24px;
  min-width: 0;
  min-height: 0;
  padding: 20px var(--pad) 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  flex: 1 1 auto;
  margin: 0 calc(-1 * var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.content::-webkit-scrollbar {
  display: none;
}

/* soft fade where text runs under the logo row (only when it actually overflows) */
.content.overflowing {
  -webkit-mask-image: linear-gradient(to bottom,#000 calc(100% - 28px),transparent);
  mask-image: linear-gradient(to bottom,#000 calc(100% - 28px),transparent);
  padding-bottom: 28px;
}

.content.overflowing.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

/* matching fade at the top, under the breadcrumb, once the text has been scrolled */
.content.overflowing.scrolled {
  -webkit-mask-image: linear-gradient(to bottom,transparent,#000 28px,#000 calc(100% - 28px),transparent);
  mask-image: linear-gradient(to bottom,transparent,#000 28px,#000 calc(100% - 28px),transparent);
}

.content.overflowing.scrolled.at-end {
  -webkit-mask-image: linear-gradient(to bottom,transparent,#000 28px);
  mask-image: linear-gradient(to bottom,transparent,#000 28px);
}

/* ---------- TEXT ---------- */
.lead {
  margin-top: 0;
  margin-bottom: 0;
  max-width: var(--measure);
  font-size: var(--t-lead);
  line-height: 1.14;
  letter-spacing: -.01em;
}

.body {
  margin: 0;
  font-size: var(--t-text);
  max-width: var(--measure);
  text-indent: 2em;
}

/* imprint: small, flush left, pinned to the bottom of the content column */
.pageblock[data-page="imprint"] {
  flex: 1 0 auto;
}
#imprintBody {
  margin-top: auto;
}
#imprintBody .body {
  font-size: 11px;
  line-height: 1.4;
  text-indent: 0;
}
#imprintBody .body + .body {
  margin-top: .6em;
}

/* spacing between paragraphs */
.body + .body {
  margin-top: .9em;
}

.sec {
  padding-top: var(--sec-pad);
  font-size: var(--t-body);
}

.sec-title {
  margin-bottom: clamp(3px,.8vh,8px);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

/* same as the paragraph indent */
.indented li {
  padding-left: 2em;
}

.pageblock {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- COMPONENT: breadcrumb and menu ---------- */
.crumb {
  align-self: flex-end;
  position: relative;
  z-index: 30;
  font-size: var(--t-body);
  display: flex;
  align-items: center;
  gap: .45em;
}

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

.crumb .current {
  position: relative;
  display: inline-block;
}

.crumb .current>button {
  color: var(--mute);
  text-align: left;
}

/* anchored right: long names stay inside the window */
.menu {
  position: absolute;
  right: 0;
  top: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.menu button {
  text-align: right;
  color: var(--fg);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--veil);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ---------- COMPONENT: logo row ---------- */
/* same minimum space as between sections */
.logos {
  flex: none;
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: var(--gap);
}

.logos .right {
  display: flex;
  gap: 8px;
}

.wm {
  display: block;
  height: 29px;
  width: 123px;
  background: var(--fg);
  -webkit-mask: url(../img/wordmark.png) no-repeat right center/contain;
  mask: url(../img/wordmark.png) no-repeat right center/contain;
}

/* ---------- COMPONENT: footer ---------- */
footer {
  flex: none;
  height: 32px;
  background: var(--bg);
  color: var(--foot);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  font-size: 13px;
}

footer a,footer a:visited {
  color: inherit;
  text-decoration: none;
}

/* ---------- COMPONENT: loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 200ms ease,visibility 0s linear 200ms;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--plate);
  border-top-color: var(--line);
  animation: spin 400ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- PAGE: Contact ---------- */
/* vertically centred in the text column */
[data-page="contact"] {
  flex: 1 0 auto;
  justify-content: center;
}

.contact {
  margin: 0;
  font-size: var(--t-text);
}

/* ---------- PHONES ---------- */
@media (max-width:760px) {
  /* always larger than the paragraph (max 21px) */
  :root {
    --t-lead: clamp(22px,calc(15px + 2.4vw),27px);
    /* text runs to the edge, the font grows with the width */
    --t-text: min(4.9vw,24px);
    --measure: 100%;
  }
  .content {
    overflow: visible;
  }
  .content.overflowing,.content.overflowing.scrolled {
    -webkit-mask-image: none;
    mask-image: none;
    padding-bottom: 0;
  }
  .root {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .halves,body.is-full .halves {
    grid-template-columns: minmax(0,1fr);
  }
  .imgcol {
    height: 50vh;
  }
  body.is-full .imgcol {
    display: none;
  }
  body.is-full {
    --measure: 100%;
  }
  footer {
    height: auto;
    min-height: 32px;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 8px 16px;
  }
  main {
    --pad: 16px;
    padding: 16px var(--pad) 12px;
  }
}
