@font-face {
  font-family: UnifrakturMaguntia;
  src: url('assets/unifrakturmaguntia.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #11090e;
  --wine: #4a1423;
  --rose: #f1a4c1;
  --violet: #c7a0f8;
  --ink: #fbebeb;
  --dust: #dec3ce;
  --thread: #904d65;
  --mono: ui-monospace, 'Courier New', monospace;
  --gothic: UnifrakturMaguntia, Georgia, serif;
  --checker: 102px;
  --page-width: min(calc(100% - 4.5rem), 72rem);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--black);
  background-image:
    radial-gradient(ellipse at 50% 38%, #10060ba0 5%, transparent 68%),
    linear-gradient(180deg, #0b060835, transparent 58%, #11050bd9),
    conic-gradient(from 90deg, var(--wine) 25%, var(--black) 0 50%, var(--wine) 0 75%, var(--black) 0);
  background-size: auto, auto, var(--checker) var(--checker);
  font-family: Georgia, serif;
}
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.glyph { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 10; top: 1rem; left: 1rem; transform: translateY(-200%); padding: .85rem 1rem; color: #200c16; background: var(--rose); }
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
.frame { position: relative; isolation: isolate; }
.frame::before, .frame::after {
  content: '';
  position: absolute;
  z-index: 1;
  width: var(--corner, 5.6rem);
  aspect-ratio: 1;
  pointer-events: none;
  background: url('assets/arabesco.svg') center / contain no-repeat;
}
.frame::before { left: var(--corner-inset, .36rem); top: var(--corner-inset, .36rem); }
.frame::after { right: var(--corner-inset, .36rem); bottom: var(--corner-inset, .36rem); transform: rotate(180deg); }
.mast {
  border-bottom: 1px solid #7c3d51;
  background: linear-gradient(#140910dc, #210b15e8), url('assets/renda.svg') center / 80px;
}
.mast-inner {
  display: flex;
  align-items: center;
  width: var(--page-width);
  min-height: 3.65rem;
  margin-inline: auto;
  gap: clamp(.9rem, 2vw, 1.65rem);
}
.brand { display: grid; place-items: center; min-width: 2.35rem; height: 2.35rem; border: 1px solid #754055; border-radius: 50%; background: #200d1d; box-shadow: 0 0 0 3px #331321; }
.brand img { display: block; filter: drop-shadow(0 0 6px #b953b575); }
.mast-trim { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; color: #d380a1; }
.mast-trim::before, .mast-trim::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, #66314349, #98566c); }
.mast-trim::after { transform: scaleX(-1); }
.mast-trim .glyph { width: .78rem; height: .78rem; }
.age {
  display: flex;
  align-items: center;
  gap: .59rem;
  padding: .46rem .67rem;
  white-space: nowrap;
  border: 1px solid #a25570;
  outline: 1px solid #522839;
  outline-offset: 2px;
  color: var(--rose);
  font: 700 .7rem/1 var(--mono);
  letter-spacing: .12em;
  background: #130910;
}
.age span { color: var(--dust); font-size: .57rem; }
.motion-control {
  display: flex;
  align-items: center;
  gap: .46rem;
  min-height: 44px;
  white-space: nowrap;
  color: var(--dust);
  font: .66rem/1.3 var(--mono);
  cursor: pointer;
}
.motion-control input { appearance: none; flex: 0 0 auto; display: grid; place-items: center; width: 1rem; height: 1rem; margin: 0; border: 1px solid #d78aa7; border-radius: 2px; background: #130910; cursor: pointer; }
.motion-control input:checked::after { content: ''; width: .5rem; height: .5rem; background: var(--rose); }
.folio {
  --corner: clamp(3.3rem, 7.5vw, 6.5rem);
  width: var(--page-width);
  margin: clamp(.85rem, 2.8vh, 1.75rem) auto 0;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4.5vw, 4.75rem);
  padding: clamp(2.5rem, 4.6vw, 4.25rem) clamp(2rem, 5vw, 4.6rem);
  border: 1px solid var(--thread);
  box-shadow: inset 0 0 0 6px #190c147f, inset 0 0 0 7px #a454714c, 0 14px 38px #0b050cb3;
  background:
    radial-gradient(ellipse at 22% 36%, #18090fdc 4%, #1c0a12a1 37%, transparent 78%),
    linear-gradient(140deg, #190b15b0, #280d1bcc 68%, #4718276b),
    url('assets/renda.svg') 50% 34% / 108px repeat,
    #1b0b14;
}
.intro { min-width: 0; position: relative; isolation: isolate; }
.window {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -2.1rem -2rem -2.1rem -1rem;
  background: url('assets/vitral.svg') center center / auto 122% no-repeat;
  filter: sepia(.85) saturate(1.7) hue-rotate(292deg);
  opacity: .25;
  mask-image: radial-gradient(ellipse, #000 30%, transparent 72%);
}
.chapter {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.15rem;
  font: 700 .65rem/1.3 var(--mono);
  letter-spacing: .19em;
  color: #e4b9e7;
}
.chapter .glyph { width: .74rem; height: .74rem; color: var(--violet); }
h1 { margin: 0; font: 400 clamp(3.65rem, 7.1vw, 6.15rem)/.93 var(--gothic); letter-spacing: -.027em; }
h1 span { display: block; }
h1 .last {
  margin-top: .13em;
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-style: normal;
  font-weight: 700;
  font-size: .76em;
  line-height: 1.06;
  letter-spacing: -.061em;
  color: var(--rose);
  text-shadow: 0 2px #511b35, 0 0 27px #d85a943d;
}
.flourish { display: flex; align-items: center; gap: .65rem; width: min(100%, 16rem); margin-top: 1.1rem; color: #dc8da6; }
.flourish::before, .flourish::after { content: ''; flex: 1; height: 5px; border-block: 1px solid #a3576d; mask-image: linear-gradient(90deg, transparent, #000 42%); }
.flourish::after { transform: scaleX(-1); }
.flourish .glyph { width: 1.45rem; height: 1.45rem; }
.links { min-width: 0; }
.links-heading { display: flex; align-items: center; gap: .68rem; color: var(--rose); }
.links-heading h2 { margin: 0; flex: 0 0 auto; color: var(--dust); font: 700 .69rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.links-heading::after { content: ''; order: 1; flex: 1; height: 3px; border-block: 1px solid #86435f; mask-image: linear-gradient(90deg, #000, #0005); }
.links-heading .glyph { order: 2; width: .75rem; height: .75rem; }
.links ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; list-style: none; padding: 0; margin: .72rem 0 0; }
.link-card {
  --corner: 1.55rem;
  --corner-inset: 0px;
  display: grid;
  grid-template-columns: var(--icon-size, 2.55rem) minmax(0, 1fr) .77rem;
  align-items: center;
  gap: .55rem;
  min-height: 4.22rem;
  height: 100%;
  padding: .6rem .66rem;
  border: 1px solid #8b4c65;
  box-shadow: inset 0 0 0 3px #1b0b15, inset 0 0 0 4px #79395266;
  background: linear-gradient(115deg, #2f1222dd, #1d0c16f6 51%, #1b0d17e0), url('assets/renda.svg') center / 82px;
  color: var(--ink);
  text-decoration: none;
}
.link-card::before, .link-card::after { opacity: .74; }
.link-card.special { border-color: #c36e91; background-color: #65203e; background-image: linear-gradient(107deg, #4a1834be, #2d0e23c7), url('assets/renda.svg'); }
.link-card img { display: block; width: var(--icon-size, 2.55rem); height: var(--icon-size, 2.55rem); }
.link-copy { display: grid; gap: .25rem; min-width: 0; }
.link-name { display: block; font-size: 1rem; line-height: 1.1; }
.link-description { display: block; color: var(--dust); font: .72rem/1.32 system-ui, sans-serif; overflow-wrap: break-word; }
.link-card .link-arrow { width: .77rem; height: .77rem; color: #dd9dbc; }
.link-card:is(:hover, :focus-visible) { border-color: var(--rose); background-color: #6a2a46; background-image: linear-gradient(95deg, #57213bb0, #281021cb), url('assets/renda.svg'); }
.link-card:is(:hover, :focus-visible)::before, .link-card:is(:hover, :focus-visible)::after { opacity: 1; }
.link-card:is(:hover, :focus-visible) .link-name { text-decoration: underline; text-underline-offset: .16em; }
.link-card:focus-visible { z-index: 2; outline-offset: 1px; }
.ornament { position: absolute; pointer-events: none; width: .65rem; height: .65rem; color: #d289a7; }
.ornament-first { top: .95rem; right: 1.1rem; animation-delay: -2s; }
.ornament-second { bottom: .95rem; left: 1.1rem; animation-delay: -4s; }
.footer {
  --corner: clamp(3.3rem, 7.5vw, 6.5rem);
  width: var(--page-width);
  margin: .6rem auto 1.5rem;
  border: 1px solid #945469;
  box-shadow: inset 0 0 0 5px #10091070, inset 0 0 0 6px #9e536947, 0 15px 35px #0b050caa;
  background:
    radial-gradient(ellipse at 47% 59%, #2e1020c2, #100810ea 75%),
    url('assets/renda.svg') center / 112px repeat, #150b12;
}
.footer::after { bottom: 3.05rem; }
.scene { display: grid; justify-items: center; align-items: end; position: relative; isolation: isolate; margin: 0; padding-block: .75rem 1.2rem; }
.scene-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 47% 45% at 48% 66%, #641f48b3, transparent), radial-gradient(ellipse 35% 35% at 50% 90%, #a03a4c6e, transparent);
}
.portrait {
  z-index: 0;
  display: block;
  position: relative;
  width: min(94%, 35rem);
  height: auto;
  aspect-ratio: 1140 / 645;
  filter: drop-shadow(0 12px 11px #09030bb8);
}
.altar-edge {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: auto 1px 0;
  height: 2.15rem;
  background: url('assets/barrado-renda.svg') center top / 91px 34px repeat-x;
  filter: drop-shadow(0 -2px 5px #19081599);
}
.spark, .heart-charm, .creature { position: absolute; pointer-events: none; color: #e29cbc; }
.spark { width: .8rem; height: .8rem; }
.spark-a { top: 18%; left: 29%; animation-delay: -1.1s; }
.spark-b { top: 21%; right: 26%; width: .68rem; height: .68rem; color: var(--violet); animation-delay: -4.4s; }
.spark-c { bottom: 24%; right: 18%; width: .57rem; height: .57rem; animation-delay: -2.5s; }
.heart-charm { top: 36%; right: 12.5%; width: 2.6rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #b26b8e; background: #270f22; box-shadow: 0 0 0 4px #1b0b17, 0 0 0 5px #974866a8; border-radius: 50%; transform-origin: center -.7rem; }
.heart-charm .glyph { width: 1.35rem; height: 1.35rem; }
.creature { top: 51%; left: 13%; width: 2.9rem; height: 1.45rem; color: #af72ae; opacity: .68; }
.colophon { min-height: 2.9rem; display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.2rem; gap: .65rem; color: var(--dust); background: linear-gradient(90deg, #1c0d18d0, #100910b0, #1c0d18d0); font: 700 .6rem/1.35 var(--mono); letter-spacing: .13em; }
.colophon .glyph { width: .86rem; height: .86rem; color: var(--rose); }
@media (prefers-reduced-motion: no-preference) {
  .twinkle { animation-name: twinkle; animation-duration: 5.8s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
  .sway { animation: sway 6.7s ease-in-out infinite; }
  .fly { animation: fly 7.8s ease-in-out infinite; }
  .sigil { animation: sigil 8.5s ease-in-out infinite; }
  .link-card img, .link-arrow { transition: transform 200ms ease-out; }
  .link-card:is(:hover, :focus-visible) img { transform: translateY(-2px) rotate(-5deg); }
  .link-card:is(:hover, :focus-visible) .link-arrow { transform: translate(2px, -2px); }
  body:has(#pause-effects:checked) .effect { animation-play-state: paused; }
  body:has(#pause-effects:checked) .link-card :is(img, .link-arrow) { transition: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .motion-control { display: none; } }
@keyframes twinkle { 0%,100% { opacity: .56; transform: scale(.88); } 49% { opacity: 1; transform: scale(1.24); } }
@keyframes sway { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@keyframes fly { 0%,100% { transform: translate(0,0) rotate(-7deg) scaleY(1); } 39% { transform: translate(.75rem,-.37rem) rotate(2deg) scaleY(.76); } 64% { transform: translate(.38rem,-.56rem) rotate(9deg) scaleY(1); } }
@keyframes sigil { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(7deg); } }
@media (min-width: 811px) and (max-width: 1040px) {
  .folio { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1.7rem; padding-inline: 1.85rem; }
  .link-card { --icon-size: 2.15rem; grid-template-columns: var(--icon-size) minmax(0, 1fr); gap: .4rem; }
  .link-card .link-arrow { display: none; }
}
@media (max-width: 810px) {
  :root { --page-width: min(calc(100% - 1.35rem), 38rem); --checker: 76px; }
  .mast-inner { min-height: 3.35rem; }
  .folio { grid-template-columns: minmax(0,1fr); gap: 1.35rem; padding: 1.7rem clamp(.85rem, 4.2vw, 2.2rem) 1.35rem; }
  .intro { text-align: center; }
  .chapter { justify-content: center; margin-bottom: .8rem; font-size: .6rem; letter-spacing: .14em; }
  h1 { font-size: clamp(3.45rem, 13vw, 5.4rem); }
  .flourish { margin: .7rem auto 0; }
  .window { inset: -1.3rem 0 -1.8rem; }
  .links { width: min(100%, 32rem); margin-inline: auto; }
  .footer { margin-top: .55rem; }
  .scene { padding-top: .6rem; padding-bottom: 1rem; }
  .altar-edge { height: 1.8rem; background-size: 75px 28px; }
  .heart-charm { width: 2.1rem; right: 9.5%; }
  .creature { top: 54%; left: 8%; width: 2.25rem; }
  .colophon { min-height: 2.4rem; }
}
@media (max-width: 520px) {
  .mast-inner { gap: .75rem; padding-inline: .1rem; }
  .mast-trim { gap: .25rem; }
  .age span { display: none; }
  .age { padding: .4rem .49rem; }
  .motion-control { font-size: .63rem; }
  .links ul { gap: .42rem; }
  .link-card { --icon-size: 2.15rem; grid-template-columns: var(--icon-size) minmax(0,1fr); min-height: 3.75rem; padding: .48rem .47rem; gap: .3rem; }
  .link-card .link-arrow { display: none; }
  .link-name { font-size: .91rem; }
  .link-description { font-size: .67rem; }
  .heart-charm { top: 28%; right: 9%; width: 1.72rem; }
  .heart-charm .glyph { width: 1rem; height: 1rem; }
  .creature { top: 64%; left: 5.4%; width: 1.83rem; }
  .spark-a { top: 13%; left: 46%; }
  .spark-b { top: 17%; right: 15.5%; }
  .spark-c { bottom: 28%; right: 8%; }
  .colophon { padding-inline: .72rem; font-size: .56rem; }
}
@media (max-width: 355px) {
  .link-card { --icon-size: 1.85rem; padding-inline: .38rem; }
  .link-name { font-size: .86rem; }
  .link-description { font-size: .65rem; }
}
