@import url("./preflight.css");
@import url("../fonts/Alcyone.css");
@import url("../fonts/Sharphy.css");

:root {
  --font-sans: "Alcyone", sans-serif;
  --font-serif: "Sharphy", sans-serif;
  --font-line-height: 1.5;

  --side-padding: 1rem;
  --top-padding-offset: 5vh;

  --max-content-width: 120rem;

  height: 100%;
  position: relative;
  color-scheme: light dark;
}

:root.light {
  color-scheme: light;
}

:root.dark {
  color-scheme: dark;

  --color-background: #341936;
  --color-background-transparent: rgba(63, 33, 67, 0);
  /* --color-secondary-background: #1e4b47; */
  --color-secondary-background: #1b3532;
  /* --color-text: #fbbcff; */
  --color-text: #fbc2ff;
  /* --color-heading: #ff59a1; */
  /* --color-heading: #ff80b5; */
  --color-heading: #ff69aa;
  --color-link: #9eaeff;
  --color-link-hover: #e2e7ff;
  --color-footer-background: #151a32;
  --color-footer-text: #fbbcff;
  --color-footer-link: var(--color-footer-text);
  --color-gallery-tab-inactive: #9faefc;
  --color-gallery-tab-active: #8d4892;
}

:root,
:root.light {
  /* --color-background: #faf1fb; */
  --color-background: #fefaff;
  --color-background-transparent: rgba(250, 241, 251, 0);
  /* --color-secondary-background: #c9e7e5; */
  --color-secondary-background: #dafaf8;
  --color-text: #8d4892;
  /* --color-text: #652969; */
  --color-heading: #e8629b;
  /* --color-heading: #e84a8b; */
  /* --color-heading: #de548f; */
  --color-link: #202a5d;
  --color-link-hover: #7a90ff;
  --color-footer-background: #202a5d;
  --color-footer-text: #f7befb;
  --color-footer-text: #f7c1fb;
  --color-footer-link: var(--color-footer-text);
  /* --color-footer-link: #7d8ee7; */
  --color-gallery-tab-inactive: #9faefc;
  --color-gallery-tab-active: #8d4892;
  --color-pagination-inactive-background: var(--color-text);
  --color-pagination-inactive-text: var(--color-background);
  --color-pagination-active-background: var(--color-heading);
  --color-pagination-active-text: var(--color-background);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #341936;
    --color-background-transparent: rgba(63, 33, 67, 0);
    --color-secondary-background: #1e4b47;
    --color-text: #fbbcff;
    --color-text: #fbcfff;
    --color-heading: #ff59a1;
    --color-heading: #ff80b5;
    --color-link: #9eaeff;
    --color-link-hover: #e2e7ff;
    --color-footer-background: #151a32;
    --color-footer-text: #fbbcff;
    --color-footer-link: var(--color-footer-text);
    --color-gallery-tab-inactive: #9faefc;
    --color-gallery-tab-active: #8d4892;
  }
}

@media (min-width: 50rem) {
  :root {
    --side-padding: 3rem;
  }
}

body {
  font-family: var(--font-sans);
  line-height: var(--font-line-height);
  color: var(--color-text);
  background-color: var(--color-background);
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
  font-synthesis: none;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  color: var(--color-heading);
  text-wrap: balance;
  text-wrap: pretty;
  hyphens: auto;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4rem;
}

@media (min-width: 50rem) {
  h1 {
    font-size: 4rem;
  }
}

h2 {
  margin-block: 4rem 2rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 50rem) {
  h2 {
    font-size: 3rem;
  }
}

h3 {
  margin-block: 2rem 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
}

@media (min-width: 50rem) {
  h3 {
    font-size: 2rem;
  }
}

a {
  color: var(--color-link);
}

a:hover {
  color: var(--color-link-hover);
}

.btn-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

a.btn {
  --font-size: 1rem;
  --font-line-height: 1.4;
  --padding-block: 0.5rem;
  display: flex;
  background-color: var(--color-text);
  color: var(--color-background);
  padding: var(--padding-block) calc(1rem + var(--font-size) / 2);
  min-height: calc(
    var(--padding-block) * 2 + var(--font-size) * var(--font-line-height)
  );
  border-radius: calc(
    var(--padding-block) + var(--font-size) * var(--font-line-height) / 2
  );
  text-decoration: none;
  font-weight: bold;
  z-index: 1000;
  font-size: var(--font-size);
  line-height: var(--font-line-height);
  text-wrap: balance;
  text-wrap: pretty;
  text-align: center;
}

