@font-face {
  font-family: Cinzel;
  src: url('./assets/cinzel-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #392816;
  --paper: #f2e6cb;
  --inscription: Cinzel, Georgia, serif;
  color: var(--ink);
  background: #2b364e;
  font-family: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button, summary { cursor: pointer; }
button { color: inherit; font: inherit; }
a { color: inherit; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #0969a1; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip {
  position: fixed;
  top: max(.75rem, env(safe-area-inset-top));
  left: 1rem;
  z-index: 5;
  padding: .75rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

:root {
  --name-width: min(94%, 40rem);
  --name-top: max(clamp(1.2rem, 4svh, 3rem), calc(env(safe-area-inset-top) + .5rem));
}
main { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; }
.parvis {
  isolation: isolate;
  position: relative;
  flex: none;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: var(--name-top) 0 0;
  z-index: 1;
  text-align: center;
  overflow: hidden;
}
.skyline {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #2b364e;
}
.city, .skyline::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.city {
  object-fit: cover;
  object-position: 42% 50%;
  transform: scale(1.035) translateY(var(--drift, 0px));
}
.skyline::after {
  content: '';
  background: linear-gradient(180deg, #10275b12, transparent 34%, #10275b0d 45%, #0b20575c 74%, #0a194b77);
}
.welcome { width: 100%; }
.welcome h1 {
  position: relative;
  width: var(--name-width);
  margin-inline: auto;
  line-height: 1;
}
.welcome img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 2px #171423) drop-shadow(0 4px 7px #111e4965);
}
.welcome p {
  margin-top: .12rem;
  color: #fff7da;
  font: 600 clamp(.92rem, 4vw, 1.4rem)/1.3 var(--inscription);
  text-shadow: 0 1px 2px #111e49, 0 0 6px #111e49, 0 1px 10px #111e49;
}
.monument {
  position: relative;
  isolation: isolate;
  width: min(70vw, 35svh, 19rem);
  aspect-ratio: 1;
  margin-top: clamp(.55rem, 2svh, 1.4rem);
}
.arch, .conor { position: absolute; display: block; }
.arch { inset: 0; width: 100%; height: 100%; }
.conor {
  width: 64%;
  left: 18%;
  top: 30%;
  filter: drop-shadow(0 4px 5px #111e4960);
}
#vote { position: relative; margin-top: -.65rem; width: min(75%, clamp(14rem, 36svh, 19rem)); }
.hours-plaque {
  background: url('./assets/scylla/plaque.webp') center / 100% 100% no-repeat;
  padding: 1.12rem 15% .88rem;
  filter: drop-shadow(0 3px 2px #41301545);
}
#vote-title {
  font: 650 clamp(.72rem, 2.9vw, .9rem)/1.3 var(--inscription);
  letter-spacing: .065em;
  color: #3c301e;
}
#vote-hours {
  color: #182749;
  font: 700 clamp(1.16rem, 5vw, 1.6rem)/1.15 var(--inscription);
  margin-top: .12em;
  overflow-wrap: anywhere;
}
#vote-info:not(:empty), #pdf-slot:not(:empty) { margin-top: .8rem; }
#programme {
  position: relative;
  width: min(87%, 39rem);
  margin-inline: auto;
  padding: clamp(1.3rem, 4svh, 2.8rem) 0 1rem;
  color: #fff8eb;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px #101521, 0 2px 12px #10152188;
}
#mandate-title {
  font: 600 clamp(2.05rem, 8.7vw, 3.1rem)/1.12 var(--inscription);
  color: #ffebbe;
  letter-spacing: -.042em;
  margin-bottom: .38em;
}
#programme p { font: 400 clamp(1.05rem, 3.9vw, 1.18rem)/1.55 Georgia, serif; }
.editorial-status { max-width: 32ch; margin: auto; text-wrap: balance; }
.priority, #programme-details details {
  text-align: left;
  padding: .9rem 0;
  border-top: 1px solid #dcbd796e;
}
h3, #programme-details summary { font: 600 1.17rem/1.4 var(--inscription); }
#programme-details summary { min-height: 44px; align-content: center; }
.priority p, .detail-content p { white-space: pre-line; margin-top: .45rem; }
.button {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: .85rem 1.9rem;
  color: var(--ink);
  background: url('./assets/scylla/plaque.webp') center / 100% 100% no-repeat;
  text-decoration: none;
  text-shadow: none;
  font: 700 .95rem/1.3 var(--inscription);
}
footer {
  width: min(100%, 42rem);
  margin: auto auto 0;
  text-align: center;
  color: #fff4da;
  padding: .9rem max(.85rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(.85rem, env(safe-area-inset-left));
}
.footer-links a, .footer-links button {
  font: 600 clamp(.75rem, 3vw, .91rem)/1.35 var(--inscription);
  color: #fff4da;
  text-shadow: 0 1px 4px #192331;
  text-decoration-color: #dbc395;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 1.45rem;
}
footer a, .quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #504126;
  text-underline-offset: .3em;
  text-decoration: underline;
}
#intro {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
#intro::backdrop { background: transparent; }
html:has(#intro[open]) { overflow: hidden; }
.gate {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: max(68rem, 110vw);
}
.door {
  position: absolute;
  inset-block: 0;
  width: calc(50% + .5px);
  overflow: hidden;
  backface-visibility: hidden;
}
.door::before {
  content: '';
  position: absolute;
  inset-block: 0;
  width: 200%;
  background: var(--paper) url('./assets/parcours/portes.webp') center / cover;
}
.left, .left::before { left: 0; transform-origin: left center; }
.right, .right::before { right: 0; transform-origin: right center; }
.joint-light {
  position: absolute;
  inset: 9% auto 6% 50%;
  width: 2px;
  opacity: 0;
  background: #fff9d9;
  box-shadow: 0 0 8px #fff, 0 0 17px 3px #70dfff;
}
.gate-seal {
  position: absolute;
  top: 57%;
  left: 50%;
  width: clamp(5rem, 26vmin, 10rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  filter: drop-shadow(0 6px 5px #251906b0);
}
.gate-seal img { display: block; width: 100%; height: 100%; }
.gate-seal::after {
  content: '';
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  box-shadow: 0 0 10px #70dfff, inset 0 0 8px #fff4cc;
  opacity: 0;
}
.gate-mist {
  position: absolute;
  inset: auto -23% -9%;
  height: min(47vh, 25rem);
  opacity: 0;
  background: url('./assets/empire/brume.webp') center bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.intro-name {
  position: absolute;
  left: 50%;
  top: var(--name-top);
  width: var(--name-width);
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 6px #35240c);
}
@media (min-width: 740px) {
  :root { --name-width: min(50vw, 34rem); }
  .monument { width: min(36svh, 22rem); }
  .city { object-position: center 51%; }
}
@media (max-height: 495px) and (orientation: landscape) {
  :root { --name-top: .8rem; --name-width: min(42vw, 18rem); }
  .monument { width: 8rem; }
  .hours-plaque { padding-block: .6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
  #intro.playing .left { animation: swing-left 1.42s .64s cubic-bezier(.55,0,.21,1) both; }
  #intro.playing .right { animation: swing-right 1.42s .64s cubic-bezier(.55,0,.21,1) both; }
  #intro.playing .gate-seal { animation: unseal .98s .23s ease-in both; }
  #intro.playing .gate-seal::after { animation: seal-light .75s .12s ease-out both; }
  #intro.playing .joint-light { animation: seam 1.12s .13s ease-out both; }
  #intro.playing .gate-mist { animation: mist-clears 2.48s ease-in-out both; }
  #intro.playing .intro-name { animation: lift-title .78s .43s ease-in both; }
  #intro.playing ~ main .arch { animation: cross-threshold 1.35s .95s cubic-bezier(.2,.7,.2,1) both; }
  #intro.playing ~ main .conor { animation: settle-medal 1.18s 1.16s ease-out both; }
  .arrived > h2 { animation: inscribe .6s ease-out both; }
  @keyframes swing-left {
    to { transform: translateX(-26%) rotateY(-85deg); }
  }
  @keyframes swing-right {
    to { transform: translateX(26%) rotateY(85deg); }
  }
  @keyframes unseal {
    35% { transform: scale(1.1); opacity: 1; }
    to { transform: scale(1.32) rotateY(74deg); opacity: 0; }
  }
  @keyframes seal-light { 45% { opacity: .8; } }
  @keyframes seam {
    from { opacity: 0; transform: scaleY(.04); }
    48% { opacity: .95; transform: scaleY(.86); }
    to { opacity: 0; transform: scaleY(1); }
  }
  @keyframes lift-title {
    to { opacity: 0; transform: translate(-50%, -12%) scale(1.09); }
  }
  @keyframes mist-clears {
    0%, 25% { opacity: 0; transform: translateY(12%) scale(.92); }
    58% { opacity: .83; }
    100% { opacity: 0; transform: translateY(-21%) scale(1.22); }
  }
  @keyframes cross-threshold { from { transform: translateY(6%) scale(.9); } }
  @keyframes settle-medal { from { opacity: .35; transform: translateY(6%) rotateY(-30deg) scale(.91); } }
  @keyframes inscribe { from { opacity: .55; transform: translateY(6px); } }
}

