/* Stefano Miele — an open, typographic artist's catalogue.
   Shared by public and administration pages, after the shared CMS styles. */
.atelier {
  --site-ink: #25231f;
  --site-muted: #6a635a;
  --site-surface: #f5f1e8;
  --site-surface-soft: #eae4d8;
  --site-card-surface: #f5f1e8;
  --site-nav-surface: #f5f1e8;
  --site-accent: #243d56;
  --site-accent-strong: #182c40;
  --site-nav-accent: #243d56;
  --site-accent-soft: #e1e7ed;
  --site-border: #c9c1b3;
  --site-border-strong: #a69c8c;
  --site-radius: 0;
  --site-shadow: none;
  --site-shadow-strong: none;
  --site-heading-1: clamp(3.2rem, 8vw, 8rem);
  --site-heading-2: clamp(2.4rem, 4.5vw, 4.8rem);
  --site-heading-3: clamp(1.7rem, 3vw, 2.6rem);
  --atelier-title-line-height: 1;
  background-color: var(--site-surface);
  background-image:
    radial-gradient(ellipse at 100% 0, rgb(112 138 157 / 19%), transparent 68%),
    radial-gradient(ellipse at 78% 0, rgb(211 185 139 / 22%), transparent 65%);
  background-position: top right;
  background-size: min(100%, 90rem) 65rem;
  background-repeat: no-repeat;
}

/* Keep forms and administration headings compact within the shared theme. */
.atelier--utility {
  --site-heading-1: clamp(2.4rem, 4vw, 3.5rem);
  --site-heading-2: clamp(1.8rem, 3vw, 2.5rem);
  --site-heading-3: clamp(1.4rem, 2vw, 1.8rem);
}