a.btn:hover {
  background-color: var(--color-heading);
}

blockquote {
  font-style: italic;
  margin-block: 2rem;
  font-size: 1.25rem;
  text-wrap: balance;
  text-wrap: pretty;
  line-height: 1.4;
}

@media (min-width: 50rem) {
  blockquote {
    font-size: 1.5rem;
    padding-inline: 2rem;
    margin-block: 3rem;
  }
}

blockquote footer {
  font-size: 0.85rem;
  font-style: normal;
  margin-top: 0.5rem;
  line-height: 1.55;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.skip-link {
  background: var(--color-text);
  color: var(--color-background);
  font-weight: 600;
  left: 0;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  position: absolute;
  transform: translate(-100%, -100%);
}

.skip-link:hover {
  background: var(--color-text);
  color: var(--color-background);
}

.skip-link:focus {
  transform: translate(0%, 0%);
  color: var(--color-background);
}

.icon {
  --size: 2rem;
}

svg {
  width: var(--size, 100%);
  height: var(--size, 100%);
}

svg path,
svg rect,
svg circle,
svg polygon,
svg ellipse {
  fill: currentColor;
  fill-rule: nonzero;
}

/* Header */

header.header {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  --logo-width: 10rem;
  --menu-bottom-border-width: 0;
}

@media (scripting: enabled) {
  header.header {
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    max-height: calc(100% + var(--menu-bottom-border-width));
    --menu-bottom-border-width: 0.5rem;
    padding-inline: max(0px, calc((100% - var(--max-content-width)) / 2));
  }

  header.header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-color: var(--color-background);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
  }
}

@media (min-width: 50rem) {
  header.header {
    flex-direction: row;
    gap: 0;
    --logo-width: 10rem;
    padding-block: 2rem;
  }
}

@media (min-width: 50rem) and (scripting: enabled) {
  body.scrolled header.header::after {
    opacity: 1;
  }
}

header.header .logo {
  color: var(--color-text);
}

header.header .logo:hover {
  color: var(--color-heading);
}

header.header .logo > svg {
  width: var(--logo-width);
}

.mobile-header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  flex: none;
  align-self: flex-start;
  padding: 1rem var(--side-padding) 0;
}

@media (scripting: enabled) {
  .mobile-header {
    padding-block: 0.5rem;
    padding-right: calc(var(--side-padding) - 0.5rem);
  }

  body.scrolled .mobile-header,
  .mobile-header:has(+ .open) {
    background: var(--color-background);
  }
}

@media (min-width: 50rem) {
  .mobile-header {
    width: auto;
    padding-right: 0;
    padding-block: 0;
  }
}

@media (min-width: 50rem) and (scripting: enabled) {
  .mobile-header {
    padding-block: 0;
    padding-right: 0;
  }

  body.scrolled .mobile-header {
    background: none;
  }
}

div#menu-toggle {
  display: none;
}

button#menu-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  outline-offset: -1rem;
  margin-left: 0.5em;
  font-size: 1rem;
  font-weight: 500;
}

button#menu-toggle:hover {
  color: var(--color-heading);
}

@media (min-width: 50rem) {
  button#menu-toggle {
    display: none;
  }
}

@media (scripting: enabled) {
  #menu:not(.open) {
    display: none;
  }
}

#menu {
  background: var(--color-background);
  border-bottom: var(--menu-bottom-border-width) solid var(--color-heading);
  padding: 0 var(--side-padding);
}

@media (scripting: enabled) {
  #menu {
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1 1 auto;
  }
}

@media (min-width: 50rem) {
  #menu {
    background: none;
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (min-width: 50rem) and (scripting: enabled) {
  #menu {
    overflow-y: visible;
  }

  #menu:not(.open) {
    display: block;
  }
}

nav.main {
  padding-block: 1rem;
}

@media (scripting: enabled) {
  nav.main {
    padding-top: 0.5rem;
  }
}

@media (min-width: 50rem) {
  nav.main {
    padding-top: 0;
    margin-top: -0.125rem;
  }
}

@media (min-width: 50rem) and (scripting: enabled) {
  nav.main {
    padding-block: 0;
  }
}

nav.main ul {
  list-style: none;
}

nav.main a {
  display: block;
  text-decoration: none;
  color: var(--color-text);
}

nav.main a:hover {
  text-decoration: underline;
}

nav.main li.has-active > a,
nav.main li.has-active > .trigger > a,
nav.main a.active,
nav.main li.has-active > a:hover,
nav.main li.has-active > .trigger > a:hover,
nav.main a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.125em;
  text-underline-offset: 0.15em;
}

nav.main li.has-active > a,
nav.main li.has-active > .trigger > a,
nav.main a.active {
  text-decoration-color: var(--color-heading);
}

nav.main > ul > li > a,
nav.main > ul > li > .trigger > a {
  font-size: 1.25rem;
  font-weight: 600;
  padding-block: 0.5rem;
}

nav.main > ul ul {
  padding-left: 1rem;
}

nav.main > ul ul a {
  font-weight: 500;
  padding-block: 0.5rem;
}

@media (min-width: 50rem) {
  nav.main > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
  }
  nav.main > ul > li {
    position: relative;
  }

  nav.main > ul > li > .trigger {
    display: flex;
    align-items: center;
  }
}

nav.main button.toggle {
  display: none;
}

@media (min-width: 50rem) {
  nav.main button.toggle .icon {
    --size: var(--size);
  }

  nav.main a:hover,
  nav.main button.toggle:hover,
  nav.main a:hover + button.toggle {
    color: var(--color-heading);
  }
}

@media (min-width: 50rem) and (scripting: enabled) {
  nav.main button.toggle {
    display: block;
    background: none;
    color: var(--color-text);
    padding: 0.5rem;
    --size: 1rem;
    width: 2rem;
    height: 2rem;
    outline-offset: -6px;
    border: none;
    cursor: pointer;
  }

  nav.main > ul > li > ul {
    display: none;
    position: absolute;
    background: var(--color-secondary-background);
    padding: 0.5rem 1rem;
    left: calc(-0.5rem - var(--overextension, 0px));
    border-radius: 0.5rem;
    width: auto;
    white-space: nowrap;
  }

  nav.main > ul > li.open > ul {
    display: block;
    z-index: 30;
  }
}

/* General */

main {
  padding: calc(var(--header-height, 0px) + var(--top-padding-offset, 0px))
    var(--side-padding) 5rem;
  max-width: var(--max-content-width);
  margin-inline: auto;
  flex: 1 1 auto;
  width: 100%;
}

/* General content readability */

main .layout :is(h1, h2, h3) {
  margin-left: -0.04em;
}

main .layout :is(h1, h2, h3, h4, h5, h6) {
  max-width: 40em;
}

main .layout p {
  margin-block: 1rem;
}

main .layout :is(p, li, blockquote) {
  max-width: 55rem;
}

main :is(ul, ol) {
  margin-block: 1rem;
  padding-left: 2rem;
}

main .layout figure {
  max-width: 55em;
}

/* Gallery */

figure {
  margin-block: 2rem;
}

figure .gallery-content {
  position: relative;
}

figure {
  --step-padding: 0.5rem;
  --step-size: 3rem;
  --outer-step-position: calc(var(--step-size) / -4);
}

figure ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  margin: 0;
  z-index: 1;
}

figure ul li {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: var(--ratio, auto);
  width: 100%;
  overflow: hidden;
  position: relative;
}

@media (scripting: enabled) {
  figure ul:has(li.active) li:not(.active) {
    display: none;
  }
}

figure :is(li, picture, img) {
  max-height: calc(100vh - var(--header-height, 0px) - 8rem);
}

figure picture,
figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  z-index: 1;
  max-width: var(--max-width, none);
  margin-inline: auto;
}

figure img {
  mask-image: url("/assets/images/image-mask.svg");
  mask-size: 100% 100%;
  mask-position: top;
  mask-repeat: no-repeat;
}

figure/*[data-crop]*/ picture,
figure/*[data-crop]*/ img {
  height: 100%;
}

figure/*[data-crop]*/ img {
  object-fit: cover;
}

figure .gallery-tablist {
  position: absolute;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  left: 0;
  right: 0;
  bottom: -3rem;
  padding: 1rem;
  align-self: center;
}