.atelier ::selection { color: #fff; background: #243d56; }
.atelier .site-header,
.atelier .site-header.site-header-scrolled { padding: 0; }
.atelier .site-navbar,
.atelier .site-header-scrolled .site-navbar {
  width: 100%;
  min-height: 6rem;
  padding: 1rem 0;
  background: radial-gradient(ellipse 38rem 12rem at 100% 35%,
    rgb(211 185 139 / 32%), transparent 75%), var(--site-surface);
  border: 0;
  border-bottom: 1px solid var(--site-ink);
  border-radius: 0;
  box-shadow: 0 5px 10px -5px rgb(37 35 31 / 28%),
    0 18px 30px -14px rgb(37 35 31 / 30%);
  backdrop-filter: none;
}
.atelier .site-navbar > .container,
.atelier .site-main-container,
.atelier .site-footer > .container {
  width: 100%;
  max-width: 94rem;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
}
.atelier .site-navbar .navbar-brand {
  padding-left: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -.045em;
}
.atelier .site-navbar .navbar-brand::before { display: none; }
.atelier .site-navbar .nav-link {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.atelier .site-navbar .navbar-toggler {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.atelier .mega-menu-panel { border-radius: 0; box-shadow: none; }
.atelier .site-main { max-width: none; padding-top: clamp(2rem, 5vw, 5rem); }
.atelier .page-breadcrumb { font-size: .75rem; letter-spacing: .06em; }
.atelier .page-intro:not(.page-intro--empty) {
  padding-bottom: clamp(2rem, 4vw, 4rem);
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--site-ink);
}
.atelier .page-heading h1 {
  font-size: var(--site-heading-1);
  line-height: var(--atelier-title-line-height);
  letter-spacing: .015em;
  text-wrap: balance;
}
.atelier .page-description {
  max-width: 42rem;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.6;
}
.atelier .article-card,
.atelier .article-card:hover {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  margin-bottom: 2rem;
  border: 0;
  border-top: 1px solid var(--site-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.atelier .article-card-heading { justify-content: flex-start; text-align: left; }
.atelier .article-card .article-title {
  text-align: left;
  letter-spacing: -.025em;
  line-height: var(--atelier-title-line-height);
}
.atelier .article-title a { color: var(--site-ink); }
.atelier .article-title a:hover { color: var(--site-accent); }
.atelier .article-card > .article-reading-header:has(.article-title),
.atelier .full-article:not(.full-article--hero) > .article-reading-header:has(h1:not(.visually-hidden)),
.atelier .article-card-body .article-card-heading:has(.article-title) {
  padding-top: .75rem;
}
.atelier .article-card > .article-reading-header:has(.article-title),
.atelier .full-article:not(.full-article--hero) > .article-reading-header:has(h1:not(.visually-hidden)) {
  padding-bottom: 3rem;
}
.atelier .article-card-body:has(.article-title) .article-card-excerpt {
  margin-top: 3rem;
}
.atelier .articles-section--grid { column-gap: clamp(1.5rem, 4vw, 4rem); row-gap: 3rem; }
.atelier .article-card--grid,
.atelier .article-card--grid:hover { padding: 0; border: 0; margin: 0; }
/* Article sheets echo the book index without tilting the reading surface. */
.atelier .article-card,
.atelier .article-card:hover,
.atelier .full-article:not(.full-article--hero) {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-left: clamp(2rem, 4.5vw, 3.5rem);
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 2px 7px 7px 2px;
  box-shadow: none;
}
/* Independent paper leaves; the article's text remains level. */
.atelier :is(.article-card, .full-article:not(.full-article--hero))::before,
.atelier :is(.article-card, .full-article:not(.full-article--hero))::after,
.atelier :is(.article-card, .full-article:not(.full-article--hero)) > .article-reading-header::after,
.atelier .article-card--grid > .article-card-body::after {
  position: absolute;
  inset: -1px -1px -1px -3px;
  border: 1px solid #c5baa5;
  border-radius: 2px 7px 7px 2px;
  transform-origin: left center;
  pointer-events: none;
  content: "";
}
.atelier :is(.article-card, .full-article:not(.full-article--hero))::before {
  z-index: -1;
  border-left: 3px solid var(--site-accent);
  background: linear-gradient(90deg, #ded5c4 0, #f2ebdd 7px,
    #faf5e9 22px, #fffcf5 48px, #fffcf5 94%, #f2ecdf 100%);
  box-shadow: 1px 2px 4px rgb(36 61 86 / 10%);
}
.atelier :is(.article-card, .full-article:not(.full-article--hero)) > .article-reading-header,
.atelier .article-card--grid > .article-card-body {
  position: static;
}
.atelier :is(.article-card, .full-article:not(.full-article--hero)) > .article-reading-header::after,
.atelier .article-card--grid > .article-card-body::after {
  z-index: -2;
  background: #f8f2e5;
  transform: translate(3px, 4px) rotate(.6deg);
  box-shadow: 1px 2px 3px rgb(36 61 86 / 12%);
}
.atelier :is(.article-card, .full-article:not(.full-article--hero))::after {
  z-index: -3;
  background: #eee5d3;
  transform: translate(6px, 8px) rotate(.5deg);
  box-shadow: 4px 10px 20px -10px rgb(36 61 86 / 35%);
}
.atelier .article-card--grid,
.atelier .article-card--grid:hover {
  padding: clamp(1rem, 2vw, 1.5rem);
  padding-left: clamp(1.5rem, 2.5vw, 2rem);
}
.atelier .article-card-body { padding: 1.25rem 0 0; }
.atelier .article-card-cover { background: var(--site-surface-soft); }
.atelier .article-card-cover img { object-fit: contain; }
.atelier .article-card-meta-row { border-top: 1px solid var(--site-border); padding-top: .75rem; }
.atelier .read-more { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.atelier .read-more::after { content: " ↗"; }
.atelier .hero-article { border-radius: 0; box-shadow: none; }
.atelier .hero-mode-statement {
  background: var(--site-accent);
  --site-hero-gradient-start: #243d56;
  --site-hero-gradient-middle: #243d56;
  --site-hero-gradient-end: #243d56;
}
.atelier .hero-article .hero-title { letter-spacing: -.035em; }
.atelier .page-article-index,
.atelier .section-navigation-panel { border-radius: 0; box-shadow: none; background: transparent; }
/* A bound book leaf: shaded gutter, inset print frame, and visible page edges. */
.atelier .page-article-index {
  position: relative;
  isolation: isolate;
  rotate: -.8deg;
  transform-origin: center;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  padding-left: clamp(2.5rem, 4vw, 3.25rem);
  color: var(--site-ink);
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 2px 7px 7px 2px;
  box-shadow: none;
}
.atelier .page-article-index::before,
.atelier .page-article-index::after,
.atelier .page-article-index-heading::after {
  position: absolute;
  inset: -1px -1px -1px -3px;
  border: 1px solid #c5baa5;
  border-radius: 2px 7px 7px 2px;
  transform-origin: left center;
  pointer-events: none;
  content: "";
}
/* Front leaf, with the original gutter and inset print frame. */
.atelier .page-article-index::before {
  z-index: -1;
  border-left: 3px solid var(--site-accent);
  background:
    linear-gradient(rgb(36 61 86 / 17%), rgb(36 61 86 / 17%)) 1.45rem .7rem / calc(100% - 2.15rem) 1px no-repeat,
    linear-gradient(90deg, #cec5b3 0, #e9e0ce 7px,
      #faf5e9 22px, #fffcf5 48px, #fffcf5 94%, #f2ecdf 100%);
  box-shadow: 1px 2px 4px rgb(36 61 86 / 10%);
}
/* Each underlying leaf has its own angle, relative to the front leaf. */
.atelier .page-article-index-heading::after {
  z-index: -2;
  background: #f8f2e5;
  transform: translate(3px, 4px) rotate(.6deg);
  box-shadow: 1px 2px 3px rgb(36 61 86 / 12%);
}
.atelier .page-article-index::after {
  z-index: -3;
  background: #eee5d3;
  transform: translate(6px, 8px) rotate(.5deg);
  box-shadow: 4px 10px 20px -10px rgb(36 61 86 / 35%);
}
.atelier .page-article-index-heading {
  position: static;
  padding-top: 1.1rem;
  color: var(--site-accent);
}
.atelier .page-article-index-heading > span::before {
  position: absolute;
  top: -1.1rem;
  left: 0;
  width: 3rem;
  height: 4px;
  border-block: 1px solid currentColor;
  content: "";
}
.atelier .page-article-index-heading > span {
  position: relative;
  font-family: var(--site-font-heading);
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-transform: none;
}
.atelier .page-article-index-body { margin-top: 1.25rem; }
.atelier .page-article-index-list {
  padding-inline-start: 1.9rem;
  list-style-type: decimal-leading-zero;
}
.atelier .page-article-index-list li { padding-inline-start: .5rem; }
.atelier .page-article-index-list li + li { margin-top: .85rem; }
.atelier .page-article-index-list li::marker {
  color: var(--site-accent);
  font-family: var(--site-font-heading);
  font-size: .95rem;
}
.atelier .page-article-index-list a {
  color: var(--site-ink);
  font-size: .9rem;
  line-height: 1.6;
  text-decoration: none;
}
.atelier .page-article-index-list a:hover {
  color: var(--site-accent);
  text-decoration: underline;
}
.atelier .page-article-index .article-index-toggle { color: var(--site-accent); }

/* Entrance motion only: the page and its headings stay still on hover. */
@media (prefers-reduced-motion: no-preference) {
  .atelier .page-article-index {
    animation: atelier-paper-arrive 1100ms cubic-bezier(.2, .65, .3, 1);
  }
  .atelier .article-card .article-title,
  .atelier .full-article > .page-heading h1,
  .atelier .article-content :is(h2, h3) {
    animation: atelier-heading-arrive 1200ms cubic-bezier(.2, .65, .3, 1) both;
  }
}
@keyframes atelier-paper-arrive {
  from { opacity: .5; transform: translateY(18px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes atelier-heading-arrive {
  from { opacity: .2; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.atelier .gallery-item { border-radius: 0; box-shadow: none; background: transparent; }
.atelier .gallery-item figcaption { font-size: .8rem; text-align: left; }
.atelier .site-footer {
  margin-top: 4rem;
  padding-block: 2rem;
  background: var(--site-surface-soft);
  border-top: 1px solid var(--site-ink);
  font-size: .78rem;
}
.atelier .site-footer-content { justify-content: flex-start; gap: 1rem 1.75rem; }
.atelier .site-footer-content > span:first-child { margin-right: auto; }

@media (min-width: 992px) {
  .atelier .site-navbar > .container { flex-wrap: nowrap; }
  .atelier .site-navbar .navbar-collapse {
    flex-basis: 0;
    min-width: 0;
    align-items: flex-end;
  }
  .atelier .site-navbar .navbar-nav {
    justify-content: flex-end;
    align-items: center;
  }
  .atelier .page-intro-copy:has(.page-description) {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: end;
  }
  .atelier .page-intro--beside .page-intro-copy { display: flex; }
  .atelier .page-description p:last-child { margin-bottom: 0; }
}
@media (max-width: 991.98px) {
  .atelier .site-navbar { min-height: 4.75rem; }
  .atelier .navbar-collapse { padding-top: 1rem; }
  .atelier .mega-menu-panel { position: static; width: 100%; margin: 0; border: 0; }
  .atelier .page-heading h1 { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .atelier { scroll-behavior: auto; }
  .atelier *, .atelier *::before, .atelier *::after {
    scroll-behavior: auto;
    transition: none !important;
  }
}

/* Section links use the same print treatment as article-index links. */
.atelier .page-sidebar { gap: 2rem; }
.atelier .page-article-index .section-navigation-link {
  border-radius: 0;
  font-size: .9rem;
  line-height: 1.6;
}
.atelier .page-article-index .section-navigation-tree > li + li { margin-top: .85rem; }