figure .gallery-tablist:focus-within {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

figure .gallery-tab {
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 0.25rem solid var(--color-gallery-tab-inactive);
  background: none;
  z-index: 5;
  border-radius: 50%;
  cursor: pointer;
}

figure .gallery-tab:hover,
figure .gallery-tab:focus {
  outline: none;
  border-color: var(--color-gallery-tab-active);
}

figure .gallery-tab[aria-selected="true"] {
  background: var(--color-gallery-tab-active);
  border: none;
}

figure .gallery-step {
  width: var(--step-size);
  height: var(--step-size);
  border-radius: calc(var(--step-size) / 2);
  position: absolute;
  z-index: 5;
  background: var(--color-text);
  border: none;
  font-family: var(--font-serif);
  color: var(--color-background);
  font-size: 1.75rem;
  top: calc(50% - var(--step-size) / 2);
  cursor: pointer;
}

figure .gallery-step:hover {
  background: var(--color-heading);
}

figure .gallery-step:focus {
  outline-offset: calc(var(--border-width) * -1 + 2px);
}

figure .gallery-step .icon {
  --size: 2rem;
}

figure .gallery-previous {
  left: var(--outer-step-position);
}

figure .gallery-next {
  right: var(--outer-step-position);
}

figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
}

.gallery figcaption {
  margin-top: 3.5rem;
}

/* Compact Lists */

.compact-list-item-section {
  margin-top: 1.5rem;
}

.compact-list-item-section__title {
  display: block;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--color-heading);
  font-size: 1rem;
  line-height: var(--font-line-height);
  margin: 0;
  margin-bottom: 0.25rem;
}

.compact-list-item + .compact-list-item {
  margin-top: 0.5rem;
}

@container (min-width: 30rem) {
  @supports (grid-template-columns: subgrid) {
    .compact-list-item__content {
      display: grid;
      gap: 0 0.75rem;
      grid-template-columns: auto 1fr;
    }

    .compact-list {
      display: grid;
      grid-template-columns: auto 1fr;
    }

    .compact-list .compact-list-item-section,
    .compact-list .compact-list-item,
    .compact-list .compact-list-item__content {
      display: grid;
      grid-template-columns: subgrid;
    }

    .compact-list .compact-list-item-section,
    .compact-list .compact-list-item-section__title,
    .compact-list .compact-list-item,
    .compact-list .compact-list-item__content {
      grid-column: 1 / -1;
    }
  }
}

@container (min-width: 60rem) {
  @supports (grid-template-columns: subgrid) {
    .compact-list:has(> .compact-list-item-section) {
      grid-template-columns: auto auto 1fr;
      gap: 2rem 3rem;
    }

    .compact-list-item-section .compact-list-item-section__title {
      grid-column: 1 / 2;
      grid-row: 1 / calc(var(--items, 1) + 1);
      font-size: 2rem;
      line-height: 1.1;
    }

    .compact-list-item-section .compact-list-item {
      grid-column: 2 / 4;
    }
    .compact-list-item-section .compact-list-item .compact-list-item {
      grid-column: 1 / 3;
    }
  }
}

a.compact-list-item__content {
  text-decoration: none;
  color: var(--color-text);
}

a.compact-list-item__content:hover {
  text-decoration: underline;
}

.compact-list-item__title {
  display: block;
  font-weight: 700;
  grid-area: 1 / 2 / 2 / 3;
  text-wrap: balance;
  text-wrap: pretty;
}

.compact-list-item__date {
  display: block;
  font-variant-numeric: tabular-nums;
  grid-area: 1 / 1 / 2 / 2;
}

.compact-list-item__meta {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.125rem;
  grid-area: 2 / 2 / 3 / 3;
}

.compact-list__after-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--color-text);
  font-weight: 600;
}

/* Footer */

footer.footer {
  margin-top: 6rem;
  padding: 0 var(--side-padding) 6rem;
  color: var(--color-footer-text);
  position: relative;
}

@media (min-width: 50rem) {
  footer.footer {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    grid-template-areas: "flag nav settings" "flag nav copy";
    gap: 5rem 3rem;
    padding-inline: max(
      var(--side-padding),
      calc((100% - var(--max-content-width)) / 2 + var(--side-padding))
    );
  }
}

@media (min-width: 80rem) {
  footer.footer {
    padding-bottom: 3rem;
  }
}

footer.footer .flag {
  /* width: calc((100vw - var(--side-padding) * 2) / 2); */
  margin-bottom: 2rem;
  width: 8rem;
}

@media (min-width: 50rem) {
  footer.footer .flag {
    /* width: calc(100vw / 6 - var(--side-padding) * 2); */
    grid-area: flag;
    align-self: end;
    margin-bottom: 0;
  }
}

footer.footer nav.footer {
  margin-bottom: 1rem;
  grid-area: nav;
}

@media (min-width: 50rem) {
  footer.footer nav.footer {
    align-self: end;
    margin-bottom: 0;
  }
}

footer.footer nav.languages ul {
  display: flex;
  gap: 1rem;
}

footer.footer nav.languages a {
  font-size: 0.9rem;
}

footer.footer nav.languages ul li.active a {
  font-weight: 700;
}

footer.footer .settings {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  grid-area: settings;
}

@media (min-width: 50rem) {
  footer.footer .settings {
    justify-content: flex-end;
    gap: 3rem;
  }
}

footer.footer nav.setting ul {
  display: flex;
  gap: 1rem;
}

footer.footer nav.setting ul :is(button, a) {
  color: var(--color-footer-link);
  display: block;
  text-decoration: none;
  border: none;
  background: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  cursor: pointer;
}

footer.footer nav.setting :is(button, a):hover {
  text-decoration: underline;
}

footer.footer nav.setting :is(button, a).active {
  font-weight: 700;
}

footer.footer ul {
  list-style: none;
}

footer.footer a {
  color: var(--color-footer-link);
  display: block;
  text-decoration: none;
}

footer.footer a:hover {
  text-decoration: underline;
}

footer.footer .copy {
  margin-top: 1rem;
  grid-area: copy;
}

@media (min-width: 50rem) {
  footer.footer .copy {
    text-align: right;
    margin-top: 0;
  }
}

footer.footer > :not(.footer-background) {
  z-index: 1;
  position: relative;
}

footer.footer .footer-background {
  position: absolute;
  top: -4rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
  color: var(--color-footer-background);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

footer.footer .footer-background svg {
  width: 100%;
  height: 8rem;
  flex: none;
}

@media (min-width: 50rem) {
  footer.footer .footer-background svg {
    height: 16rem;
  }
}

footer.footer .footer-background__fill {
  flex: 1 1 0;
  background-color: var(--color-footer-background);
  width: 100%;
  margin-top: -1px;
}

/* Background Blobs */

.blob {
  color: var(--color-secondary-background);
  position: absolute;
  z-index: -1;
  width: 100%;
  overflow: hidden;
}

.blob svg {
  width: var(--blob-width);
  height: var(--blob-height);
  margin-left: calc(50% + var(--blob-offset, 0px));
}

.blob--top {
  top: -28rem;
  height: min(100% + 28rem, var(--blob-height));
  --blob-width: 104.25rem;
  --blob-height: 87rem;
  --blob-offset: -20rem;
}

.blob--bottom {
  bottom: 0;
  height: clamp(0px, 100% - 42rem, var(--blob-height));
  --blob-width: 172.75rem;
  --blob-height: 69.25rem;
  --blob-offset: -78rem;
}

/* Emergency Exit */

a.emergency-exit {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  --font-size: 1.5rem;
  white-space: nowrap;
}

/* Pagination */

nav.pagination ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin: 4rem 0 0;
  padding: 0;
}

nav.pagination li {
  display: block;
  position: relative;
}

nav.pagination li > a,
nav.pagination li > span {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 1.2rem;
  line-height: 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  background-color: var(--color-pagination-inactive-background);
  color: var(--color-pagination-inactive-text);
  text-decoration: none;
  padding: 0.5rem 0 0;
}

nav.pagination a span {
  padding: 0;
}

nav.pagination li > span {
  opacity: 0.25;
}

nav.pagination li.prev {
  margin-right: 1rem;
}

nav.pagination li.next {
  margin-left: 1rem;
}

nav.pagination a:hover,
nav.pagination a[aria-current="page"] {
  background-color: var(--color-pagination-active-background);
  color: var(--color-pagination-active-text);
}
